diff options
Diffstat (limited to 'mod/tex/context/third/rst/t-rst.mkiv')
-rw-r--r-- | mod/tex/context/third/rst/t-rst.mkiv | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/mod/tex/context/third/rst/t-rst.mkiv b/mod/tex/context/third/rst/t-rst.mkiv index bb727b0..7971e3f 100644 --- a/mod/tex/context/third/rst/t-rst.mkiv +++ b/mod/tex/context/third/rst/t-rst.mkiv @@ -122,7 +122,7 @@ %D %D \showsetup{typesetRSTfile} -\def\do_typesetRSTfile[#1]#2{% +\def\do_typeset_RST_file[#1]#2{% \iffirstargument \getparameters[RST][#1]% \doifdefined{RSTstripBOM} {\ctxlua{thirddata.rst.strip_BOM = \RSTstripBOM}}% @@ -133,7 +133,7 @@ } \def\typesetRSTfile{% - \dosingleempty\do_typesetRSTfile% + \dosingleempty\do_typeset_RST_file% } %D \subsection{Typesetting Inline Snippets} @@ -178,6 +178,37 @@ \ctxlua{thirddata.rst.do_rst_snippet(\!!bs#1\!!es)}% } +\def\do_define_RST_inclusion[#1][#2]{% + \ifsecondargument + \ctxlua{thirddata.rst.do_rst_inclusion("#1", "#2")}% + \fi% +} + +\def\defineRSTinclusion{% + \dodoubleempty\do_define_RST_inclusion% +} + +\def\do_RST_inclusion[#1]{% + \iffirstargument + \ctxlua{thirddata.rst.get_rst_inclusion("#1")}% + \fi% +} + +\def\do_RST_setups{% + \ctxlua{thirddata.rst.do_rst_setups()}% +} + +\def\startRSTproject{ + \begingroup + \def\RSTinclusion{\dosingleempty\do_RST_inclusion} + \do_RST_setups + \starttext% +} + +\def\stopRSTproject{ + \stoptext \endgroup \endinput +} + \protect \endinput % vim:ft=context:sw=2:ts=2 |