diff options
author | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-05-16 00:15:04 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2015-05-16 00:15:04 +0200 |
commit | b55577d0998160c0174e250b542016ecd6ca9056 (patch) | |
tree | 27093212d5ca3e6ffe4ae434c3ec094233ed37ba /tex/context/base/math-frc.lua | |
parent | 624cbb5da392e9403984dd1cf368c0d408b1c2a8 (diff) | |
download | context-b55577d0998160c0174e250b542016ecd6ca9056.tar.gz |
2015-05-15 23:06:00
Diffstat (limited to 'tex/context/base/math-frc.lua')
-rw-r--r-- | tex/context/base/math-frc.lua | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tex/context/base/math-frc.lua b/tex/context/base/math-frc.lua index 4f531a530..639edc94b 100644 --- a/tex/context/base/math-frc.lua +++ b/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" } +} |