summaryrefslogtreecommitdiff
path: root/tex/context/base/mkxl/math-ali.lmt
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkxl/math-ali.lmt')
-rw-r--r--tex/context/base/mkxl/math-ali.lmt17
1 files changed, 17 insertions, 0 deletions
diff --git a/tex/context/base/mkxl/math-ali.lmt b/tex/context/base/mkxl/math-ali.lmt
index a84d5a4c4..718975a50 100644
--- a/tex/context/base/mkxl/math-ali.lmt
+++ b/tex/context/base/mkxl/math-ali.lmt
@@ -82,3 +82,20 @@ function mathematics.registersimplematrix(name,action)
useractions[name] = action
end
end
+
+-- \cases{1, x>0 ; -1, x<0 }
+
+interfaces.implement {
+ name = "simplecases",
+ arguments = "2 strings",
+ actions = function(method,data)
+ -- no methods yet
+ local m = lpegmatch(rows,(gsub(data,"%s+"," ")))
+ for i=1,#m do
+ m[i] = lpegmatch(cols,m[i])
+ end
+ for i=1,#m do
+ context("\\NC %{ \\NC }t \\NR",m[i])
+ end
+ end
+}