summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2022-04-11 20:12:40 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2022-04-11 20:12:40 +0200
commit1e69816bbbeebedafd52684fc4182ce977d92a8a (patch)
tree06d7cfe0c8490e66eb8f6447bd6f9c50afb8d90e /tex
parentc1224cc330e695938cfcf944f8e9d0c14c15fa8c (diff)
downloadcontext-1e69816bbbeebedafd52684fc4182ce977d92a8a.tar.gz
2022-04-11 19:22:00
Diffstat (limited to 'tex')
-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-en.mkii9
-rw-r--r--tex/context/base/mkii/mult-nl.mkii9
-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/lang-txt.lua12
-rw-r--r--tex/context/base/mkiv/mult-fun.lua2
-rw-r--r--tex/context/base/mkiv/mult-low.lua4
-rw-r--r--tex/context/base/mkiv/mult-prm.lua3
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin24633 -> 24635 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin258289 -> 257022 bytes
-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/math-ali.mkxl33
-rw-r--r--tex/context/base/mkxl/math-def.mkxl1
-rw-r--r--tex/context/base/mkxl/math-ini.mkxl2
-rw-r--r--tex/context/base/mkxl/mlib-lmp.lmt56
-rw-r--r--tex/context/base/mkxl/mlib-scn.lmt137
-rw-r--r--tex/context/base/mkxl/node-bwc.lmt159
-rw-r--r--tex/context/base/mkxl/node-ini.mkxl2
-rw-r--r--tex/context/base/mkxl/node-nut.lmt4
-rw-r--r--tex/context/base/mkxl/node-rul.lmt2
-rw-r--r--tex/context/base/mkxl/node-syn.lmt58
-rw-r--r--tex/context/base/mkxl/node-tsk.lmt2
-rw-r--r--tex/context/base/mkxl/strc-mat.mkxl125
-rw-r--r--tex/context/base/mkxl/supp-box.lmt4
-rw-r--r--tex/context/base/mkxl/supp-mat.mkxl1
-rw-r--r--tex/context/base/mkxl/syst-ini.mkxl1
-rw-r--r--tex/context/base/mkxl/trac-vis.lmt2
-rw-r--r--tex/context/base/mkxl/typo-adj.lmt2
-rw-r--r--tex/context/base/mkxl/typo-lbx.lmt14
-rw-r--r--tex/context/base/mkxl/typo-pag.lmt2
-rw-r--r--tex/context/base/mkxl/util-deb.lmt2
-rw-r--r--tex/context/fonts/mkiv/bonum-math.lfg2
-rw-r--r--tex/context/interface/mkii/keys-en.xml9
-rw-r--r--tex/context/interface/mkii/keys-nl.xml9
-rw-r--r--tex/context/modules/mkiv/s-fonts-features.lua57
-rw-r--r--tex/context/modules/mkiv/s-fonts-features.mkiv1
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
40 files changed, 471 insertions, 269 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 382032446..6a834d8e7 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{2022.04.01 09:33}
+\newcontextversion{2022.04.11 19:20}
%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 433b62f7e..6b362dab4 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{2022.04.01 09:33}
+\edef\contextversion{2022.04.11 19:20}
%D For those who want to use this:
diff --git a/tex/context/base/mkii/mult-en.mkii b/tex/context/base/mkii/mult-en.mkii
index b7c96b231..a5c8bc7ef 100644
--- a/tex/context/base/mkii/mult-en.mkii
+++ b/tex/context/base/mkii/mult-en.mkii
@@ -281,7 +281,6 @@
\setinterfacevariable{inright}{inright}
\setinterfacevariable{inrightedge}{inrightedge}
\setinterfacevariable{inrightmargin}{inrightmargin}
-\setinterfacevariable{integral}{integral}
\setinterfacevariable{interaction}{interaction}
\setinterfacevariable{interactionmenu}{interactionmenu}
\setinterfacevariable{interactive}{interactive}
@@ -716,6 +715,7 @@
\setinterfaceconstant{bottom}{bottom}
\setinterfaceconstant{bottomafter}{bottomafter}
\setinterfaceconstant{bottombefore}{bottombefore}
+\setinterfaceconstant{bottomcolor}{bottomcolor}
\setinterfaceconstant{bottomcommand}{bottomcommand}
\setinterfaceconstant{bottomdistance}{bottomdistance}
\setinterfaceconstant{bottomframe}{bottomframe}
@@ -919,6 +919,7 @@
\setinterfaceconstant{inputfile}{inputfile}
\setinterfaceconstant{insidesection}{insidesection}
\setinterfaceconstant{instance}{instance}
+\setinterfaceconstant{integral}{integral}
\setinterfaceconstant{intent}{intent}
\setinterfaceconstant{interaction}{interaction}
\setinterfaceconstant{interlinespace}{interlinespace}
@@ -961,6 +962,7 @@
\setinterfaceconstant{leftquote}{leftquote}
\setinterfaceconstant{leftsample}{leftsample}
\setinterfaceconstant{leftsentence}{leftsentence}
+\setinterfaceconstant{leftsource}{leftsource}
\setinterfaceconstant{leftspeech}{leftspeech}
\setinterfaceconstant{leftstyle}{leftstyle}
\setinterfaceconstant{leftsubsentence}{leftsubsentence}
@@ -993,7 +995,9 @@
\setinterfaceconstant{marstyle}{marstyle}
\setinterfaceconstant{mask}{mask}
\setinterfaceconstant{mathclass}{mathclass}
+\setinterfaceconstant{mathdenominatorstyle}{mathdenominatorstyle}
\setinterfaceconstant{mathlimits}{mathlimits}
+\setinterfaceconstant{mathnumeratorstyle}{mathnumeratorstyle}
\setinterfaceconstant{mathstyle}{mathstyle}
\setinterfaceconstant{max}{max}
\setinterfaceconstant{maxdepth}{maxdepth}
@@ -1005,6 +1009,7 @@
\setinterfaceconstant{middle}{middle}
\setinterfaceconstant{middlecolor}{middlecolor}
\setinterfaceconstant{middlecommand}{middlecommand}
+\setinterfaceconstant{middlesource}{middlesource}
\setinterfaceconstant{middlespeech}{middlespeech}
\setinterfaceconstant{middlestyle}{middlestyle}
\setinterfaceconstant{middletext}{middletext}
@@ -1177,6 +1182,7 @@
\setinterfaceconstant{rightquote}{rightquote}
\setinterfaceconstant{rightsample}{rightsample}
\setinterfaceconstant{rightsentence}{rightsentence}
+\setinterfaceconstant{rightsource}{rightsource}
\setinterfaceconstant{rightspeech}{rightspeech}
\setinterfaceconstant{rightstyle}{rightstyle}
\setinterfaceconstant{rightsubsentence}{rightsubsentence}
@@ -1312,6 +1318,7 @@
\setinterfaceconstant{toffset}{toffset}
\setinterfaceconstant{tolerance}{tolerance}
\setinterfaceconstant{top}{top}
+\setinterfaceconstant{topcolor}{topcolor}
\setinterfaceconstant{topcommand}{topcommand}
\setinterfaceconstant{topdistance}{topdistance}
\setinterfaceconstant{topframe}{topframe}
diff --git a/tex/context/base/mkii/mult-nl.mkii b/tex/context/base/mkii/mult-nl.mkii
index b600868be..1754c268a 100644
--- a/tex/context/base/mkii/mult-nl.mkii
+++ b/tex/context/base/mkii/mult-nl.mkii
@@ -281,7 +281,6 @@
\setinterfacevariable{inright}{inrechter}
\setinterfacevariable{inrightedge}{inrechterrand}
\setinterfacevariable{inrightmargin}{inrechtermarge}
-\setinterfacevariable{integral}{integral}
\setinterfacevariable{interaction}{interactie}
\setinterfacevariable{interactionmenu}{interactiemenu}
\setinterfacevariable{interactive}{interactive}
@@ -716,6 +715,7 @@
\setinterfaceconstant{bottom}{onder}
\setinterfaceconstant{bottomafter}{bottomafter}
\setinterfaceconstant{bottombefore}{bottombefore}
+\setinterfaceconstant{bottomcolor}{onderkleur}
\setinterfaceconstant{bottomcommand}{ondercommando}
\setinterfaceconstant{bottomdistance}{onderafstand}
\setinterfaceconstant{bottomframe}{onderkader}
@@ -919,6 +919,7 @@
\setinterfaceconstant{inputfile}{inputfile}
\setinterfaceconstant{insidesection}{binnensectie}
\setinterfaceconstant{instance}{instance}
+\setinterfaceconstant{integral}{integral}
\setinterfaceconstant{intent}{intent}
\setinterfaceconstant{interaction}{interactie}
\setinterfaceconstant{interlinespace}{interlinie}
@@ -961,6 +962,7 @@
\setinterfaceconstant{leftquote}{linkerciteer}
\setinterfaceconstant{leftsample}{leftsample}
\setinterfaceconstant{leftsentence}{linkerzin}
+\setinterfaceconstant{leftsource}{leftsource}
\setinterfaceconstant{leftspeech}{linkeruitspraak}
\setinterfaceconstant{leftstyle}{linkerletter}
\setinterfaceconstant{leftsubsentence}{linkersubzin}
@@ -993,7 +995,9 @@
\setinterfaceconstant{marstyle}{marletter}
\setinterfaceconstant{mask}{masker}
\setinterfaceconstant{mathclass}{mathclass}
+\setinterfaceconstant{mathdenominatorstyle}{mathdenominatorstyle}
\setinterfaceconstant{mathlimits}{mathlimits}
+\setinterfaceconstant{mathnumeratorstyle}{mathnumeratorstyle}
\setinterfaceconstant{mathstyle}{mathstyle}
\setinterfaceconstant{max}{max}
\setinterfaceconstant{maxdepth}{maxdepth}
@@ -1005,6 +1009,7 @@
\setinterfaceconstant{middle}{midden}
\setinterfaceconstant{middlecolor}{middenkleur}
\setinterfaceconstant{middlecommand}{middencommando}
+\setinterfaceconstant{middlesource}{middlesource}
\setinterfaceconstant{middlespeech}{middenuitspraak}
\setinterfaceconstant{middlestyle}{middenletter}
\setinterfaceconstant{middletext}{middentekst}
@@ -1177,6 +1182,7 @@
\setinterfaceconstant{rightquote}{rechterciteer}
\setinterfaceconstant{rightsample}{rightsample}
\setinterfaceconstant{rightsentence}{rechterzin}
+\setinterfaceconstant{rightsource}{rightsource}
\setinterfaceconstant{rightspeech}{rechteruitspraak}
\setinterfaceconstant{rightstyle}{rechterletter}
\setinterfaceconstant{rightsubsentence}{rechtersubzin}
@@ -1312,6 +1318,7 @@
\setinterfaceconstant{toffset}{toffset}
\setinterfaceconstant{tolerance}{tolerantie}
\setinterfaceconstant{top}{boven}
+\setinterfaceconstant{topcolor}{bovenkleur}
\setinterfaceconstant{topcommand}{bovencommando}
\setinterfaceconstant{topdistance}{bovenafstand}
\setinterfaceconstant{topframe}{bovenkader}
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index feaee9df4..ec2d04ae7 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{2022.04.01 09:33}
+\newcontextversion{2022.04.11 19:20}
%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 b5e27e63e..03a5382f6 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{2022.04.01 09:33}
+\edef\contextversion{2022.04.11 19:20}
%D Kind of special:
diff --git a/tex/context/base/mkiv/lang-txt.lua b/tex/context/base/mkiv/lang-txt.lua
index 3bd50246e..834f9ce43 100644
--- a/tex/context/base/mkiv/lang-txt.lua
+++ b/tex/context/base/mkiv/lang-txt.lua
@@ -676,6 +676,18 @@ data.labels={
["sr-latn"]="inf",
},
},
+ ["inv"]={
+ ["labels"]={
+ ["cs"]="inv",
+ ["en"]="inv",
+ ["eo"]="inv",
+ ["es"]="inv",
+ ["mk"]="inv",
+ ["sk"]="inv",
+ ["sr"]="inv",
+ ["sr-latn"]="inv",
+ },
+ },
["injlim"]={
["labels"]={
["cs"]="inj\\sixperemspace lim",
diff --git a/tex/context/base/mkiv/mult-fun.lua b/tex/context/base/mkiv/mult-fun.lua
index 5c982e1db..4ec5bd55e 100644
--- a/tex/context/base/mkiv/mult-fun.lua
+++ b/tex/context/base/mkiv/mult-fun.lua
@@ -39,7 +39,7 @@ return {
"setluaparameter",
"definecolor",
--
- "record", "newrecord", "setrecord", "getrecord",
+ "record", "newrecord", "setrecord", "getrecord", "cntrecord",
--
"anchorxy", "anchorx", "anchory",
"anchorht", "anchordp",
diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua
index 12f8ecfbe..c76fe4884 100644
--- a/tex/context/base/mkiv/mult-low.lua
+++ b/tex/context/base/mkiv/mult-low.lua
@@ -534,8 +534,8 @@ return {
--
"startimath", "stopimath", "normalstartimath", "normalstopimath",
"startdmath", "stopdmath", "normalstartdmath", "normalstopdmath",
- "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript",
- "superscript", "subscript", "nosuperscript", "nosubscript",
+ "normalsuperscript", "normalsubscript", "normalnosuperscript", "normalnosubscript", "normalprimescript",
+ "superscript", "subscript", "nosuperscript", "nosubscript", "primescript",
"superprescript", "subprescript", "nosuperprescript", "nosubsprecript",
--
"uncramped", "cramped",
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index 5bdea77de..927a1bd42 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -493,6 +493,7 @@ return {
"mugluespecdef",
"mutable",
"noaligned",
+ "noatomruling",
"noboundary",
"nohrule",
"norelax",
@@ -938,6 +939,8 @@ return {
"parfillleftskip",
"parfillskip",
"parindent",
+ "parinitleftskip",
+ "parinitrightskip",
"parshape",
"parskip",
"patterns",
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index eb82f9913..dbef85fbf 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 76485d6f9..ecb56dfb8 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/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index 8f4d6c1cf..0619285e5 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{2022.04.01 09:33}
+\newcontextversion{2022.04.11 19:20}
%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 2c1cccae3..fc1997c33 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{2022.04.01 09:33}
+\immutable\edef\contextversion{2022.04.11 19:20}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
diff --git a/tex/context/base/mkxl/math-ali.mkxl b/tex/context/base/mkxl/math-ali.mkxl
index cc3e363db..75355736d 100644
--- a/tex/context/base/mkxl/math-ali.mkxl
+++ b/tex/context/base/mkxl/math-ali.mkxl
@@ -1858,12 +1858,32 @@
% mode: 0=no frame | 1=number inside frame | 2=number outside frame
-\def\strc_math_flush_aligned
+% \def\strc_math_flush_aligned
+% {\ifcase\c_strc_math_vertical
+% \ifcase\mathraggedstatus\or\hfill\or\hfill\fi
+% \box\b_strc_math_display
+% \ifcase\mathraggedstatus\or\or\hfill\or\hfill\fi
+% \else
+% \ifconditional\c_strc_math_indent
+% \ifzeropt\d_strc_math_indent\else
+% \hangafter\plusone
+% \hangindent\d_strc_math_indent
+% \fi
+% \fi
+% \edef\p_interlinespace{\formulaparameter\c!interlinespace}%
+% \ifempty\p_interlinespace\else\baselineskip\p_interlinespace\fi
+% \global\d_strc_math_indent\zeropoint
+% \ifcase\mathraggedstatus\or\raggedleft\or\raggedcenter\or\raggedright\fi
+% \unhbox\b_strc_math_display
+% \fi}
+
+\protected\def\strc_math_flush_aligned
{\ifcase\c_strc_math_vertical
\ifcase\mathraggedstatus\or\hfill\or\hfill\fi
\box\b_strc_math_display
\ifcase\mathraggedstatus\or\or\hfill\or\hfill\fi
\else
+ \begincsname\??mathtextalign\formulaparameter\c!textalign:\v!start\endcsname
\ifconditional\c_strc_math_indent
\ifzeropt\d_strc_math_indent\else
\hangafter\plusone
@@ -1871,9 +1891,12 @@
\fi
\fi
\edef\p_interlinespace{\formulaparameter\c!interlinespace}%
+ \edef\p_spaceinbetween{\formulaparameter\c!spaceinbetween}%
\ifempty\p_interlinespace\else\baselineskip\p_interlinespace\fi
+ \ifempty\p_spaceinbetween\else\lineskip \p_spaceinbetween\lineskiplimit\baselineskip\fi
\global\d_strc_math_indent\zeropoint
\ifcase\mathraggedstatus\or\raggedleft\or\raggedcenter\or\raggedright\fi
+ \begincsname\??mathtextalign\formulaparameter\c!textalign:\v!stop\endcsname
\unhbox\b_strc_math_display
\fi}
@@ -2216,9 +2239,11 @@
\strc_math_traced_state
\ifcase\c_strc_math_vertical
\hbox to \displaywidth \bgroup
- \or
+ \or % yes
\vbox \bgroup \hsize\displaywidth
- \or
+ \or % page
+ \bgroup \hsize\displaywidth
+ \or % text
\bgroup \hsize\displaywidth
\fi
\ifcase\mathnumberstatus
@@ -2250,6 +2275,8 @@
\or
\or
\par
+ \or
+ \par
\fi
\egroup}
diff --git a/tex/context/base/mkxl/math-def.mkxl b/tex/context/base/mkxl/math-def.mkxl
index 6c434f995..abfd1f74e 100644
--- a/tex/context/base/mkxl/math-def.mkxl
+++ b/tex/context/base/mkxl/math-def.mkxl
@@ -50,6 +50,7 @@
\definemathfunction [gcd] [\c!mathlimits=\v!yes]
\definemathfunction [hom]
\definemathfunction [inf] [\c!mathlimits=\v!yes]
+\definemathfunction [inv] [\c!mathlimits=\v!yes]
\definemathfunction [injlim] [\c!mathlimits=\v!yes]
\definemathfunction [ker]
\definemathfunction [lg]
diff --git a/tex/context/base/mkxl/math-ini.mkxl b/tex/context/base/mkxl/math-ini.mkxl
index b278ba1e8..a7ec2abba 100644
--- a/tex/context/base/mkxl/math-ini.mkxl
+++ b/tex/context/base/mkxl/math-ini.mkxl
@@ -185,7 +185,6 @@
\copymathspacing \mathdifferentialcode \mathordinarycode
\copymathspacing \mathfactorialcode \mathordinarycode
\copymathspacing \mathexponentialcode \mathordinarycode
-\copymathspacing \mathfunctioncode \mathordinarycode
\copymathspacing \mathdigitcode \mathordinarycode
\copymathspacing \mathfunctioncode \mathoperatorcode
\copymathspacing \mathconstructcode \mathinnercode
@@ -948,6 +947,7 @@
\inherited\setmathspacing \mathordinarycode \mathdifferentialcode \allscriptstyles \tinymuskip
\inherited\setmathspacing \mathfactorialcode \mathordinarycode \allsplitstyles \thinmuskip
\inherited\setmathspacing \mathfactorialcode \mathordinarycode \allscriptstyles \tinymuskip
+ \inherited\setmathspacing \mathfactorialcode \mathfactorialcode \allmathstyles \zeromuskip
%
\inherited\setmathspacing \mathopencode \mathconstructcode \allmathstyles \thinmuskip
\inherited\setmathspacing \mathconstructcode \mathclosecode \allmathstyles \thinmuskip
diff --git a/tex/context/base/mkxl/mlib-lmp.lmt b/tex/context/base/mkxl/mlib-lmp.lmt
index 3518f94bd..b895d9ffd 100644
--- a/tex/context/base/mkxl/mlib-lmp.lmt
+++ b/tex/context/base/mkxl/mlib-lmp.lmt
@@ -41,6 +41,7 @@ local injectboolean = inject.boolean
local injectnumeric = inject.numeric
local injectstring = inject.string
local injectpair = inject.pair
+local injectpath = inject.path
local injectwhd = inject.whd -- scaled
local injectxy = inject.xy
@@ -57,6 +58,52 @@ local implement = interfaces.implement
do
+ local function s(a,b)
+ local aa = a[1]
+ local bb = b[1]
+ if aa ~= bb then
+ return aa < bb
+ end
+ aa = a[2]
+ bb = b[2]
+ return aa < bb
+ end
+
+ registerscript("sortedpath", function()
+ local p = scanpath()
+ for i=1,#p do
+ local pi = p[i]
+ p[i] = { pi[1], pi[2] }
+ end
+ table.sort(p,s)
+ injectpath(p)
+ end)
+
+ registerscript("uniquepath", function()
+ local p = scanpath()
+ local u = { }
+ local n = 0
+ local xx = nil
+ local yy = nil
+ table.sort(p,s)
+ for i=1,#p do
+ local pi = p[i]
+ local x = pi[1]
+ local y = pi[2]
+ if x ~= xx or y ~= yy then
+ n = n + 1
+ u[n] = { x, y }
+ xx = x
+ yy = y
+ end
+ end
+ injectpath(u)
+ end)
+
+end
+
+do
+
local p = nil
local n = 0
@@ -67,11 +114,12 @@ do
registerdirect("pathlengthof", function()
p = scanpath()
- return p and #p or 1
+ n = p and #p or 1
+ return n
end)
registerdirect("pathpointof", function()
- local i = scannumber()
+ local i = scaninteger()
if i > 0 and i <= n then
local pi = p[i]
injectpair(pi[1],pi[2])
@@ -79,7 +127,7 @@ do
end)
registerdirect("pathleftof", function()
- local i = scannumber()
+ local i = scaninteger()
if i > 0 and i <= n then
local pi = p[i]
injectpair(pi[5],pi[6])
@@ -87,7 +135,7 @@ do
end)
registerdirect("pathrightof", function()
- local i = scannumber()
+ local i = scaninteger()
if i > 0 and i <= n then
local pn
if i == 1 then
diff --git a/tex/context/base/mkxl/mlib-scn.lmt b/tex/context/base/mkxl/mlib-scn.lmt
index dca2a7aa9..0ed211dd3 100644
--- a/tex/context/base/mkxl/mlib-scn.lmt
+++ b/tex/context/base/mkxl/mlib-scn.lmt
@@ -240,24 +240,34 @@ local function get_parameters(nested)
if s == "]" then
break;
elseif s == "," then
- -- continue
- else
- local t = scantoken(true)
- if t == equals_code or t == colon_code then
- -- optional equal or :
- scantoken()
- end
- local kind = scantoken(true)
- if kind == leftdelimiter_code or kind == tag_code or kind == capsule_code then
- kind = scanexpression(true)
- data[s] = (typescanners[kind] or scanexpression)()
- elseif kind == leftbracket_code then
- data[s] = get_parameters(true)
- elseif kind == comma_code then
- goto again
+ goto again
+ elseif s == "[" then
+-- s = scannumeric()
+ s = scaninteger()
+ if scantoken() == rightbracket_code then
+ goto assign
else
- data[s] = tokenscanners[kind]()
+ report("] expected")
end
+ else
+ goto assign
+ end
+ ::assign::
+ local t = scantoken(true)
+ if t == equals_code or t == colon_code then
+ -- optional equal or :
+ scantoken()
+ end
+ local kind = scantoken(true)
+ if kind == leftdelimiter_code or kind == tag_code or kind == capsule_code then
+ kind = scanexpression(true)
+ data[s] = (typescanners[kind] or scanexpression)()
+ elseif kind == leftbracket_code then
+ data[s] = get_parameters(true)
+ elseif kind == comma_code then
+ goto again
+ else
+ data[s] = tokenscanners[kind]()
end
::again::
end
@@ -910,9 +920,7 @@ do
else
t = scaninteger()
v = v[t]
- if scansymbol(true) == "]" then
- scansymbol()
- else
+ if scansymbol() ~= "]" then
report("] expected")
end
end
@@ -923,6 +931,97 @@ do
end
end)
+-- registerdirect("getrecord", function()
+-- local n = scaninteger()
+-- local v = records[n]
+-- local l = 0
+-- while true do
+-- local t = scansymbol(true)
+-- if t == ";" or t == ":" then
+-- return v
+-- elseif t == "(" then
+-- scansymbol()
+-- l = l + 1
+-- elseif t == ")" then
+-- if l > 1 then
+-- scansymbol()
+-- l = l - 1
+-- elseif l == 1 then
+-- scansymbol()
+-- return v
+-- else
+-- return v
+-- end
+-- elseif t == "." then
+-- scansymbol()
+-- elseif t == "#" or t == "##" then -- from tex's we get a double
+-- scansymbol()
+-- t = scansymbol()
+-- v = v[t]
+-- local tv = type(v)
+-- return (tv == "table" or tv == "string") and #v or 0
+-- elseif t == "[" then
+-- scansymbol()
+-- t = scansymbol(true)
+-- if t == "#" or r == "##" then
+-- scansymbol()
+-- if scansymbol() ~= "]" then
+-- report("] expected")
+-- end
+-- return #v
+-- else
+-- t = scaninteger()
+-- v = v[t]
+-- if scansymbol() ~= "]" then
+-- report("] expected")
+-- end
+-- end
+-- else
+-- t = scansymbol()
+-- v = v[t]
+-- end
+-- end
+-- end)
+
+ registerdirect("cntrecord", function()
+ local n = scaninteger()
+ local v = records[n]
+ local l = 0
+ while true do
+ local t = scansymbol(true)
+ if t == ";" or t == ":" then
+ break
+ elseif t == "(" then
+ scansymbol()
+ l = l + 1
+ elseif t == ")" then
+ if l > 1 then
+ scansymbol()
+ l = l - 1
+ elseif l == 1 then
+ scansymbol()
+ break
+ else
+ break
+ end
+ elseif t == "." then
+ scansymbol()
+ elseif t == "[" then
+ scansymbol()
+ t = scaninteger()
+ v = v[t]
+ if scansymbol() ~= "]" then
+ report("] expected")
+ end
+ else
+ t = scansymbol()
+ v = v[t]
+ end
+ end
+ local tv = type(v)
+ return (tv == "table" or tv == "string") and #v or 0 -- integer
+ end)
+
function metapost.getrecord(name)
local index = names[name]
if index then
diff --git a/tex/context/base/mkxl/node-bwc.lmt b/tex/context/base/mkxl/node-bwc.lmt
index a2e9d566d..d22f62038 100644
--- a/tex/context/base/mkxl/node-bwc.lmt
+++ b/tex/context/base/mkxl/node-bwc.lmt
@@ -9,160 +9,5 @@ if not modules then modules = { } end modules ['node-bwc'] = {
-- This is a backward compatinility list. Eventually it will go away although a few
-- might stay around. We start with some real low level ones. But ... users are
-- supposed to use nodes and nuts.
-
-local node = node
-local direct = node.direct
-
-node .copy_list = node .copylist
-node .current_attributes = node .currentattributes
-node .effective_glue = node .effectiveglue
-node .end_of_math = node .endofmath
-node .first_glyph = node .firstglyph
-node .flush_list = node .flushlist
-node .flush_node = node .flushnode
-node .get_attribute = node .getattribute
-node .get_attributes = node .getattributes
-------.get_properties_table = node .getpropertiestable
-node .has_attribute = node .hasattribute
-node .has_field = node .hasfield
-node .has_glyph = node .hasglyph
-node .insert_after = node .insertafter
-node .insert_before = node .insertbefore
-node .is_node = node .isnode or node.is_node
-node .is_zero_glue = node .iszeroglue
-node .last_node = node .lastnode
-node .mlist_to_hlist = node .mlisttohlist
-node .protect_glyph = node .protectglyph
-node .protect_glyphs = node .protectglyphs
----- .protrusion_skippable = node .protrusionskippable
-node .set_attribute = node .setattribute
-node .set_attributes = node .setattributes
-node .traverse_id = node .traverseid or node.traverse_id
-node .unprotect_glyph = node .unprotectglyph
-node .unprotect_glyphs = node .unprotectglyphs
-node .unset_attribute = node .unsetattribute
-node .unset_attributes = node .unsetattributes
-
-direct.copy_list = direct.copylist
-direct.current_attributes = direct.currentattributes
-direct.effective_glue = direct.effectiveglue
-direct.end_of_math = direct.endofmath
-direct.find_node = direct.findnode
-direct.first_glyph = direct.firstglyph
-direct.flush_list = direct.flushlist
-direct.flush_node = direct.flushnode
-direct.get_attribute = direct.getattribute
-direct.get_attributes = direct.getattributes
-------.get_properties_table = direct.getpropertiestable
-direct.has_attribute = direct.hasattribute
-direct.hasdimensions = direct.hasdimensions
-direct.has_field = direct.hasfield
-direct.has_glyph = direct.hasglyph
-direct.insert_after = direct.insertafter
-direct.insert_before = direct.insertbefore
-direct.is_char = direct.ischar
-direct.is_direct = direct.isdirect
-direct.is_glyph = direct.isglyph
-direct.is_node = direct.isnode
-direct.is_valid = direct.isvalid
-direct.is_zero_glue = direct.iszeroglue
-direct.last_node = direct.lastnode
-direct.mlist_to_hlist = direct.mlisttohlist
-direct.protect_glyph = direct.protectglyph
-direct.protect_glyphs = direct.protectglyphs
-------.protrusion_skippable = direct.protrusionskippable
-direct.set_attribute = direct.setattribute
-direct.set_attributes = direct.setattributes
-direct.start_of_par = direct.startofpar
-direct.traverse_char = direct.traversechar or direct.traverse_char
-direct.traverse_content = direct.traversecontent or direct.traverse_content
-direct.traverse_glyph = direct.traverseglyph or direct.traverse_glyph
-direct.traverse_id = direct.traverseid or direct.traverse_id
-direct.traverse_list = direct.traverselist or direct.traverse_list
-direct.unprotect_glyph = direct.unprotectglyph
-direct.unprotect_glyphs = direct.unprotectglyphs
-direct.unset_attribute = direct.unsetattribute
-direct.unset_attributes = direct.unsetattributes
-direct.uses_font = direct.usesfont
-
--- Now come the nodes and nuts.
-
-local nodes = nodes
-local nuts = nodes.nuts
-
------.check_discretionaries = nuts .checkdiscretionaries
-nuts .copy_list = nuts .copylist
-nuts .copy_node = nuts .copynode
-nuts .copy_only = nuts .copyonly
-nuts .current_attr = nuts .currentattributes
-nuts .effective_glue = nuts .effectiveglue
-nuts .end_of_math = nuts .endofmath
-nuts .find_attribute = nuts .findattribute
-nuts .first_glyph = nuts .firstglyph
------.flatten_discretionaries = nuts .flattendiscretionaries
-nuts .flush_list = nuts .flushlist
-nuts .flush_node = nuts .flushnode
-nuts .get_attribute = nuts .getattribute
-nuts .get_synctex_fields = nuts .getsynctexfields
-nuts .has_attribute = nuts .hasattribute
-nuts .has_dimensions = nuts .hasdimensions
-nuts .has_field = nuts .hasfield
-nuts .has_glyph = nuts .hasglyph
-nuts .insert_after = nuts .insertafter
-nuts .insert_before = nuts .insertbefore
-nuts .is_direct = nuts .isdirect
-nuts .is_node = nuts .isnode
-nuts .is_nut = nuts .isnut
-nuts .is_zero_glue = nuts .iszeroglue
-nuts .mlist_to_hlist = nuts .mlisttohlist
-nuts .protect_glyph = nuts .protectglyph
-nuts .protect_glyphs = nuts .protectglyphs
------.protrusion_skippable = nuts .protrusionskippable
-nuts .set_attribute = nuts .setattribute
------.set_synctex_fields = nuts .setsynctexfields
-nuts .start_of_par = nuts .startofpar
-nuts .traverse_id = nuts .traverseid
-nuts .traverse_char = nuts .traversechar
-nuts .traverse_glyph = nuts .traverseglyph
-nuts .traverse_id = nuts .traverseid
-nuts .traverse_list = nuts .traverselist
-nuts .unprotect_glyph = nuts .unprotectglyph
-nuts .unprotect_glyphs = nuts .unprotectglyphs
-nuts .unset_attribute = nuts .unsetattribute
-nuts .uses_font = nuts .usesfont
-
------.check_discretionaries = nodes.check_discretionaries
-nodes.copy_list = nodes.copylist
-nodes.copy_node = nodes.copynode
-nodes.current_attributes = nodes.currentattributes
-nodes.effective_glue = nodes.effectiveglue
-nodes.end_of_math = nodes.endofmath
-nodes.find_attribute = nodes.findattribute
-nodes.first_glyph = nodes.firstglyph
------.flatten_discretionaries = nodes.flattendiscretionaries
-nodes.flush_list = nodes.flushlist
-nodes.flush_node = nodes.flushnode
-nodes.has_attribute = nodes.hasattribute
-nodes.has_field = nodes.hasfield
-nodes.has_glyph = nodes.hasglyph
-nodes.insert_after = nodes.insertafter
-nodes.insert_before = nodes.insertbefore
-nodes.is_direct = nodes.isdirect
-nodes.is_node = nodes.isnode
-nodes.is_nut = nodes.isnut
-nodes.is_zero_glue = nodes.iszeroglue
-nodes.last_node = nodes.lastnode
-nodes.mlist_to_hlist = nodes.mlisttohlist
-nodes.protect_glyph = nodes.protectglyph
-nodes.protect_glyphs = nodes.protectglyphs
------.protrusion_skippable = nodes.protrusionskippable
-nodes.set_attribute = nodes.setattribute
-nodes.traverse_id = nodes.traverseid
-nodes.traverse_char = nodes.traversechar
-nodes.traverse_glyph = nodes.traverseglyph
-nodes.traverse_id = nodes.traverseid
-nodes.traverse_list = nodes.traverselist
-nodes.unprotect_glyph = nodes.unprotectglyph
-nodes.unprotect_glyphs = nodes.unprotectglyphs
-nodes.unset_attribute = nodes.unsetattribute
-nodes.uses_font = nodes.usesfont
+--
+-- Gone.
diff --git a/tex/context/base/mkxl/node-ini.mkxl b/tex/context/base/mkxl/node-ini.mkxl
index ef5c85c5b..c843fc685 100644
--- a/tex/context/base/mkxl/node-ini.mkxl
+++ b/tex/context/base/mkxl/node-ini.mkxl
@@ -38,7 +38,7 @@
\registerctxluafile{node-scn}{autosuffix}
\registerctxluafile{node-scn}{autosuffix}
\registerctxluafile{node-par}{autosuffix}
-\registerctxluafile{node-bwc}{autosuffix} % for a while
+%registerctxluafile{node-bwc}{autosuffix} % no longer used
%D This might go away (needs checking anyway, very old code):
diff --git a/tex/context/base/mkxl/node-nut.lmt b/tex/context/base/mkxl/node-nut.lmt
index 957e937a0..6fb25c313 100644
--- a/tex/context/base/mkxl/node-nut.lmt
+++ b/tex/context/base/mkxl/node-nut.lmt
@@ -132,7 +132,7 @@ local nuts = {
getsup = direct.getsup,
getsuppre = direct.getsuppre,
getsurround = direct.getkern,
- getsynctexfields = direct.getsynctexfields,
+ getinputfields = direct.getinputfields,
gettotal = direct.gettotal,
getvalue = direct.getdata, -- obsolete
getwhd = direct.getwhd,
@@ -239,7 +239,7 @@ local nuts = {
setsup = direct.setsup,
setsuppre = direct.setsuppre,
setsurround = direct.setkern,
- setsynctexfields = direct.setsynctexfields,
+ setinputfields = direct.setinputfields,
setvalue = direct.setdata, -- obsolete
setwhd = direct.setwhd,
setwidth = direct.setwidth,
diff --git a/tex/context/base/mkxl/node-rul.lmt b/tex/context/base/mkxl/node-rul.lmt
index 5155a9109..7d638e7cd 100644
--- a/tex/context/base/mkxl/node-rul.lmt
+++ b/tex/context/base/mkxl/node-rul.lmt
@@ -622,7 +622,7 @@ do
leftlocal = true
rightlocal = true
end
- --
+ -- todo: initleft initright fillleft
local is, ls, pl, pr, rs = getskips(list)
if ls and rs then
if location == v_left or location == v_both then
diff --git a/tex/context/base/mkxl/node-syn.lmt b/tex/context/base/mkxl/node-syn.lmt
index 916e85c9e..fe607bac8 100644
--- a/tex/context/base/mkxl/node-syn.lmt
+++ b/tex/context/base/mkxl/node-syn.lmt
@@ -170,11 +170,11 @@ local new_kern = nodepool.kern
local getdimensions = nuts.dimensions
local getrangedimensions = nuts.rangedimensions
-local getsynctexfields = nuts.getsynctexfields
-local forcesynctextag = tex.forcesynctextag or tex.force_synctex_tag
-local forcesynctexline = tex.forcesynctexline or tex.force_synctex_line
-local getsynctexline = tex.getsynctexline or tex.get_synctex_line
-local setsynctexmode = tex.setsynctexmode or tex.set_synctex_mode
+local getinputfields = nuts.getinputfields
+local forceinputstatefile = tex.forceinputstatefile
+local forceinputstateline = tex.forceinputstateline
+local getinputstateline = tex.getinputstateline
+local setinputstatemode = tex.setinputstatemode
local foundintree = resolvers.foundintree
@@ -210,7 +210,7 @@ local paused = 0
local used = false
local never = false
--- the file name stuff
+-- the file name stuff (called tags in synctex)
local noftags = 0
local stnums = { }
@@ -258,17 +258,17 @@ end
function synctex.setfilename(name,line)
if paused == 0 and name then
- forcesynctextag(sttags[name])
+ forceinputstatefile(sttags[name])
if line then
- forcesynctexline(line)
+ forceinputstateline(line)
end
end
end
function synctex.resetfilename()
if paused == 0 then
- forcesynctextag(0)
- forcesynctexline(0)
+ forceinputstatefile(0)
+ forceinputstateline(0)
end
end
@@ -280,10 +280,10 @@ do
function synctex.pushline()
nesting = nesting + 1
if nesting == 1 then
- local l = getsynctexline()
+ local l = getinputstateline()
ignored = l and l > 0
if not ignored then
- forcesynctexline(texget("inputlineno"))
+ forceinputstateline(texget("inputlineno"))
end
end
end
@@ -291,7 +291,7 @@ do
function synctex.popline()
if nesting == 1 then
if not ignored then
- forcesynctexline()
+ forceinputstateline()
ignored = false
end
end
@@ -335,7 +335,7 @@ local function flushpreamble()
makenames()
filehandle = openfile(tmpfile,"wb")
if filehandle then
-filehandle:setvbuf("full",64*1024)
+ filehandle:setvbuf("full",64*1024)
filehandle:write("SyncTeX Version:1",eol)
writefiles()
filehandle:write("Output:pdf",eol)
@@ -490,7 +490,7 @@ local function collect_min(head)
local line = 0
while true do
if id == glyph_code then
- local tc, lc = getsynctexfields(current)
+ local tc, lc = getinputfields(current)
if tc and tc > 0 then
tag = tc
line = lc
@@ -557,7 +557,7 @@ local function collect_max(head,parent)
local line = 0
while true do
if id == glyph_code then
- local tc, lc = getsynctexfields(current)
+ local tc, lc = getinputfields(current)
if tc and tc > 0 then
if tag > 0 and (tag ~= tc or line ~= lc) then
head = inject(parent,head,first,last,tag,line)
@@ -584,24 +584,6 @@ local function collect_max(head,parent)
last = current
end
elseif id == glue_code then
- -- if tag > 0 then
- -- local tc, lc = getsynctexfields(current)
- -- if tc and tc > 0 then
- -- if tag ~= tc or line ~= lc then
- -- head = inject(parent,head,first,last,tag,line)
- -- tag = 0
- -- break
- -- end
- -- else
- -- head = inject(parent,head,first,last,tag,line)
- -- tag = 0
- -- break
- -- end
- -- else
- -- tag = 0
- -- break
- -- end
- -- id = nil -- so no test later on
elseif id == penalty_code then
-- go on (and be nice for math)
else
@@ -688,7 +670,7 @@ end
function synctex.enable()
if not never and not enabled then
enabled = true
- setsynctexmode(3) -- we want details
+ setinputstatemode(3) -- we want details
if not used then
nodes.tasks.enableaction("shipouts","luatex.synctex.collect")
report_system("synctex functionality is enabled, expect 5-10 pct runtime overhead!")
@@ -704,7 +686,7 @@ end
function synctex.disable()
if enabled then
- setsynctexmode(0)
+ setinputstatemode(0)
report_system("synctex functionality is disabled!")
enabled = false
for i=1,#disablers do
@@ -728,13 +710,13 @@ local filename = nil
function synctex.pause()
paused = paused + 1
if enabled and paused == 1 then
- setsynctexmode(0)
+ setinputstatemode(0)
end
end
function synctex.resume()
if enabled and paused == 1 then
- setsynctexmode(3)
+ setinputstatemode(3)
end
paused = paused - 1
end
diff --git a/tex/context/base/mkxl/node-tsk.lmt b/tex/context/base/mkxl/node-tsk.lmt
index be4052258..197d28538 100644
--- a/tex/context/base/mkxl/node-tsk.lmt
+++ b/tex/context/base/mkxl/node-tsk.lmt
@@ -1056,7 +1056,7 @@ local tonode = nodes.nuts.tonode
%localize%
--- line,leftbox,rightbox,middlebox,linenumber,leftskip,rightskip,lefthang,righthang,indent,parfillleftskip,parfillrightskip
+-- line,leftbox,rightbox,middlebox,linenumber,leftskip,rightskip,lefthang,righthang,indent,parinitleftskip,parinitrightskip,parfillleftskip,parfillrightskip,overshoot
return function(line,leftbox,rightbox,middlebox,...)
nutline = tonut(line)
diff --git a/tex/context/base/mkxl/strc-mat.mkxl b/tex/context/base/mkxl/strc-mat.mkxl
index edfe9d97f..28e678e3e 100644
--- a/tex/context/base/mkxl/strc-mat.mkxl
+++ b/tex/context/base/mkxl/strc-mat.mkxl
@@ -836,53 +836,90 @@
% \prebinoppenalty -100
% \prerelpenalty -100
+\def\strc_math_set_split_yes
+ {% \clf_setmathpenalties\plusone
+ \mathpenaltiesmode \plusone
+ \edef\p_hang{\formulaparameter\c!hang}%
+ \ifx\p_hang\v!none
+ \global\setfalse\c_strc_math_indent
+ \clf_resetmathhang
+ \else
+ \global\settrue\c_strc_math_indent
+ \clf_setmathhang {%
+ method {\p_hang}%
+ distance \formulaparameter\c!distance
+ }%
+ \fi}
+
+\def\strc_math_set_split_nop
+ {\mathpenaltiesmode \zerocount
+ \clf_resetmathhang}
+
\def\strc_math_set_split
{\edef\p_split{\formulaparameter\c!split}%
\ifx\p_split\v!yes
\global\c_strc_math_vertical\plusone
+ \strc_math_set_split_yes
\orelse\ifx\p_split\v!page
\global\c_strc_math_vertical\plustwo
+ \strc_math_set_split_yes
+ \orelse\ifx\p_split\v!text
+ \global\c_strc_math_vertical\plusthree
+ \strc_math_set_split_nop
\else
\global\c_strc_math_vertical\zerocount
- \fi
- \ifcase\c_strc_math_vertical
- % \clf_setmathpenalties\zerocount
- \mathpenaltiesmode \zerocount
- \clf_resetmathhang
- \else
- % \clf_setmathpenalties\plusone
- \mathpenaltiesmode \plusone
- \edef\p_hang{\formulaparameter\c!hang}%
- \ifx\p_hang\v!none
- \global\setfalse\c_strc_math_indent
- \clf_resetmathhang
- \else
- \global\settrue\c_strc_math_indent
- \clf_setmathhang {%
- method {\p_hang}%
- distance \formulaparameter\c!distance
- }%
- \fi
+ \strc_math_set_split_nop
\fi}
\setupformula
[\c!split=\v!no,
\c!distance=\zeropoint,
%\c!interlinespace=1.5\lineheight,
+ \c!textmargin=2\emwidth,
\c!interlinespace=,
\c!hang=\v!none]
% for the moment (when testing) we use a penalty 1
-\protected\def\strc_math_align_here{\ifmmode\boundary\plusone\fi}%
-\protected\def\strc_math_break_here{\ifmmode\hfill\break\fi}%
+\def\strc_math_pickup_again
+% {\mathatom \s!leftclass \mathendcode \s!rightclass \mathbegincode{}\noatomruling}
+ {\mathatom \s!class \mathbegincode{}\noatomruling}
+
+\protected\def\strc_math_align_here
+ {\ifmmode
+ % we can have a more dedicated value, and also maybe store the class so that we can
+ % pick it up at the engine end (second pass)
+ \boundary\plusone
+ \fi}
+
+\protected\def\strc_math_break_here
+ {\ifmmode
+ \hfill
+ \break
+ \strc_math_pickup_again
+ \fi}
+
+\tolerant\protected\def\strc_math_skip_here[#1]%
+ {% no strut as it will influence fences
+ \kern
+ \ifchkdim#1\or
+ #1%
+ \orelse\ifchknum#1\or
+ #1\dimexpr\formulaparameter\c!textmargin\relax
+ \else
+ \formulaparameter\c!textmargin
+ \fi
+ \relax
+ \strc_math_pickup_again}
\ifdefined\alignhere \else \aliased\let\alignhere\relax \fi
\ifdefined\breakhere \else \aliased\let\breakhere\relax \fi
+\ifdefined\skiphere \else \aliased\let\skiphere \relax \fi
\appendtoks
\enforced\let\alignhere\strc_math_align_here
\enforced\let\breakhere\strc_math_break_here
+ \enforced\let\skiphere \strc_math_skip_here
\to \everymathematics
% \protected\def\strc_formulas_start_formula#1%
@@ -890,6 +927,51 @@
%
% \tolerant\protected\def\strc_formulas_start_formula[#1]#*[#2]% setting leftskip adaption is slow !
+\installcorenamespace{mathtextalign}
+
+\defcsname\??mathtextalign\v!slanted\endcsname
+ {\raggedcenter
+ \parinitleftskip \zeropoint
+ \parinitrightskip\s_spac_filll
+ \parfillleftskip \s_spac_filll
+ \parfillrightskip\zeropoint
+ \updateparagraphproperties}
+
+\defcsname\??mathtextalign\v!flushleft\endcsname
+ {\raggedright
+ \updateparagraphproperties} % not needed
+
+\defcsname\??mathtextalign\v!flushright\endcsname
+ {\raggedleft
+ \updateparagraphproperties} % not needed
+
+\defcsname\??mathtextalign\v!middle\endcsname
+ {\raggedcenter
+ \updateparagraphproperties} % not needed
+
+\defcsname\??mathtextalign\v!middle:\v!start\endcsname
+ {\raggedcenter
+ \setbox\scratchbox\vbox{\unhcopy\b_strc_math_display}%
+ \scratchdimen\dimexpr\textwidth-\d_strc_math_indent-\themaxboxwidth\scratchbox\relax}
+
+\defcsname\??mathtextalign\v!middle:\v!stop\endcsname
+ {\leftskip.5\scratchdimen
+ \rightskip\leftskip}
+
+\defcsname\??mathtextalign\v!flushleft:\v!start\endcsname
+ {\csname\??mathtextalign\v!middle:\v!start\endcsname}
+
+\defcsname\??mathtextalign\v!flushleft:\v!stop\endcsname
+ {\leftskip\zeropoint
+ \rightskip\leftskip}
+
+\defcsname\??mathtextalign\v!flushright:\v!start\endcsname
+ {\csname\??mathtextalign\v!middle:\v!start\endcsname}
+
+\defcsname\??mathtextalign\v!flushright:\v!stop\endcsname
+ {\leftskip\scratchdimen
+ \rightskip\leftskip}
+
\tolerant\protected\def\strc_formulas_start_formula#1#:#*[#2]% setting leftskip adaption is slow !
{\ifhmode
\par
@@ -927,6 +1009,7 @@
\let\strc_formulas_start_formula\strc_formulas_start_formula_nested
\strc_formulas_forget_display_skips
\the\everybeforedisplayformula
+ \begincsname\??mathtextalign\formulaparameter\c!textalign\endcsname
\csname\e!start\formulaparameter\c!alternative\v!formula\endcsname}
\protected\def\strc_formulas_start_formula_nested#1%
diff --git a/tex/context/base/mkxl/supp-box.lmt b/tex/context/base/mkxl/supp-box.lmt
index ae4e32353..28c1d44f9 100644
--- a/tex/context/base/mkxl/supp-box.lmt
+++ b/tex/context/base/mkxl/supp-box.lmt
@@ -1299,6 +1299,8 @@ do
["rh"] = function(p,l,found) return dimension_value, p.righthangskip end,
["lp"] = function(p,l,found) return dimension_value, p.parfillleftskip end,
["rp"] = function(p,l,found) return dimension_value, p.parfillrightskip end,
+ ["il"] = function(p,l,found) return dimension_value, p.parinitleftskip end,
+ ["ir"] = function(p,l,found) return dimension_value, p.parinitrightskip end,
["in"] = function(p,l,found) return dimension_value, p.indent end,
["nw"] = function(p,l,found) return dimension_value, naturaldimensions(p,l,found).naturalwidth end,
@@ -1396,6 +1398,8 @@ do
define_one("boxlinerh", "rh")
define_one("boxlinelp", "lp")
define_one("boxlinerp", "rp")
+ define_one("boxlineil", "il")
+ define_one("boxlineir", "ir")
define_one("boxlinein", "in")
define_one("boxlinenw", "nw")
define_one("boxlinenh", "nh")
diff --git a/tex/context/base/mkxl/supp-mat.mkxl b/tex/context/base/mkxl/supp-mat.mkxl
index 5822e959d..680f4ea37 100644
--- a/tex/context/base/mkxl/supp-mat.mkxl
+++ b/tex/context/base/mkxl/supp-mat.mkxl
@@ -170,6 +170,7 @@
\aliased\let\superscript \Usuperscript
\aliased\let\subscript \Usubscript
+\aliased\let\primescript \Uprimescript
\aliased\let\nosuperscript \Unosuperscript
\aliased\let\nosubscript \Unosubscript
\aliased\let\superprescript \Usuperprescript
diff --git a/tex/context/base/mkxl/syst-ini.mkxl b/tex/context/base/mkxl/syst-ini.mkxl
index 6f3ccd89f..3d25aa087 100644
--- a/tex/context/base/mkxl/syst-ini.mkxl
+++ b/tex/context/base/mkxl/syst-ini.mkxl
@@ -1222,6 +1222,7 @@
\aliased\let\normalsuperscript \Usuperscript
\aliased\let\normalsubscript \Usubscript
+\aliased\let\normalprimescript \Uprimescript
\aliased\let\normalnosuperscript\Unosuperscript
\aliased\let\normalnosubscript \Unosubscript
\aliased\let\normalstartimath \Ustartmath
diff --git a/tex/context/base/mkxl/trac-vis.lmt b/tex/context/base/mkxl/trac-vis.lmt
index be30ce34b..13d043a93 100644
--- a/tex/context/base/mkxl/trac-vis.lmt
+++ b/tex/context/base/mkxl/trac-vis.lmt
@@ -1047,6 +1047,8 @@ local ruledglue, ruledmathglue do
[zerospaceskip_code] = "ZS",
[parfillleftskip_code] = "PL",
[parfillrightskip_code] = "PR",
+ [gluecodes.parinitleftskip] = "IL",
+ [gluecodes.parinitrightskip] = "IR",
[indentskip_code] = "IN",
[correctionskip_code] = "CS",
}
diff --git a/tex/context/base/mkxl/typo-adj.lmt b/tex/context/base/mkxl/typo-adj.lmt
index 31a2c2c78..1bd82c7b4 100644
--- a/tex/context/base/mkxl/typo-adj.lmt
+++ b/tex/context/base/mkxl/typo-adj.lmt
@@ -17,7 +17,7 @@ local getid = nuts.getid
----- getattr = nuts.getattribute
local getdepth = nuts.getdepth
local newglue = nuts.pool.glue
-local insertafter = nuts.insert_after
+local insertafter = nuts.insertafter
----- a_adjuster = attributes.system("adjuster")
diff --git a/tex/context/base/mkxl/typo-lbx.lmt b/tex/context/base/mkxl/typo-lbx.lmt
index 8bf744440..5517f3c2f 100644
--- a/tex/context/base/mkxl/typo-lbx.lmt
+++ b/tex/context/base/mkxl/typo-lbx.lmt
@@ -75,6 +75,8 @@ do
local lb_indent = 0
local lb_parfillleftskip = 0
local lb_parfillrightskip = 0
+ local lb_parinitleftskip = 0
+ local lb_parinitrightskip = 0
local lb_overshoot = 0
implement { name = "localboxindex", public = true, usage = "value", actions = function() return integer_value, lb_index end }
@@ -91,6 +93,8 @@ do
implement { name = "localboxindent", public = true, usage = "value", actions = function() return dimension_value, lb_indent end }
implement { name = "localboxparfillleftskip", public = true, usage = "value", actions = function() return dimension_value, lb_parfillleftskip end }
implement { name = "localboxparfillrightskip", public = true, usage = "value", actions = function() return dimension_value, lb_parfillrightskip end }
+ implement { name = "localboxparinitleftskip", public = true, usage = "value", actions = function() return dimension_value, lb_parinitleftskip end }
+ implement { name = "localboxparinitrightskip", public = true, usage = "value", actions = function() return dimension_value, lb_parinitrightskip end }
implement { name = "localboxovershoot", public = true, usage = "value", actions = function() return dimension_value, lb_overshoot end }
local cache = table.setmetatableindex(function(t,k)
@@ -196,7 +200,7 @@ do
end
end
- local function processlocalboxes(line,leftbox,rightbox,middlebox,linenumber,leftskip,rightskip,lefthang,righthang,indent,parfillleftskip,parfillrightskip,overshoot)
+ local function processlocalboxes(line,leftbox,rightbox,middlebox,linenumber,leftskip,rightskip,lefthang,righthang,indent,parinitleftskip,parinitrightskip,parfillleftskip,parfillrightskip,overshoot)
--
lb_found = nil
lb_index = 0
@@ -209,10 +213,14 @@ do
lb_indent = indent
lb_parfillleftskip = parfillleftskip
lb_parfillrightskip = parfillrightskip
+ lb_parinitleftskip = parinitleftskip
+ lb_parinitrightskip = parinitrightskip
lb_overshoot = overshoot
lb_linewidth = getwidth(line)
- lb_leftoffset = leftskip + lefthang + parfillleftskip + indent
- lb_rightoffset = rightskip + righthang + parfillrightskip - overshoot
+ -- only true for soem cases
+ lb_leftoffset = leftskip + lefthang + parfillleftskip + parinitleftskip + indent
+ lb_rightoffset = rightskip + righthang + parfillrightskip + parinitrightskip - overshoot
+ --
if leftbox then
lb_localwidth = getwidth(leftbox)
processleftbox(leftbox)
diff --git a/tex/context/base/mkxl/typo-pag.lmt b/tex/context/base/mkxl/typo-pag.lmt
index d9b910e86..f8ba68222 100644
--- a/tex/context/base/mkxl/typo-pag.lmt
+++ b/tex/context/base/mkxl/typo-pag.lmt
@@ -180,7 +180,7 @@ end
-- also look at first non glue/kern node e.g for a dropped caps
--- todo: find_attribute and unset_attributes instead of takeattr
+-- todo: findattribute and unsetattributes instead of takeattr
function parbuilders.keeptogether(head)
local done = false -- can go
diff --git a/tex/context/base/mkxl/util-deb.lmt b/tex/context/base/mkxl/util-deb.lmt
index 71a43ea17..73846f2b6 100644
--- a/tex/context/base/mkxl/util-deb.lmt
+++ b/tex/context/base/mkxl/util-deb.lmt
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['util-deb'] = {
-- the <anonymous> tag is kind of generic and used for functions that are not
-- bound to a variable, like node.new, node.copy etc (contrary to for instance
--- node.has_attribute which is bound to a has_attribute local variable in mkiv)
+-- node.hasattribute which is bound to a hasattribute local variable in mkiv)
local type, next, tostring, tonumber, xpcall, print = type, next, tostring, tonumber, xpcall, print
local format, find, sub, gsub = string.format, string.find, string.sub, string.gsub
diff --git a/tex/context/fonts/mkiv/bonum-math.lfg b/tex/context/fonts/mkiv/bonum-math.lfg
index 1e96c7a6b..766baa610 100644
--- a/tex/context/fonts/mkiv/bonum-math.lfg
+++ b/tex/context/fonts/mkiv/bonum-math.lfg
@@ -135,7 +135,7 @@ return {
[0x1D484] = { 0, 1, 0, 0.95 }, -- bold lowercase italic c
[0x1D485] = { 0, 1, 0, 0.75 }, -- bold lowercase italic d
[0x1D486] = { 0, 1, 0, 0.95 }, -- bold lowercase italic e
- [0x1D487] = { 0, 1, 0, 0.95 }, -- bold lowercase italic f
+ -- [0x1D487] = { 0, 1, 0, 0.95 }, -- bold lowercase italic f
[0x1D488] = { 0, 1, 0, 0.9 }, -- bold lowercase italic g
[0x1D489] = { 0, 1, 0, 1.2 }, -- bold lowercase italic h
-- [0x1D48A] = { 0, 1, 0, 0.6 }, -- bold lowercase italic i
diff --git a/tex/context/interface/mkii/keys-en.xml b/tex/context/interface/mkii/keys-en.xml
index fc401d9d4..cf545b6eb 100644
--- a/tex/context/interface/mkii/keys-en.xml
+++ b/tex/context/interface/mkii/keys-en.xml
@@ -284,7 +284,6 @@
<cd:variable name='inright' value='inright'/>
<cd:variable name='inrightedge' value='inrightedge'/>
<cd:variable name='inrightmargin' value='inrightmargin'/>
- <cd:variable name='integral' value='integral'/>
<cd:variable name='interaction' value='interaction'/>
<cd:variable name='interactionmenu' value='interactionmenu'/>
<cd:variable name='interactive' value='interactive'/>
@@ -722,6 +721,7 @@
<cd:constant name='bottom' value='bottom'/>
<cd:constant name='bottomafter' value='bottomafter'/>
<cd:constant name='bottombefore' value='bottombefore'/>
+ <cd:constant name='bottomcolor' value='bottomcolor'/>
<cd:constant name='bottomcommand' value='bottomcommand'/>
<cd:constant name='bottomdistance' value='bottomdistance'/>
<cd:constant name='bottomframe' value='bottomframe'/>
@@ -925,6 +925,7 @@
<cd:constant name='inputfile' value='inputfile'/>
<cd:constant name='insidesection' value='insidesection'/>
<cd:constant name='instance' value='instance'/>
+ <cd:constant name='integral' value='integral'/>
<cd:constant name='intent' value='intent'/>
<cd:constant name='interaction' value='interaction'/>
<cd:constant name='interlinespace' value='interlinespace'/>
@@ -967,6 +968,7 @@
<cd:constant name='leftquote' value='leftquote'/>
<cd:constant name='leftsample' value='leftsample'/>
<cd:constant name='leftsentence' value='leftsentence'/>
+ <cd:constant name='leftsource' value='leftsource'/>
<cd:constant name='leftspeech' value='leftspeech'/>
<cd:constant name='leftstyle' value='leftstyle'/>
<cd:constant name='leftsubsentence' value='leftsubsentence'/>
@@ -999,7 +1001,9 @@
<cd:constant name='marstyle' value='marstyle'/>
<cd:constant name='mask' value='mask'/>
<cd:constant name='mathclass' value='mathclass'/>
+ <cd:constant name='mathdenominatorstyle' value='mathdenominatorstyle'/>
<cd:constant name='mathlimits' value='mathlimits'/>
+ <cd:constant name='mathnumeratorstyle' value='mathnumeratorstyle'/>
<cd:constant name='mathstyle' value='mathstyle'/>
<cd:constant name='max' value='max'/>
<cd:constant name='maxdepth' value='maxdepth'/>
@@ -1011,6 +1015,7 @@
<cd:constant name='middle' value='middle'/>
<cd:constant name='middlecolor' value='middlecolor'/>
<cd:constant name='middlecommand' value='middlecommand'/>
+ <cd:constant name='middlesource' value='middlesource'/>
<cd:constant name='middlespeech' value='middlespeech'/>
<cd:constant name='middlestyle' value='middlestyle'/>
<cd:constant name='middletext' value='middletext'/>
@@ -1183,6 +1188,7 @@
<cd:constant name='rightquote' value='rightquote'/>
<cd:constant name='rightsample' value='rightsample'/>
<cd:constant name='rightsentence' value='rightsentence'/>
+ <cd:constant name='rightsource' value='rightsource'/>
<cd:constant name='rightspeech' value='rightspeech'/>
<cd:constant name='rightstyle' value='rightstyle'/>
<cd:constant name='rightsubsentence' value='rightsubsentence'/>
@@ -1318,6 +1324,7 @@
<cd:constant name='toffset' value='toffset'/>
<cd:constant name='tolerance' value='tolerance'/>
<cd:constant name='top' value='top'/>
+ <cd:constant name='topcolor' value='topcolor'/>
<cd:constant name='topcommand' value='topcommand'/>
<cd:constant name='topdistance' value='topdistance'/>
<cd:constant name='topframe' value='topframe'/>
diff --git a/tex/context/interface/mkii/keys-nl.xml b/tex/context/interface/mkii/keys-nl.xml
index 6ddc3a59d..01a233a88 100644
--- a/tex/context/interface/mkii/keys-nl.xml
+++ b/tex/context/interface/mkii/keys-nl.xml
@@ -284,7 +284,6 @@
<cd:variable name='inright' value='inrechter'/>
<cd:variable name='inrightedge' value='inrechterrand'/>
<cd:variable name='inrightmargin' value='inrechtermarge'/>
- <cd:variable name='integral' value='integral'/>
<cd:variable name='interaction' value='interactie'/>
<cd:variable name='interactionmenu' value='interactiemenu'/>
<cd:variable name='interactive' value='interactive'/>
@@ -722,6 +721,7 @@
<cd:constant name='bottom' value='onder'/>
<cd:constant name='bottomafter' value='bottomafter'/>
<cd:constant name='bottombefore' value='bottombefore'/>
+ <cd:constant name='bottomcolor' value='onderkleur'/>
<cd:constant name='bottomcommand' value='ondercommando'/>
<cd:constant name='bottomdistance' value='onderafstand'/>
<cd:constant name='bottomframe' value='onderkader'/>
@@ -925,6 +925,7 @@
<cd:constant name='inputfile' value='inputfile'/>
<cd:constant name='insidesection' value='binnensectie'/>
<cd:constant name='instance' value='instance'/>
+ <cd:constant name='integral' value='integral'/>
<cd:constant name='intent' value='intent'/>
<cd:constant name='interaction' value='interactie'/>
<cd:constant name='interlinespace' value='interlinie'/>
@@ -967,6 +968,7 @@
<cd:constant name='leftquote' value='linkerciteer'/>
<cd:constant name='leftsample' value='leftsample'/>
<cd:constant name='leftsentence' value='linkerzin'/>
+ <cd:constant name='leftsource' value='leftsource'/>
<cd:constant name='leftspeech' value='linkeruitspraak'/>
<cd:constant name='leftstyle' value='linkerletter'/>
<cd:constant name='leftsubsentence' value='linkersubzin'/>
@@ -999,7 +1001,9 @@
<cd:constant name='marstyle' value='marletter'/>
<cd:constant name='mask' value='masker'/>
<cd:constant name='mathclass' value='mathclass'/>
+ <cd:constant name='mathdenominatorstyle' value='mathdenominatorstyle'/>
<cd:constant name='mathlimits' value='mathlimits'/>
+ <cd:constant name='mathnumeratorstyle' value='mathnumeratorstyle'/>
<cd:constant name='mathstyle' value='mathstyle'/>
<cd:constant name='max' value='max'/>
<cd:constant name='maxdepth' value='maxdepth'/>
@@ -1011,6 +1015,7 @@
<cd:constant name='middle' value='midden'/>
<cd:constant name='middlecolor' value='middenkleur'/>
<cd:constant name='middlecommand' value='middencommando'/>
+ <cd:constant name='middlesource' value='middlesource'/>
<cd:constant name='middlespeech' value='middenuitspraak'/>
<cd:constant name='middlestyle' value='middenletter'/>
<cd:constant name='middletext' value='middentekst'/>
@@ -1183,6 +1188,7 @@
<cd:constant name='rightquote' value='rechterciteer'/>
<cd:constant name='rightsample' value='rightsample'/>
<cd:constant name='rightsentence' value='rechterzin'/>
+ <cd:constant name='rightsource' value='rightsource'/>
<cd:constant name='rightspeech' value='rechteruitspraak'/>
<cd:constant name='rightstyle' value='rechterletter'/>
<cd:constant name='rightsubsentence' value='rechtersubzin'/>
@@ -1318,6 +1324,7 @@
<cd:constant name='toffset' value='toffset'/>
<cd:constant name='tolerance' value='tolerantie'/>
<cd:constant name='top' value='boven'/>
+ <cd:constant name='topcolor' value='bovenkleur'/>
<cd:constant name='topcommand' value='bovencommando'/>
<cd:constant name='topdistance' value='bovenafstand'/>
<cd:constant name='topframe' value='bovenkader'/>
diff --git a/tex/context/modules/mkiv/s-fonts-features.lua b/tex/context/modules/mkiv/s-fonts-features.lua
index eb64e4c8f..2a1d36e14 100644
--- a/tex/context/modules/mkiv/s-fonts-features.lua
+++ b/tex/context/modules/mkiv/s-fonts-features.lua
@@ -298,3 +298,60 @@ function moduledata.fonts.features.showallligatures(specification)
context.par()
end
end
+
+
+function moduledata.fonts.features.showallfeatures(specification)
+ specification = interfaces.checkedspecification(specification)
+ local id, cs = fonts.definers.internal(specification,"<module:fonts:features:font>")
+ local tfmdata = fonts.hashes.identifiers[id]
+ local sequences = tfmdata.resources.sequences
+
+ context.starttabulate { "|T|T|Tc|T|T|Tp|" }
+
+ NC() context.bold("\\letterhash")
+ NC() context.bold("type")
+ NC() context.bold("\\letterhash steps")
+ NC() context.bold("feature")
+ NC() context.bold("script")
+ NC() context.bold("language")
+ NC() NR()
+ context.HL()
+
+ for i=1,#sequences do
+ local s = sequences[i]
+ local features = s.features
+ if features then
+ local done1 = false
+ NC() context(i)
+ NC() context(s.type)
+ NC() context(s.nofsteps)
+ for feature, scripts in table.sortedhash(features) do
+ NC()
+ if done1 then
+ NC() NC() NC()
+ else
+ context(feature)
+ done1 = true
+ end
+ local done2 = false
+ for script, languages in table.sortedhash(scripts) do
+ if done2 then
+ NC() NC() NC() NC()
+ else
+ done2 = true
+ end
+ NC() context(script)
+ NC() context("% t",table.sortedkeys(languages))
+ NC() context.NR()
+ end
+ end
+ else
+ NC() context(i)
+ NC() context(s.type)
+ NC() context(s.nofsteps)
+ NC() NC() NC() NC() NR()
+ end
+ end
+
+ context.stoptabulate()
+end
diff --git a/tex/context/modules/mkiv/s-fonts-features.mkiv b/tex/context/modules/mkiv/s-fonts-features.mkiv
index 2390c44df..81d2b0dcd 100644
--- a/tex/context/modules/mkiv/s-fonts-features.mkiv
+++ b/tex/context/modules/mkiv/s-fonts-features.mkiv
@@ -20,6 +20,7 @@
\installmodulecommandluasingle \showbasekerns {moduledata.fonts.features.showbasekerns}
\installmodulecommandluasingle \showallligatures {moduledata.fonts.features.showallligatures}
\installmodulecommandluasingle \showfeatureset {moduledata.fonts.features.showfeatureset}
+\installmodulecommandluasingle \showallfeatures {moduledata.fonts.features.showallfeatures}
\def\kernpairheight{.8\strutht}
\def\kernpairdepth {.8\strutdp}
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 966b918c1..8449d0bc1 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 2022-04-01 09:33
+-- merge date : 2022-04-11 19:20
do -- begin closure to overcome local limits and interference