diff options
Diffstat (limited to 'tex/context/base/mkiv')
-rw-r--r-- | tex/context/base/mkiv/cont-new.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/context.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/lxml-ini.lua | 1 | ||||
-rw-r--r-- | tex/context/base/mkiv/lxml-ini.mkiv | 5 | ||||
-rw-r--r-- | tex/context/base/mkiv/lxml-tex.lua | 4 | ||||
-rw-r--r-- | tex/context/base/mkiv/math-ali.mkiv | 36 | ||||
-rw-r--r-- | tex/context/base/mkiv/pack-rul.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/publ-imp-apa.lua | 1 | ||||
-rw-r--r-- | tex/context/base/mkiv/publ-imp-cite.mkvi | 16 | ||||
-rw-r--r-- | tex/context/base/mkiv/publ-ini.mkiv | 2 | ||||
-rw-r--r-- | tex/context/base/mkiv/publ-tra.lua | 120 | ||||
-rw-r--r-- | tex/context/base/mkiv/status-files.pdf | bin | 25745 -> 25753 bytes | |||
-rw-r--r-- | tex/context/base/mkiv/status-lua.pdf | bin | 425934 -> 426127 bytes |
13 files changed, 125 insertions, 66 deletions
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv index 59ff7e2ee..1cf30f5bb 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{2017.08.10 10:46} +\newcontextversion{2017.08.11 14:00} %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 40444815d..d9e2e3fc3 100644 --- a/tex/context/base/mkiv/context.mkiv +++ b/tex/context/base/mkiv/context.mkiv @@ -41,7 +41,7 @@ %D up and the dependencies are more consistent. \edef\contextformat {\jobname} -\edef\contextversion{2017.08.10 10:46} +\edef\contextversion{2017.08.11 14:00} \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 09a13eb5c..6b22caf26 100644 --- a/tex/context/base/mkiv/lxml-ini.lua +++ b/tex/context/base/mkiv/lxml-ini.lua @@ -76,6 +76,7 @@ implement { name = "xmlfunction", actions = lxml.applyfunction, arg implement { name = "xmlinclude", actions = lxml.include, arguments = { "string", "string", "string", true } } implement { name = "xmlincludeoptions", actions = lxml.include, arguments = { "string", "string", "string", "string" } } implement { name = "xmlinclusion", actions = lxml.inclusion, arguments = "string" } +implement { name = "xmlinclusionbase", actions = lxml.inclusion, arguments = { "string", false, true } } implement { name = "xmlinclusions", actions = lxml.inclusions, arguments = "string" } implement { name = "xmlbadinclusions", actions = lxml.badinclusions, arguments = "string" } implement { name = "xmlindex", actions = lxml.index, arguments = { "string", "string", "string" } } -- can be integer but now we can alias diff --git a/tex/context/base/mkiv/lxml-ini.mkiv b/tex/context/base/mkiv/lxml-ini.mkiv index d4616edca..9c0b70b0b 100644 --- a/tex/context/base/mkiv/lxml-ini.mkiv +++ b/tex/context/base/mkiv/lxml-ini.mkiv @@ -75,6 +75,7 @@ \let\xmlinclude \clf_xmlinclude \let\xmlincludeoptions \clf_xmlincludeoptions \let\xmlinclusion \clf_xmlinclusion +\let\xmlinclusionbase \clf_xmlinclusionbase \let\xmlinclusions \clf_xmlinclusions \let\xmlbadinclusions \clf_xmlbadinclusions \let\xmlindex \clf_xmlindex @@ -116,8 +117,8 @@ \let\xmltoparameters \clf_xmltoparameters \let\xmlverbatim \clf_xmlverbatim -\unexpanded\def\xmlinfo #1{\hbox{\ttxx[\clf_xmlname{#1}]}} -\unexpanded\def\xmlshow #1{\startpacked\ttx\xmlverbatim{#1}\stoppacked} +\unexpanded\def\xmlinfo#1{\hbox{\ttxx[\clf_xmlname{#1}]}} +\unexpanded\def\xmlshow#1{\startpacked\ttx\xmlverbatim{#1}\stoppacked} % the next one is handy for mode runs because it enforces a consistent % #1 indexing (needed when using \xmltext{main:123}{...} like calls diff --git a/tex/context/base/mkiv/lxml-tex.lua b/tex/context/base/mkiv/lxml-tex.lua index cfebee650..b7c76c193 100644 --- a/tex/context/base/mkiv/lxml-tex.lua +++ b/tex/context/base/mkiv/lxml-tex.lua @@ -621,10 +621,10 @@ function lxml.include(id,pattern,attribute,options) stoptiming(xml) end -function lxml.inclusion(id,default) +function lxml.inclusion(id,default,base) local inclusion = xmlinclusion(getid(id),default) if inclusion then - context(inclusion) + context(base and basename(inclusion) or inclusion) end end diff --git a/tex/context/base/mkiv/math-ali.mkiv b/tex/context/base/mkiv/math-ali.mkiv index 1ff72630b..7af5fab97 100644 --- a/tex/context/base/mkiv/math-ali.mkiv +++ b/tex/context/base/mkiv/math-ali.mkiv @@ -232,20 +232,46 @@ \math_halign_checked\expandafter\bgroup\the\scratchtoks\crcr#2\crcr\egroup \math_finish_eqalign_no} +% \def\math_both_eqalign_no_aligned#1% +% {\ifmmode +% \the\mathdisplayaligntweaks +% \global\mathnumberstatus\plusone +% \ifcase\mathraggedstatus +% \def\math_finish_eqalign_no{\crcr\egroup}% +% \else +% % we're in a mathbox +% \vcenter\bgroup +% \def\math_finish_eqalign_no{\crcr\egroup\egroup}% +% \fi +% \fi +% #1% +% \math_halign_checked\expandafter\bgroup\the\scratchtoks\crcr} + +\installcorenamespace {mathalignlocation} + +\setvalue{\??mathalignlocation\v!top }{\let\math_alignment_halign_method\halign\tpack} +\setvalue{\??mathalignlocation\v!bottom}{\let\math_alignment_halign_method\halign\vpack} +\setvalue{\??mathalignlocation\v!center}{\let\math_alignment_halign_method\halign\vcenter} + \def\math_both_eqalign_no_aligned#1% - {\ifmmode + {\let\math_alignment_halign_method\math_halign_checked + \ifmmode \the\mathdisplayaligntweaks \global\mathnumberstatus\plusone \ifcase\mathraggedstatus \def\math_finish_eqalign_no{\crcr\egroup}% - \else - % we're in a mathbox - \vcenter\bgroup + \else % we're in a mathbox + \ifcsname\??mathalignlocation\mathalignmentparameter\c!location\endcsname + \lastnamedcs % top|bottom|center as suggested by HM + \else + \vcenter + \fi + \bgroup \def\math_finish_eqalign_no{\crcr\egroup\egroup}% \fi \fi #1% - \math_halign_checked\expandafter\bgroup\the\scratchtoks\crcr} + \math_alignment_halign_method\expandafter\bgroup\the\scratchtoks\crcr} \def\math_rlap#1% {\setbox\scratchbox\hbox{#1}% diff --git a/tex/context/base/mkiv/pack-rul.mkiv b/tex/context/base/mkiv/pack-rul.mkiv index eec7b8cb3..ac2a3f171 100644 --- a/tex/context/base/mkiv/pack-rul.mkiv +++ b/tex/context/base/mkiv/pack-rul.mkiv @@ -1806,7 +1806,7 @@ \dp\b_framed_normal\scratchdimen \hpack{\box\b_framed_normal}} -\installframedlocator \v!lohi +\installframedlocator \v!lohi % maybe also \v!center {\pack_framed_locator_before\v!middle} {\pack_framed_locator_after \v!middle} diff --git a/tex/context/base/mkiv/publ-imp-apa.lua b/tex/context/base/mkiv/publ-imp-apa.lua index a725bf22f..8a1cc1b9c 100644 --- a/tex/context/base/mkiv/publ-imp-apa.lua +++ b/tex/context/base/mkiv/publ-imp-apa.lua @@ -175,6 +175,7 @@ categories.book = { "editionset", "series", "address", "doi", "note", + "abstract", }, } diff --git a/tex/context/base/mkiv/publ-imp-cite.mkvi b/tex/context/base/mkiv/publ-imp-cite.mkvi index a9b681d33..56af83a1b 100644 --- a/tex/context/base/mkiv/publ-imp-cite.mkvi +++ b/tex/context/base/mkiv/publ-imp-cite.mkvi @@ -88,15 +88,17 @@ {\tt <\currentbtxreference>} \stopsetups -\starttexdefinition unexpanded btx:cite:concat - \btxparameter{\c!separator:\number\currentbtxconcat} -\stoptexdefinition +\startsetups btx:cite:concat + \startbtxrunningstyleandcolor + \btxparameter{\c!separator:\number\currentbtxconcat} + \stopbtxrunningstyleandcolor +\stopsetups % when we have an author-year combination, the first and seconds is not % fields data but something more complex (that itself calls for a setup) \startsetups btx:cite:normal - \texdefinition{\s!btx:\s!cite:concat} + \fastsetup{\s!btx:\s!cite:concat} \fastsetup{\s!btx:\s!cite:lefttext} \ifx\currentbtxfirst\empty \fastsetup{\s!btx:\s!cite:\s!empty} @@ -123,7 +125,7 @@ \stopsetups \startsetups btx:cite:range - \texdefinition{\s!btx:\s!cite:concat} + \fastsetup{\s!btx:\s!cite:concat} \fastsetup{\s!btx:\s!cite:lefttext} \ifx\currentbtxfirst\empty \fastsetup{\s!btx:\s!cite:\s!empty} @@ -146,7 +148,7 @@ % somehow related to keywords: \startsetups btx:cite:listelement - \texdefinition{\s!btx:\s!cite:concat} + \fastsetup{\s!btx:\s!cite:concat} \fastsetup{\s!btx:\s!cite:lefttext} \ifx\currentbtxfirst\empty \fastsetup{\s!btx:\s!cite:\s!empty} @@ -160,7 +162,7 @@ \stopsetups \startsetups \s!btx:\s!cite:entry - \texdefinition{\s!btx:\s!cite:concat} + \fastsetup{\s!btx:\s!cite:concat} \fastsetup{\s!btx:\s!cite:lefttext} \btxhandleciteentry \fastsetup{\s!btx:\s!cite:righttext} diff --git a/tex/context/base/mkiv/publ-ini.mkiv b/tex/context/base/mkiv/publ-ini.mkiv index 5e467177b..981aa8f36 100644 --- a/tex/context/base/mkiv/publ-ini.mkiv +++ b/tex/context/base/mkiv/publ-ini.mkiv @@ -1817,7 +1817,7 @@ \c!pagestate=\v!stop, \c!textstate=\v!start, \c!width=\v!auto, - \c!separator={\btxsemicolon}, + \c!separator={\removepunctuation;\space}, \c!distance=1.5\emwidth] % Quite some interpunction and labels are the same of at least consistent within diff --git a/tex/context/base/mkiv/publ-tra.lua b/tex/context/base/mkiv/publ-tra.lua index b3d40be61..81bbc2fd3 100644 --- a/tex/context/base/mkiv/publ-tra.lua +++ b/tex/context/base/mkiv/publ-tra.lua @@ -103,7 +103,7 @@ function tracers.showdatasetcompleteness(settings) local preamble = { "|lTBw(5em)|lBTp(10em)|plT|" } - local function identified(tag,category,crossref,index) + local function do_identified(tag,category,crossref,index) ctx_NC() ctx_monobold(index) ctx_NC() ctx_monobold(category) ctx_NC() if crossref then @@ -114,7 +114,7 @@ function tracers.showdatasetcompleteness(settings) ctx_NC() ctx_NR() end - local function required(done,foundfields,key,value,indirect) + local function do_required(done,found,key,value,indirect) ctx_NC() if not done then ctx_monobold("required") end ctx_NC() context(key) ctx_NC() @@ -131,11 +131,11 @@ function tracers.showdatasetcompleteness(settings) context("\\darkred\\tttf [missing value]") end ctx_NC() ctx_NR() - foundfields[key] = nil + found[key] = nil return done or true end - local function optional(done,foundfields,key,value,indirect) + local function do_optional(done,found,key,value,indirect) ctx_NC() if not done then ctx_monobold("optional") end ctx_NC() context(key) ctx_NC() @@ -146,11 +146,11 @@ function tracers.showdatasetcompleteness(settings) ctx_verbatim(value) end ctx_NC() ctx_NR() - foundfields[key] = nil + found[key] = nil return done or true end - local function special(done,key,value) + local function do_special(done,key,value) ctx_NC() if not done then ctx_monobold("special") end ctx_NC() context(key) ctx_NC() if value then ctx_verbatim(value) end @@ -158,7 +158,7 @@ function tracers.showdatasetcompleteness(settings) return done or true end - local function extra(done,key,value) + local function do_extra(done,key,value) ctx_NC() if not done then ctx_monobold("extra") end ctx_NC() context(key) ctx_NC() if value then ctx_verbatim(value) end @@ -168,84 +168,112 @@ function tracers.showdatasetcompleteness(settings) if next(luadata) then for tag, entry in sortedhash(luadata) do - local category = entry.category - local fields = categories[category] - local foundfields = { } + local category = entry.category + local fields = categories[category] + local found = { } + local flushed = { } for k, v in next, entry do - foundfields[k] = true + found[k] = true end ctx_starttabulate(preamble) - identified(tag,category,entry.crossref,entry.index) + do_identified(tag,category,entry.crossref,entry.index) ctx_FL() if fields then - local requiredfields = fields.required - local sets = fields.sets or { } - local done = false - if requiredfields then - for i=1,#requiredfields do - local r = requiredfields[i] + local required = fields.required + local sets = fields.sets or { } + local done = false + if required then + for i=1,#required do + local r = required[i] local r = sets[r] or r if type(r) == "table" then local okay = false for i=1,#r do local ri = r[i] - if rawget(entry,ri) then - done = required(done,foundfields,ri,entry[ri]) - okay = true - elseif entry[ri] then - done = required(done,foundfields,ri,entry[ri],true) - okay = true + if not flushed[ri] then + -- already done + if rawget(entry,ri) then + done = do_required(done,found,ri,entry[ri]) + okay = true + flushed[ri] = true + elseif entry[ri] then + done = do_required(done,found,ri,entry[ri],true) + okay = true + flushed[ri] = true + end end end - if not okay then - done = required(done,foundfields,table.concat(r," {\\letterbar} ")) + if not okay and not flushed[r] then + done = do_required(done,found,concat(r," {\\letterbar} ")) + flushed[r] = true end elseif rawget(entry,r) then - done = required(done,foundfields,r,entry[r]) + if not flushed[r] then + done = do_required(done,found,r,entry[r]) + flushed[r] = true + end elseif entry[r] then - done = required(done,foundfields,r,entry[r],true) + if not flushed[r] then + done = do_required(done,found,r,entry[r],true) + flushed[r] = true + end else - done = required(done,foundfields,r) + if not flushed[r] then + done = do_required(done,found,r) + flushed[r] = true + end end end end - local optionalfields = fields.optional - local done = false - if optionalfields then - for i=1,#optionalfields do - local o = optionalfields[i] + local optional = fields.optional + local done = false + if optional then + for i=1,#optional do + local o = optional[i] local o = sets[o] or o if type(o) == "table" then for i=1,#o do local oi = o[i] - if rawget(entry,oi) then - done = optional(done,foundfields,oi,entry[oi]) - elseif entry[oi] then - done = optional(done,foundfields,oi,entry[oi],true) + if not flushed[oi] then + if rawget(entry,oi) then + done = do_optional(done,found,oi,entry[oi]) + flushed[oi] = true + elseif entry[oi] then + done = do_optional(done,found,oi,entry[oi],true) + flushed[oi] = true + end end end elseif rawget(entry,o) then - done = optional(done,foundfields,o,entry[o]) + if not flushed[o] then + done = do_optional(done,found,o,entry[o]) + flushed[o] = true + end elseif entry[o] then - done = optional(done,foundfields,o,entry[o],true) + if not flushed[o] then + done = do_optional(done,found,o,entry[o],true) + flushed[o] = true + end end end end end local done = false - for k, v in sortedhash(foundfields) do + for k, v in sortedhash(found) do if privates[k] then -- skip - elseif specials[k] then - done = special(done,k,entry[k]) + elseif specials[k] and not flushed[k] then + done = do_special(done,k,entry[k]) + flushed[k] = true end end local done = false - for k, v in sortedhash(foundfields) do + for k, v in sortedhash(found) do if privates[k] then -- skip - elseif not specials[k] then - done = extra(done,k,entry[k]) + elseif not specials[k] and not flushed[k] then + done = do_extra(done,k,entry[k]) + flushed[k] = true end end ctx_stoptabulate() diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf Binary files differindex 078a735e5..72073241d 100644 --- a/tex/context/base/mkiv/status-files.pdf +++ b/tex/context/base/mkiv/status-files.pdf diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf Binary files differindex 8477f929b..c94deff60 100644 --- a/tex/context/base/mkiv/status-lua.pdf +++ b/tex/context/base/mkiv/status-lua.pdf |