summaryrefslogtreecommitdiff
path: root/mod/doc/context/third
diff options
context:
space:
mode:
Diffstat (limited to 'mod/doc/context/third')
-rw-r--r--mod/doc/context/third/rst/documentation.rst38
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
=========