diff options
author | Philipp Gesang <megas.kapaneus@gmail.com> | 2011-08-28 16:38:19 +0200 |
---|---|---|
committer | Philipp Gesang <megas.kapaneus@gmail.com> | 2011-08-28 16:38:19 +0200 |
commit | a8eacee630c8c2f17e267f2b94feb1c7e052db94 (patch) | |
tree | baeb7d96f6f09c02099cff6751da283eb58c535d /mod/doc | |
parent | b01ed84fbebae5c219d3d621c5d2fff67a59f905 (diff) | |
download | context-rst-a8eacee630c8c2f17e267f2b94feb1c7e052db94.tar.gz |
updated manual
Diffstat (limited to 'mod/doc')
-rw-r--r-- | mod/doc/context/third/rst/documentation.rst | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/mod/doc/context/third/rst/documentation.rst b/mod/doc/context/third/rst/documentation.rst index c5f83c3..90168a3 100644 --- a/mod/doc/context/third/rst/documentation.rst +++ b/mod/doc/context/third/rst/documentation.rst @@ -140,8 +140,8 @@ output of |rstcontext| as starting point. However, using the module may have advantages when testing. There is a usage example in ``moduletest.tex``, introducing the macro -``\typesetRSTfile``. Another example in ``hybridtest.tex`` -demonstrates the |CONTEXT| command ``\RST`` as well as the +``\\typesetRSTfile``. Another example in ``hybridtest.tex`` +demonstrates the |CONTEXT| command ``\\RST`` as well as the corresponding environment. To install the module simply copy the files into your local |TEX| @@ -153,6 +153,40 @@ issue the following line: :: Then rebuild the filename database running ``context --generate``. The module should be ready for use now. +RST projects +************ + +In addition to the simple command ``\\typesetRSTfile`` the module +also provides means for handling multiple |rst| input files. This +is achieved by so-called *inclusions*. An inclusion has to be +defined first, using the macro ``\\defineRSTinclusion``, which +receives up to three arguments in brackets. The first one +specifies the *identifier* by which the inclusion will be +referred to afterwards (cf. |CONTEXT|’s ``\\useURL`` command). The +second argument, which is mandatory as well, takes the file to be +associated with an inclusion. Finally, optional setups can be +passed to the parser via the third argument (cf. the section on +`Tabs`_). E.g.: :: + + \usemodule[rst] + \defineRSTinclusion [first][inc-first.rst] + \defineRSTinclusion[second][inc-second.rst][expandtab=true,shiftwidth=8] + \defineRSTinclusion [third][inc-third.rst] + +Those inclusions are afterwards accessible *within* the +``\\[start|stop]project`` environment, and can be dereferenced by +``\\RSTinclusion``, which takes the identifier as a single +argument in brackets: :: + + \startRSTproject + \RSTinclusion [first] + \RSTinclusion[second] + \RSTinclusion [third] + \stopRSTproject + +Within the project environment, |rstcontext| allows for arbitrary +|CONTEXT| markup. + ========= Examples ========= |