diff options
Diffstat (limited to 'tex/context/base/mkxl')
-rw-r--r-- | tex/context/base/mkxl/cont-new.mkxl | 2 | ||||
-rw-r--r-- | tex/context/base/mkxl/context.mkxl | 2 | ||||
-rw-r--r-- | tex/context/base/mkxl/mlib-scn.lmt | 4 | ||||
-rw-r--r-- | tex/context/base/mkxl/node-nut.lmt | 1 | ||||
-rw-r--r-- | tex/context/base/mkxl/spac-ali.mkxl | 3 | ||||
-rw-r--r-- | tex/context/base/mkxl/spac-ver.lmt | 14 | ||||
-rw-r--r-- | tex/context/base/mkxl/spac-ver.mkxl | 7 | ||||
-rw-r--r-- | tex/context/base/mkxl/strc-itm.mklx | 18 | ||||
-rw-r--r-- | tex/context/base/mkxl/supp-box.mkxl | 5 | ||||
-rw-r--r-- | tex/context/base/mkxl/trac-deb.lmt | 10 | ||||
-rw-r--r-- | tex/context/base/mkxl/typo-del.mkxl | 9 |
11 files changed, 51 insertions, 24 deletions
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl index bd8833c4e..28c8d3bf6 100644 --- a/tex/context/base/mkxl/cont-new.mkxl +++ b/tex/context/base/mkxl/cont-new.mkxl @@ -13,7 +13,7 @@ % \normalend % uncomment this to get the real base runtime -\newcontextversion{2021.12.10 11:29} +\newcontextversion{2021.12.14 19:16} %D This file is loaded at runtime, thereby providing an excellent place for hacks, %D patches, extensions and new features. There can be local overloads in cont-loc diff --git a/tex/context/base/mkxl/context.mkxl b/tex/context/base/mkxl/context.mkxl index 81310b47a..93c7f1d69 100644 --- a/tex/context/base/mkxl/context.mkxl +++ b/tex/context/base/mkxl/context.mkxl @@ -29,7 +29,7 @@ %D {YYYY.MM.DD HH:MM} format. \immutable\edef\contextformat {\jobname} -\immutable\edef\contextversion{2021.12.10 11:29} +\immutable\edef\contextversion{2021.12.14 19:16} %overloadmode 1 % check frozen / warning %overloadmode 2 % check frozen / error diff --git a/tex/context/base/mkxl/mlib-scn.lmt b/tex/context/base/mkxl/mlib-scn.lmt index fcf9e73c3..eb34d2b2e 100644 --- a/tex/context/base/mkxl/mlib-scn.lmt +++ b/tex/context/base/mkxl/mlib-scn.lmt @@ -331,14 +331,14 @@ local function collectnames() local t = scantoken(true) -- (1) not really needed if t == numeric_code then - n = n + 1 l[n] = scannumeric(1) + n = n + 1 l[n] = scannumeric(1) -- so a float even if it is an index elseif t == string_code then n = n + 1 l[n] = scanstring(1) elseif t == nullary_code then n = n + 1 l[n] = scanboolean(1) elseif t == leftbracket_code then scantoken() -- leftbacket - n = n + 1 l[n] = scaninteger(1) + n = n + 1 l[n] = scaninteger(1) -- forces an index scantoken() -- rightbacket elseif t == leftdelimiter_code or t == tag_code or t == capsule_code then t = scanexpression(true) diff --git a/tex/context/base/mkxl/node-nut.lmt b/tex/context/base/mkxl/node-nut.lmt index 0cd6eb051..dfa89e4ab 100644 --- a/tex/context/base/mkxl/node-nut.lmt +++ b/tex/context/base/mkxl/node-nut.lmt @@ -266,6 +266,7 @@ local nuts = { -- getxyoffsets = direct.getxyoffsets, getspeciallist = direct.getspeciallist, setspeciallist = direct.setspeciallist, + getusedattributes = direct.getusedattributes, } nodes.nuts = nuts diff --git a/tex/context/base/mkxl/spac-ali.mkxl b/tex/context/base/mkxl/spac-ali.mkxl index e196b0c03..6e16614aa 100644 --- a/tex/context/base/mkxl/spac-ali.mkxl +++ b/tex/context/base/mkxl/spac-ali.mkxl @@ -192,6 +192,9 @@ \permanent\protected\def\leftorrightvbox{\ifconditional\displaylefttoright\expandafter\lefttorightvbox\else\expandafter\righttoleftvbox\fi} \permanent\protected\def\leftorrightvtop{\ifconditional\displaylefttoright\expandafter\lefttorightvtop\else\expandafter\righttoleftvtop\fi} +\permanent\protected\def\rtltext{\groupedcommand{\dontleavehmode\righttoleft\ignorespaces}\removeunwantedspaces} +\permanent\protected\def\ltrtext{\groupedcommand{\dontleavehmode\lefttoright\ignorespaces}\removeunwantedspaces} + % Tolerance and hyphenation \ifdefined\lesshyphens \else \let\lesshyphens\relax \fi diff --git a/tex/context/base/mkxl/spac-ver.lmt b/tex/context/base/mkxl/spac-ver.lmt index fcb1b7e7f..3faa15c77 100644 --- a/tex/context/base/mkxl/spac-ver.lmt +++ b/tex/context/base/mkxl/spac-ver.lmt @@ -2472,8 +2472,18 @@ do -- check if in mvl if texgetnest("ptr") == 0 then -- this flushes the contributions - while getspeciallist("contributehead") do - triggerbuildpage() + local prev = nil + local cycle = 1 + while cycle <= 10 do + local head = getspeciallist("contributehead") + if head == prev then + -- This can happen .. maybe 10 is already too much ... e.g. + -- extreme side float case in m4all. + cycle = cycle + 1 + else + triggerbuildpage() + prev = head + end end -- now we consult the last line (if present) local head, tail = getspeciallist("pagehead") diff --git a/tex/context/base/mkxl/spac-ver.mkxl b/tex/context/base/mkxl/spac-ver.mkxl index e2fa75133..3f40d98cf 100644 --- a/tex/context/base/mkxl/spac-ver.mkxl +++ b/tex/context/base/mkxl/spac-ver.mkxl @@ -1353,6 +1353,13 @@ \frozen#1\numexpr#2+\plusone\relax\space\doexpandedrecurse{\the\numexpr#2\relax}{ #3}\zerocount\relax \fi} +% to be tested: +% +% \permanent\protected\def\setpenalties#1#2#3% +% {\ifdefined#1% space before #3 prevents lookahead problems, needed when #3=text +% \frozen#1\numexpr#2+\plusone\relax\space\expandedloop\plusone\numexpr#2\relax\plusone{ #3}\zerocount\relax +% \fi} + %D \macros %D {keeplinestogether} %D diff --git a/tex/context/base/mkxl/strc-itm.mklx b/tex/context/base/mkxl/strc-itm.mklx index 65df80f32..ba21733c5 100644 --- a/tex/context/base/mkxl/strc-itm.mklx +++ b/tex/context/base/mkxl/strc-itm.mklx @@ -1314,16 +1314,18 @@ \settrue\c_strc_itemgroups_txt \startitemgroupitem} -% \protected\def\strc_itemgroups_start_head -% {\settrue\c_strc_itemgroups_head -% \startitemgrouphead} +% \protected\tolerant\def\strc_itemgroups_start_items_indeed[#1]% +% {\strc_itemgroups_start_edge +% {\dorecurse{0\itemgroupparameter\c!items}{\strc_itemgroups_used_symbol\hss}% +% \unskip}} -\protected\def\strc_itemgroups_start_items - {\dosingleempty\strc_itemgroups_start_items_indeed} - -\protected\def\strc_itemgroups_start_items_indeed[#whatever]% something got lost +\protected\tolerant\def\strc_itemgroups_start_items_indeed[#1]% {\strc_itemgroups_start_edge - {\dorecurse{0\itemgroupparameter\c!items}{\strc_itemgroups_used_symbol\hss}% + {\localcontrolledloop + \plusone + \ifchknum#1\or#1\else0\itemgroupparameter\c!items\fi + \plusone + {\strc_itemgroups_used_symbol\hss}% \unskip}} \protected\permanent\def\startspecialitemgroupitem[#name]% todo: frozen diff --git a/tex/context/base/mkxl/supp-box.mkxl b/tex/context/base/mkxl/supp-box.mkxl index 87660df49..2ad067002 100644 --- a/tex/context/base/mkxl/supp-box.mkxl +++ b/tex/context/base/mkxl/supp-box.mkxl @@ -2481,8 +2481,11 @@ %D %D A funny (but rather stupid) one, plus a redefinition. +% \permanent\protected\def\removebottomthings +% {\dorecurse\plusfive{\unskip\unkern\unpenalty}} + \permanent\protected\def\removebottomthings - {\dorecurse\plusfive{\unskip\unkern\unpenalty}} + {\localcontrolledloop\plusone\plusfive\plusone{\unskip\unkern\unpenalty}} \permanent\protected\def\removelastskip % \ifvmode the plain tex one \fi, overloaded to \permanent in spac-ver {\ifvmode\ifzeropt\lastskip\else\vskip-\lastskip\fi\fi} diff --git a/tex/context/base/mkxl/trac-deb.lmt b/tex/context/base/mkxl/trac-deb.lmt index 6ac0f3e16..9cf122d32 100644 --- a/tex/context/base/mkxl/trac-deb.lmt +++ b/tex/context/base/mkxl/trac-deb.lmt @@ -135,7 +135,7 @@ local nop = function() end local resetmessages = status.resetmessages or nop local function processerror(offset,errortype) - local readstate = status.readstate + local readstate = status.getreadstate() local filename = readstate.filename local linenumber = readstate.linenumber local skiplinenumber = readstate.skiplinenumber @@ -317,7 +317,7 @@ local function reportback(lmxname,default,variables) end local function showerror(lmxname) - local readstate = status.readstate() + local readstate = status.getreadstate() local filename = readstate.filename local linenumber = tonumber(readstate.linenumber) or 0 local errorcontext = "" @@ -329,7 +329,7 @@ local function showerror(lmxname) end local variables = { ['title'] = 'ConTeXt Error Information', - ['errormessage'] = status.errorstatus.error or "?", + ['errormessage'] = status.geterrorstate().error or "?", ['linenumber'] = linenumber, ['color-background-one'] = lmx.get('color-background-yellow'), ['color-background-two'] = lmx.get('color-background-purple'), @@ -347,8 +347,8 @@ function lmx.overloaderror(v) usescitelexer = true end callback.register('show_error_message', function() showerror() end) - callback.register('intercept_lua_error', function() showerror() end) - callback.register('intercept_tex_error', function() showerror() end) +-- callback.register('intercept_lua_error', function() showerror() end) +-- callback.register('intercept_tex_error', function() showerror() end) end directives.register("system.showerror", lmx.overloaderror) diff --git a/tex/context/base/mkxl/typo-del.mkxl b/tex/context/base/mkxl/typo-del.mkxl index dc26b4295..f322b4f48 100644 --- a/tex/context/base/mkxl/typo-del.mkxl +++ b/tex/context/base/mkxl/typo-del.mkxl @@ -514,10 +514,11 @@ \usedelimitedtextstyleandcolor\c!style\c!color % \begingroup - \edef\p_delimited_left {\delimitedtextparameter{\c!left}}% - \edef\p_delimited_right {\delimitedtextparameter{\c!right}}% - \edef\p_delimited_nextleft {\delimitedtextparameter{\c!nextleft}}% - \edef\p_delimited_nextright{\delimitedtextparameter{\c!nextright}}% + \usealignparameter\delimitedtextparameter + \edef\p_delimited_left {\delimitedtextparameter\c!left}% + \edef\p_delimited_right {\delimitedtextparameter\c!right}% + \edef\p_delimited_nextleft {\delimitedtextparameter\c!nextleft}% + \edef\p_delimited_nextright{\delimitedtextparameter\c!nextright}% % \leftdelimitedtextmark % |