summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/math-frc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/context/base/math-frc.lua')
-rw-r--r--Master/texmf-dist/tex/context/base/math-frc.lua18
1 files changed, 12 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/context/base/math-frc.lua b/Master/texmf-dist/tex/context/base/math-frc.lua
index 4f531a5307a..639edc94ba3 100644
--- a/Master/texmf-dist/tex/context/base/math-frc.lua
+++ b/Master/texmf-dist/tex/context/base/math-frc.lua
@@ -25,13 +25,13 @@ table.setmetatableindex(resolved, function(t,k)
return v
end)
-local normalatop = context.normalatop
-local normalover = context.normalover
+local ctx_normalatop = context.normalatop
+local ctx_normalover = context.normalover
-function commands.math_frac(how,left,right,width)
- if how == v_no then
+local function mathfraction(how,left,right,width) -- of course we could use the scanners directly here which
+ if how == v_no then -- is faster but also less abstract ... maybe some day
if left == 0x002E and right == 0x002E then
- normalatop()
+ ctx_normalatop()
else
context("\\atopwithdelims%s%s",resolved[left],resolved[right])
end
@@ -43,9 +43,15 @@ function commands.math_frac(how,left,right,width)
end
else -- v_auto
if left == 0x002E and right == 0x002E then
- normalover()
+ ctx_normalover()
else
context("\\overwithdelims%s%s",resolved[left],resolved[right])
end
end
end
+
+interfaces.implement {
+ name = "mathfraction",
+ actions = mathfraction,
+ arguments = { "string", "number", "number", "dimen" }
+}