diff options
author | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2011-09-01 09:48:36 +0200 |
---|---|---|
committer | Philipp Gesang <pgesang@ix.urz.uni-heidelberg.de> | 2011-09-01 09:48:36 +0200 |
commit | 97808eec2f8c35daacdd398fae71458fd22846dd (patch) | |
tree | a148e5cd255a9e480e3d5c1606f66ec9367e0cf4 /mod | |
parent | f7c796518ed2128fe334576b4fb1f5509dd36007 (diff) | |
download | context-rst-97808eec2f8c35daacdd398fae71458fd22846dd.tar.gz |
preliminary math role && escaping exception
Diffstat (limited to 'mod')
-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 } |