diff options
author | Hans Hagen <pragma@wxs.nl> | 2020-04-26 20:17:14 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2020-04-26 20:17:14 +0200 |
commit | 1b8f320120195d4a8a523c4bdba45d811bd81048 (patch) | |
tree | 6de94017bc7b267a983b934d4da5c4c207d0cbbc /tex/context/base/mkiv/math-frc.lua | |
parent | 3c25716e01b7251f0f7504481692421a729e4b53 (diff) | |
download | context-1b8f320120195d4a8a523c4bdba45d811bd81048.tar.gz |
2020-04-26 19:56:00
Diffstat (limited to 'tex/context/base/mkiv/math-frc.lua')
-rw-r--r-- | tex/context/base/mkiv/math-frc.lua | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tex/context/base/mkiv/math-frc.lua b/tex/context/base/mkiv/math-frc.lua index 190c36410..af30a03b5 100644 --- a/tex/context/base/mkiv/math-frc.lua +++ b/tex/context/base/mkiv/math-frc.lua @@ -55,3 +55,40 @@ interfaces.implement { actions = mathfraction, arguments = { "string", "number", "number", "dimen" } } + +-- experimental code in lmtx + +if CONTEXTLMTXMODE > 0 then + + local ctx_normalUatop = context.normalUatop + local ctx_normalUover = context.normalUover + + local function umathfraction(how,left,right,width) + if how == v_no then + if left == 0x002E and right == 0x002E then + ctx_normalUatop() + else + context("\\Uatopwithdelims%s%s",resolved[left],resolved[right]) + end + elseif how == v_yes then + if left == 0x002E and right == 0x002E then + context("\\normalUabove%ssp",width) + else + context("\\Uabovewithdelims%s%s%ssp",resolved[left],resolved[right],width) + end + else -- v_auto + if left == 0x002E and right == 0x002E then + ctx_normalUover() + else + context("\\Uoverwithdelims%s%s",resolved[left],resolved[right]) + end + end + end + + interfaces.implement { + name = "umathfraction", + actions = umathfraction, + arguments = { "string", "number", "number", "dimen" } + } + +end |