diff options
-rw-r--r-- | mod/tex/context/third/rst/rst_context.lua | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/mod/tex/context/third/rst/rst_context.lua b/mod/tex/context/third/rst/rst_context.lua index 1ce25f0..adc2c64 100644 --- a/mod/tex/context/third/rst/rst_context.lua +++ b/mod/tex/context/third/rst/rst_context.lua @@ -169,7 +169,9 @@ rst_context.roles.color = function(color, str) return fmt([[\\colored[%s]{%s}]], definition, str) end +-------------------------------------------------------------------------------- --- Inofficial text roles for my private bib +-------------------------------------------------------------------------------- -- Afterthought: -- Different citation commands are essentially typographical instructions: @@ -230,7 +232,22 @@ function rst_context.roles.nocite(str) -- nocite return [[\\nocite[]] .. str .. [=[]]=] end +-------------------------------------------------------------------------------- --- End citator roles +-------------------------------------------------------------------------------- + +-------------------------------------------------------------------------------- +--- Experimental roles. +-------------------------------------------------------------------------------- + +--- Feature request by Philipp A. +function rst_context.roles.math(str) + return [[\\mathematics{]] .. str .. [[}]] +end + +-------------------------------------------------------------------------------- +--- End roles +-------------------------------------------------------------------------------- function rst_context.interpreted_text (...) local tab = { ... } @@ -349,7 +366,8 @@ do skip1 = P"\\starttyping" * (1 - P"\\stoptyping")^1, balanced = P"{" * (V"balanced" + (1 - P"}"))^0 * P"}", skip2 = P"\\type" * V"balanced", - skip = V"skip1" + V"skip2", + skip3 = P"\\mathematics" * V"balanced", + skip = V"skip1" + V"skip2" + V"skip3", --literal = Cs(P"\\" / "") * 1 } |