summaryrefslogtreecommitdiff
path: root/tex/context/base
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkii/mult-ro.mkii1
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context-error.lmx4
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/mult-low.lua1
-rw-r--r--tex/context/base/mkiv/spac-ali.mkiv3
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin24770 -> 24763 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin257675 -> 257684 bytes
-rw-r--r--tex/context/base/mkiv/syst-ini.mkiv6
-rw-r--r--tex/context/base/mkiv/typo-del.mkiv9
-rw-r--r--tex/context/base/mkiv/util-jsn.lua8
-rw-r--r--tex/context/base/mkxl/cont-new.mkxl2
-rw-r--r--tex/context/base/mkxl/context.mkxl2
-rw-r--r--tex/context/base/mkxl/mlib-scn.lmt4
-rw-r--r--tex/context/base/mkxl/node-nut.lmt1
-rw-r--r--tex/context/base/mkxl/spac-ali.mkxl3
-rw-r--r--tex/context/base/mkxl/spac-ver.lmt14
-rw-r--r--tex/context/base/mkxl/spac-ver.mkxl7
-rw-r--r--tex/context/base/mkxl/strc-itm.mklx18
-rw-r--r--tex/context/base/mkxl/supp-box.mkxl5
-rw-r--r--tex/context/base/mkxl/trac-deb.lmt10
-rw-r--r--tex/context/base/mkxl/typo-del.mkxl9
24 files changed, 80 insertions, 35 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 801541637..bbd1c93f6 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2021.12.10 11:29}
+\newcontextversion{2021.12.14 19:16}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index 2aa9cee0d..560c4107c 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2021.12.10 11:29}
+\edef\contextversion{2021.12.14 19:16}
%D For those who want to use this:
diff --git a/tex/context/base/mkii/mult-ro.mkii b/tex/context/base/mkii/mult-ro.mkii
index 5db4797e4..65c52c639 100644
--- a/tex/context/base/mkii/mult-ro.mkii
+++ b/tex/context/base/mkii/mult-ro.mkii
@@ -1282,6 +1282,7 @@
\setinterfaceconstant{tab}{tab}
\setinterfaceconstant{text}{text}
\setinterfaceconstant{textalign}{textalign}
+\setinterfaceconstant{textalternative}{textalternative}
\setinterfaceconstant{textcolor}{culoaretext}
\setinterfaceconstant{textcommand}{comandatext}
\setinterfaceconstant{textdistance}{textdistance}
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 1b143ffb7..d61d0887e 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -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/mkiv/context-error.lmx b/tex/context/base/mkiv/context-error.lmx
index d1a758b05..60579f4a0 100644
--- a/tex/context/base/mkiv/context-error.lmx
+++ b/tex/context/base/mkiv/context-error.lmx
@@ -51,9 +51,7 @@
</div></div>
<div id="bottom"><div id="bottom-one"><div id="bottom-two">
Job Name: <?lua p(environment.jobname) ?> &nbsp;&nbsp;&nbsp;
- ConTeXt Version: <?lua p(environment.version) ?> &nbsp;&nbsp;&nbsp;
- Real Page: <?lua p(tracers.cs('c:realpageno')) ?> &nbsp;&nbsp;&nbsp;
- Page: <?lua p(tracers.cs('c:pageno')) ?> &nbsp;&nbsp;&nbsp;
+ ConTeXt Version: <?lua p(environment.version) ?>
</div></div></div>
</body>
</html>
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 7c32ed6d8..4675386c8 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -49,7 +49,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2021.12.10 11:29}
+\edef\contextversion{2021.12.14 19:16}
%D Kind of special:
diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua
index baf85eb04..9c4c35037 100644
--- a/tex/context/base/mkiv/mult-low.lua
+++ b/tex/context/base/mkiv/mult-low.lua
@@ -538,6 +538,7 @@ return {
"lefttoright", "righttoleft", "checkedlefttoright", "checkedrighttoleft",
"synchronizelayoutdirection","synchronizedisplaydirection","synchronizeinlinedirection",
"dirlre", "dirrle", "dirlro", "dirrlo",
+ "rtltext", "ltrtext",
--
"lesshyphens", "morehyphens", "nohyphens", "dohyphens", "dohyphencollapsing", "nohyphencollapsing",
"compounddiscretionary",
diff --git a/tex/context/base/mkiv/spac-ali.mkiv b/tex/context/base/mkiv/spac-ali.mkiv
index 2467f8352..a54c44b72 100644
--- a/tex/context/base/mkiv/spac-ali.mkiv
+++ b/tex/context/base/mkiv/spac-ali.mkiv
@@ -184,6 +184,9 @@
\unexpanded\def\leftorrightvbox{\ifconditional\displaylefttoright\expandafter\lefttorightvbox\else\expandafter\righttoleftvbox\fi}
\unexpanded\def\leftorrightvtop{\ifconditional\displaylefttoright\expandafter\lefttorightvtop\else\expandafter\righttoleftvtop\fi}
+\unexpanded\def\rtltext{\groupedcommand{\dontleavehmode\righttoleft\ignorespaces}\removeunwantedspaces}
+\unexpanded\def\ltrtext{\groupedcommand{\dontleavehmode\lefttoright\ignorespaces}\removeunwantedspaces}
+
% Tolerance and hyphenation
\ifdefined\lesshyphens \else \let\lesshyphens\relax \fi
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index a7f20d3e8..708b6ffd2 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index 43b1fbf13..10f855c72 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/syst-ini.mkiv b/tex/context/base/mkiv/syst-ini.mkiv
index 488f16e16..568912a33 100644
--- a/tex/context/base/mkiv/syst-ini.mkiv
+++ b/tex/context/base/mkiv/syst-ini.mkiv
@@ -1251,4 +1251,10 @@
\let\partokenname\gobbleoneargument
\fi
+%D In case we load \LMTX\ code.
+
+\ifdefined\autoparagraphmode \else
+ \newcount\autoparagraphmode
+\fi
+
\protect \endinput
diff --git a/tex/context/base/mkiv/typo-del.mkiv b/tex/context/base/mkiv/typo-del.mkiv
index 9720326be..726c6d4ba 100644
--- a/tex/context/base/mkiv/typo-del.mkiv
+++ b/tex/context/base/mkiv/typo-del.mkiv
@@ -525,10 +525,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
%
diff --git a/tex/context/base/mkiv/util-jsn.lua b/tex/context/base/mkiv/util-jsn.lua
index 8da351897..c1048b00a 100644
--- a/tex/context/base/mkiv/util-jsn.lua
+++ b/tex/context/base/mkiv/util-jsn.lua
@@ -17,6 +17,10 @@ if not modules then modules = { } end modules ['util-jsn'] = {
--
-- Upgraded for handling the somewhat more fax server templates.
+if utilities and utilities.json then
+ return json
+end
+
local P, V, R, S, C, Cc, Cs, Ct, Cf, Cg = lpeg.P, lpeg.V, lpeg.R, lpeg.S, lpeg.C, lpeg.Cc, lpeg.Cs, lpeg.Ct, lpeg.Cf, lpeg.Cg
local lpegmatch = lpeg.match
local format, gsub = string.format, string.gsub
@@ -440,4 +444,8 @@ end
-- inspect(l)
-- print(s==l.s)
+-- if not package.loaded.json then
+-- package.loaded.json = json
+-- end
+
return json
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
%