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 | |
parent | b01ed84fbebae5c219d3d621c5d2fff67a59f905 (diff) | |
download | context-rst-a8eacee630c8c2f17e267f2b94feb1c7e052db94.tar.gz |
updated manual
Diffstat (limited to 'mod')
-rw-r--r-- | mod/doc/context/third/rst/documentation.rst | 38 | ||||
-rw-r--r-- | mod/tex/context/third/rst/rst_parser.lua | 2 |
2 files changed, 37 insertions, 3 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 ========= diff --git a/mod/tex/context/third/rst/rst_parser.lua b/mod/tex/context/third/rst/rst_parser.lua index 5bdc89d..ab391b1 100644 --- a/mod/tex/context/third/rst/rst_parser.lua +++ b/mod/tex/context/third/rst/rst_parser.lua @@ -1477,7 +1477,7 @@ function thirddata.rst.standalone (infile, outfile) if testdata == 1 then return 1 end local processeddata = parser:match(testdata) - local setups = get_setups() + local setups = get_setups(false) processeddata = setups .. processeddata .. [[ |