summaryrefslogtreecommitdiff
path: root/tex/context
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-07-27 19:52:30 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-07-27 19:52:30 +0200
commitdf12f144a2cb09cec29a95df26bdfc5ccad58aff (patch)
treef25cb74e040f21e898e270c1299899b51b34bba7 /tex/context
parentc73351bc5e590d5a7ebd2b0f13f895a447d25794 (diff)
downloadcontext-df12f144a2cb09cec29a95df26bdfc5ccad58aff.tar.gz
2021-07-27 19:27:00
Diffstat (limited to 'tex/context')
-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-it.mkii2
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/file-res.lua10
-rw-r--r--tex/context/base/mkiv/grph-inc.lua4
-rw-r--r--tex/context/base/mkiv/lpdf-wid.lua18
-rw-r--r--tex/context/base/mkiv/lxml-ctx.mkiv14
-rw-r--r--tex/context/base/mkiv/math-ini.mkiv4
-rw-r--r--tex/context/base/mkiv/mult-def.lua6
-rw-r--r--tex/context/base/mkiv/mult-low.lua61
-rw-r--r--tex/context/base/mkiv/mult-prm.lua3
-rw-r--r--tex/context/base/mkiv/scrn-wid.mkvi1
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin23576 -> 23606 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin248572 -> 248677 bytes
-rw-r--r--tex/context/base/mkiv/syst-ini.mkiv11
-rw-r--r--tex/context/base/mkiv/typo-inj.lua37
-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/core-env.mkxl5
-rw-r--r--tex/context/base/mkxl/file-job.lmt41
-rw-r--r--tex/context/base/mkxl/file-job.mklx28
-rw-r--r--tex/context/base/mkxl/grph-inc.lmt4
-rw-r--r--tex/context/base/mkxl/hand-ini.mkxl4
-rw-r--r--tex/context/base/mkxl/lang-ini.mkxl82
-rw-r--r--tex/context/base/mkxl/lpdf-mis.lmt1
-rw-r--r--tex/context/base/mkxl/lpdf-wid.lmt18
-rw-r--r--tex/context/base/mkxl/lxml-ctx.mkxl14
-rw-r--r--tex/context/base/mkxl/math-ini.mkxl14
-rw-r--r--tex/context/base/mkxl/mlib-lmt.lmt23
-rw-r--r--tex/context/base/mkxl/node-fin.mkxl10
-rw-r--r--tex/context/base/mkxl/node-nut.lmt2
-rw-r--r--tex/context/base/mkxl/node-tra.lmt48
-rw-r--r--tex/context/base/mkxl/pack-rul.mkxl2
-rw-r--r--tex/context/base/mkxl/scrn-wid.mklx1
-rw-r--r--tex/context/base/mkxl/spac-ali.mkxl7
-rw-r--r--tex/context/base/mkxl/spac-hor.mkxl8
-rw-r--r--tex/context/base/mkxl/spac-par.mkxl76
-rw-r--r--tex/context/base/mkxl/spac-ver.mkxl10
-rw-r--r--tex/context/base/mkxl/strc-con.mklx16
-rw-r--r--tex/context/base/mkxl/strc-des.mklx14
-rw-r--r--tex/context/base/mkxl/strc-ind.mkxl7
-rw-r--r--tex/context/base/mkxl/syst-aux.mkxl30
-rw-r--r--tex/context/base/mkxl/syst-ini.mkxl9
-rw-r--r--tex/context/base/mkxl/tabl-tbl.mkxl4
-rw-r--r--tex/context/base/mkxl/toks-aux.lmt43
-rw-r--r--tex/context/base/mkxl/trac-vis.mkxl4
-rw-r--r--tex/context/base/mkxl/typo-dir.mkxl2
-rw-r--r--tex/context/base/mkxl/typo-inj.mkxl8
-rw-r--r--tex/context/interface/mkii/keys-it.xml2
-rw-r--r--tex/context/modules/mkiv/x-asciimath.mkiv2
-rw-r--r--tex/context/modules/mkxl/s-languages-goodies.mkxl2
53 files changed, 455 insertions, 269 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 7a36f2d34..24ca54092 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.07.23 18:50}
+\newcontextversion{2021.07.27 19:24}
%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 f03ce574b..d4b21f8d2 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.07.23 18:50}
+\edef\contextversion{2021.07.27 19:24}
%D For those who want to use this:
diff --git a/tex/context/base/mkii/mult-it.mkii b/tex/context/base/mkii/mult-it.mkii
index 99ae15d9a..4ba837a13 100644
--- a/tex/context/base/mkii/mult-it.mkii
+++ b/tex/context/base/mkii/mult-it.mkii
@@ -207,6 +207,8 @@
\setinterfacevariable{fixed}{fisso}
\setinterfacevariable{flexible}{flessibile}
\setinterfacevariable{float}{oggettomobile}
+\setinterfacevariable{flushbackward}{flushbackward}
+\setinterfacevariable{flushforward}{flushforward}
\setinterfacevariable{flushinner}{flushinner}
\setinterfacevariable{flushleft}{flushleft}
\setinterfacevariable{flushouter}{flushouter}
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index f1fa1e266..48164c9fc 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.07.23 18:50}
+\newcontextversion{2021.07.27 19:24}
%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.mkiv b/tex/context/base/mkiv/context.mkiv
index c54db1589..b75a70285 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -45,7 +45,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2021.07.23 18:50}
+\edef\contextversion{2021.07.27 19:24}
%D Kind of special:
diff --git a/tex/context/base/mkiv/file-res.lua b/tex/context/base/mkiv/file-res.lua
index 16afae4c7..8b16ff7da 100644
--- a/tex/context/base/mkiv/file-res.lua
+++ b/tex/context/base/mkiv/file-res.lua
@@ -59,18 +59,20 @@ local function readfilename(specification,backtrack,treetoo)
end
end
if not fnd and backtrack then
+ local path = environment.arguments.runpath and environment.arguments.path or ""
for i=1,#names do
local fname = names[i]
for i=1,backtrack,1 do
fname = "../" .. fname
- if isfile(fname) then
+ local pname = path and (path .. "/" .. fname) or fname
+ if isfile(pname) then
if trace_files then
- report_files("found by backtracking: %s",fname)
+ report_files("found by backtracking: %s",pname)
end
- fnd = fname
+ fnd = pname
break
elseif trace_files then
- report_files("not found by backtracking: %s",fname)
+ report_files("not found by backtracking: %s",pname)
end
end
if fnd then
diff --git a/tex/context/base/mkiv/grph-inc.lua b/tex/context/base/mkiv/grph-inc.lua
index 3789191f1..f8dcc658b 100644
--- a/tex/context/base/mkiv/grph-inc.lua
+++ b/tex/context/base/mkiv/grph-inc.lua
@@ -822,6 +822,10 @@ local function register(askedname,specification)
local oldname = specification.fullname
local newpath = file.dirname(oldname)
local oldbase = file.basename(oldname)
+ local runpath = environment.arguments.runpath
+ if runpath and runpath ~= "" and newpath == environment.arguments.path then
+ newpath = runpath
+ end
--
-- problem: we can have weird filenames, like a.b.c (no suffix) and a.b.c.gif
-- so we cannot safely remove a suffix (unless we do that for known suffixes)
diff --git a/tex/context/base/mkiv/lpdf-wid.lua b/tex/context/base/mkiv/lpdf-wid.lua
index a0e41e4d0..f0156075a 100644
--- a/tex/context/base/mkiv/lpdf-wid.lua
+++ b/tex/context/base/mkiv/lpdf-wid.lua
@@ -23,6 +23,9 @@ if not modules then modules = { } end modules ['lpdf-wid'] = {
-- the other fragile bit. And, now that adobe quits flash in 2020 we're without any
-- video anyway. Also, it won't play on all platforms and devices so let's wait for
-- html5 media in pdf then.
+--
+-- See mail by Michal Vlasák to the mailing list that discusses current support in
+-- viewers and also mentions a few fixes wrt embedding media.
local tonumber, next = tonumber, next
local gmatch, gsub, find, lower = string.gmatch, string.gsub, string.find, string.lower
@@ -688,18 +691,19 @@ local function insertrendering(specification)
-- B = start,
-- }
-- }
- -- local parameters = pdfdictionary {
- -- Type = pdfconstant(MediaPermissions),
- -- TF = pdfstring("TEMPALWAYS") }, -- TEMPNEVER TEMPEXTRACT TEMPACCESS TEMPALWAYS
- -- }
+ local parameters = pdfdictionary {
+ Type = pdfconstant(MediaPermissions),
+ TF = pdfstring("TEMPALWAYS"), -- TEMPNEVER TEMPEXTRACT TEMPACCESS TEMPALWAYS / needed for acrobat/wmp
+ }
local descriptor = pdfdictionary {
Type = pdfconstant("Filespec"),
F = filename,
}
if isurl then
descriptor.FS = pdfconstant("URL")
+ descriptor = pdfreference(pdfflushobject(descriptor))
elseif option[v_embed] then
- descriptor.EF = codeinjections.embedfile {
+ descriptor = codeinjections.embedfile {
file = filename,
mimetype = mimetype, -- yes or no
compress = false,
@@ -711,8 +715,8 @@ local function insertrendering(specification)
N = label,
CT = mimetype,
Alt = pdfarray { "", "file not found" }, -- language id + message
- D = pdfreference(pdfflushobject(descriptor)),
- -- P = pdfreference(pdfflushobject(parameters)),
+ D = descriptor,
+ P = pdfreference(pdfflushobject(parameters)),
}
local rendition = pdfdictionary {
Type = pdfconstant("Rendition"),
diff --git a/tex/context/base/mkiv/lxml-ctx.mkiv b/tex/context/base/mkiv/lxml-ctx.mkiv
index 7d44d61be..ec782c395 100644
--- a/tex/context/base/mkiv/lxml-ctx.mkiv
+++ b/tex/context/base/mkiv/lxml-ctx.mkiv
@@ -20,9 +20,9 @@
\unprotect
-\settrue \xmllshowbuffer
-\setfalse\xmllshowtitle
-\settrue \xmllshowwarning
+\settrue \xmllshowbuffertoo
+\setfalse\xmllshowtitletoo
+\settrue \xmllshowwarningtoo
\definehead
[lshowtitle]
@@ -35,10 +35,10 @@
\unexpanded\def\xmllshow#1%
{\ctxlua{xml.ctx.tshow {
pattern = \!!bs\detokenize{#1}\!!es,
- \ifconditional\xmllshowtitle
+ \ifconditional\xmllshowtitletoo
title = "lshowtitle",
\fi
- \ifconditional\xmllshowwarning
+ \ifconditional\xmllshowwarningtoo
warning = true,
\fi
} }}
@@ -46,11 +46,11 @@
\unexpanded\def\xmllshowbuffer#1#2#3%
{\ctxlua{xml.ctx.tshow {
pattern = \!!bs\detokenize{#2}\!!es,
- \ifconditional\xmllshowbuffer
+ \ifconditional\xmllshowbuffertoo
xmlroot = "#1",
attribute = "#3",
\fi
- \ifconditional\xmllshowwarning
+ \ifconditional\xmllshowwarningtoo
warning = true,
\fi
} }}
diff --git a/tex/context/base/mkiv/math-ini.mkiv b/tex/context/base/mkiv/math-ini.mkiv
index d0e18ff4b..80a9f1412 100644
--- a/tex/context/base/mkiv/math-ini.mkiv
+++ b/tex/context/base/mkiv/math-ini.mkiv
@@ -2931,6 +2931,10 @@
\math_openup_parameter#1{#2}%
\fi}
+%D For now (needed in asciimath):
+
+\def\math_relax_limits{\let\limits\relax}
+
\protect \endinput
% % not used (yet)
diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua
index b6d6141e5..d720a5b21 100644
--- a/tex/context/base/mkiv/mult-def.lua
+++ b/tex/context/base/mkiv/mult-def.lua
@@ -15573,6 +15573,12 @@ return {
["pe"]="شناور",
["ro"]="obiectmobil",
},
+ ["flushforward"]={
+ ["en"]="flushforward",
+ },
+ ["flushbackward"]={
+ ["en"]="flushbackward",
+ },
["flushinner"]={
["cs"]="flushinner",
["de"]="flushinner",
diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua
index 8132c6094..d8db74701 100644
--- a/tex/context/base/mkiv/mult-low.lua
+++ b/tex/context/base/mkiv/mult-low.lua
@@ -69,12 +69,12 @@ return {
"doublequoteasciicode", "singlequoteasciicode", "forwardslashasciicode",
"primeasciicode", "hyphenasciicode", "percentasciicode", "leftbracketasciicode", "rightbracketasciicode",
--
- "frozenhsizecode", "frozenskipcode", "frozenhangcode", "frozenindentcode", "frozenparfillcode",
- "frozenadjustcode", "frozenprotrudecode", "frozentolerancecode", "frozenstretchcode",
- "frozenloosenesscode", "frozenlastlinecode", "frozenlinepenaltycode", "frozenclubpenaltycode",
- "frozenwidowpenaltycode", "frozendisplaypenaltycode", "frozenbrokenpenaltycode",
- "frozendemeritscode", "frozenshapecode", "frozenlinecode", "frozenhyphenationcode",
- "frozenallcode",
+ "hsizefrozenparcode", "skipfrozenparcode", "hangfrozenparcode", "indentfrozenparcode", "parfillfrozenparcode",
+ "adjustfrozenparcode", "protrudefrozenparcode", "tolerancefrozenparcode", "stretchfrozenparcode",
+ "loosenessfrozenparcode", "lastlinefrozenparcode", "linepenaltyfrozenparcode", "clubpenaltyfrozenparcode",
+ "widowpenaltyfrozenparcode", "displaypenaltyfrozenparcode", "brokenpenaltyfrozenparcode",
+ "demeritsfrozenparcode", "shapefrozenparcode", "linefrozenparcode", "hyphenationfrozenparcode",
+ "allfrozenparcode",
--
"activemathcharcode",
--
@@ -103,6 +103,14 @@ return {
"charitalicnoreboxmathcontrolcode", "boxednoitalickernmathcontrolcode", "nostaircasekernmathcontrolcode",
"textitalickernmathcontrolcode",
--
+ "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode",
+ "noleftkerningglyphoptioncode", "noleftligaturingglyphoptioncode", "norightkerningglyphoptioncode", "norightligaturingglyphoptioncode",
+ "noitaliccorrectionglyphoptioncode",
+ --
+ "normalparcontextcode", "vmodeparcontextcode", "vboxparcontextcode", "vtopparcontextcode", "vcenterparcontextcode",
+ "vadjustparcontextcode", "insertparcontextcode", "outputparcontextcode", "alignparcontextcode",
+ "noalignparcontextcode", "spanparcontextcode", "resetparcontextcode",
+ --
"fontslantperpoint", "fontinterwordspace", "fontinterwordstretch", "fontinterwordshrink",
"fontexheight", "fontemwidth", "fontextraspace", "slantperpoint",
"mathexheight", "mathemwidth",
@@ -164,30 +172,29 @@ return {
--
"wildcardsymbol",
--
- "normalhyphenationmodecode", "automatichyphenationmodecode", "explicithyphenationmodecode",
- "syllablehyphenationmodecode", "uppercasehyphenationmodecode", "collapsehyphenationmodecode",
- "compoundhyphenationmodecode", "strictstarthyphenationmodecode", "strictendhyphenationmodecode",
- "automaticpenaltyhyphenationmodecode", "explicitpenaltyhyphenationmodecode",
- "permitgluehyphenationmodecode", "permitallhyphenationmodecode", "permitmathreplacehyphenationmodecode",
- "forcecheckhyphenationmodecode", "lazyligatureshyphenationmodecode", "forcehandlerhyphenationmodecode",
- "feedbackcompoundhyphenationmodecode", "ignoreboundshyphenationmodecode",
- --
- "partialhyphenationmodecode", "completehyphenationmodecode",
+ "normalhyphenationcode", "automatichyphenationcode", "explicithyphenationcode", "syllablehyphenationcode", "uppercasehyphenationcode",
+ "collapsehyphenationmcode", "compoundhyphenationcode", "strictstarthyphenationcode", "strictendhyphenationcode",
+ "automaticpenaltyhyphenationcode", "explicitpenaltyhyphenationcode", "permitgluehyphenationcode", "permitallhyphenationcode",
+ "permitmathreplacehyphenationcode", "forcecheckhyphenationcode", "lazyligatureshyphenationcode", "forcehandlerhyphenationcode",
+ "feedbackcompoundhyphenationcode", "ignoreboundshyphenationcode", "partialhyphenationcode", "completehyphenationcode",
--
- "normalizelinecode", "parindentskipcode", "swaphangindentcode", "swapparsshapecode", "breakafterdircode", "removemarginkernscode",
- "clipwidthcode", "flattendiscretionariescode",
+ "normalizelinenormalizecode", "parindentskipnormalizecode", "swaphangindentnormalizecode", "swapparsshapenormalizecode",
+ "breakafterdirnormalizecode", "removemarginkernsnormalizecode", "clipwidthnormalizecode", "flattendiscretionariesnormalizecode",
--
- "noligaturingcode", "nokerningcode", "noleftligaturecode", "noleftkerncode", "norightligaturecode", "norightkerncode",
- "noexpansioncode", "noprotrusioncode", "noitaliccorrectioncode",
+ "noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noleftligatureglyphoptioncode",
+ "noleftkernglyphoptioncode", "norightligatureglyphoptioncode", "norightkernglyphoptioncode",
+ "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode", "noitaliccorrectionglyphoptioncode",
+ -- extras:
+ "nokerningcode", "noligaturingcode",
--
- "frozenflagcode", "tolerantflagcode", "protectedflagcode", "primitiveflagcode", "permanentflagcode", "noalignedflagcode", "immutableflagcode", "mutableflagcode",
- "globalflagcode", "overloadedflagcode", "immediateflagcode", "conditionalflagcode", "valueflagcode", "instanceflagcode",
+ "frozenflagcode", "tolerantflagcode", "protectedflagcode", "primitiveflagcode", "permanentflagcode", "noalignedflagcode", "immutableflagcode",
+ "mutableflagcode", "globalflagcode", "overloadedflagcode", "immediateflagcode", "conditionalflagcode", "valueflagcode", "instanceflagcode",
--
- "ordflattencode", "binflattencode", "relflattencode", "punctflattencode", "innerflattencode",
+ "ordmathflattencode", "binmathflattencode", "relmathflattencode", "punctmathflattencode", "innermathflattencode",
--
- "prewordcode", "postwordcode",
+ "normalworddiscoptioncode", "preworddiscoptioncode", "postworddiscoptioncode",
--
- "continuewhenlmtxmode"
+ "continuewhenlmtxmode",
},
["helpers"] = {
--
@@ -573,8 +580,14 @@ return {
--
"showboxhere",
--
+ "discoptioncodestring", "flagcodestring", "frozenparcodestring", "glyphoptioncodestring", "groupcodestring",
+ "hyphenationcodestring", "mathcontrolcodestring", "mathflattencodestring", "normalizecodestring",
+ "parcontextcodestring",
+ --
"newlocalcount", "newlocaldimen", "newlocalskip", "newlocalmuskip", "newlocaltoks", "newlocalbox",
"newlocalwrite", "newlocalread",
"setnewlocalcount", "setnewlocaldimen", "setnewlocalskip", "setnewlocalmuskip", "setnewlocaltoks", "setnewlocalbox",
+ --
+ "ifexpression"
}
}
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index 05ab7bcf0..52574e768 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -280,6 +280,7 @@ return {
"automaticdiscretionary",
"automatichyphenpenalty",
"automigrationmode",
+ "autoparagraphmode",
"begincsname",
"beginlocalcontrol",
"boundary",
@@ -368,6 +369,7 @@ return {
"ifcstok",
"ifdimval",
"ifempty",
+ "ifexpression",
"ifflags",
"ifhastok",
"ifhastoks",
@@ -406,6 +408,7 @@ return {
"lastchknum",
"lastnamedcs",
"lastnodesubtype",
+ "lastparcontext",
"leftmarginkern",
"letcharcode",
"letcsname",
diff --git a/tex/context/base/mkiv/scrn-wid.mkvi b/tex/context/base/mkiv/scrn-wid.mkvi
index d0b0fb006..d9f7940cd 100644
--- a/tex/context/base/mkiv/scrn-wid.mkvi
+++ b/tex/context/base/mkiv/scrn-wid.mkvi
@@ -665,6 +665,7 @@
\letrenderingwindowparameter\c!closepageaction\empty
\setrenderingwindowparameter\c!width {\d_scrn_rendering_width }%
\setrenderingwindowparameter\c!height {\d_scrn_rendering_height}%
+ \letrenderingwindowparameter\c!align \v!flushleft
\to \everypresetrenderingwindow
\unexpanded\def\placerenderingwindow
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 6cc175fa2..f258bcfba 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 95162e960..11b45b798 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 aafbc787e..488f16e16 100644
--- a/tex/context/base/mkiv/syst-ini.mkiv
+++ b/tex/context/base/mkiv/syst-ini.mkiv
@@ -1240,4 +1240,15 @@
\let\nexttoken\relax
+%D We need to disable this feature (comes from pdftex) because it not only messes up
+%D the nested content and wrappers (like in the page builder) but also is rather
+%D confusing wrt grouping. In \CONTEXT\ we don't redefine \type {\par} anyway, so
+%D best not expose this feature.
+
+\ifdefined\partokenname
+ \let\partokencontext\relax
+ \newcount\partokencontext
+ \let\partokenname\gobbleoneargument
+\fi
+
\protect \endinput
diff --git a/tex/context/base/mkiv/typo-inj.lua b/tex/context/base/mkiv/typo-inj.lua
index 44b6c0a14..ef344ec4b 100644
--- a/tex/context/base/mkiv/typo-inj.lua
+++ b/tex/context/base/mkiv/typo-inj.lua
@@ -41,26 +41,45 @@ function injectors.reset(name)
list[name] = nil
end
+local function activate(injector,name)
+ if not injector.active then
+ ctx_doactivateinjector(name)
+ injector.active = true
+ if showall then
+ -- in case we already enabled tracing
+ injector.show = true
+ end
+ end
+end
+
function injectors.set(name,numbers,command)
local injector = list[name]
- local actions = injector.actions
- local places = settings_to_array(numbers)
+ local actions = injector.actions
+ local places = settings_to_array(numbers)
for i=1,#places do
actions[tonumber(places[i])] = command
end
- if not injector.active then
- ctx_doactivateinjector(name)
- injector.active = true
- end
+ -- not: injector.show = true
+ activate(injector,name)
end
function injectors.show(name)
if not name or name == "" then
showall = true
+ local names = settings_to_array(name)
+ for name, injector in next, list do
+ injector.show = true
+ activate(injector,name)
+ end
else
- local list = settings_to_array(name)
- for i=1,#list do
- list[list[i]].show = true
+ local names = settings_to_array(name)
+ for i=1,#names do
+ local name = names[i]
+ local injector = list[name]
+ if injector then
+ injector.show = true
+ activate(injector,name)
+ end
end
end
end
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index c4718ba92..f8a7700b1 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.07.23 18:50}
+\newcontextversion{2021.07.27 19:24}
%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 c8c14a6b1..01dc31fab 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.07.23 18:50}
+\immutable\edef\contextversion{2021.07.27 19:24}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
diff --git a/tex/context/base/mkxl/core-env.mkxl b/tex/context/base/mkxl/core-env.mkxl
index f3d0a62ba..c0cc44e5b 100644
--- a/tex/context/base/mkxl/core-env.mkxl
+++ b/tex/context/base/mkxl/core-env.mkxl
@@ -341,9 +341,10 @@
\def\syst_modes_set_quit#-\stopmodeset
{\pop_macro_c_syst_modes_set_done}
-%D Lets now set a mode:
+%D Lets now set a few modes:
-\enablemode[mkiv] \newsystemmode{mkiv} \setsystemmode{mkiv}
+\enablemode[mkiv] \newsystemmode{mkiv} \setsystemmode{mkiv} % also mkxl
+\enablemode[lmtx] \newsystemmode{lmtx} \setsystemmode{lmtx}
%D Setups:
diff --git a/tex/context/base/mkxl/file-job.lmt b/tex/context/base/mkxl/file-job.lmt
index e64ed8539..90aea19e6 100644
--- a/tex/context/base/mkxl/file-job.lmt
+++ b/tex/context/base/mkxl/file-job.lmt
@@ -191,7 +191,7 @@ implement {
-- moved from tex to lua:
-local texpatterns = { "%s.mkvi", "%s.mkiv", "%s.mklx", "%s.mkxl", "%s.tex" }
+local texpatterns = { "%s.mklx", "%s.mkxl", "%s.mkvi", "%s.mkiv", "%s.tex" }
local luapatterns = { "%s" .. utilities.lua.suffixes.luc, "%s.lua", "%s.lmt" }
local cldpatterns = { "%s.cld" }
local xmlpatterns = { "%s.xml" }
@@ -813,18 +813,32 @@ implement { name = "usecomponent", public = true, protected = true, actions =
-- todo: setsystemmode to currenttype
-- todo: make start/stop commands at the tex end
+-- local start = {
+-- [v_project] = context.startprojectindeed,
+-- [v_product] = context.startproductindeed,
+-- [v_component] = context.startcomponentindeed,
+-- [v_environment] = context.startenvironmentindeed,
+-- }
+
+-- local stop = {
+-- [v_project] = context.stopprojectindeed,
+-- [v_product] = context.stopproductindeed,
+-- [v_component] = context.stopcomponentindeed,
+-- [v_environment] = context.stopenvironmentindeed,
+-- }
+
local start = {
- [v_project] = context.startprojectindeed,
- [v_product] = context.startproductindeed,
- [v_component] = context.startcomponentindeed,
- [v_environment] = context.startenvironmentindeed,
+ [v_project] = "startprojectindeed",
+ [v_product] = "startproductindeed",
+ [v_component] = "startcomponentindeed",
+ [v_environment] = "startenvironmentindeed",
}
local stop = {
- [v_project] = context.stopprojectindeed,
- [v_product] = context.stopproductindeed,
- [v_component] = context.stopcomponentindeed,
- [v_environment] = context.stopenvironmentindeed,
+ [v_project] = "stopprojectindeed",
+ [v_product] = "stopproductindeed",
+ [v_component] = "stopcomponentindeed",
+ [v_environment] = "stopenvironmentindeed",
}
local function gotonextlevel(what,name) -- todo: something with suffix name
@@ -833,19 +847,20 @@ local function gotonextlevel(what,name) -- todo: something with suffix name
currenttype = what
pushtree(what,name)
if start[what] then
- start[what]()
+ -- start[what]()
+ token.expandmacro(start[what])
end
end
local function gotopreviouslevel(what)
if stop[what] then
- stop[what]()
+ token.expandmacro(stop[what])
+ -- stop[what]() -- not immediate
end
poptree()
currenttype = remove(typestack) or v_text
remove(stacks[what]) -- not currenttype ... weak recovery
- context.endinput()
--- context.signalendofinput(what)
+ -- context.endinput() -- now at the tex end !
end
local function autoname()
diff --git a/tex/context/base/mkxl/file-job.mklx b/tex/context/base/mkxl/file-job.mklx
index 9fb14c9bf..e39ed17ed 100644
--- a/tex/context/base/mkxl/file-job.mklx
+++ b/tex/context/base/mkxl/file-job.mklx
@@ -138,22 +138,6 @@
% \startcomponent [#name] or #name<space> % defined at lua end
% \startenvironment [#name] or #name<space> % defined at lua end
-\newconditional\endofinput % hack, needed because \endinput happens one level down in the input when we write from lua
-
-% \protected\def\signalendofinput#1% argument just for tracing
-% {\global\settrue\endofinput}
-%
-% \protected\def\honorendofinput
-% {\ifconditional\endofinput
-% \global\setfalse\endofinput
-% \endinput
-% \fi}
-
-% \protected\def\stopproject {\clf_stopproject \honorendofinput} % todo
-% \protected\def\stopproduct {\clf_stopproduct \honorendofinput} % todo
-% \protected\def\stopcomponent {\clf_stopcomponent \honorendofinput} % todo
-% \protected\def\stopenvironment {\clf_stopenvironment\honorendofinput} % todo
-
% \currentproject % defined at lua end
% \currentproduct % defined at lua end
% \currentcomponent % defined at lua end
@@ -189,7 +173,9 @@
\neverypar\emptytoks
-%D Wrappers (the signal is a synchronization with lua hack):
+%D Wrappers. The \type {\endinput} is tricky because we call macros at the \LUA\
+%D end. In \LMTX\ we now do an immediate one, so the ending happens here now. It
+%D is different that in \MKIV, but you can compare the code.
\newsystemmode\v!project
\newsystemmode\v!product
@@ -204,7 +190,7 @@
\permanent\protected\def\stopprojectindeed
{\popsystemmode\v!project
%stoptext
- }%\signalendofinput\v!project}
+ \endinput}
\permanent\protected\def\startproductindeed
{\starttext
@@ -214,7 +200,7 @@
\permanent\protected\def\stopproductindeed
{\popsystemmode\v!product
\stoptext
- }%\signalendofinput\v!product}
+ \endinput}
\permanent\protected\def\startcomponentindeed
{\starttext
@@ -226,7 +212,7 @@
{\popsystemmode\v!component
\popreferenceprefix
\stoptext
- }%\signalendofinput\v!component}
+ \endinput}
\permanent\protected\def\startenvironmentindeed
{\pushsystemmode\v!environment
@@ -234,7 +220,7 @@
\permanent\protected\def\stopenvironmentindeed
{\popsystemmode\v!environment
- }%\signalendofinput\v!environment}
+ \endinput}
%D Upgraded after the ctx 2020 meeting:
%D
diff --git a/tex/context/base/mkxl/grph-inc.lmt b/tex/context/base/mkxl/grph-inc.lmt
index d6cfb0d6c..f5784f2db 100644
--- a/tex/context/base/mkxl/grph-inc.lmt
+++ b/tex/context/base/mkxl/grph-inc.lmt
@@ -822,6 +822,10 @@ local function register(askedname,specification)
local oldname = specification.fullname
local newpath = file.dirname(oldname)
local oldbase = file.basename(oldname)
+ local runpath = environment.arguments.runpath
+ if runpath and runpath ~= "" and newpath == environment.arguments.path then
+ newpath = runpath
+ end
--
-- problem: we can have weird filenames, like a.b.c (no suffix) and a.b.c.gif
-- so we cannot safely remove a suffix (unless we do that for known suffixes)
diff --git a/tex/context/base/mkxl/hand-ini.mkxl b/tex/context/base/mkxl/hand-ini.mkxl
index 3fd82f239..1d4dabf6b 100644
--- a/tex/context/base/mkxl/hand-ini.mkxl
+++ b/tex/context/base/mkxl/hand-ini.mkxl
@@ -107,7 +107,7 @@
%D New in \LMTX: can be used grouped.
-\permanent\protected\def\noexpansion {\bitwiseflip\glyphoptions\noexpansioncode}
-\permanent\protected\def\noprotrusion{\bitwiseflip\glyphoptions\noprotrusioncode}
+\permanent\protected\def\noexpansion {\bitwiseflip\glyphoptions\noexpansionglyphoptioncode}
+\permanent\protected\def\noprotrusion{\bitwiseflip\glyphoptions\noprotrusionglyphoptioncode}
\protect \endinput
diff --git a/tex/context/base/mkxl/lang-ini.mkxl b/tex/context/base/mkxl/lang-ini.mkxl
index ba9e37d86..42d365ff8 100644
--- a/tex/context/base/mkxl/lang-ini.mkxl
+++ b/tex/context/base/mkxl/lang-ini.mkxl
@@ -418,31 +418,31 @@
% \uchyph\plusone :
-% \chardef \completehyphenationmodecode \numexpr
-\permanent \integerdef \completehyphenationmodecode \numexpr
- \normalhyphenationmodecode % \discretionary
- + \automatichyphenationmodecode % -
- + \explicithyphenationmodecode % \-
- + \syllablehyphenationmodecode % pattern driven
- + \uppercasehyphenationmodecode % replaces \uchyph
- + \compoundhyphenationmodecode % replaces \compoundhyphenmode
- % \strictstarthyphenationmodecode % replaces \hyphenationbounds (strict = original tex)
- % \strictendhyphenationmodecode % replaces \hyphenationbounds (strict = original tex)
- + \automaticpenaltyhyphenationmodecode % replaces \hyphenpenaltymode (otherwise use \exhyphenpenalty)
- + \explicitpenaltyhyphenationmodecode % replaces \hyphenpenaltymode (otherwise use \exhyphenpenalty)
- + \permitgluehyphenationmodecode % turn glue into kern in \discretionary
- + \permitallhyphenationmodecode % okay, let's be even more tolerant
- + \permitmathreplacehyphenationmodecode % and again we're more permissive
- + \forcehandlerhyphenationmodecode % kick in the handler (could be an option)
- + \feedbackcompoundhyphenationmodecode % feedback compound snippets
- + \ignoreboundshyphenationmodecode % just in case we have hyphens at the edges
- + \collapsehyphenationmodecode % collapse -- and ---
+% \chardef \completehyphenationcode \numexpr
+\permanent \integerdef \completehyphenationcode \numexpr
+ \normalhyphenationcode % \discretionary
+ + \automatichyphenationcode % -
+ + \explicithyphenationcode % \-
+ + \syllablehyphenationcode % pattern driven
+ + \uppercasehyphenationcode % replaces \uchyph
+ + \compoundhyphenationcode % replaces \compoundhyphenmode
+ % \strictstarthyphenationcode % replaces \hyphenationbounds (strict = original tex)
+ % \strictendhyphenationcode % replaces \hyphenationbounds (strict = original tex)
+ + \automaticpenaltyhyphenationcode % replaces \hyphenpenaltymode (otherwise use \exhyphenpenalty)
+ + \explicitpenaltyhyphenationcode % replaces \hyphenpenaltymode (otherwise use \exhyphenpenalty)
+ + \permitgluehyphenationcode % turn glue into kern in \discretionary
+ + \permitallhyphenationcode % okay, let's be even more tolerant
+ + \permitmathreplacehyphenationcode % and again we're more permissive
+ + \forcehandlerhyphenationcode % kick in the handler (could be an option)
+ + \feedbackcompoundhyphenationcode % feedback compound snippets
+ + \ignoreboundshyphenationcode % just in case we have hyphens at the edges
+ + \collapsehyphenationcode % collapse -- and ---
\relax
-\permanent \integerdef \partialhyphenationmodecode \numexpr
- \ignoreboundshyphenationmodecode % just in case we have hyphens at the edges
-% + \explicithyphenationmodecode % \-
- + \collapsehyphenationmodecode % collapse -- and ---
+\permanent \integerdef \partialhyphenationcode \numexpr
+ \ignoreboundshyphenationcode % just in case we have hyphens at the edges
+% + \explicithyphenationcode % \-
+ + \collapsehyphenationcode % collapse -- and ---
\relax
\hccode"002D "002D
@@ -461,30 +461,30 @@
% maybe a (un)setter for handlers
-\permanent\protected\def\dohyphens {\hyphenationmode\completehyphenationmodecode}
-\permanent\protected\def\nohyphens {\hyphenationmode\partialhyphenationmodecode}
+\permanent\protected\def\dohyphens {\hyphenationmode\completehyphenationcode}
+\permanent\protected\def\nohyphens {\hyphenationmode\partialhyphenationcode}
% \permanent\protected\def\dohyphens
-% {\ifbitwiseand\hyphenationmode\collapsehyphenationmodecode
-% \hyphenationmode\completehyphenationmodecode
+% {\ifbitwiseand\hyphenationmode\collapsehyphenationcode
+% \hyphenationmode\completehyphenationcode
% \else
-% \hyphenationmode\numexpr\completehyphenationmodecode-\collapsehyphenationmodecode\relax
+% \hyphenationmode\numexpr\completehyphenationcode-\collapsehyphenationcode\relax
% \fi}
% \permanent\protected\def\nohyphens
-% {\ifbitwiseand\hyphenationmode\collapsehyphenationmodecode
-% \hyphenationmode\partialhyphenationmodecode
+% {\ifbitwiseand\hyphenationmode\collapsehyphenationcode
+% \hyphenationmode\partialhyphenationcode
% \else
-% \hyphenationmode\numexpr\partialhyphenationmodecode-\collapsehyphenationmodecode\relax
+% \hyphenationmode\numexpr\partialhyphenationcode-\collapsehyphenationcode\relax
% \fi}
-\permanent\protected\def\dohyphencollapsing{\hyphenationmode\bitwiseflip\hyphenationmode \collapsehyphenationmodecode}
-\permanent\protected\def\nohyphencollapsing{\hyphenationmode\bitwiseflip\hyphenationmode-\collapsehyphenationmodecode}
+\permanent\protected\def\dohyphencollapsing{\hyphenationmode\bitwiseflip\hyphenationmode \collapsehyphenationcode}
+\permanent\protected\def\nohyphencollapsing{\hyphenationmode\bitwiseflip\hyphenationmode-\collapsehyphenationcode}
\permanent\protected\def\usehyphensparameter#1%
{\edef\p_hyphens{#1\c!hyphens}%
\ifx\p_hyphens\v!no
- \ifbitwiseand\hyphenationmode\collapsehyphenationmodecode
+ \ifbitwiseand\hyphenationmode\collapsehyphenationcode
\nohyphens
\else
\nohyphens
@@ -835,20 +835,20 @@
%D {ef{\norightligaturing f}icient ff fi}\par
%D \stoptyping
-\immutable\chardef\nokerningcode \numexpr\noleftkerncode +\norightkerncode \relax
-\immutable\chardef\noligaturingcode\numexpr\noleftligaturecode+\norightligaturecode\relax
+\immutable\chardef\nokerningcode \numexpr\noleftkernglyphoptioncode +\norightkernglyphoptioncode \relax
+\immutable\chardef\noligaturingcode\numexpr\noleftligatureglyphoptioncode+\norightligatureglyphoptioncode\relax
\permanent\protected\def\nokerning {\bitwiseflip\glyphoptions\nokerningcode}
\permanent\protected\def\noligaturing{\bitwiseflip\glyphoptions\noligaturingcode}
-\permanent\protected\def\noleftkerning {\bitwiseflip\glyphoptions\noleftkerncode}
-\permanent\protected\def\noleftligaturing {\bitwiseflip\glyphoptions\noleftligaturecode}
-\permanent\protected\def\norightkerning {\bitwiseflip\glyphoptions\norightkerncode}
-\permanent\protected\def\norightligaturing{\bitwiseflip\glyphoptions\norightligaturecode}
+\permanent\protected\def\noleftkerning {\bitwiseflip\glyphoptions\noleftkernglyphoptioncode}
+\permanent\protected\def\noleftligaturing {\bitwiseflip\glyphoptions\noleftligatureglyphoptioncode}
+\permanent\protected\def\norightkerning {\bitwiseflip\glyphoptions\norightkernglyphoptioncode}
+\permanent\protected\def\norightligaturing{\bitwiseflip\glyphoptions\norightligatureglyphoptioncode}
% This is not really language related but let's define it here:
-\permanent\protected\def\noitaliccorrection{\bitwiseflip\glyphoptions\noitaliccorrectioncode}
+\permanent\protected\def\noitaliccorrection{\bitwiseflip\glyphoptions\noitaliccorrectionglyphoptioncode}
%D Also \LMTX:
diff --git a/tex/context/base/mkxl/lpdf-mis.lmt b/tex/context/base/mkxl/lpdf-mis.lmt
index bf1a736c0..73f7bcf06 100644
--- a/tex/context/base/mkxl/lpdf-mis.lmt
+++ b/tex/context/base/mkxl/lpdf-mis.lmt
@@ -438,7 +438,6 @@ local function documentspecification()
end
end
end
-
-- maybe interfaces.variables
local layout = spec.layout
local mode = spec.mode
diff --git a/tex/context/base/mkxl/lpdf-wid.lmt b/tex/context/base/mkxl/lpdf-wid.lmt
index 1bccd9fc9..a75053c94 100644
--- a/tex/context/base/mkxl/lpdf-wid.lmt
+++ b/tex/context/base/mkxl/lpdf-wid.lmt
@@ -23,6 +23,9 @@ if not modules then modules = { } end modules ['lpdf-wid'] = {
-- the other fragile bit. And, now that adobe quits flash in 2020 we're without any
-- video anyway. Also, it won't play on all platforms and devices so let's wait for
-- html5 media in pdf then.
+--
+-- See mail by Michal Vlasák to the mailing list that discusses current support in
+-- viewers and also mentions a few fixes wrt embedding media.
local tonumber, next = tonumber, next
local gmatch, gsub, find, lower = string.gmatch, string.gsub, string.find, string.lower
@@ -689,18 +692,19 @@ local function insertrendering(specification)
-- B = start,
-- }
-- }
- -- local parameters = pdfdictionary {
- -- Type = pdfconstant(MediaPermissions),
- -- TF = pdfstring("TEMPALWAYS") }, -- TEMPNEVER TEMPEXTRACT TEMPACCESS TEMPALWAYS
- -- }
+ local parameters = pdfdictionary {
+ Type = pdfconstant(MediaPermissions),
+ TF = pdfstring("TEMPALWAYS"), -- TEMPNEVER TEMPEXTRACT TEMPACCESS TEMPALWAYS / needed for acrobat/wmp
+ }
local descriptor = pdfdictionary {
Type = pdfconstant("Filespec"),
F = filename,
}
if isurl then
descriptor.FS = pdfconstant("URL")
+ descriptor = pdfreference(pdfflushobject(descriptor))
elseif option[v_embed] then
- descriptor.EF = codeinjections.embedfile {
+ descriptor = codeinjections.embedfile {
file = filename,
mimetype = mimetype, -- yes or no
compress = false,
@@ -712,8 +716,8 @@ local function insertrendering(specification)
N = label,
CT = mimetype,
Alt = pdfarray { "", "file not found" }, -- language id + message
- D = pdfreference(pdfflushobject(descriptor)),
- -- P = pdfreference(pdfflushobject(parameters)),
+ D = descriptor,
+ P = pdfreference(pdfflushobject(parameters)),
}
local rendition = pdfdictionary {
Type = pdfconstant("Rendition"),
diff --git a/tex/context/base/mkxl/lxml-ctx.mkxl b/tex/context/base/mkxl/lxml-ctx.mkxl
index f4b2edc79..8515e6187 100644
--- a/tex/context/base/mkxl/lxml-ctx.mkxl
+++ b/tex/context/base/mkxl/lxml-ctx.mkxl
@@ -20,9 +20,9 @@
\unprotect
-\settrue \xmllshowbuffer
-\setfalse\xmllshowtitle
-\settrue \xmllshowwarning
+\settrue \xmllshowbuffertoo
+\setfalse\xmllshowtitletoo
+\settrue \xmllshowwarningtoo
\definehead
[lshowtitle]
@@ -35,10 +35,10 @@
\permanent\protected\def\xmllshow#1%
{\ctxlua{xml.ctx.tshow {
pattern = \!!bs\detokenize{#1}\!!es,
- \ifconditional\xmllshowtitle
+ \ifconditional\xmllshowtitletoo
title = "lshowtitle",
\fi
- \ifconditional\xmllshowwarning
+ \ifconditional\xmllshowwarningtoo
warning = true,
\fi
} }}
@@ -46,11 +46,11 @@
\permanent\protected\def\xmllshowbuffer#1#2#3%
{\ctxlua{xml.ctx.tshow {
pattern = \!!bs\detokenize{#2}\!!es,
- \ifconditional\xmllshowbuffer
+ \ifconditional\xmllshowbuffertoo
xmlroot = "#1",
attribute = "#3",
\fi
- \ifconditional\xmllshowwarning
+ \ifconditional\xmllshowwarningtoo
warning = true,
\fi
} }}
diff --git a/tex/context/base/mkxl/math-ini.mkxl b/tex/context/base/mkxl/math-ini.mkxl
index 37c48121c..4425c936d 100644
--- a/tex/context/base/mkxl/math-ini.mkxl
+++ b/tex/context/base/mkxl/math-ini.mkxl
@@ -123,11 +123,11 @@
\definesystemattribute[displaymath] [public]
\mathflattenmode\numexpr
- \ordflattencode
- +\binflattencode
- +\relflattencode
- +\punctflattencode
- +\innerflattencode
+ \ordmathflattencode
+ +\binmathflattencode
+ +\relmathflattencode
+ +\punctmathflattencode
+ +\innermathflattencode
\relax
\ifdefined\ordlimits\else
@@ -3041,6 +3041,10 @@
{\ifchkdim#1\or\Umathopenupheight#1\relax\Umathopenupdepth#1\relax\fi
\Usubprescript{#2}\Usuperprescript{#3}}
+%D For now (needed in asciimath):
+
+\def\math_relax_limits{\enforced\let\limits\relax}
+
\protect \endinput
% % not used (yet)
diff --git a/tex/context/base/mkxl/mlib-lmt.lmt b/tex/context/base/mkxl/mlib-lmt.lmt
index 61d390dc0..7bbccb16b 100644
--- a/tex/context/base/mkxl/mlib-lmt.lmt
+++ b/tex/context/base/mkxl/mlib-lmt.lmt
@@ -157,23 +157,26 @@ todecimal = xdecimal and xdecimal.new or tonumber -- bonus
-- mail on list by Mikael Sundqvist and Taco's analysis of near duplicate points (2021/02/11+)
-registerscript("scrutenized", function()
- local pth = scanpath()
- local d = 1/10^scannumeric() -- decimals
- local p1 = pth[1]
- local x1 = p1[1]
- local y1 = p1[2]
- local res = { pth[1] }
- local r = 1
+registerscript("scrutinized", function()
+ local pth = scanpath()
+ local d = 1/10^scannumeric() -- decimals
+ local p1 = pth[1]
+ local x1 = p1[1]
+ local y1 = p1[2]
+ local res = { pth[1] }
+ local r = 1
for i=2,#pth do
local pi = pth[i]
x2 = pi[1]
y2 = pi[2]
if abs(x1-x2) > d or abs(y1-y2) > d then
r = r + 1 res[r] = pi
+ x1 = x2
+ y1 = y2
+ else
+ res[r][5] = pi[5]
+ res[r][6] = pi[6]
end
- x1 = x2
- y1 = y2
end
if pth.cycle then
res.cycle = true
diff --git a/tex/context/base/mkxl/node-fin.mkxl b/tex/context/base/mkxl/node-fin.mkxl
index 8e6a11edc..361744b8e 100644
--- a/tex/context/base/mkxl/node-fin.mkxl
+++ b/tex/context/base/mkxl/node-fin.mkxl
@@ -70,4 +70,14 @@
% % \enableattributeinheritance % might become default
% % \to\everyjob
+% This is just a compatibility hack:
+
+\newcount\c_syst_attr_trigger
+
+\permanent\protected\def\attributedcopy{\afterassignment\syst_attr_copy\c_syst_attr_trigger}
+\permanent\protected\def\attributedbox {\afterassignment\syst_attr_box \c_syst_attr_trigger}
+
+\def\syst_attr_copy{\recolorbox\c_syst_attr_trigger\copy\c_syst_attr_trigger}
+\def\syst_attr_box {\recolorbox\c_syst_attr_trigger\box \c_syst_attr_trigger}
+
\protect \endinput
diff --git a/tex/context/base/mkxl/node-nut.lmt b/tex/context/base/mkxl/node-nut.lmt
index 004da72af..b5a371d5e 100644
--- a/tex/context/base/mkxl/node-nut.lmt
+++ b/tex/context/base/mkxl/node-nut.lmt
@@ -178,6 +178,8 @@ local nuts = {
reverse = direct.reverse,
setattr = direct.setattribute,
setattribute = direct.setattribute,
+ setattributes = direct.setattributes,
+ patchattributes = direct.patchattributes,
setattributelist = direct.setattributelist,
setattrlist = direct.setattributelist,
setattrs = direct.setattributes,
diff --git a/tex/context/base/mkxl/node-tra.lmt b/tex/context/base/mkxl/node-tra.lmt
index 8ed14b305..6fe2e2081 100644
--- a/tex/context/base/mkxl/node-tra.lmt
+++ b/tex/context/base/mkxl/node-tra.lmt
@@ -736,3 +736,51 @@ end
trackers.register("fonts.result.show", function(v)
nodes.tasks.setaction("processors","nodes.handlers.show",v)
end)
+
+-- This is a weird spot but it's just a compatibility hack:
+
+local getattributes = nuts.getattributes
+local patchattributes = nuts.patchattributes
+
+local texgetattribute = tex.getattribute
+
+function recolor(head,colormodel,color,transparency)
+ -- todo loop over content
+ for n, id in nextnode, head do
+ if id == glyph_code or id == rule_code then
+ local m, c, t = getattributes(n,a_colormodel,a_color,a_transparency)
+ if not c or c == 1 then
+ if not t then
+ patchattributes(n,a_colormodel,colormodel,a_color,color,a_transparency,transparency)
+ else
+ patchattributes(n,a_colormodel,colormodel,a_color,color)
+ end
+ else
+ if not t then
+ patchattributes(n,a_transparency,transparency)
+ end
+ end
+ -- maybe skip the visuals
+ elseif id == hlist_node or id == vlist_node then
+ recolor(getlist(n),colormodel,color,transparency)
+ end
+ end
+end
+
+local function recolorbox(head)
+ recolor(getlist(head),texgetattribute(a_colormodel),texgetattribute(a_color),texgetattribute(a_transparency))
+end
+
+nodes.handlers.recolor = recolorbox
+
+local getbox = nodes.nuts.getbox
+
+interfaces.implement {
+ name = "recolorbox",
+ public = true,
+ protected = true,
+ arguments = { "integer" },
+ actions = function(n)
+ recolor(getbox(n))
+ end
+}
diff --git a/tex/context/base/mkxl/pack-rul.mkxl b/tex/context/base/mkxl/pack-rul.mkxl
index bbfd88bfe..f1d8cbf31 100644
--- a/tex/context/base/mkxl/pack-rul.mkxl
+++ b/tex/context/base/mkxl/pack-rul.mkxl
@@ -1288,7 +1288,7 @@
\edef\framedheight{\the\ifdim\d_framed_height>\zeropoint \d_framed_height\else\zeropoint\fi}% public
\edef\framedoffset{\the\dimexpr\ifconditional\c_framed_has_offset\localoffset \else\zeropoint\fi}% public
% for now: i need to think of something better
- % \bitwiseflip \normalizelinemode -\clipwidthcode % now handled in analyzer
+ % \bitwiseflip \normalizelinemode -\clipwidthnormalizecode % now handled in analyzer
% but that's for later
\ifempty\p_framed_orientation
\let\pack_framed_stop_orientation\relax
diff --git a/tex/context/base/mkxl/scrn-wid.mklx b/tex/context/base/mkxl/scrn-wid.mklx
index 5d1d67a99..d760e3e2e 100644
--- a/tex/context/base/mkxl/scrn-wid.mklx
+++ b/tex/context/base/mkxl/scrn-wid.mklx
@@ -649,6 +649,7 @@
\letrenderingwindowparameter\c!closepageaction\empty
\setrenderingwindowparameter\c!width {\d_scrn_rendering_width }%
\setrenderingwindowparameter\c!height {\d_scrn_rendering_height}%
+ \letrenderingwindowparameter\c!align \v!flushleft
\to \everypresetrenderingwindow
\permanent\tolerant\protected\def\placerenderingwindow[#window]#spacer[#rendering]% do all in lua
diff --git a/tex/context/base/mkxl/spac-ali.mkxl b/tex/context/base/mkxl/spac-ali.mkxl
index 765dc428d..3ad3dcb91 100644
--- a/tex/context/base/mkxl/spac-ali.mkxl
+++ b/tex/context/base/mkxl/spac-ali.mkxl
@@ -741,7 +741,12 @@
% experiment
-\defcsname\??aligncommand\v!always\endcsname{\toksapp\t_spac_align_collected{\bitwiseflip\hyphenationmode\forcecheckhyphenationmodecode}}
+\defcsname\??aligncommand \v!flushforward\endcsname{\c_spac_align_state_horizontal\ifconditional\inlinelefttoright\plustwo\else\plusthree\fi}
+\defcsname\??aligncommand\v!flushbackward\endcsname{\c_spac_align_state_horizontal\ifconditional\inlinelefttoright\plusthree\else\plustwo\fi}
+
+% experiment
+
+\defcsname\??aligncommand\v!always\endcsname{\toksapp\t_spac_align_collected{\bitwiseflip\hyphenationmode\forcecheckhyphenationcode}}
\definehspace [\v!final] [\emspaceamount]
diff --git a/tex/context/base/mkxl/spac-hor.mkxl b/tex/context/base/mkxl/spac-hor.mkxl
index 25f469fc5..0a378d500 100644
--- a/tex/context/base/mkxl/spac-hor.mkxl
+++ b/tex/context/base/mkxl/spac-hor.mkxl
@@ -19,10 +19,10 @@
\aliased\let\parfillrightskip\parfillskip
-\bitwiseflip \normalizelinemode \parindentskipcode
-\bitwiseflip \normalizelinemode \normalizelinecode
-\bitwiseflip \normalizelinemode \clipwidthcode
-\bitwiseflip \normalizelinemode \flattendiscretionariescode
+\bitwiseflip \normalizelinemode \parindentskipnormalizecode
+\bitwiseflip \normalizelinemode \normalizelinenormalizecode
+\bitwiseflip \normalizelinemode \clipwidthnormalizecode
+\bitwiseflip \normalizelinemode \flattendiscretionariesnormalizecode
\let\v_spac_indentation_current\empty % amount/keyword
diff --git a/tex/context/base/mkxl/spac-par.mkxl b/tex/context/base/mkxl/spac-par.mkxl
index 6c3927861..8124f2929 100644
--- a/tex/context/base/mkxl/spac-par.mkxl
+++ b/tex/context/base/mkxl/spac-par.mkxl
@@ -24,62 +24,62 @@
% this might move to syst-ini.mkxl
\setnewconstant\paragraphupdatecodes\numexpr
- \frozentolerancecode
- + \frozenloosenesscode
- + \frozenlinepenaltycode
- + \frozenwidowpenaltycode
- + \frozenclubpenaltycode
- + \frozenbrokenpenaltycode
- + \frozendemeritscode
+ \tolerancefrozenparcode
+ + \loosenessfrozenparcode
+ + \linepenaltyfrozenparcode
+ + \widowpenaltyfrozenparcode
+ + \clubpenaltyfrozenparcode
+ + \brokenpenaltyfrozenparcode
+ + \demeritsfrozenparcode
\relax
\setnewconstant\paragraphpenaltycodes\numexpr
- \frozenlinepenaltycode
- + \frozenwidowpenaltycode
- + \frozenclubpenaltycode
- + \frozenbrokenpenaltycode
+ \linepenaltyfrozenparcode
+ + \widowpenaltyfrozenparcode
+ + \clubpenaltyfrozenparcode
+ + \brokenpenaltyfrozenparcode
\relax
\setnewconstant\paragraphdemeritcodes\numexpr
- \frozendemeritscode
+ \demeritsfrozenparcode
\relax
\setnewconstant\paragraphshapecodes\numexpr
- \frozenhangcode
- + \frozenskipcode
- + \frozenparfillcode
- + \frozenshapecode
+ \hangfrozenparcode
+ + \skipfrozenparcode
+ + \parfillfrozenparcode
+ + \shapefrozenparcode
\relax
\setnewconstant\paragraphlinecodes\numexpr
- \frozenlinecode
+ \linefrozenparcode
\relax
\setnewconstant\paragraphhyphenationcodes\numexpr
- \frozenhyphenationcode
+ \hyphenationfrozenparcode
\relax
\setnewconstant\frozenparagraphdefault\numexpr
- \frozenhsizecode % \hsize
- + \frozenskipcode % \leftskip \rightskip
- + \frozenhangcode % \hangindent \hangafter
- + \frozenindentcode % \parindent
- + \frozenparfillcode % \parfillskip \parfillleftskip
- + \frozenadjustcode % \adjustspacing
- + \frozenprotrudecode % \protrudechars
- + \frozentolerancecode % \tolerance \pretolerance
- + \frozenstretchcode % \emergcystretch
- + \frozenloosenesscode % \looseness
- + \frozenlastlinecode % \lastlinefit
- + \frozenlinepenaltycode % \linepenalty \interlinepenalty \interlinepenalties
- + \frozenclubpenaltycode % \clubpenalty \clubpenalties
- + \frozenwidowpenaltycode % \widowpenalty \widowpenalties
- + \frozendisplaypenaltycode % \displaypenalty \displaypenalties
- + \frozenbrokenpenaltycode % \brokenpenalty
- + \frozendemeritscode % \doublehyphendemerits \finalhyphendemerits \adjdemerits
- + \frozenshapecode % \parshape
- % \frozenlinecode % \baselineskip \lineskip \lineskiplimit
- + \frozenhyphenationcode % \hyphenationmode
+ \hsizefrozenparcode % \hsize
+ + \skipfrozenparcode % \leftskip \rightskip
+ + \hangfrozenparcode % \hangindent \hangafter
+ + \indentfrozenparcode % \parindent
+ + \parfillfrozenparcode % \parfillskip \parfillleftskip
+ + \adjustfrozenparcode % \adjustspacing
+ + \protrudefrozenparcode % \protrudechars
+ + \tolerancefrozenparcode % \tolerance \pretolerance
+ + \stretchfrozenparcode % \emergcystretch
+ + \loosenessfrozenparcode % \looseness
+ + \lastlinefrozenparcode % \lastlinefit
+ + \linepenaltyfrozenparcode % \linepenalty \interlinepenalty \interlinepenalties
+ + \clubpenaltyfrozenparcode % \clubpenalty \clubpenalties
+ + \widowpenaltyfrozenparcode % \widowpenalty \widowpenalties
+ + \displaypenaltyfrozenparcode % \displaypenalty \displaypenalties
+ + \brokenpenaltyfrozenparcode % \brokenpenalty
+ + \demeritsfrozenparcode % \doublehyphendemerits \finalhyphendemerits \adjdemerits
+ + \shapefrozenparcode % \parshape
+ % \linefrozenparcode % \baselineskip \lineskip \lineskiplimit
+ + \hyphenationfrozenparcode % \hyphenationmode
\relax
\permanent\protected\def\freezeparagraphproperties {\snapshotpar\frozenparagraphdefault}
diff --git a/tex/context/base/mkxl/spac-ver.mkxl b/tex/context/base/mkxl/spac-ver.mkxl
index 42c424e83..82f0d40d1 100644
--- a/tex/context/base/mkxl/spac-ver.mkxl
+++ b/tex/context/base/mkxl/spac-ver.mkxl
@@ -488,17 +488,17 @@
\installtextracker
{linecorrection.boxes}
- {\letfrozen\let\spac_lines_vbox\ruledvbox}
- {\letfrozen\let\spac_lines_vbox\vbox}
+ {\enforced\let\spac_lines_vbox\ruledvbox}
+ {\enforced\let\spac_lines_vbox\vbox}
\let\v_spac_lines_around_action_set\relax
\let\m_spac_lines_around \empty
\newconstant\c_spac_lines_correction_mode
-\setvalue{\??linesaround\v!blank }{\blank}
-\letvalue{\??linesaround\empty }\relax
-\setvalue{\??linesaround\s!unknown}{\directcheckedvspacing\m_spac_lines_around} % \blank[\m_spac_lines_around]}
+\defcsname\??linesaround\v!blank \endcsname{\blank}
+\letcsname\??linesaround\empty \endcsname\relax
+\defcsname\??linesaround\s!unknown\endcsname{\directcheckedvspacing\m_spac_lines_around} % \blank[\m_spac_lines_around]}
\def\spac_lines_action_around % we used to let this one but it's cleaner this way
{\csname\??linesaround % i.e. do it twice
diff --git a/tex/context/base/mkxl/strc-con.mklx b/tex/context/base/mkxl/strc-con.mklx
index a7df2f9cf..d700899b3 100644
--- a/tex/context/base/mkxl/strc-con.mklx
+++ b/tex/context/base/mkxl/strc-con.mklx
@@ -132,23 +132,23 @@
\appendtoks
\ifempty\currentconstructionparent
- \letvalue{\??constructionmain\currentconstruction}\currentconstruction
+ \letcsname\??constructionmain\currentconstruction\endcsname\currentconstruction
\definelist[\currentconstruction]% goodie
\else
- \letvalue{\??constructionmain\currentconstruction}\currentconstructionparent
+ \letcsname\??constructionmain\currentconstruction\endcsname\currentconstructionparent
\definelist[\currentconstruction][\currentconstructionparent]% goodie
\fi
- \setevalue{\??constructionlevel\currentconstruction}{\number\constructionparameter\c!level}%
- \setevalue{\??constructionclass\currentconstruction}{\constructionparameter\s!handler}%
+ \edefcsname\??constructionlevel\currentconstruction\endcsname{\number\constructionparameter\c!level}%
+ \edefcsname\??constructionclass\currentconstruction\endcsname{\constructionparameter\s!handler}%
\to \everydefineconstruction
% todo: inhibit this when we have a different handle .. current we cannot do \frozen
\appendtoks
\ifconditional\c_strc_constructions_define_commands
- %% \instance\setuevalue{\e!start\currentconstruction}{\strc_constructions_start{\currentconstruction}}%
- \instance\setuevalue{\e!start\currentconstruction}{\strc_constructions_start[\currentconstruction]}%
- \instance\setuevalue{\e!stop \currentconstruction}{\strc_constructions_stop}%
+ %% \protected\instance\edefcsname\e!start\currentconstruction\endcsname{\strc_constructions_start{\currentconstruction}}%
+ \protected\instance\edefcsname\e!start\currentconstruction\endcsname{\strc_constructions_start[\currentconstruction]}%
+ \protected\instance\edefcsname\e!stop \currentconstruction\endcsname{\strc_constructions_stop}%
\fi
\to \everydefineconstruction
@@ -443,7 +443,7 @@
\updateparagraphshapes
\ignorespaces} % args not needed
-\protected\setvalue{\??constructionstophandler\v!construction}%
+\protected\defcsname\??constructionstophandler\v!construction\endcsname
{\strc_constructions_close_symbol_place
\doifnot{\constructionparameter\c!display}\v!no\par
\dostoptagged % content
diff --git a/tex/context/base/mkxl/strc-des.mklx b/tex/context/base/mkxl/strc-des.mklx
index b44593a32..1eab07d7d 100644
--- a/tex/context/base/mkxl/strc-des.mklx
+++ b/tex/context/base/mkxl/strc-des.mklx
@@ -67,14 +67,14 @@
\defineconstruction[\currentdescription][\s!handler=\v!description,\c!level=1]%
\fi
% We can combine these but in tracing (or errors) using a different caller is nicer.
- \frozen\instance\setuevalue {\currentdescription}{\strc_descriptions_command[\currentdescription]}%
- \frozen\instance\setuevalue{\e!start\currentdescription}{\strc_descriptions_start [\currentdescription]}%
- \frozen\instance\setuevalue{\e!stop \currentdescription}{\strc_descriptions_stop}%
+ \frozen\protected\instance\edefcsname \currentdescription\endcsname{\strc_descriptions_command[\currentdescription]}%
+ \frozen\protected\instance\edefcsname\e!start\currentdescription\endcsname{\strc_descriptions_start [\currentdescription]}%
+ \frozen\protected\instance\edefcsname\e!stop \currentdescription\endcsname{\strc_descriptions_stop}%
\to \everydefinedescription
\let\p_strc_constructions_title \empty
-\protected\setvalue{\??constructioninitializer\v!description}%
+\protected\defcsname\??constructioninitializer\v!description\endcsname
{\let \currentdescription \currentconstruction
\enforced\let\constructionparameter \descriptionparameter
\enforced\let\constructionnamespace \??description
@@ -165,16 +165,16 @@
\letcsname\??constructioncommandhandler\v!description\expandafter\endcsname\csname\??constructioncommandhandler\v!construction\endcsname
\letcsname\??constructiontexthandler \v!description\expandafter\endcsname\csname\??constructiontexthandler \v!construction\endcsname
-\protected\setvalue{\??constructioncommandhandler\v!description}%
+\protected\defcsname\??constructioncommandhandler\v!description\endcsname
{\dowithpar
{\csname\??constructionstarthandler\v!construction\endcsname}%
{\csname\??constructionstophandler \v!construction\endcsname\endgroup}}
-\protected\setvalue{\??constructionstarthandler\v!description}%
+\protected\defcsname\??constructionstarthandler\v!description\endcsname
{\dogotopar
{\csname\??constructionstarthandler\v!construction\endcsname}}
-\protected\setvalue{\??constructionstophandler\v!description}%
+\protected\defcsname\??constructionstophandler\v!description\endcsname
{\csname\??constructionstophandler\v!construction\endcsname
\endgroup}
diff --git a/tex/context/base/mkxl/strc-ind.mkxl b/tex/context/base/mkxl/strc-ind.mkxl
index 31d7eb575..1ba64bbd3 100644
--- a/tex/context/base/mkxl/strc-ind.mkxl
+++ b/tex/context/base/mkxl/strc-ind.mkxl
@@ -109,8 +109,11 @@
\permanent\let\stopindentedtext\strc_indentedtexts_stop
-\protected\def\strc_indentedtexts_direct#1#2#3\par % no longer clever grabpar trickery
- {\strc_indentedtexts_start{#1}{#2}#3\strc_indentedtexts_stop}
+% \protected\def\strc_indentedtexts_direct#1#2#3\par % no longer clever grabpar trickery
+% {\strc_indentedtexts_start{#1}{#2}#3\strc_indentedtexts_stop}
+
+\protected\def\strc_indentedtexts_direct#1#2% more modern anyway
+ {\strc_indentedtexts_start{#1}{#2}\wrapuppar{\strc_indentedtexts_stop}}
\setupindentedtext
[\c!style=\v!normal,
diff --git a/tex/context/base/mkxl/syst-aux.mkxl b/tex/context/base/mkxl/syst-aux.mkxl
index 1349385a9..2cca77390 100644
--- a/tex/context/base/mkxl/syst-aux.mkxl
+++ b/tex/context/base/mkxl/syst-aux.mkxl
@@ -4197,15 +4197,21 @@
\let\syst_helpers_par_before\relax
\let\syst_helpers_par_around\relax
+% \permanent\protected\def\dowithpar#1#2%
+% {\globalpushmacro\syst_helpers_par_around
+% \def\syst_helpers_par_around##1\par{#1##1#2\globalpopmacro\syst_helpers_par_around}%
+% \expandafter\syst_helpers_par_around\ignorepars}
+
+% \permanent\protected\def\dogotopar#1%
+% {\globalpushmacro\syst_helpers_par_before
+% \def\syst_helpers_par_before{#1\globalpopmacro\syst_helpers_par_before}%
+% \expandafter\syst_helpers_par_before\ignorepars}
+
\permanent\protected\def\dowithpar#1#2%
- {\globalpushmacro\syst_helpers_par_around
- \def\syst_helpers_par_around##1\par{#1##1#2\globalpopmacro\syst_helpers_par_around}%
- \expandafter\syst_helpers_par_around\ignorepars}
+ {\begingroup\aftergrouped{#1\dontleavehmode\wrapuppar{#2}}\expandafter\endgroup\ignorepars}
\permanent\protected\def\dogotopar#1%
- {\globalpushmacro\syst_helpers_par_before
- \def\syst_helpers_par_before{#1\globalpopmacro\syst_helpers_par_before}%
- \expandafter\syst_helpers_par_before\ignorepars}
+ {\begingroup\aftergrouped{#1}\expandafter\endgroup\ignorepars}
\aliased\let\dogotoparcs\dogotopar
@@ -6263,12 +6269,14 @@
\permanent\protected\def\DoMod#1by#2to#3{\dosetmodulo {#1}{#2}{#3}}
\permanent\protected\def\DoDiv#1by#2to#3{\dosetdivision{#1}{#2}{#3}}
-\def\syst_helpers_unprotected#1\par
- {#1\protect}
+%D This is obsolete, just use \type {\unprotect} and \type {\protect} instead.
-\permanent\protected\def\unprotected
- {\unprotect
- \syst_helpers_unprotected}
+% \def\syst_helpers_unprotected#1\par
+% {#1\protect}
+%
+% \permanent\protected\def\unprotected
+% {\unprotect
+% \syst_helpers_unprotected}
\aliased\let\resettimer \clf_resettimer % todo: at lua end
\aliased\let\elapsedtime \clf_elapsedtime % todo: at lua end
diff --git a/tex/context/base/mkxl/syst-ini.mkxl b/tex/context/base/mkxl/syst-ini.mkxl
index 15e349330..90580c471 100644
--- a/tex/context/base/mkxl/syst-ini.mkxl
+++ b/tex/context/base/mkxl/syst-ini.mkxl
@@ -1397,4 +1397,13 @@
\tracinghyphenation\plusone
+%D Sometimes nicer:
+
+\let\ifexpression\ifnumexpression
+
+%D This will be default:
+
+\autoparagraphmode\plusone % we need at least 1 in order to be able to switch to 2
+%autoparagraphmode\plustwo % because we define two \par delimited macros
+
\protect \endinput
diff --git a/tex/context/base/mkxl/tabl-tbl.mkxl b/tex/context/base/mkxl/tabl-tbl.mkxl
index a1601c23e..e22fb946c 100644
--- a/tex/context/base/mkxl/tabl-tbl.mkxl
+++ b/tex/context/base/mkxl/tabl-tbl.mkxl
@@ -1050,8 +1050,8 @@
\appendtoks
\enforced\permanent\protected\edefcsname\e!start \currenttabulation\endcsname{\tabl_start_defined[\currenttabulation]}%
\enforced\aliased \letcsname \e!stop \currenttabulation\endcsname\relax
- \enforced\aliased \letcsname \??tabulatehead\currenttabulation\endcsname\empty
- \enforced\aliased \letcsname \??tabulatefoot\currenttabulation\endcsname\empty
+ \mutable \letcsname \??tabulatehead\currenttabulation\endcsname\empty
+ \mutable \letcsname \??tabulatefoot\currenttabulation\endcsname\empty
\to \everydefinetabulation
\aliased \let\tabulateparameter\tabulationparameter % will stay for a while
diff --git a/tex/context/base/mkxl/toks-aux.lmt b/tex/context/base/mkxl/toks-aux.lmt
index 35676841e..c62511168 100644
--- a/tex/context/base/mkxl/toks-aux.lmt
+++ b/tex/context/base/mkxl/toks-aux.lmt
@@ -130,33 +130,46 @@ interfaces.implement {
-- For the moment here, will move to initex only (also see node-ini.lua); we need
-- to actually store these.
-local function getthem(getter,pre,post)
+local context = context
+
+local function getthem(getter,post)
local codes = { }
if getter then
local texintegerdef = tex.integerdef
for k, v in next, getter() do
codes[k] = gsub(v,"[_ ]","")
end
- if post ~= "" and environment.initex then
- for k, v in next, codes do
- texintegerdef(pre .. v .. post,k,"immutable")
+ if post ~= "" then
+ if environment.initex then
+ for k, v in next, codes do
+ texintegerdef(v .. post,k,"immutable")
+ end
end
+ interfaces.implement {
+ name = post .. "string",
+ public = true,
+ arguments = "integer",
+ actions = function(i)
+ context(codes[i] or "unknown")
+ end
+ }
end
end
return utilities.storage.allocate(table.swapped(codes,codes))
end
-tex.groupcodes = getthem(tex.getgroupvalues, "", "groupcode")
-tex.glyphoptioncodes = getthem(tex.getglyphoptionvalues, "", "code")
-tex.discoptioncodes = getthem(tex.getdiscoptionvalues, "", "code")
-tex.mathoptioncodes = getthem(tex.getmathoptionvalues, "", "") -- only at lua end
-tex.mathcontrolcodes = getthem(tex.getmathcontrolvalues, "", "mathcontrolcode")
-tex.textcontrolcodes = getthem(tex.gettextcontrolvalues, "", "") -- only at lua end
-tex.mathflattencodes = getthem(tex.getmathflattenvalues, "", "flattencode")
-tex.hyphenationcodes = getthem(tex.gethyphenationvalues, "", "hyphenationmodecode")
-tex.frozenparcodes = getthem(tex.getfrozenparvalues, "frozen", "code")
-tex.flagcodes = getthem(tex.getflagvalues, "", "flagcode" )
-tex.normalizecodes = getthem(tex.getnormalizevalues, "", "code")
+tex.discoptioncodes = getthem(tex.getdiscoptionvalues, "discoptioncode")
+tex.flagcodes = getthem(tex.getflagvalues, "flagcode" )
+tex.frozenparcodes = getthem(tex.getfrozenparvalues, "frozenparcode")
+tex.glyphoptioncodes = getthem(tex.getglyphoptionvalues, "glyphoptioncode")
+tex.groupcodes = getthem(tex.getgroupvalues, "groupcode")
+tex.hyphenationcodes = getthem(tex.gethyphenationvalues, "hyphenationcode")
+tex.mathcontrolcodes = getthem(tex.getmathcontrolvalues, "mathcontrolcode")
+tex.mathflattencodes = getthem(tex.getmathflattenvalues, "mathflattencode")
+tex.mathoptioncodes = getthem(tex.getmathoptionvalues, "") -- only at lua end
+tex.normalizecodes = getthem(tex.getnormalizevalues, "normalizecode")
+tex.parcontextcodes = getthem(tex.getparcontextvalues, "parcontextcode")
+tex.textcontrolcodes = getthem(tex.gettextcontrolvalues, "") -- only at lua end
function tex.stringtocodesbitmap(str,codes)
local bitmap = 0
diff --git a/tex/context/base/mkxl/trac-vis.mkxl b/tex/context/base/mkxl/trac-vis.mkxl
index 38ab7ca3d..f98b84f00 100644
--- a/tex/context/base/mkxl/trac-vis.mkxl
+++ b/tex/context/base/mkxl/trac-vis.mkxl
@@ -80,7 +80,7 @@
\def\syst_visualizers_speedup{\the\t_syst_visualizers_optimize}
-\appendtoks
+% \appendtoks
% \enforced\global\protected\edef\ruledhbox {\syst_visualizers_hbox attr \visualattribute \number\clf_getvisual{simplehbox} }
% \enforced\global\protected\edef\ruledhpack {\syst_visualizers_hpack attr \visualattribute \number\clf_getvisual{simplehbox} }
% \enforced\global\protected\edef\ruledvbox {\syst_visualizers_vbox attr \visualattribute \number\clf_getvisual{simplevbox} }
@@ -88,7 +88,7 @@
% \enforced\global\protected\edef\ruledvtop {\syst_visualizers_vtop attr \visualattribute \number\clf_getvisual{simplevtop} }
% \enforced\global\protected\edef\ruledtpack {\syst_visualizers_tpack attr \visualattribute \number\clf_getvisual{simplevtop} }
% \enforced\global\protected\edef\ruledvcenter{\syst_visualizers_vcenter attr \visualattribute \number\clf_getvisual{simplevbox} }
-\to \t_syst_visualizers_optimize
+% \to \t_syst_visualizers_optimize
\permanent\tolerant\protected\def\showmakeup[#1]%
{\ifarguments
diff --git a/tex/context/base/mkxl/typo-dir.mkxl b/tex/context/base/mkxl/typo-dir.mkxl
index 328b157ef..af680282c 100644
--- a/tex/context/base/mkxl/typo-dir.mkxl
+++ b/tex/context/base/mkxl/typo-dir.mkxl
@@ -87,7 +87,7 @@
\appendtoks
\edef\p_option{\directionsparameter\c!break}% name can change
- \bitwiseflip\normalizelinemode\ifx\p_option\v!both\else-\fi\breakafterdircode
+ \bitwiseflip\normalizelinemode\ifx\p_option\v!both\else-\fi\breakafterdirnormalizecode
\to \everysetupdirections
% bidi: local=obey grouping, global=ignore grouping (unicode has no grouping)
diff --git a/tex/context/base/mkxl/typo-inj.mkxl b/tex/context/base/mkxl/typo-inj.mkxl
index 9dae32253..bf329482e 100644
--- a/tex/context/base/mkxl/typo-inj.mkxl
+++ b/tex/context/base/mkxl/typo-inj.mkxl
@@ -61,12 +61,12 @@
% use \v!list instead of \s!list
\permanent\protected\def\doinstallinjector#1%
- {\letcsname typo_injectors_mark_#1\endcsname\donothing
- \letcsname typo_injectors_check_#1\endcsname\donothing}
+ {\gletcsname typo_injectors_mark_#1\endcsname\donothing
+ \gletcsname typo_injectors_check_#1\endcsname\donothing}
\permanent\protected\def\doactivateinjector#1% used at lua end
- {\protected\edefcsname typo_injectors_mark_#1\endcsname{\dontleavehmode\noexpand\clf_markinjector{#1}}%
- \protected\edefcsname typo_injectors_check_#1\endcsname{\noexpand\clf_checkinjector{#1}}}
+ {\protected\xdefcsname typo_injectors_mark_#1\endcsname{\dontleavehmode\noexpand\clf_markinjector{#1}}%
+ \protected\xdefcsname typo_injectors_check_#1\endcsname{\noexpand\clf_checkinjector{#1}}}
\permanent\protected\def\dotestinjector#1% only for testing outside unprotect
{\begincsname typo_injectors_check_#1\endcsname
diff --git a/tex/context/interface/mkii/keys-it.xml b/tex/context/interface/mkii/keys-it.xml
index db0dee470..3b7577a1f 100644
--- a/tex/context/interface/mkii/keys-it.xml
+++ b/tex/context/interface/mkii/keys-it.xml
@@ -210,6 +210,8 @@
<cd:variable name='fixed' value='fisso'/>
<cd:variable name='flexible' value='flessibile'/>
<cd:variable name='float' value='oggettomobile'/>
+ <cd:variable name='flushbackward' value='flushbackward'/>
+ <cd:variable name='flushforward' value='flushforward'/>
<cd:variable name='flushinner' value='flushinner'/>
<cd:variable name='flushleft' value='flushleft'/>
<cd:variable name='flushouter' value='flushouter'/>
diff --git a/tex/context/modules/mkiv/x-asciimath.mkiv b/tex/context/modules/mkiv/x-asciimath.mkiv
index bd9b847d9..5a329f0b0 100644
--- a/tex/context/modules/mkiv/x-asciimath.mkiv
+++ b/tex/context/modules/mkiv/x-asciimath.mkiv
@@ -139,7 +139,7 @@
\unexpanded\def\asciimathoptext #1{\ifmmode\mathoptext{#1}\else#1\fi}
\unexpanded\def\asciimathoptexttraced #1{\ifmmode\mathoptext{\color[darkgreen]{#1}}\else\color[darkgreen]{#1}\fi}
-\unexpanded\def\asciimathstackrel #1#2{\mathematics{\mathop{\let\limits\relax\mover{#2}{#1}}}}
+\unexpanded\def\asciimathstackrel #1#2{\mathematics{\mathop{\math_relax_limits\mover{#2}{#1}}}}
\unexpanded\def\asciimathroot #1#2{\sqrt[#1]{#2}}
\unexpanded\def\asciimathsqrt #1{\sqrt{#1}}
diff --git a/tex/context/modules/mkxl/s-languages-goodies.mkxl b/tex/context/modules/mkxl/s-languages-goodies.mkxl
index 3ced071be..fd5e66bda 100644
--- a/tex/context/modules/mkxl/s-languages-goodies.mkxl
+++ b/tex/context/modules/mkxl/s-languages-goodies.mkxl
@@ -126,7 +126,7 @@
% {\hsize 1mm Offline\par}
-% \hyphenationmode\bitwiseflip\hyphenationmode-\forcehandlerhyphenationmodecode
+% \hyphenationmode\bitwiseflip\hyphenationmode-\forcehandlerhyphenationcode
% \de \dontcomplain