From f6e7648f6126ffe087071531f03c674be32930f1 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 20 Aug 2019 19:19:52 +0200 Subject: 2019-08-20 17:28:00 --- tex/context/base/mkiv/math-tag.lua | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'tex/context/base/mkiv/math-tag.lua') diff --git a/tex/context/base/mkiv/math-tag.lua b/tex/context/base/mkiv/math-tag.lua index b758c1ff5..d7aa37a5b 100644 --- a/tex/context/base/mkiv/math-tag.lua +++ b/tex/context/base/mkiv/math-tag.lua @@ -58,11 +58,16 @@ local choice_code = nodecodes.choice -- attr display text script s local fence_code = nodecodes.fence -- attr subtype local accentcodes = nodes.accentcodes +local fencecodes = nodes.fencecodes local fixedtopaccent_code = accentcodes.fixedtop local fixedbottomaccent_code = accentcodes.fixedbottom local fixedbothaccent_code = accentcodes.fixedboth +local leftfence_code = fencecodes.left +local middlefence_code = fencecodes.middle +local rightfence_code = fencecodes.right + local kerncodes = nodes.kerncodes local fontkern_code = kerncodes.fontkern @@ -450,16 +455,16 @@ process = function(start) -- we cannot use the processor as we have no finalizer process(scriptscript) end elseif id == fence_code then + local subtype = getsubtype(start) local delim = getfield(start,"delim") - local subtype = getfield(start,"subtype") - if subtype == 1 then + if subtype == leftfence_code then -- left local properties = { } insert(fencesstack,properties) setattr(start,a_tagged,start_tagged("mfenced",properties)) -- needs checking if delim then start_tagged("ignore") - local chr = getfield(delim,"small_char") + local chr = getchar(delim) if chr ~= 0 then properties.left = chr end @@ -467,12 +472,12 @@ process = function(start) -- we cannot use the processor as we have no finalizer stop_tagged() end start_tagged("mrow") -- begin of subsequence - elseif subtype == 2 then + elseif subtype == middlefence_code then -- middle if delim then start_tagged("ignore") local top = fencesstack[#fencesstack] - local chr = getfield(delim,"small_char") + local chr = getchar(delim) if chr ~= 0 then local mid = top.middle if mid then @@ -486,7 +491,7 @@ process = function(start) -- we cannot use the processor as we have no finalizer end stop_tagged() -- end of subsequence start_tagged("mrow") -- begin of subsequence - elseif subtype == 3 then + elseif subtype == rightfence_code then local properties = remove(fencesstack) if not properties then report_tags("missing right fence") @@ -494,7 +499,7 @@ process = function(start) -- we cannot use the processor as we have no finalizer end if delim then start_tagged("ignore") - local chr = getfield(delim,"small_char") + local chr = getchar(delim) if chr ~= 0 then properties.right = chr end @@ -525,9 +530,9 @@ process = function(start) -- we cannot use the processor as we have no finalizer stop_tagged() end elseif id == accent_code then + local subtype = getsubtype(start) local accent = getfield(start,"accent") local bot_accent = getfield(start,"bot_accent") - local subtype = getsubtype(start) if bot_accent then if accent then setattr(start,a_tagged,start_tagged("munderover", { -- cgit v1.2.3