diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-06 21:58:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-06 21:58:15 +0000 |
commit | 974640d66e61e81cb197ad96fdff7b08343e4c5a (patch) | |
tree | 2e1f75f32f312b7f24ba82b4590ae230bcd6f399 /Master/texmf-dist/tex/context/base/mkiv/math-noa.lua | |
parent | b4fa72e61230aca75f7f6fbf988821f71edfb6b2 (diff) |
context
git-svn-id: svn://tug.org/texlive/trunk@58167 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkiv/math-noa.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkiv/math-noa.lua | 51 |
1 files changed, 46 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua b/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua index f53410b18cd..1fb763a3b6c 100644 --- a/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua +++ b/Master/texmf-dist/tex/context/base/mkiv/math-noa.lua @@ -1,5 +1,6 @@ if not modules then modules = { } end modules ['math-noa'] = { version = 1.001, + optimize = true, comment = "companion to math-ini.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", @@ -124,10 +125,14 @@ local getdepth = nuts.getdepth local getnucleus = nuts.getnucleus local getsub = nuts.getsub local getsup = nuts.getsup +local getsubpre = nuts.getsubpre +local getsuppre = nuts.getsuppre local setnucleus = nuts.setnucleus local setsub = nuts.setsub local setsup = nuts.setsup +local setsubpre = nuts.setsubpre +local setsuppre = nuts.setsuppre local flush_node = nuts.flush local copy_node = nuts.copy @@ -198,7 +203,7 @@ local subbox_code = nodecodes.subbox -- attr list local submlist_code = nodecodes.submlist -- attr list local mathchar_code = nodecodes.mathchar -- attr fam char local mathtextchar_code = nodecodes.mathtextchar -- attr fam char -local delim_code = nodecodes.delim -- attr small_fam small_char large_fam large_char +local delimiter_code = nodecodes.delimiter -- attr small_fam small_char large_fam large_char ----- style_code = nodecodes.style -- attr style ----- parameter_code = nodecodes.parameter -- attr style local math_choice = nodecodes.choice -- attr display text script scriptscript @@ -273,7 +278,11 @@ local function process(start,what,n,parent) local noad = getnucleus(start) if noad then process(noad,what,n,start) end -- list noad = getsup (start) if noad then process(noad,what,n,start) end -- list noad = getsub (start) if noad then process(noad,what,n,start) end -- list - elseif id == mathchar_code or id == mathtextchar_code or id == delim_code then + if getsubpre then + noad = getsuppre (start) if noad then process(noad,what,n,start) end -- list + noad = getsubpre (start) if noad then process(noad,what,n,start) end -- list + end + elseif id == mathchar_code or id == mathtextchar_code or id == delimiter_code then break elseif id == subbox_code or id == submlist_code then local noad = getlist(start) if noad then process(noad,what,n,start) end -- list (not getlist !) @@ -293,12 +302,20 @@ local function process(start,what,n,parent) local noad = getnucleus(start) if noad then process(noad,what,n,start) end -- list noad = getsup (start) if noad then process(noad,what,n,start) end -- list noad = getsub (start) if noad then process(noad,what,n,start) end -- list + if getsubpre then + noad = getsuppre (start) if noad then process(noad,what,n,start) end -- list + noad = getsubpre (start) if noad then process(noad,what,n,start) end -- list + end noad = getfield(start,"left") if noad then process(noad,what,n,start) end -- delimiter noad = getfield(start,"degree") if noad then process(noad,what,n,start) end -- list elseif id == accent_code then local noad = getnucleus(start) if noad then process(noad,what,n,start) end -- list noad = getsup (start) if noad then process(noad,what,n,start) end -- list noad = getsub (start) if noad then process(noad,what,n,start) end -- list + if getsubpre then + noad = getsuppre (start) if noad then process(noad,what,n,start) end -- list + noad = getsubpre (start) if noad then process(noad,what,n,start) end -- list + end noad = getfield(start,"accent") if noad then process(noad,what,n,start) end -- list noad = getfield(start,"bot_accent") if noad then process(noad,what,n,start) end -- list -- elseif id == style_code then @@ -322,6 +339,10 @@ local function processnested(current,what,n) noad = getnucleus(current) if noad then process(noad,what,n,current) end -- list noad = getsup (current) if noad then process(noad,what,n,current) end -- list noad = getsub (current) if noad then process(noad,what,n,current) end -- list + if getsubpre then + noad = getsuppre (current) if noad then process(noad,what,n,current) end -- list + noad = getsubpre (current) if noad then process(noad,what,n,current) end -- list + end elseif id == subbox_code or id == submlist_code then noad = getlist(current) if noad then process(noad,what,n,current) end -- list (not getlist !) elseif id == fraction_code then @@ -340,12 +361,20 @@ local function processnested(current,what,n) noad = getnucleus(current) if noad then process(noad,what,n,current) end -- list noad = getsup (current) if noad then process(noad,what,n,current) end -- list noad = getsub (current) if noad then process(noad,what,n,current) end -- list + if getsubpre then + noad = getsuppre (current) if noad then process(noad,what,n,current) end -- list + noad = getsubpre (current) if noad then process(noad,what,n,current) end -- list + end noad = getfield(current,"left") if noad then process(noad,what,n,current) end -- delimiter noad = getfield(current,"degree") if noad then process(noad,what,n,current) end -- list elseif id == accent_code then noad = getnucleus(current) if noad then process(noad,what,n,current) end -- list noad = getsup (current) if noad then process(noad,what,n,current) end -- list noad = getsub (current) if noad then process(noad,what,n,current) end -- list + if getsubpre then + noad = getsuppre (current) if noad then process(noad,what,n,current) end -- list + noad = getsubpre (current) if noad then process(noad,what,n,current) end -- list + end noad = getfield(current,"accent") if noad then process(noad,what,n,current) end -- list noad = getfield(current,"bot_accent") if noad then process(noad,what,n,current) end -- list end @@ -358,6 +387,10 @@ local function processstep(current,process,n,id) noad = getnucleus(current) if noad then process(noad,n,current) end -- list noad = getsup (current) if noad then process(noad,n,current) end -- list noad = getsub (current) if noad then process(noad,n,current) end -- list + if getsubpre then + noad = getsuppre (current) if noad then process(noad,n,current) end -- list + noad = getsubpre (current) if noad then process(noad,n,current) end -- list + end elseif id == subbox_code or id == submlist_code then noad = getlist(current) if noad then process(noad,n,current) end -- list (not getlist !) elseif id == fraction_code then @@ -376,12 +409,20 @@ local function processstep(current,process,n,id) noad = getnucleus(current) if noad then process(noad,n,current) end -- list noad = getsup (current) if noad then process(noad,n,current) end -- list noad = getsub (current) if noad then process(noad,n,current) end -- list + if getsubpre then + noad = getsuppre (current) if noad then process(noad,n,current) end -- list + noad = getsubpre (current) if noad then process(noad,n,current) end -- list + end noad = getfield(current,"left") if noad then process(noad,n,current) end -- delimiter noad = getfield(current,"degree") if noad then process(noad,n,current) end -- list elseif id == accent_code then noad = getnucleus(current) if noad then process(noad,n,current) end -- list noad = getsup (current) if noad then process(noad,n,current) end -- list noad = getsub (current) if noad then process(noad,n,current) end -- list + if getsubpre then + noad = getsuppre (current) if noad then process(noad,n,current) end -- list + noad = getsubpre (current) if noad then process(noad,n,current) end -- list + end noad = getfield(current,"accent") if noad then process(noad,n,current) end -- list noad = getfield(current,"bot_accent") if noad then process(noad,n,current) end -- list end @@ -542,7 +583,7 @@ do end end end - families[delim_code] = function(pointer) + families[delimiter_code] = function(pointer) if getfield(pointer,"small_fam") == 0 then local a = getattr(pointer,a_mathfamily) if a and a > 0 then @@ -574,7 +615,7 @@ do -- will become: - -- families[delim_code] = function(pointer) + -- families[delimiter_code] = function(pointer) -- if getfam(pointer) == 0 then -- local a = getattr(pointer,a_mathfamily) -- if a and a > 0 then @@ -717,7 +758,7 @@ do end end - relocate[delim_code] = function(pointer) + relocate[delimiter_code] = function(pointer) if trace_analyzing then setnodecolor(pointer,"font:fina") end |