summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/tex/context/third/rst/rst_directives.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/mod/tex/context/third/rst/rst_directives.lua b/mod/tex/context/third/rst/rst_directives.lua
index 3bc4166..96eaf59 100644
--- a/mod/tex/context/third/rst/rst_directives.lua
+++ b/mod/tex/context/third/rst/rst_directives.lua
@@ -253,6 +253,34 @@ rst_directives.lua = function(name, data)
return luacode
end
+--------------------------------------------------------------------------------
+--- Experimental math directive
+--------------------------------------------------------------------------------
+
+rst_directives.math = function (name, data)
+ data = data or name
+ local formula
+ if type(data) == "table" then
+ local last, i = table.maxn(data), 1
+ while i <= last do
+ local line = stringstrip(data[i])
+ if line and line ~= "" then
+ formula = formula and formula .. " " .. line or line
+ end
+ i = i + 1
+ end
+ end
+ return fmt([[
+\startformula
+%s
+\stopformula
+]], formula)
+end
+
+--------------------------------------------------------------------------------
+--- End math directive
+--------------------------------------------------------------------------------
+
rst_directives.replace = function(name, data)
return fmt([[