diff options
author | Hans Hagen <pragma@wxs.nl> | 2017-03-23 18:35:01 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2017-03-23 18:35:01 +0100 |
commit | 576286d4c1349c644bea833c99ec5364668ffc8a (patch) | |
tree | ddaa0e3880a084eb52cf0cc9658d5e2d59377392 /tex/context/base/mkiv/math-noa.lua | |
parent | 1987348696a38821137cc579a986d37086b87404 (diff) | |
download | context-576286d4c1349c644bea833c99ec5364668ffc8a.tar.gz |
2017-03-23 17:26:00
Diffstat (limited to 'tex/context/base/mkiv/math-noa.lua')
-rw-r--r-- | tex/context/base/mkiv/math-noa.lua | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tex/context/base/mkiv/math-noa.lua b/tex/context/base/mkiv/math-noa.lua index e8918a978..3a45bb30d 100644 --- a/tex/context/base/mkiv/math-noa.lua +++ b/tex/context/base/mkiv/math-noa.lua @@ -186,6 +186,13 @@ local left_fence_code = fencecodes.left local middle_fence_code = fencecodes.middle local right_fence_code = fencecodes.right +-- local mathclasses = mathematics.classes +-- local fenceclasses = { +-- [left_fence_code] = mathclasses.open, +-- [middle_fence_code] = mathclasses.middle, +-- [right_fence_code] = mathclasses.close, +-- } + -- this initial stuff is tricky as we can have removed and new nodes with the same address -- the only way out is a free-per-page list of nodes (not bad anyway) @@ -711,6 +718,8 @@ function handlers.resize(head,style,penalties) return true end +-- still not perfect: + local a_autofence = privateattribute("mathautofence") local autofences = { } processors.autofences = autofences @@ -732,6 +741,7 @@ local function makefence(what,char) end setsubtype(f,what) setfield(f,"delim",d) + setfield(f,"class",-1) -- tex itself does this, so not fenceclasses[what] return f end @@ -831,20 +841,23 @@ local function processfences(pointer,n,parent) local open = remove(stack) if open then if trace_fences then - report_fences("%2i: handling %s, stack depth %i",n,"both",#stack) + report_fences("%2i: handling %s, stack depth %i",n,"both",#stack+1) end current = convert_both(open,current,middle) elseif current == start then -- skip else if trace_fences then - report_fences("%2i: handling %s, stack depth %i",n,"close",#stack) + report_fences("%2i: handling %s, stack depth %i",n,"close",#stack+1) end current = convert_close(current,initial,middle) if not parent then initial = current end end + if trace_fences then + report_fences("%2i: popping close from stack",n) + end elseif a == 3 then if trace_fences then report_fences("%2i: registering middle",n) |