From e200230205ec1297f8d3ade3d491585f85d87fff Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Sun, 17 Jan 2016 19:15:07 +0100 Subject: 2016-01-17 18:52:00 --- .../manuals/luatex/luatex-modifications.tex | 20 +- scripts/context/lua/mtxrun.lua | 22 +- scripts/context/stubs/mswin/mtxrun.lua | 22 +- scripts/context/stubs/unix/mtxrun | 22 +- scripts/context/stubs/win64/mtxrun.lua | 22 +- tex/context/base/context-version.pdf | Bin 4170 -> 4175 bytes tex/context/base/mkiv/buff-ini.lua | 16 ++ tex/context/base/mkiv/cont-new.mkiv | 2 +- tex/context/base/mkiv/context.mkiv | 2 +- tex/context/base/mkiv/lxml-ini.lua | 1 + tex/context/base/mkiv/lxml-ini.mkiv | 8 + tex/context/base/mkiv/lxml-tab.lua | 20 +- tex/context/base/mkiv/lxml-tex.lua | 97 ++++++--- tex/context/base/mkiv/pack-mrl.mkiv | 4 +- tex/context/base/mkiv/pack-rul.lua | 11 +- tex/context/base/mkiv/pack-rul.mkiv | 9 + tex/context/base/mkiv/page-set.mkiv | 7 +- tex/context/base/mkiv/status-files.pdf | Bin 9033 -> 9018 bytes tex/context/base/mkiv/status-lua.pdf | Bin 258720 -> 258792 bytes tex/context/base/mkiv/strc-flt.mkvi | 3 + tex/context/base/mkiv/strc-syn.mkiv | 3 + tex/context/interface/common/cont-cs.xml | 8 - tex/context/interface/common/cont-de.xml | 8 - tex/context/interface/common/cont-en.xml | 8 - tex/context/interface/common/cont-fr.xml | 8 - tex/context/interface/common/cont-it.xml | 8 - tex/context/interface/common/cont-nl.xml | 8 - tex/context/interface/common/cont-pe.xml | 8 - tex/context/interface/common/cont-ro.xml | 8 - tex/context/modules/mkiv/x-set-11.mkiv | 241 +++++++++++++-------- tex/generic/context/luatex/luatex-fonts-merged.lua | 2 +- tex/generic/context/luatex/luatex-pdf.tex | 20 +- 32 files changed, 358 insertions(+), 260 deletions(-) diff --git a/doc/context/sources/general/manuals/luatex/luatex-modifications.tex b/doc/context/sources/general/manuals/luatex/luatex-modifications.tex index 940afc24b..180766816 100644 --- a/doc/context/sources/general/manuals/luatex/luatex-modifications.tex +++ b/doc/context/sources/general/manuals/luatex/luatex-modifications.tex @@ -513,18 +513,18 @@ primitives (for as far their functionality is still around) you now can do this: The introspective primitives can bve defines as: \starttyping -\def\pdftexversion {\numexpr\pdffeedback version} +\def\pdftexversion {\numexpr\pdffeedback version\relax} \def\pdftexrevision {\pdffeedback revision} -\def\pdflastlink {\numexpr\pdffeedback lastlink} -\def\pdfretval {\numexpr\pdffeedback retval} -\def\pdflastobj {\numexpr\pdffeedback lastobj} -\def\pdflastannot {\numexpr\pdffeedback lastannot} -\def\pdfxformname {\numexpr\pdffeedback xformname} +\def\pdflastlink {\numexpr\pdffeedback lastlink\relax} +\def\pdfretval {\numexpr\pdffeedback retval\relax} +\def\pdflastobj {\numexpr\pdffeedback lastobj\relax} +\def\pdflastannot {\numexpr\pdffeedback lastannot\relax} +\def\pdfxformname {\numexpr\pdffeedback xformname\relax} \def\pdfcreationdate {\pdffeedback creationdate} -\def\pdffontname {\numexpr\pdffeedback fontname} -\def\pdffontobjnum {\numexpr\pdffeedback fontobjnum} -\def\pdffontsize {\dimexpr\pdffeedback fontsize} -\def\pdfpageref {\numexpr\pdffeedback pageref} +\def\pdffontname {\numexpr\pdffeedback fontname\relax} +\def\pdffontobjnum {\numexpr\pdffeedback fontobjnum\relax} +\def\pdffontsize {\dimexpr\pdffeedback fontsize\relax} +\def\pdfpageref {\numexpr\pdffeedback pageref\relax} \def\pdfcolorstackinit {\pdffeedback colorstackinit} \stoptyping diff --git a/scripts/context/lua/mtxrun.lua b/scripts/context/lua/mtxrun.lua index ad29cac15..71b93eab9 100644 --- a/scripts/context/lua/mtxrun.lua +++ b/scripts/context/lua/mtxrun.lua @@ -9984,7 +9984,7 @@ do -- create closure to overcome 200 locals limit package.loaded["lxml-tab"] = package.loaded["lxml-tab"] or true --- original size: 47323, stripped down to: 28746 +-- original size: 47392, stripped down to: 28789 if not modules then modules={} end modules ['lxml-tab']={ version=1.001, @@ -10298,7 +10298,7 @@ local function handle_any_entity(str) end else if type(resolve)=="function" then - a=resolve(str) or entities[str] + a=resolve(str,entities) or entities[str] else a=entities[str] end @@ -10773,12 +10773,14 @@ local function serialize(e,handlers,...) end end local function xserialize(e,handlers) - local functions=handlers.functions - local etg=e.tg - if etg then - (functions[etg] or functions["@el@"])(e,handlers) - else - functions["@dc@"](e,handlers) + if e then + local functions=handlers.functions + local etg=e.tg + if etg then + (functions[etg] or functions["@el@"])(e,handlers) + else + functions["@dc@"](e,handlers) + end end end local handlers={} @@ -18360,8 +18362,8 @@ end -- of closure -- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 782342 --- stripped bytes : 283454 +-- original bytes : 782411 +-- stripped bytes : 283480 -- end library merge diff --git a/scripts/context/stubs/mswin/mtxrun.lua b/scripts/context/stubs/mswin/mtxrun.lua index ad29cac15..71b93eab9 100644 --- a/scripts/context/stubs/mswin/mtxrun.lua +++ b/scripts/context/stubs/mswin/mtxrun.lua @@ -9984,7 +9984,7 @@ do -- create closure to overcome 200 locals limit package.loaded["lxml-tab"] = package.loaded["lxml-tab"] or true --- original size: 47323, stripped down to: 28746 +-- original size: 47392, stripped down to: 28789 if not modules then modules={} end modules ['lxml-tab']={ version=1.001, @@ -10298,7 +10298,7 @@ local function handle_any_entity(str) end else if type(resolve)=="function" then - a=resolve(str) or entities[str] + a=resolve(str,entities) or entities[str] else a=entities[str] end @@ -10773,12 +10773,14 @@ local function serialize(e,handlers,...) end end local function xserialize(e,handlers) - local functions=handlers.functions - local etg=e.tg - if etg then - (functions[etg] or functions["@el@"])(e,handlers) - else - functions["@dc@"](e,handlers) + if e then + local functions=handlers.functions + local etg=e.tg + if etg then + (functions[etg] or functions["@el@"])(e,handlers) + else + functions["@dc@"](e,handlers) + end end end local handlers={} @@ -18360,8 +18362,8 @@ end -- of closure -- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 782342 --- stripped bytes : 283454 +-- original bytes : 782411 +-- stripped bytes : 283480 -- end library merge diff --git a/scripts/context/stubs/unix/mtxrun b/scripts/context/stubs/unix/mtxrun index ad29cac15..71b93eab9 100644 --- a/scripts/context/stubs/unix/mtxrun +++ b/scripts/context/stubs/unix/mtxrun @@ -9984,7 +9984,7 @@ do -- create closure to overcome 200 locals limit package.loaded["lxml-tab"] = package.loaded["lxml-tab"] or true --- original size: 47323, stripped down to: 28746 +-- original size: 47392, stripped down to: 28789 if not modules then modules={} end modules ['lxml-tab']={ version=1.001, @@ -10298,7 +10298,7 @@ local function handle_any_entity(str) end else if type(resolve)=="function" then - a=resolve(str) or entities[str] + a=resolve(str,entities) or entities[str] else a=entities[str] end @@ -10773,12 +10773,14 @@ local function serialize(e,handlers,...) end end local function xserialize(e,handlers) - local functions=handlers.functions - local etg=e.tg - if etg then - (functions[etg] or functions["@el@"])(e,handlers) - else - functions["@dc@"](e,handlers) + if e then + local functions=handlers.functions + local etg=e.tg + if etg then + (functions[etg] or functions["@el@"])(e,handlers) + else + functions["@dc@"](e,handlers) + end end end local handlers={} @@ -18360,8 +18362,8 @@ end -- of closure -- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 782342 --- stripped bytes : 283454 +-- original bytes : 782411 +-- stripped bytes : 283480 -- end library merge diff --git a/scripts/context/stubs/win64/mtxrun.lua b/scripts/context/stubs/win64/mtxrun.lua index ad29cac15..71b93eab9 100644 --- a/scripts/context/stubs/win64/mtxrun.lua +++ b/scripts/context/stubs/win64/mtxrun.lua @@ -9984,7 +9984,7 @@ do -- create closure to overcome 200 locals limit package.loaded["lxml-tab"] = package.loaded["lxml-tab"] or true --- original size: 47323, stripped down to: 28746 +-- original size: 47392, stripped down to: 28789 if not modules then modules={} end modules ['lxml-tab']={ version=1.001, @@ -10298,7 +10298,7 @@ local function handle_any_entity(str) end else if type(resolve)=="function" then - a=resolve(str) or entities[str] + a=resolve(str,entities) or entities[str] else a=entities[str] end @@ -10773,12 +10773,14 @@ local function serialize(e,handlers,...) end end local function xserialize(e,handlers) - local functions=handlers.functions - local etg=e.tg - if etg then - (functions[etg] or functions["@el@"])(e,handlers) - else - functions["@dc@"](e,handlers) + if e then + local functions=handlers.functions + local etg=e.tg + if etg then + (functions[etg] or functions["@el@"])(e,handlers) + else + functions["@dc@"](e,handlers) + end end end local handlers={} @@ -18360,8 +18362,8 @@ end -- of closure -- used libraries : l-lua.lua l-package.lua l-lpeg.lua l-function.lua l-string.lua l-table.lua l-io.lua l-number.lua l-set.lua l-os.lua l-file.lua l-gzip.lua l-md5.lua l-url.lua l-dir.lua l-boolean.lua l-unicode.lua l-math.lua util-str.lua util-tab.lua util-fil.lua util-sac.lua util-sto.lua util-prs.lua util-fmt.lua trac-set.lua trac-log.lua trac-inf.lua trac-pro.lua util-lua.lua util-deb.lua util-mrg.lua util-tpl.lua util-env.lua luat-env.lua lxml-tab.lua lxml-lpt.lua lxml-mis.lua lxml-aux.lua lxml-xml.lua trac-xml.lua data-ini.lua data-exp.lua data-env.lua data-tmp.lua data-met.lua data-res.lua data-pre.lua data-inp.lua data-out.lua data-fil.lua data-con.lua data-use.lua data-zip.lua data-tre.lua data-sch.lua data-lua.lua data-aux.lua data-tmf.lua data-lst.lua util-lib.lua luat-sta.lua luat-fmt.lua -- skipped libraries : - --- original bytes : 782342 --- stripped bytes : 283454 +-- original bytes : 782411 +-- stripped bytes : 283480 -- end library merge diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf index 97cb0c64f..25f70f2af 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/mkiv/buff-ini.lua b/tex/context/base/mkiv/buff-ini.lua index 1caf3b752..c41c51607 100644 --- a/tex/context/base/mkiv/buff-ini.lua +++ b/tex/context/base/mkiv/buff-ini.lua @@ -589,3 +589,19 @@ implement { actions = { collectcontent, context.printlines }, arguments = "string" } + +local startbuffer = context.startbuffer +local stopbuffer = context.stopbuffer + +local startcollecting = context.startcollecting +local stopcollecting = context.stopcollecting + +function context.startbuffer(...) + startcollecting() + startbuffer(...) +end + +function context.stopbuffer() + stopbuffer() + stopcollecting() +end diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 796a0d948..420befa6e 100644 --- a/tex/context/base/mkiv/cont-new.mkiv +++ b/tex/context/base/mkiv/cont-new.mkiv @@ -11,7 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -\newcontextversion{2016.01.14 09:55} +\newcontextversion{2016.01.17 18:49} %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/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv index 96c9558c8..95edb74ee 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -39,7 +39,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2016.01.14 09:55} +\edef\contextversion{2016.01.17 18:49} \edef\contextkind {beta} %D For those who want to use this: diff --git a/tex/context/base/mkiv/lxml-ini.lua b/tex/context/base/mkiv/lxml-ini.lua index 379ea31b7..28f5040ff 100644 --- a/tex/context/base/mkiv/lxml-ini.lua +++ b/tex/context/base/mkiv/lxml-ini.lua @@ -41,6 +41,7 @@ implement { name = "xmldoifelseselfempty", actions = lxml.doifelseempty, --------- { name = "xmlflushstripped", actions = lxml.strip, arguments = { "string", true } } implement { name = "xmlall", actions = lxml.all, arguments = { "string", "string" } } implement { name = "xmlatt", actions = lxml.att, arguments = { "string", "string" } } +implement { name = "xmllastatt", actions = lxml.lastatt } implement { name = "xmlattdef", actions = lxml.att, arguments = { "string", "string", "string" } } implement { name = "xmlattribute", actions = lxml.attribute, arguments = { "string", "string", "string" } } implement { name = "xmlattributedef", actions = lxml.attribute, arguments = { "string", "string", "string", "string" } } diff --git a/tex/context/base/mkiv/lxml-ini.mkiv b/tex/context/base/mkiv/lxml-ini.mkiv index 9f84f8ca3..8860f62fe 100644 --- a/tex/context/base/mkiv/lxml-ini.mkiv +++ b/tex/context/base/mkiv/lxml-ini.mkiv @@ -106,6 +106,7 @@ % experiment: \let\xmlall \clf_xmlall \let\xmlatt \clf_xmlatt +\let\xmllastatt \clf_xmllastatt \let\xmlattdef \clf_xmlattdef \let\xmlattribute \clf_xmlattribute \let\xmlattributedef \clf_xmlattributedef @@ -434,6 +435,13 @@ \expandafter\firstofoneargument \fi} +\def\xmlmappedvalue#1#2#3% + {\ifcsname\??xmlmapvalue#1:#2\endcsname + \expandafter\lastnamedcs + \else + \csname\??xmlmapvalue#1:#3\expandafter\endcsname + \fi} + \let\xmldoifvalueelse\xmldoifelsevalue \let\xmlmapval\xmlmapvalue diff --git a/tex/context/base/mkiv/lxml-tab.lua b/tex/context/base/mkiv/lxml-tab.lua index 510ba1bd4..c5480f746 100644 --- a/tex/context/base/mkiv/lxml-tab.lua +++ b/tex/context/base/mkiv/lxml-tab.lua @@ -528,7 +528,7 @@ local function handle_any_entity(str) end else if type(resolve) == "function" then - a = resolve(str) or entities[str] + a = resolve(str,entities) or entities[str] else a = entities[str] end @@ -1146,14 +1146,16 @@ local function serialize(e,handlers,...) end local function xserialize(e,handlers) - local functions = handlers.functions - local etg = e.tg - if etg then - (functions[etg] or functions["@el@"])(e,handlers) - -- elseif type(e) == "string" then - -- functions["@tx@"](e,handlers) - else - functions["@dc@"](e,handlers) + if e then + local functions = handlers.functions + local etg = e.tg + if etg then + (functions[etg] or functions["@el@"])(e,handlers) + -- elseif type(e) == "string" then + -- functions["@tx@"](e,handlers) + else + functions["@dc@"](e,handlers) + end end end diff --git a/tex/context/base/mkiv/lxml-tex.lua b/tex/context/base/mkiv/lxml-tex.lua index 7f375927e..718b8f8c6 100644 --- a/tex/context/base/mkiv/lxml-tex.lua +++ b/tex/context/base/mkiv/lxml-tex.lua @@ -464,8 +464,8 @@ function xml.load(filename,settings) return xmltable end -local function entityconverter(id,str) - return xmlentities[str] or xmlprivatetoken(str) or "" -- roundtrip handler +local function entityconverter(id,str,ent) -- todo ent optional + return xmlentities[str] or ent[str] or xmlprivatetoken(str) or "" -- roundtrip handler end local function lxmlconvert(id,data,compress,currentresource) @@ -473,7 +473,7 @@ local function lxmlconvert(id,data,compress,currentresource) unify_predefined_entities = true, utfize_entities = true, resolve_predefined_entities = true, - resolve_entities = function(str) return entityconverter(id,str) end, -- needed for mathml + resolve_entities = function(str,ent) return entityconverter(id,str,ent) end, -- needed for mathml currentresource = tostring(currentresource or id), } if compress and compress == variables.yes then @@ -1617,44 +1617,81 @@ end -- -- no need for an assignment so: -function lxml.att(id,a,default) - local e = getid(id) - if e then - local at = e.at - if at then - -- normally always true - local str = at[a] - if not str then - if default and default ~= "" then - contextsprint(notcatcodes,default) +-- function lxml.att(id,a,default) +-- local e = getid(id) +-- if e then +-- local at = e.at +-- if at then +-- -- normally always true +-- local str = at[a] +-- if not str then +-- if default and default ~= "" then +-- contextsprint(notcatcodes,default) +-- end +-- elseif str ~= "" then +-- contextsprint(notcatcodes,str) +-- else +-- -- explicit empty is valid +-- end +-- elseif default and default ~= "" then +-- contextsprint(notcatcodes,default) +-- end +-- elseif default and default ~= "" then +-- contextsprint(notcatcodes,default) +-- end +-- end + +do + + local att + + function lxml.att(id,a,default) + local e = getid(id) + if e then + local at = e.at + if at then + -- normally always true + att = at[a] + if not att then + if default and default ~= "" then + att = default + contextsprint(notcatcodes,default) + end + elseif att ~= "" then + contextsprint(notcatcodes,att) + else + -- explicit empty is valid end - elseif str ~= "" then - contextsprint(notcatcodes,str) - else - -- explicit empty is valid + elseif default and default ~= "" then + att = default + contextsprint(notcatcodes,default) end elseif default and default ~= "" then + att = default contextsprint(notcatcodes,default) end - elseif default and default ~= "" then - contextsprint(notcatcodes,default) end -end -function lxml.refatt(id,a) - local e = getid(id) - if e then - local at = e.at - if at then - local str = at[a] - if str and str ~= "" then - str = gsub(str,"^#+","") - if str ~= "" then - contextsprint(notcatcodes,str) + function lxml.refatt(id,a) + local e = getid(id) + if e then + local at = e.at + if at then + att = at[a] + if str and str ~= "" then + str = gsub(str,"^#+","") + if str ~= "" then + contextsprint(notcatcodes,str) + end end end end end + + function lxml.lastatt() + contextsprint(notcatcodes,att) + end + end function lxml.name(id) -- or remapped name? -> lxml.info, combine diff --git a/tex/context/base/mkiv/pack-mrl.mkiv b/tex/context/base/mkiv/pack-mrl.mkiv index e8f89da8e..39e1f4086 100644 --- a/tex/context/base/mkiv/pack-mrl.mkiv +++ b/tex/context/base/mkiv/pack-mrl.mkiv @@ -353,8 +353,8 @@ \directthinrulesparameter\c!before \scratchcounter\directthinrulesparameter\c!n\relax \dorecurse\scratchcounter - {\ifnum\recurselevel=\scratchcounter \penalty500 \else - \ifnum\recurselevel=\plustwo \penalty500 \fi\fi + {\ifnum\recurselevel=\scratchcounter \directvspacing\v!samepage \else % \penalty500 + \ifnum\recurselevel=\plustwo \directvspacing\v!samepage \fi\fi % \penalty500 \thinrule \ifnum\recurselevel<\scratchcounter\relax % test needed, else messed up whitespace diff --git a/tex/context/base/mkiv/pack-rul.lua b/tex/context/base/mkiv/pack-rul.lua index 32cd9738e..427a2d11d 100644 --- a/tex/context/base/mkiv/pack-rul.lua +++ b/tex/context/base/mkiv/pack-rul.lua @@ -181,7 +181,7 @@ end implement { name = "doreshapeframedbox", actions = doreshapeframedbox, arguments = "integer" } implement { name = "doanalyzeframedbox", actions = doanalyzeframedbox, arguments = "integer" } -function nodes.maxboxwidth(box) +local function maxboxwidth(box) local boxwidth = getfield(box,"width") if boxwidth == 0 then return 0 @@ -219,4 +219,13 @@ function nodes.maxboxwidth(box) for v in traverse_id(vlist_code,list) do -- no dir etc needed check(v,false) end + return maxwidth end + +nodes.maxboxwidth = maxboxwidth + +implement { + name = "themaxboxwidth", + actions = function(n) context("%isp",maxboxwidth(getbox(n))) end, + arguments = "integer" +} diff --git a/tex/context/base/mkiv/pack-rul.mkiv b/tex/context/base/mkiv/pack-rul.mkiv index 9737fb288..0d6ab20bd 100644 --- a/tex/context/base/mkiv/pack-rul.mkiv +++ b/tex/context/base/mkiv/pack-rul.mkiv @@ -3052,4 +3052,13 @@ \c!foregroundstyle=\framedparameter\c!style, \c!foregroundcolor=\framedparameter\c!color] +%D Bonus (as defined in \type {pack-rul.lua}): +%D +%D \starttyping +%D \setbox\scratchbox\vbox{a\par aa\par aaa\par} +%D \the\dimexpr\themaxboxwidth\scratchbox\relax +%D \stoptyping + +\let\themaxboxwidth\clf_themaxboxwidth + \protect \endinput diff --git a/tex/context/base/mkiv/page-set.mkiv b/tex/context/base/mkiv/page-set.mkiv index 6a3d550bd..fab6bc086 100644 --- a/tex/context/base/mkiv/page-set.mkiv +++ b/tex/context/base/mkiv/page-set.mkiv @@ -1170,10 +1170,15 @@ \page_set_command_set_vsize} \def\OTRSETcheckprefered - {\ifnum\floatcolumn<\mofcolumns + {\ifx\floatcolumn\empty + \let\pofcolumns\nofcolumns + \else\ifnum\floatcolumn<\mofcolumns \let\pofcolumns\mofcolumns \else \let\pofcolumns\floatcolumn + \fi\fi + \ifx\floatrow\empty + \let\pofcolumns\plusone \fi \ifquitincurrentcolumn \ifnum\mofcolumns=\nofcolumns diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf index 0950af5fd..10a5fd251 100644 Binary files a/tex/context/base/mkiv/status-files.pdf and b/tex/context/base/mkiv/status-files.pdf differ diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf index f3c2a95fd..bda7542f2 100644 Binary files a/tex/context/base/mkiv/status-lua.pdf and b/tex/context/base/mkiv/status-lua.pdf differ diff --git a/tex/context/base/mkiv/strc-flt.mkvi b/tex/context/base/mkiv/strc-flt.mkvi index ff06b4609..334d98a93 100644 --- a/tex/context/base/mkiv/strc-flt.mkvi +++ b/tex/context/base/mkiv/strc-flt.mkvi @@ -2043,6 +2043,9 @@ % \let\floatrow \empty % \setfloatmethodvariables\floatlocation % todo: nog algemeen otr +% \ifdefined\OTRSETsetpreferedcolumnslot +% \OTRSETsetpreferedcolumnslot\floatcolumn\floatrow +% \fi \ifcsname\??floatmethods\currentoutputroutine:\floatmethod\endcsname \else \let\floatmethod\v!here \fi diff --git a/tex/context/base/mkiv/strc-syn.mkiv b/tex/context/base/mkiv/strc-syn.mkiv index 28d418751..72c94d069 100644 --- a/tex/context/base/mkiv/strc-syn.mkiv +++ b/tex/context/base/mkiv/strc-syn.mkiv @@ -322,6 +322,9 @@ \unexpanded\def\resetusedsynonyms [#1]{\clf_resetusedsynonyms {#1}} \unexpanded\def\resetshownsynonyms [#1]{\clf_resetshownsynonyms {#1}} +\let\rawsynonymname \clf_synonymname +\let\rawsynonymmeaning\clf_synonymmeaning + \installcorenamespace{simplelistalternative} % specific ways of rendering a list \installcorenamespace{simplelistrenderings} % a namespace for setups (rather local) diff --git a/tex/context/interface/common/cont-cs.xml b/tex/context/interface/common/cont-cs.xml index 0d51d5a4f..174a03304 100644 --- a/tex/context/interface/common/cont-cs.xml +++ b/tex/context/interface/common/cont-cs.xml @@ -951,14 +951,6 @@ - - - - - - - - diff --git a/tex/context/interface/common/cont-de.xml b/tex/context/interface/common/cont-de.xml index ede21ab2b..d2144c2e3 100644 --- a/tex/context/interface/common/cont-de.xml +++ b/tex/context/interface/common/cont-de.xml @@ -951,14 +951,6 @@ - - - - - - - - diff --git a/tex/context/interface/common/cont-en.xml b/tex/context/interface/common/cont-en.xml index de2ee4f6a..f640f99bc 100644 --- a/tex/context/interface/common/cont-en.xml +++ b/tex/context/interface/common/cont-en.xml @@ -951,14 +951,6 @@ - - - - - - - - diff --git a/tex/context/interface/common/cont-fr.xml b/tex/context/interface/common/cont-fr.xml index e69e60313..02f00c8d1 100644 --- a/tex/context/interface/common/cont-fr.xml +++ b/tex/context/interface/common/cont-fr.xml @@ -951,14 +951,6 @@ - - - - - - - - diff --git a/tex/context/interface/common/cont-it.xml b/tex/context/interface/common/cont-it.xml index 66843c997..9e0476b76 100644 --- a/tex/context/interface/common/cont-it.xml +++ b/tex/context/interface/common/cont-it.xml @@ -951,14 +951,6 @@ - - - - - - - - diff --git a/tex/context/interface/common/cont-nl.xml b/tex/context/interface/common/cont-nl.xml index 66e430ebb..659e499b5 100644 --- a/tex/context/interface/common/cont-nl.xml +++ b/tex/context/interface/common/cont-nl.xml @@ -951,14 +951,6 @@ - - - - - - - - diff --git a/tex/context/interface/common/cont-pe.xml b/tex/context/interface/common/cont-pe.xml index b4a43eb12..02df71b12 100644 --- a/tex/context/interface/common/cont-pe.xml +++ b/tex/context/interface/common/cont-pe.xml @@ -951,14 +951,6 @@ - - - - - - - - diff --git a/tex/context/interface/common/cont-ro.xml b/tex/context/interface/common/cont-ro.xml index b89dd607e..284813b4b 100644 --- a/tex/context/interface/common/cont-ro.xml +++ b/tex/context/interface/common/cont-ro.xml @@ -951,14 +951,6 @@ - - - - - - - - diff --git a/tex/context/modules/mkiv/x-set-11.mkiv b/tex/context/modules/mkiv/x-set-11.mkiv index c82b9735d..c5810db55 100644 --- a/tex/context/modules/mkiv/x-set-11.mkiv +++ b/tex/context/modules/mkiv/x-set-11.mkiv @@ -70,6 +70,7 @@ triplet: triplet word: woord content: tekst + language: taal \stopmessages \startmessages english library: setup @@ -108,6 +109,7 @@ triplet: triplet word: word content: text + language: language \stopmessages \startmessages german library: setup @@ -146,6 +148,7 @@ triplet: triplet word: word content: text + language: sprache \stopmessages \startmessages czech library: setup @@ -184,6 +187,8 @@ triplet: triplet word: word content: text + % + language: language \stopmessages \startmessages italian library: setup @@ -222,6 +227,8 @@ triplet: triplet word: word content: text + % + language: language \stopmessages \startmessages romanian library: setup @@ -260,6 +267,7 @@ triplet: triplet word: word content: text + language: language \stopmessages \startmessages french library: setup @@ -298,6 +306,8 @@ triplet: triplet word: mot content: texte + % + language: language \stopmessages \unprotect @@ -312,29 +322,32 @@ \unexpanded\def\setupalwcolor{} \unexpanded\def\setupoptcolor{darkgray} -\def\c!setup!definereserved#1#2% - {\setvalue{c!setup!:r:#1}{#2}} +\installcorenamespace{interfacesetup} +\installcorenamespace{interfacesetupreserved} -\def\c!setup!reserved!#1% - {\executeifdefined{c!setup!:r:#1}{#1}} +\installsetuponlycommandhandler \??interfacesetup {setup} % \??interfacesetup -\def\c!setup!internal!#1% +\unexpanded\def\c!setup!definereserved#1#2% + {\setvalue{\??interfacesetupreserved#1}{#2}} + +\unexpanded\def\c!setup!reserved!#1% + {\executeifdefined{\??interfacesetupreserved#1}{#1}} + +\unexpanded\def\c!setup!internal!#1% {\dontleavehmode \begingroup \setupintfont{#1}% \endgroup} -\def\c!setup!text!#1% +\unexpanded\def\c!setup!text!#1% {\dontleavehmode \begingroup \setupvarfont{#1}% \endgroup} -\def\c!setup!command!#1% +\unexpanded\def\c!setup!command!#1% {{\setupvarfont{\texescape...#1}}} -\def\??stp{@@stp} - \defineregister [texmacro] % [texmacros] @@ -346,7 +359,7 @@ \setupsorting [texcommand] [\c!command=\showsetupinlist, - \c!criterium=\@@stpcriterium] + \c!criterium=\setupparameter\c!criterium] \pushmacro\setuptext @@ -369,8 +382,7 @@ } { \let\currentSETUPprefix\empty } - % \edef\currentSETUPname{\xmlatt{#1}{name}} - \edef\currentSETUPname{\xmlattribute{#1}{/sequence/string[1]}{value}}% + \edef\currentSETUPname{\xmlatt{#1}{name}} \doifelse {\xmlatt{#1}{generated}} {yes} { \def\currentSETUPgenerated{*} } { @@ -379,7 +391,8 @@ \doifelsenothing {\xmlatt{#1}{variant}} { \let\currentSETUPvariant\empty } { - \def\currentSETUPvariant{:\xmlatt{#1}{variant}} + %\def\currentSETUPvariant{:\xmlatt{#1}{variant}} + \def\currentSETUPvariant{:\xmllastatt} } \edef\currentSETUPfullname { \currentSETUPprefix @@ -395,13 +408,38 @@ \expanded{\texcommand[stp:x:\currentSETUPfullname]{#1}} \stopxmlsetups +\startluacode + + -- normally a lookup is fast enough but here we can have many setups + -- spread over many files so we do a little speedup here + + local setups = moduledata.setups or { } + moduledata.setups = setups + local definitions = { } + setups.definitions = definitions + + function xml.functions.setups_define(id) + local x = lxml.getid(id) + for c in xml.collected(x,"/cd:interface/cd:define") do + definitions[c.at.name] = c + end + end + + function moduledata.setups.resolved(name) + lxml.flush(definitions[name]) + end + +\stopluacode + \startxmlsetups xml:setups:basics \xmlinclude{#1}{include}{filename}% \xmlsetsetup {#1} { - sequence|string|variable|assignments|keywords|content|displaymath|index|math| + sequence|string|variable|assignments|keywords|content|displaymath|index|math|argument| nothing|file|position|reference|csname|destination|triplet|word| - resolve|parameter|constant|inherit|parameter|define + resolve|define| + parameter|constant|inherit|parameter } {xml:setups:*} + \xmlfunction{#1}{setups_define} \stopxmlsetups \xmlregisterdocumentsetup{setups}{xml:setups:basics} @@ -425,14 +463,13 @@ \unexpanded\def\setup {\shortsetupfalse\doshowsetup} \unexpanded\def\showsetup {\shortsetupfalse\doshowsetup} \unexpanded\def\shortsetup{\shortsetuptrue \doshowsetup} -\unexpanded\def\setupsetup{\dodoubleargument\getparameters[\??stp]} %unexpanded\def\showsetupinlist#1#2#3{\shortsetupfalse\showsetupindeed{#3}\par} \unexpanded\def\showsetupinlist#1#2#3{\shortsetupfalse\xmlsetup{#3}{xml:setups:typeset}\par} % todo: only references in lists -\def\doshowsetup +\unexpanded\def\doshowsetup {\dosingleempty\dodoshowsetup} \def\dodoshowsetup[#1]% @@ -446,19 +483,11 @@ {\registersort[texcommand][stp:x:#1]% \showsetupindeed{#1}} -% \def\showsetupindeed#1% -% {\xmlfilterlist{\loadedsetups}{interface/command[@name='#1']/command(xml:setups:typeset)}} - -% \def\showsetupindeed#1% -% {\xmlfilterlist{\loadedsetups}{/interface/command['#1' == (@type=='environment' and 'start' or '') .. @name]/command(xml:setups:typeset)}} - -% \setelementnature[setup][display] -% \setelementnature[setup][mixed] - \def\showsetupindeed#1% {\startelement[setup][name=#1]% \startelement[noexport][comment={setup definition #1}] - \xmlfilterlist{\loadedsetups}{/interface/command['#1' == (@type=='environment' and '\e!start' or '') .. @name]/command(xml:setups:typeset)}% + \xmlsetup{\rawsynonymname{texcommand}{stp:x:#1}}{xml:setups:typeset} + % \xmlfilterlist{\loadedsetups}{/interface/command['#1' == (@type=='environment' and '\e!start' or '') .. @name]/command(xml:setups:typeset)}% \stopelement \stopelement} @@ -470,8 +499,7 @@ %D Typesetting: \setupxml - [%\c!method=mkiv, % mixed mode - \c!default=\v!hidden, % ignore elements that are not defined + [\c!default=\v!hidden, % ignore elements that are not defined \c!compress=\v!yes, % strip comment \c!entities=\v!yes] % replace entities @@ -495,7 +523,11 @@ } \letterbackslash \doif {\xmlatt{#1}{type}} {environment} { - \e!start + \doifsomethingelse {\xmlatt{#1}{begin}} { + \xmllastatt + } { + \e!start + } } \xmlfilter{#1}{/sequence/first()} \ignorespaces @@ -518,7 +550,12 @@ \doif {\xmlatt{#1}{generated}} {yes} { \ttsl } - \tex{\e!stop} + \letterbackslash + \doifsomethingelse {\xmlatt{#1}{end}} { + \xmllastatt + } { + \e!stop + } \xmlfilter{#1}{/sequence/first()} \ignorespaces \egroup @@ -544,9 +581,12 @@ \c!command=\setup, \c!criterium=\v!used] +% slow ... also hash this + \startxmlsetups xml:setups:resolve \ignorespaces - \xmlfilterlist{\loadedsetups}{/interface/define[@name='\xmlatt{#1}{name}']/first()} + \ctxlua{moduledata.setups.resolved('\xmlatt{#1}{name}')} + % \xmlfilterlist{\loadedsetups}{/interface/define[@name='\xmlatt{#1}{name}']/first()} \stopxmlsetups %D This is the first pass; here we generate the top line. @@ -565,6 +605,7 @@ \startxmlsetups xml:setups:content \showSETUPcomponent{#1}{content} {content} \stopxmlsetups \startxmlsetups xml:setups:displaymath \showSETUPcomponent{#1}{displaymath}{display math}\stopxmlsetups +\startxmlsetups xml:setups:argument \showSETUPcomponent{#1}{argument} {argument} \stopxmlsetups \startxmlsetups xml:setups:index \showSETUPcomponent{#1}{index} {index} \stopxmlsetups \startxmlsetups xml:setups:math \showSETUPcomponent{#1}{math} {math} \stopxmlsetups \startxmlsetups xml:setups:nothing \showSETUPcomponent{#1}{nothing} {nothing} \stopxmlsetups @@ -576,7 +617,7 @@ \startxmlsetups xml:setups:triplet \showSETUPcomponent{#1}{triplet} {triplet} \stopxmlsetups \startxmlsetups xml:setups:word \showSETUPcomponent{#1}{word} {word} \stopxmlsetups -\def\showSETUPcomponent#1#2#3% +\unexpanded\def\showSETUPcomponent#1#2#3% {\doifelsemode{setups-pass-one} {\getvalue{showSETUP#2}{#1}} {\simpleSETUPargument{#3}}} @@ -585,8 +626,9 @@ \unexpanded\def\startfirstSETUPcolumn#1% {\bgroup - \advance\leftskip 2em - \noindent\llap{\hbox to 2em{#1\hss}}} + \scratchdimen2\emwidth + \advance\leftskip \scratchdimen + \noindent\llap{\hbox to \scratchdimen{#1\hss}}} \unexpanded\def\stopfirstSETUPcolumn {\endgraf @@ -594,34 +636,32 @@ \unexpanded\def\startsecondSETUPcolumn#1#2% {\bgroup - \advance\hangindent\dimexpr\currentSETUPwidth+2.5em\relax - \noindent \hbox to \hangindent{#1\hss\hbox to 2.5em{\hss#2\hss}}} + \scratchdimen2.5\emwidth + \advance\hangindent\dimexpr\currentSETUPwidth+\scratchdimen\relax + \noindent \hbox to \hangindent{#1\hss\hbox to \scratchdimen{\hss#2\hss}}} \unexpanded\def\stopsecondSETUPcolumn {\endgraf \egroup} -\def\secondSETUPcolumn#1#2% +\unexpanded\def\secondSETUPcolumn#1#2% {\startsecondSETUPcolumn{#1}{#2}\stopsecondSETUPcolumn} \def\previousSETUPargument{\currentSETUPargument} -\startxmlsetups xml:setups:parameter:measure - \setbox0=\hbox{\c!setup!reserved!{\xmlatt{#1}{name}}} - \ifdim\wd0>\currentSETUPwidth\xdef\currentSETUPwidth{\the\wd0}\fi -\stopxmlsetups - \startxmlsetups xml:setups:assignments \doifelsemode{setups-pass-one} { \showSETUPassignment{#1} } { \xdef\currentSETUPwidth{0pt}% - \bgroup - \xmlfilter{#1}{/parameter/command(xml:setups:parameter:measure)} + \setbox\scratchbox\vbox\bgroup + \setmode{setups-measure} + \xmlall{#1}{/(parameter|resolve)} \egroup + \xdef\currentSETUPwidth{\themaxboxwidth\scratchbox}% \startfirstSETUPcolumn{\showSETUPnumber}% \ignorespaces - \xmldoifelse{#1}{/(parameter|inherit)}{ + \xmldoifelse {#1} {/(parameter|inherit)} { \xmlflush{#1} } { ... @@ -648,32 +688,45 @@ \stopxmlsetups \startxmlsetups xml:setups:parameter - \startsecondSETUPcolumn{\c!setup!reserved!{\xmlatt{#1}{name}}}{=} - \ignorespaces - \xmlflush{#1} - \doifmode{interface:setup:defaults} { - \ifx\currentSETUPhash\empty \else - \begingroup - % todo, make a one level expansion of parameter - \let\emwidth \relax - \let\exheight\relax - \edef\currentSETUPvalue{\csname named\currentSETUPhash parameter\endcsname\empty{\xmlatt{#1}{name}}} - \ifx\currentSETUPvalue\empty \else - =\space - \detokenize\expandafter{\currentSETUPvalue} - \fi - \endgroup - \fi - } - \stopsecondSETUPcolumn + \doifmodeelse {setups-measure} { + \c!setup!reserved!{\xmlatt{#1}{name}}\par + } { + \startsecondSETUPcolumn{\c!setup!reserved!{\xmlatt{#1}{name}}}{=} + \ignorespaces + \xmlflush{#1} + \doifmode{interface:setup:defaults} { + \ifx\currentSETUPhash\empty \else + \begingroup + % todo, make a one level expansion of parameter + \let\emwidth \relax + \let\exheight\relax + \edef\currentSETUPvalue{\csname named\currentSETUPhash parameter\endcsname\empty{\xmlatt{#1}{name}}} + \ifx\currentSETUPvalue\empty \else + =\space + \detokenize\expandafter{\currentSETUPvalue} + \fi + \endgroup + \fi + } + \stopsecondSETUPcolumn + } \ignorespaces \stopxmlsetups +\xmlmapvalue{setups:method}{class}{:} +\xmlmapvalue{setups:method}{apply}{->} +\xmlmapvalue{setups:method}{none} {} + \startxmlsetups xml:setups:constant \doifelsemode {setups-pass-one} { } { - \doif {\xmlatt{#1}{default}} {yes} { - \underbar % next needs to be {braced} + \doifsomethingelse{\xmlatt{#1}{prefix}} { + \c!setup!reserved!{\xmllastatt} + \xmlmappedvalue{setups:method}{\xmlatt{#1}{method}}{none} + } { + \doif {\xmlatt{#1}{default}} {yes} { + \underbar % next needs to be {braced} + } } {\c!setup!reserved!{\xmlatt{#1}{type}}} \space @@ -701,7 +754,7 @@ \ignorespaces \stopxmlsetups -\def\simpleSETUPargument#1% +\unexpanded\def\simpleSETUPargument#1% {\startfirstSETUPcolumn{\showSETUPnumber}% \c!setup!internal!{#1}% \stopfirstSETUPcolumn @@ -724,12 +777,16 @@ \c!setup!definereserved {cd:matrix} {\c!setup!internal!{\getmessage{setup}{matrix}}} \c!setup!definereserved {cd:list} {\c!setup!internal!{\getmessage{setup}{list}}} \c!setup!definereserved {cd:section} {\c!setup!internal!{\getmessage{setup}{section}}} +\c!setup!definereserved {cd:language} {\c!setup!internal!{\getmessage{setup}{language}}} +\c!setup!definereserved {cd:section} {\c!setup!internal!{\getmessage{setup}{section}}} \c!setup!definereserved {cd:noargument} {\c!setup!command! {}} \c!setup!definereserved {cd:oneargument} {\c!setup!command! {\#1}} \c!setup!definereserved {cd:twoarguments} {\c!setup!command! {\#1\#2}} \c!setup!definereserved {cd:threearguments} {\c!setup!command! {\#1\#2\#3}} +\c!setup!definereserved {cd:sign} {[-+]} + %D Auxiliary. \unexpanded\def\showSETUP#1#2#3% @@ -739,25 +796,27 @@ {\doifelse{\xmlatt{#1}{list}}{yes}{#3}{#2}}% \setbox2=\hbox to \wd0 {\hss - \raise1ex\hbox + \raise\exheight\hbox {\tx\ifcase\maximumSETUPargument\relax \or*\else\currentSETUPargument \fi}% \hss}% \setbox4=\hbox to \wd0 {\hss - \lower2ex\hbox + \lower2\exheight\hbox \bgroup - \txx\doif{\xmlatt{#1}{optional}}{yes}{\c!setup!internal!{\getmessage{setup}{optional}}}% + \txx + \doif {\xmlatt{#1}{optional}} {yes} + {\c!setup!internal!{\getmessage{setup}{optional}}}% \egroup \hss}% \ht2\ht\strutbox \dp4\dp\strutbox - \hskip.5em\hsmash{\box0}\hsmash{\box4}\box2% + \hskip.5\emwidth\hsmash{\box0}\hsmash{\box4}\box2\relax \egroup \ignorespaces} -\def\showSETUPnumber +\unexpanded\def\showSETUPnumber {\doglobal\increment\currentSETUPargument \hbox to 2em {\ifcase\maximumSETUPargument\relax @@ -765,21 +824,21 @@ \fi \hss}} -\def\showSETUPassignment #1{\showSETUP{#1}{[.\lower.5ex\hbox{=}.]} {[..,.\lower.5ex\hbox{=}.,..]}} -\def\showSETUPkeyword #1{\showSETUP{#1}{[...]} {[...,...]}} -\def\showSETUPargument #1{\showSETUP{#1}{\leftargument..\rightargument} {\leftargument..,...,..\rightargument}} -\def\showSETUPdisplaymath#1{\showSETUP{#1}{\$\$...\$\$} {\$\$...\$\$}} -\def\showSETUPindex #1{\showSETUP{#1}{\leftargument...\rightargument} {\leftargument..+...+..\rightargument}} -\def\showSETUPmath #1{\showSETUP{#1}{\$...\$} {\$...\$}} -\def\showSETUPnothing #1{\showSETUP{#1}{...} {}} -\def\showSETUPfile #1{\showSETUP{#1}{~...~} {}} -\def\showSETUPposition #1{\showSETUP{#1}{(...)} {(...,...)}} -\def\showSETUPreference #1{\showSETUP{#1}{[...]} {[...,...]}} -\def\showSETUPcsname #1{\showSETUP{#1}{{\c!setup!command!{}}} {}} -\def\showSETUPdestination#1{\showSETUP{#1}{[\leftargument..[ref]\rightargument]}{[..,\leftargument..[ref,..]\rightargument,..]}} -\def\showSETUPtriplet #1{\showSETUP{#1}{[x:y:z=]} {[x:y:z=,..]}} -\def\showSETUPword #1{\showSETUP{#1}{\leftargument...\rightargument} {\leftargument.. ... ..\rightargument}} -\def\showSETUPcontent #1{\showSETUP{#1}{\leftargument...\rightargument} {\leftargument.. ... ..\rightargument}} +\unexpanded\def\showSETUPassignment #1{\showSETUP{#1}{[.\lower.5ex\hbox{=}.]} {[..,.\lower.5ex\hbox{=}.,..]}} +\unexpanded\def\showSETUPkeyword #1{\showSETUP{#1}{[...]} {[...,...]}} +\unexpanded\def\showSETUPargument #1{\showSETUP{#1}{\leftargument..\rightargument} {\leftargument..,...,..\rightargument}} +\unexpanded\def\showSETUPdisplaymath#1{\showSETUP{#1}{\$\$...\$\$} {\$\$...\$\$}} +\unexpanded\def\showSETUPindex #1{\showSETUP{#1}{\leftargument...\rightargument} {\leftargument..+...+..\rightargument}} +\unexpanded\def\showSETUPmath #1{\showSETUP{#1}{\$...\$} {\$...\$}} +\unexpanded\def\showSETUPnothing #1{\showSETUP{#1}{...} {}} +\unexpanded\def\showSETUPfile #1{\showSETUP{#1}{~...~} {}} +\unexpanded\def\showSETUPposition #1{\showSETUP{#1}{(...)} {(...,...)}} +\unexpanded\def\showSETUPreference #1{\showSETUP{#1}{[...]} {[...,...]}} +\unexpanded\def\showSETUPcsname #1{\showSETUP{#1}{{\c!setup!command!{}}} {}} +\unexpanded\def\showSETUPdestination#1{\showSETUP{#1}{[\leftargument..[ref]\rightargument]}{[..,\leftargument..[ref,..]\rightargument,..]}} +\unexpanded\def\showSETUPtriplet #1{\showSETUP{#1}{[x:y:z=]} {[x:y:z=,..]}} +\unexpanded\def\showSETUPword #1{\showSETUP{#1}{\leftargument...\rightargument} {\leftargument.. ... ..\rightargument}} +\unexpanded\def\showSETUPcontent #1{\showSETUP{#1}{\leftargument...\rightargument} {\leftargument.. ... ..\rightargument}} % A prelude to a rewrite and some more: @@ -787,6 +846,8 @@ % \definetype[parameterkey] [\v!type] % \definetype[parametervalue] [\v!type][\c!space=\v!on] +% todo: no list but hash .. + \definetype[parametercommand] \definetype[parameterkey] \definetype[parametervalue] [\c!space=\v!on] @@ -796,7 +857,7 @@ \startxmlsetups xml:setups:parameters:value \edef\currentsetupparameterkey {\xmlatt{#1}{name}} - \edef\currentsetupparametervalue{\csname named\currentsetupparametercategory parameter\endcsname\currentsetupparameterinstance\currentsetupparameterkey} + \edef\currentsetupparametervalue{\begincsname named\currentsetupparametercategory parameter\endcsname\currentsetupparameterinstance\currentsetupparameterkey} \ifx\currentsetupparameterinstance\empty \expanded { \NC \parameterkey {\currentsetupparameterkey} @@ -805,7 +866,7 @@ } \else\ifx\currentsetupparametervalue\empty \else - \edef\currentsetupparameterdefault{\csname named\currentsetupparametercategory parameter\endcsname\empty\currentsetupparameterkey} + \edef\currentsetupparameterdefault{\begincsname named\currentsetupparametercategory parameter\endcsname\empty\currentsetupparameterkey} \ifx\currentsetupparametervalue\currentsetupparameterdefault % skip \else @@ -835,7 +896,7 @@ \starttabulate[|l|p|] \xmlall {#1} - {/interface/command[@name=='\currentsetupparametercommand']/arguments/assignments/parameter/command(xml:setups:parameters:value)} + {/interface/command[@name=='\currentsetupparametercommand' or @handler=='\currentsetupparametercommand']/arguments/assignments/parameter/command(xml:setups:parameters:value)} \ifnum\noftabulaterows = \zerocount \NC \parameterkey{no specific settings} \NC \NC \NR \fi diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index c1e2902c6..7c6ae801b 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 : c:/data/develop/context/sources/luatex-fonts-merged.lua -- parent file : c:/data/develop/context/sources/luatex-fonts.lua --- merge date : 01/14/16 09:55:22 +-- merge date : 01/17/16 18:49:30 do -- begin closure to overcome local limits and interference diff --git a/tex/generic/context/luatex/luatex-pdf.tex b/tex/generic/context/luatex/luatex-pdf.tex index c48a0336b..8b80addc2 100644 --- a/tex/generic/context/luatex/luatex-pdf.tex +++ b/tex/generic/context/luatex/luatex-pdf.tex @@ -94,18 +94,18 @@ % converted - \gdef\pdftexversion {\numexpr\pdffeedback version} + \gdef\pdftexversion {\numexpr\pdffeedback version\relax} \gdef\pdftexrevision {\pdffeedback revision} - \gdef\pdflastlink {\numexpr\pdffeedback lastlink} - \gdef\pdfretval {\numexpr\pdffeedback retval} - \gdef\pdflastobj {\numexpr\pdffeedback lastobj} - \gdef\pdflastannot {\numexpr\pdffeedback lastannot} - \gdef\pdfxformname {\numexpr\pdffeedback xformname} + \gdef\pdflastlink {\numexpr\pdffeedback lastlink\relax} + \gdef\pdfretval {\numexpr\pdffeedback retval\relax} + \gdef\pdflastobj {\numexpr\pdffeedback lastobj\relax} + \gdef\pdflastannot {\numexpr\pdffeedback lastannot\relax} + \gdef\pdfxformname {\numexpr\pdffeedback xformname\relax} \gdef\pdfcreationdate {\pdffeedback creationdate} - \gdef\pdffontname {\numexpr\pdffeedback fontname} - \gdef\pdffontobjnum {\numexpr\pdffeedback fontobjnum} - \gdef\pdffontsize {\dimexpr\pdffeedback fontsize} - \gdef\pdfpageref {\numexpr\pdffeedback pageref} + \gdef\pdffontname {\numexpr\pdffeedback fontname\relax} + \gdef\pdffontobjnum {\numexpr\pdffeedback fontobjnum\relax} + \gdef\pdffontsize {\dimexpr\pdffeedback fontsize\relax} + \gdef\pdfpageref {\numexpr\pdffeedback pageref\relax} \gdef\pdfcolorstackinit {\pdffeedback colorstackinit} % registers -- cgit v1.2.3