From bd0ef6b1b32b7a6bb313ad7619c35da45cb4ede3 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Sun, 12 Jul 2015 16:15:05 +0200 Subject: 2015-07-12 15:42:00 --- tex/context/base/cont-new.mkiv | 2 +- tex/context/base/context-version.pdf | Bin 4202 -> 4212 bytes tex/context/base/context.mkiv | 2 +- tex/context/base/font-otl.lua | 7 +- tex/context/base/font-oto.lua | 3 +- tex/context/base/font-otr.lua | 1 + tex/context/base/font-oup.lua | 15 +- tex/context/base/m-newotf.mkiv | 21 +-- tex/context/base/math-fen.mkiv | 185 +++++++++++++++------ tex/context/base/math-noa.lua | 174 +++++++++++++++++++ tex/context/base/status-files.pdf | Bin 24371 -> 24387 bytes tex/context/base/status-lua.pdf | Bin 254495 -> 254527 bytes tex/context/base/strc-ref.lua | 3 +- tex/context/base/task-ini.lua | 1 + tex/context/base/x-asciimath.mkiv | 13 +- tex/context/base/x-mathml.lua | 2 + tex/context/base/x-mathml.mkiv | 58 ++++--- tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- 18 files changed, 389 insertions(+), 100 deletions(-) diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv index a344eee5c..dfc4086d7 100644 --- a/tex/context/base/cont-new.mkiv +++ b/tex/context/base/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2015.07.12 00:00} +\newcontextversion{2015.07.12 15:40} %D This file is loaded at runtime, thereby providing an excellent place for %D hacks, patches, extensions and new features. diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf index 7154b629d..6f6fed9ac 100644 Binary files a/tex/context/base/context-version.pdf and b/tex/context/base/context-version.pdf differ diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv index 8d17530f3..7f33e9629 100644 --- a/tex/context/base/context.mkiv +++ b/tex/context/base/context.mkiv @@ -39,7 +39,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2015.07.12 00:00} +\edef\contextversion{2015.07.12 15:40} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/font-otl.lua b/tex/context/base/font-otl.lua index 4dd95a7d1..f86850bf4 100644 --- a/tex/context/base/font-otl.lua +++ b/tex/context/base/font-otl.lua @@ -53,7 +53,7 @@ local report_otf = logs.reporter("fonts","otf loading") local fonts = fonts local otf = fonts.handlers.otf -otf.version = 3.000 -- beware: also sync font-mis.lua and in mtx-fonts +otf.version = 3.002 -- beware: also sync font-mis.lua and in mtx-fonts otf.cache = containers.define("fonts", "otl", otf.version, true) local otfreaders = otf.readers @@ -183,6 +183,9 @@ function enhancers.register(what,action) -- only already registered can be overl end function otf.load(filename,sub,featurefile) -- second argument (format) is gone ! + -- + local featurefile = nil -- not supported (yet) + -- local base = file.basename(file.removesuffix(filename)) local name = file.removesuffix(base) local attr = lfs.attributes(filename) @@ -251,7 +254,7 @@ function otf.load(filename,sub,featurefile) -- second argument (format) is gone report_otf("loading %a, hash %a",filename,hash) -- starttiming(otfreaders) - data = otfreaders.loadfont(filename,sub) + data = otfreaders.loadfont(filename,sub or 1) -- -- if featurefiles then -- for i=1,#featurefiles do diff --git a/tex/context/base/font-oto.lua b/tex/context/base/font-oto.lua index 08e2fe3cf..aaaa67796 100644 --- a/tex/context/base/font-oto.lua +++ b/tex/context/base/font-oto.lua @@ -22,7 +22,7 @@ local trace_singles = false trackers.register("otf.singles", local trace_multiples = false trackers.register("otf.multiples", function(v) trace_multiples = v end) local trace_alternatives = false trackers.register("otf.alternatives", function(v) trace_alternatives = v end) local trace_ligatures = false trackers.register("otf.ligatures", function(v) trace_ligatures = v end) -local trace_ligatures_detail = false trackers.register("otf.ligatures.detail", function(v) trace_ligatures_detail = v end) +----- trace_ligatures_detail = false trackers.register("otf.ligatures.detail", function(v) trace_ligatures_detail = v end) local trace_kerns = false trackers.register("otf.kerns", function(v) trace_kerns = v end) local trace_preparing = false trackers.register("otf.preparing", function(v) trace_preparing = v end) @@ -272,7 +272,6 @@ local function preparesubstitutions(tfmdata,feature,value,validlookups,lookuplis end end elseif kind == "gsub_ligature" then --- inspect(steps) for i=1,#steps do for unicode, data in next, steps[i].coverage do ligatures[#ligatures+1] = { unicode, data, "" } -- lookupname } diff --git a/tex/context/base/font-otr.lua b/tex/context/base/font-otr.lua index 12775f475..d8bd1219d 100644 --- a/tex/context/base/font-otr.lua +++ b/tex/context/base/font-otr.lua @@ -1888,6 +1888,7 @@ function readers.loadfont(filename,n) -- kerns = true, subfont = n, } +print(fontdata.subfonts) if fontdata then -- return { diff --git a/tex/context/base/font-oup.lua b/tex/context/base/font-oup.lua index a1c225ee9..e07bd6d05 100644 --- a/tex/context/base/font-oup.lua +++ b/tex/context/base/font-oup.lua @@ -646,12 +646,15 @@ function readers.addunicodetable(fontdata) local resources = fontdata.resources local unicodes = resources.unicodes if not unicodes then - unicodes = { } - resources.unicodes = unicodes - for u, d in next, fontdata.descriptions do - local n = d.name - if n then - unicodes[n] = u + local descriptions = fontdata.descriptions + if descriptions then + unicodes = { } + resources.unicodes = unicodes + for u, d in next, descriptions do + local n = d.name + if n then + unicodes[n] = u + end end end end diff --git a/tex/context/base/m-newotf.mkiv b/tex/context/base/m-newotf.mkiv index 8348f600f..67a6864a7 100644 --- a/tex/context/base/m-newotf.mkiv +++ b/tex/context/base/m-newotf.mkiv @@ -23,17 +23,18 @@ "font-otl", "font-ots", "font-oto", "font-otd", "font-otc", "font-osd", "font-map", "font-fbk", "font-gds", } - - logs.report("fonts") - if tex.modes.atpragma then - logs.report("fonts","replacing font loader code by experimental code (at pragma)") - logs.report("fonts") - for i=1,#files do require(file.join("t:/sources",files[i])) end - else - logs.report("fonts","replacing font loader code by experimental code") - logs.report("fonts") - for i=1,#files do require(files[i]) end + local report = logs.reporter("newotf") + local findfile = resolvers.findfile + local addsuffix = file.addsuffix + report() + report("replacing font loader code by experimental code") + report() + for i=1,#files do + local foundfile = findfile(addsuffix(files[i],"lua")) + report("loading %a",foundfile) + dofile(foundfile) end + report() \stopluacode \protect \endinput diff --git a/tex/context/base/math-fen.mkiv b/tex/context/base/math-fen.mkiv index 9570eac83..6c29a8c18 100644 --- a/tex/context/base/math-fen.mkiv +++ b/tex/context/base/math-fen.mkiv @@ -216,6 +216,8 @@ \unexpanded\def\right {\afterassignment\math_right \let\nexttoken} \unexpanded\def\middle{\afterassignment\math_middle\let\nexttoken} +\let\leftorright\relax + \newconditional\c_math_fenced_done \newconditional\c_math_fenced_unknown \settrue\c_math_fenced_unknown @@ -448,74 +450,159 @@ %D This is needed for mathml (used in mrow, so it gets reset): -\let\math_fences_saved_left \left -\let\math_fences_saved_middle\middle -\let\math_fences_saved_right \right +% old code: + +% \let\math_fences_saved_left \left +% \let\math_fences_saved_middle\middle +% \let\math_fences_saved_right \right +% +% % \def\math_fences_traced#1{\ruledhbox{\ttx#1\low{\the\c_math_fenced_nesting}}} +% +% \unexpanded\def\math_fences_checked_left +% {%\math_fences_traced L% +% \math_fences_saved_left} +% +% \unexpanded\def\math_fences_checked_middle +% {%\math_fences_traced M% +% \ifcase\c_math_fenced_nesting +% \expandafter\math_fences_saved_middle +% \else +% \expandafter\firstofoneargument +% \fi} +% +% \unexpanded\def\math_fences_checked_right +% {%\math_fences_traced R% +% \ifcase\c_math_fenced_nesting +% \expandafter\firstofoneargument +% \else +% \expandafter\math_fences_saved_right +% \fi} +% +% \newconditional\c_math_checked_done % only bars +% +% \unexpanded\def\math_fences_checked_left_or_right +% {%\math_fences_traced B% +% \ifcase\c_math_fenced_nesting +% \settrue\c_math_checked_done +% \expandafter\math_fences_saved_left +% \else\ifconditional\c_math_checked_done +% \setfalse\c_math_checked_done +% \doubleexpandafter\math_fences_saved_right +% \else +% \doubleexpandafter\math_fences_saved_middle +% \fi\fi} +% +% \unexpanded\def\math_fences_checked_start +% {\c_math_fenced_nesting\zerocount} +% +% \unexpanded\def\math_fences_checked_stop +% {\ifcase\c_math_fenced_nesting\else +% \right.\relax % error, todo: nil spacing +% \expandafter\math_fences_checked_stop +% \fi} +% +% \unexpanded\def\startcheckedfences +% {\begingroup +% \let\left \math_fences_checked_left +% \let\middle\math_fences_checked_middle +% \let\right \math_fences_checked_right +% \math_fences_checked_start} +% +% \unexpanded\def\stopcheckedfences +% {\math_fences_checked_stop +% \endgroup} +% +% \let\leftorright\math_fences_checked_left_or_right % for bars + +\definesystemattribute[mathautofence][public] + +\let\math_fences_normal_left \left +\let\math_fences_normal_right \right +\let\math_fences_normal_middle\middle +\let\math_fences_normal_both \leftorright + +\unexpanded\def\math_fences_auto_left #1{\attribute\mathautofenceattribute\plusone #1\attribute\mathautofenceattribute\attributeunsetvalue} +\unexpanded\def\math_fences_auto_right #1{\attribute\mathautofenceattribute\plustwo #1\attribute\mathautofenceattribute\attributeunsetvalue} +\unexpanded\def\math_fences_auto_middle#1{\attribute\mathautofenceattribute\plusthree#1\attribute\mathautofenceattribute\attributeunsetvalue} +\unexpanded\def\math_fences_auto_both #1{\attribute\mathautofenceattribute\plusfour #1\attribute\mathautofenceattribute\attributeunsetvalue} -% \def\math_fences_traced#1{\ruledhbox{\ttx#1\low{\the\c_math_fenced_nesting}}} +\let\autofenceopen \math_fences_auto_left % for testing +\let\autofenceclose \math_fences_auto_right % for testing +\let\autofenceleft \math_fences_auto_left % for testing +\let\autofenceright \math_fences_auto_right % for testing +\let\autofencemiddle\math_fences_auto_middle % for testing +\let\autofenceboth \math_fences_auto_both % for testing -\unexpanded\def\math_fences_checked_left - {%\math_fences_traced L% - \math_fences_saved_left} +% fences are used not that often (i.e. no performance issue) so we can use a state +% instead of \let ... also some state variable can come in handy in the future -\unexpanded\def\math_fences_checked_middle - {%\math_fences_traced M% - \ifcase\c_math_fenced_nesting - \expandafter\math_fences_saved_middle +\newconditional\c_math_fences_auto + +\unexpanded\def\enableautofences {\settrue \c_math_fences_auto} +\unexpanded\def\disableautofences{\setfalse\c_math_fences_auto} + +\unexpanded\def\math_fences_used_left + {\ifconditional\c_math_fences_auto + \expandafter\math_fences_auto_left \else - \expandafter\firstofoneargument + \expandafter\math_fences_normal_left \fi} - -\unexpanded\def\math_fences_checked_right - {%\math_fences_traced R% - \ifcase\c_math_fenced_nesting - \expandafter\firstofoneargument +\unexpanded\def\math_fences_used_right + {\ifconditional\c_math_fences_auto + \expandafter\math_fences_auto_right \else - \expandafter\math_fences_saved_right + \expandafter\math_fences_normal_right \fi} - -\newconditional\c_math_checked_done % only bars - -\unexpanded\def\math_fences_checked_left_or_right - {%\math_fences_traced B% - \ifcase\c_math_fenced_nesting - \settrue\c_math_checked_done - \expandafter\math_fences_saved_left - \else\ifconditional\c_math_checked_done - \setfalse\c_math_checked_done - \doubleexpandafter\math_fences_saved_right +\unexpanded\def\math_fences_used_middle + {\ifconditional\c_math_fences_auto + \expandafter\math_fences_auto_middle + \else + \expandafter\math_fences_normal_middle + \fi} +\unexpanded\def\math_fences_used_both + {\ifconditional\c_math_fences_auto + \expandafter\math_fences_auto_both \else - \doubleexpandafter\math_fences_saved_middle - \fi\fi} + \expandafter\math_fences_normal_both + \fi} -\unexpanded\def\math_fences_checked_start - {\c_math_fenced_nesting\zerocount} +\let\left \math_fences_used_left +\let\right \math_fences_used_right +\let\middle \math_fences_used_middle +\let\leftorright\math_fences_used_both -\unexpanded\def\math_fences_checked_stop - {\ifcase\c_math_fenced_nesting\else - \right.\relax % error, todo: nil spacing - \expandafter\math_fences_checked_stop - \fi} +% wrappers \unexpanded\def\startcheckedfences {\begingroup - \let\left \math_fences_checked_left - \let\middle\math_fences_checked_middle - \let\right \math_fences_checked_right - \math_fences_checked_start} + \enableautofences} \unexpanded\def\stopcheckedfences - {\math_fences_checked_stop - \endgroup} + {\endgroup} + +\appendtoks + % maybe: safeguard against overloading + % + % \let\left \math_fences_used_left + % \let\right \math_fences_used_right + % \let\middle \math_fences_used_middle + % \let\leftorright\math_fences_used_both +\to \everymathematics + +\appendtoks + \ifx\currentmathfence\empty + \doifelse{\mathfenceparameter\c!state}\v!auto\enableautofences\disableautofences + \fi +\to \everysetupmathfence -\let\leftorright\math_fences_checked_left_or_right % for bars +% some day default: \setupmathfences[\c!state=\v!auto] %D The next characters were used for constructing nicer extensibles but %D nowadays we have real characters. -\Umathchardef\braceld=0 \defaultmathfamily "FF07A -\Umathchardef\bracerd=0 \defaultmathfamily "FF07B -\Umathchardef\bracelu=0 \defaultmathfamily "FF07C -\Umathchardef\braceru=0 \defaultmathfamily "FF07D +\Umathchardef\braceld\zerocount \defaultmathfamily "FF07A +\Umathchardef\bracerd\zerocount \defaultmathfamily "FF07B +\Umathchardef\bracelu\zerocount \defaultmathfamily "FF07C +\Umathchardef\braceru\zerocount \defaultmathfamily "FF07D \protect diff --git a/tex/context/base/math-noa.lua b/tex/context/base/math-noa.lua index 8231738bc..2275497e8 100644 --- a/tex/context/base/math-noa.lua +++ b/tex/context/base/math-noa.lua @@ -634,6 +634,180 @@ function handlers.resize(head,style,penalties) return true end + +local a_autofence = privateattribute("mathautofence") +local autofences = { } + +local function makefence(what,char) + local d = new_node(math_delim) + local f = new_node(math_fence) + if char then + local c = getfield(char,"nucleus") + setfield(d,"small_char",getfield(c,"char")) + setfield(d,"small_fam", getfield(c,"fam")) + free_node(c) + end + setfield(f,"subtype",what) + setfield(f,"delim",d) + return f +end + +local function makelist(noad,f_o,o_next,c_prev,f_c,middle) + local list = new_node(math_sub) + setfield(list,"head",f_o) + setfield(noad,"subtype",noad_inner) + setfield(noad,"nucleus",list) + setfield(f_o,"next",o_next) + setfield(o_next,"prev",f_o) + setfield(f_c,"prev",c_prev) + setfield(c_prev,"next",f_c) + if middle and next(middle) then + local prev = f_o + local current = o_next + while current ~= f_c do + if middle[current] then + local next = getnext(current) + local fence = makefence(middle_fence_code,current) + setfield(current,"nucleus",nil) + free_node(current) + middle[current] = nil + -- replace_node + setfield(prev,"next",fence) + setfield(fence,"prev",prev) + setfield(next,"prev",fence) + setfield(fence,"next",next) + prev = fence + current = next + else + prev = current + current = getnext(current) + end + end + end +end + +local function convert_both(open,close,middle) + local f_o = makefence(left_fence_code,open) + local f_c = makefence(right_fence_code,close) + local o_next = getnext(open) + -- local o_prev = getprev(open) + local c_next = getnext(close) + local c_prev = getprev(close) + makelist(open,f_o,o_next,c_prev,f_c,middle) + setfield(close,"nucleus",nil) + free_node(close) + if c_next then + setfield(c_next,"prev",open) + end + setfield(open,"next",c_next) + return open +end + +local function convert_open(open,last,middle) + local f_o = makefence(left_fence_code,open) + local f_c = makefence(right_fence_code) + local o_next = getnext(open) + -- local o_prev = getprev(open) + local l_next = getnext(last) + -- local l_prev = getprev(last) + makelist(open,f_o,o_next,last,f_c,middle) + if l_next then + setfield(l_next,"prev",open) + end + setfield(open,"next",l_next) + return open +end + +local function convert_close(close,first,middle) + local f_o = makefence(left_fence_code) + local f_c = makefence(right_fence_code,close) + local c_prev = getprev(close) + makelist(close,f_o,first,c_prev,f_c,middle) + return close +end + +autofences[math_noad] = function(pointer,what,n,parent) + -- can we do a fast check? + local current = pointer + local last = pointer + local start = pointer + local done = false + local initial = pointer + local noad = nil + local stack = nil + local middle = nil -- todo: use properties + while current do + local id = getid(current) + if id == math_noad then + local a = getattr(current,a_autofence) + if a and a > 0 then + setattr(current,a_autofence,0) + if a == 1 or (a == 4 and (not stack or #stack == 0)) then + if stack then + insert(stack,current) + else + stack = { current } + end + elseif a == 2 or a == 4 then + local open = stack and remove(stack) + if open then + current = convert_both(open,current,middle) + elseif current == start then + -- skip + else + current = convert_close(current,initial,middle) + if not parent then + initial = current + end + end + elseif a == 3 then + if middle then + middle[current] = true + else + middle = { [current] = true } + end + end + done = true + else + -- make a helper for this + noad = getfield(current,"nucleus") if noad then process(noad,what,n,current) end -- list + noad = getfield(current,"sup") if noad then process(noad,what,n,current) end -- list + noad = getfield(current,"sub") if noad then process(noad,what,n,current) end -- list + end + else + process(current,autofences) + end + last = current + current = getnext(current) + end + if done then + if stack then + local n = #stack + if n > 0 then + for i=1,n do + last = convert_open(remove(stack),last,middle) + end + end + end + if not parent then + return true, current, initial + end + end +end + +-- we can have a first changed node .. an option is to have a leading dummy node in math +-- lists like the par node as it can save a lot of mess + +function handlers.autofences(head,style,penalties) + -- if tex.modes.c_math_fences_auto then + local h, d = processnoads(head,autofences,"autofence") + -- inspect(nodes.totree(h)) + return h or head, d + -- else + -- return head, false + -- end +end + -- normalize scripts local unscript = { } noads.processors.unscript = unscript diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf index 96c4157a8..16ea1e5f9 100644 Binary files a/tex/context/base/status-files.pdf and b/tex/context/base/status-files.pdf differ diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf index ff68f540b..af8fcdd90 100644 Binary files a/tex/context/base/status-lua.pdf and b/tex/context/base/status-lua.pdf differ diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua index 6c500e14d..fbef19380 100644 --- a/tex/context/base/strc-ref.lua +++ b/tex/context/base/strc-ref.lua @@ -1607,7 +1607,8 @@ local function identify_inner_or_outer(set,var,i) -- nest we look at each component (but we can omit the already consulted one - local components = job.structure.components + local jobstructure = job.structure + local components = jobstructure and jobstructure.components if components then for c=1,#components do local component = components[c] diff --git a/tex/context/base/task-ini.lua b/tex/context/base/task-ini.lua index 5fef5633c..56d39445f 100644 --- a/tex/context/base/task-ini.lua +++ b/tex/context/base/task-ini.lua @@ -97,6 +97,7 @@ appendaction("math", "normalizers", "noads.handlers.families", nil, "no appendaction("math", "normalizers", "noads.handlers.render", nil, "nohead") -- always on appendaction("math", "normalizers", "noads.handlers.collapse", nil, "nohead") -- always on +appendaction("math", "normalizers", "noads.handlers.autofences") -- head ! -- always on appendaction("math", "normalizers", "noads.handlers.resize", nil, "nohead") -- always on ------------("math", "normalizers", "noads.handlers.respace", nil, "nohead") -- always on appendaction("math", "normalizers", "noads.handlers.alternates",nil, "nohead") -- always on diff --git a/tex/context/base/x-asciimath.mkiv b/tex/context/base/x-asciimath.mkiv index 0e1230bb0..a1254a445 100644 --- a/tex/context/base/x-asciimath.mkiv +++ b/tex/context/base/x-asciimath.mkiv @@ -163,14 +163,23 @@ % \ignorediscretionaries % \to \everyasciimath +\appendtoks + \enableautofences +\to \everyasciimath + \unexpanded\def\asciimath {\doifnextoptionalelse\asciimath_yes\asciimath_nop} \def\asciimath_yes[#1]#2% - {\mathematics[#1]{\clf_justasciimath{\detokenize\expandafter{\normalexpanded{#2}}}}} + {\mathematics + [#1]% + {\the\everyasciimath% + \clf_justasciimath{\detokenize\expandafter{\normalexpanded{#2}}}}} \def\asciimath_nop#1% - {\mathematics{\clf_justasciimath{\detokenize\expandafter{\normalexpanded{#1}}}}} + {\mathematics + {\the\everyasciimath + \clf_justasciimath{\detokenize\expandafter{\normalexpanded{#1}}}}} \unexpanded\def\ctxmoduleasciimath#1% {\ctxlua{moduledata.asciimath.#1}} diff --git a/tex/context/base/x-mathml.lua b/tex/context/base/x-mathml.lua index a0db339bc..50369407f 100644 --- a/tex/context/base/x-mathml.lua +++ b/tex/context/base/x-mathml.lua @@ -92,6 +92,8 @@ local r_replacements = { -- in main table -- todo: play with asciimode and avoid mmlchar +-- we can use the proper names now! todo + local o_replacements = { -- in main table ["@l"] = "\\mmlleftdelimiter.", ["@r"] = "\\mmlrightdelimiter.", diff --git a/tex/context/base/x-mathml.mkiv b/tex/context/base/x-mathml.mkiv index 65a7223ce..daeae97b6 100644 --- a/tex/context/base/x-mathml.mkiv +++ b/tex/context/base/x-mathml.mkiv @@ -72,6 +72,7 @@ \startxmlsetups mml:math \begingroup + \enableautofences \xmlval {mml:math:dir} {\xmlatt{#1}{dir}} {} \xmlval {mml:math:display} {\xmlatt{#1}{display}} { \xmlval {mml:math:mode} {\xmlatt{#1}{mode}} { @@ -79,29 +80,31 @@ } } { - \math_fences_checked_start + %\math_fences_checked_start %\MMLhack \xmlflush{#1} - \math_fences_checked_stop + %\math_fences_checked_stop } \endgroup \stopxmlsetups \startxmlsetups mml:imath \inlinemathematics { - \math_fences_checked_start + \enableautofences + %\math_fences_checked_start %\MMLhack \xmlflush{#1} - \math_fences_checked_stop + %\math_fences_checked_stop } \stopxmlsetups \startxmlsetups mml:dmath \displaymathematics { - \math_fences_checked_start + \enableautofences + %\math_fences_checked_start %\MMLhack \xmlflush{#1} - \math_fences_checked_stop + %\math_fences_checked_stop } \stopxmlsetups @@ -150,10 +153,15 @@ \setfalse\mmlignoredelimiter % alternatively we could turn it on/off inside the start/stop and ignore \left\right\middle otherwise -\def\mmlleftdelimiter {\ifconditional\mmlignoredelimiter\else\expandafter\math_fences_checked_left \fi} -\def\mmlrightdelimiter {\ifconditional\mmlignoredelimiter\else\expandafter\math_fences_checked_right \fi} -\def\mmlmiddledelimiter {\ifconditional\mmlignoredelimiter\else\expandafter\math_fences_checked_middle \fi} -\def\mmlleftorrightdelimiter{\ifconditional\mmlignoredelimiter\else\expandafter\math_fences_checked_left_or_right\fi} +% \def\mmlleftdelimiter {\ifconditional\mmlignoredelimiter\else\expandafter\math_fences_checked_left \fi} +% \def\mmlrightdelimiter {\ifconditional\mmlignoredelimiter\else\expandafter\math_fences_checked_right \fi} +% \def\mmlmiddledelimiter {\ifconditional\mmlignoredelimiter\else\expandafter\math_fences_checked_middle \fi} +% \def\mmlleftorrightdelimiter{\ifconditional\mmlignoredelimiter\else\expandafter\math_fences_checked_left_or_right\fi} + +\let\mmlleftdelimiter \autofenceopen +\let\mmlmiddledelimiter \autofencemiddle +\let\mmlrightdelimiter \autofenceclose +\let\mmlleftorrightdelimiter\autofenceboth % end of delimiter mess @@ -1940,9 +1948,9 @@ % \stopxmlsetups \startxmlsetups mml:mfenced % {} around separator is needed for spacing - \math_fences_checked_start + %\math_fences_checked_start \ctxmodulemathml{mfenced("#1")} - \math_fences_checked_stop + %\math_fences_checked_stop \stopxmlsetups @@ -2182,13 +2190,13 @@ \startxmlsetups mml:mrow \begingroup - \xmldoifelse {#1} {/mml:mo[first() or last()]} {% we need a {} - \math_fences_checked_start - \xmlflush{#1} - \math_fences_checked_stop - } { + %\xmldoifelse {#1} {/mml:mo[first() or last()]} {% we need a {} + % % \math_fences_checked_start + % \xmlflush{#1} + % \math_fences_checked_stop + %} { \xmlflush{#1} - } + %} \endgroup \stopxmlsetups @@ -2264,22 +2272,22 @@ \definemathtriplet [\v!mathematics] [mmlundertriplet] % or will we use a special instance \definemathtriplet [\v!mathematics] [mmldoubletriplet] % or will we use a special instance -% common to munder/mover/munderover +% common to munder/mover/munderover : will become core helper (speed up too) \starttexdefinition unexpanded mmlfencedfirst #1 - \math_fences_checked_start + %\math_fences_checked_start \mmlunexpandedfirst{#1} - \math_fences_checked_stop + %\math_fences_checked_stop \stoptexdefinition \starttexdefinition unexpanded mmlfencedsecond #1 - \math_fences_checked_start + %\math_fences_checked_start \mmlunexpandedsecond{#1} - \math_fences_checked_stop + %\math_fences_checked_stop \stoptexdefinition \starttexdefinition unexpanded mmlfencedthird #1 - \math_fences_checked_start + %\math_fences_checked_start \mmlunexpandedthird{#1} - \math_fences_checked_stop + %\math_fences_checked_stop \stoptexdefinition % mover diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index c88a52855..556550568 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 07/12/15 00:00:22 +-- merge date : 07/12/15 15:40:46 do -- begin closure to overcome local limits and interference -- cgit v1.2.3