summaryrefslogtreecommitdiff
path: root/tex/context/base
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-01-26 19:04:42 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-01-26 19:04:42 +0100
commit27e58283ca9fd418a9f49981712d8f957cafaa0c (patch)
treed12d1eb09525df083fe6150dea06b5a178f41ecc /tex/context/base
parentc80fc815f3b6db50716f9fe56f86ce068728221f (diff)
downloadcontext-27e58283ca9fd418a9f49981712d8f957cafaa0c.tar.gz
2021-01-26 18:04:00
Diffstat (limited to 'tex/context/base')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/font-run.mkiv16
-rw-r--r--tex/context/base/mkiv/page-otr.lua4
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin26124 -> 26121 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin255117 -> 255112 bytes
-rw-r--r--tex/context/base/mkiv/tabl-tbl.mkiv27
-rw-r--r--tex/context/base/mkiv/trac-deb.lua2
-rw-r--r--tex/context/base/mkiv/trac-deb.mkiv3
-rw-r--r--tex/context/base/mkxl/catc-ini.mkxl12
-rw-r--r--tex/context/base/mkxl/colo-grp.mkxl4
-rw-r--r--tex/context/base/mkxl/colo-ini.mkxl38
-rw-r--r--tex/context/base/mkxl/cont-new.mkxl2
-rw-r--r--tex/context/base/mkxl/context.mkxl4
-rw-r--r--tex/context/base/mkxl/core-sys.mkxl8
-rw-r--r--tex/context/base/mkxl/file-ini.mklx2
-rw-r--r--tex/context/base/mkxl/file-mod.mklx47
-rw-r--r--tex/context/base/mkxl/font-fil.mklx2
-rw-r--r--tex/context/base/mkxl/font-ini.mklx16
-rw-r--r--tex/context/base/mkxl/font-tex.lmt25
-rw-r--r--tex/context/base/mkxl/font-tex.mkxl1
-rw-r--r--tex/context/base/mkxl/font-tra.mkxl261
-rw-r--r--tex/context/base/mkxl/lpdf-emb.lmt19
-rw-r--r--tex/context/base/mkxl/lpdf-lmt.lmt45
-rw-r--r--tex/context/base/mkxl/luat-ini.mkxl23
-rw-r--r--tex/context/base/mkxl/math-ini.mkxl16
-rw-r--r--tex/context/base/mkxl/meta-ini.mkxl2
-rw-r--r--tex/context/base/mkxl/mult-sys.mkxl10
-rw-r--r--tex/context/base/mkxl/page-box.mklx4
-rw-r--r--tex/context/base/mkxl/page-lay.mkxl12
-rw-r--r--tex/context/base/mkxl/page-otr.lmt14
-rw-r--r--tex/context/base/mkxl/page-otr.mklx4
-rw-r--r--tex/context/base/mkxl/publ-ini.mkxl13
-rw-r--r--tex/context/base/mkxl/publ-tra.mkxl84
-rw-r--r--tex/context/base/mkxl/spac-hor.mkxl10
-rw-r--r--tex/context/base/mkxl/strc-con.mklx4
-rw-r--r--tex/context/base/mkxl/strc-itm.mklx2
-rw-r--r--tex/context/base/mkxl/strc-sec.mkxl24
-rw-r--r--tex/context/base/mkxl/symb-ini.mkxl2
-rw-r--r--tex/context/base/mkxl/syst-aux.mkxl2
-rw-r--r--tex/context/base/mkxl/syst-ini.mkxl32
-rw-r--r--tex/context/base/mkxl/tabl-tbl.mkxl43
-rw-r--r--tex/context/base/mkxl/trac-deb.lmt6
-rw-r--r--tex/context/base/mkxl/trac-deb.mkxl3
-rw-r--r--tex/context/base/mkxl/type-ini.mklx2
-rw-r--r--tex/context/base/mkxl/typo-dir.mkxl3
48 files changed, 307 insertions, 554 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index f0f145664..2af36d356 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.01.24 16:02}
+\newcontextversion{2021.01.26 18:02}
%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 9c05fd446..dbdc83d4c 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.01.24 16:02}
+\edef\contextversion{2021.01.26 18:02}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 27b0a995e..eb9380033 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.01.24 16:02}
+\newcontextversion{2021.01.26 18:02}
%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 c6ba8b009..372a1c29b 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.01.24 16:02}
+\edef\contextversion{2021.01.26 18:02}
%D Kind of special:
diff --git a/tex/context/base/mkiv/font-run.mkiv b/tex/context/base/mkiv/font-run.mkiv
index 2f6cd32df..6bfa7ee72 100644
--- a/tex/context/base/mkiv/font-run.mkiv
+++ b/tex/context/base/mkiv/font-run.mkiv
@@ -350,7 +350,7 @@
\ifdefined\databox \else \newbox\databox \fi
-\unexpanded\gdef\testminimalbaseline#1% to be used in a 10 column tabulate
+\unexpanded\gdef\font_show_minimal_baseline#1% to be used in a 10 column tabulate
{\setbox\databox\ruledhbox{#1}%
\scratchdimen\htdp\databox
\normalexpanded {
@@ -374,18 +374,14 @@
\font_show_only_english\showminimalbaseline
\else
\starttabulate[|l|T|T|T|T|T|T|T|T|T|]
- \testminimalbaseline{\hbox to \emwidth{\hss\showstruts\strut\hss}}%
- \testminimalbaseline{(/)}%
- \testminimalbaseline{\normalstartimath\frac{1}{2}x\normalsuperscript2\normalsubscript3\normalstopimath}
+ \font_show_minimal_baseline{\hbox to \emwidth{\hss\showstruts\strut\hss}}%
+ \font_show_minimal_baseline{(/)}%
+ \font_show_minimal_baseline{\normalstartimath\frac{1}{2}x\normalsuperscript2\normalsubscript3\normalstopimath}
\stoptabulate
\fi}
-\unexpanded\gdef\showkerning#1%
- {\bgroup
- \let\MPfshowcommand\ruledhbox
- \setMPtext\s!dummy{#1}%
- \startMPcode draw textext(\MPstring\s!dummy);\stopMPcode
- \egroup}
+\unexpanded\gdef\showkerning
+ {\groupedcommandcs\showfontkerns\relax}
\unexpanded\gdef\showcharratio
{\dowithnextboxcontent
diff --git a/tex/context/base/mkiv/page-otr.lua b/tex/context/base/mkiv/page-otr.lua
index 307158684..c87f419b4 100644
--- a/tex/context/base/mkiv/page-otr.lua
+++ b/tex/context/base/mkiv/page-otr.lua
@@ -7,6 +7,6 @@ if not modules then modules = { } end modules ['page-otr'] = {
}
interfaces.implement {
- name = "triggerpagebuilder",
- actions = tex.triggerbuildpage,
+ name = "triggerpagebuilder",
+ actions = tex.triggerbuildpage,
}
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 43ce46887..fa71c74b4 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 24aadd25d..7bae75b95 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/tabl-tbl.mkiv b/tex/context/base/mkiv/tabl-tbl.mkiv
index ce8d67b63..2ed104adf 100644
--- a/tex/context/base/mkiv/tabl-tbl.mkiv
+++ b/tex/context/base/mkiv/tabl-tbl.mkiv
@@ -224,6 +224,9 @@
\newconstant \c_tabl_tabulate_localcolorspan
\newconstant \c_tabl_tabulate_modus
+%newconditional \c_tabl_pre_is_set
+\newconditional \c_tabl_post_is_set
+
\let\tabulatesplitlinemode\c_tabl_tabulate_splitlinemode % temp hack, we need an interface
\let \m_tabl_tabulate_separator_factor \empty % fraction
@@ -424,9 +427,9 @@
\fi\fi}
% \unexpanded % we can expand this one
-\def\tabl_tabulate_inject_post_skip#1%
+\def\tabl_tabulate_inject_post_skip#1#2%
{\ifdim#1>\zeropoint
- \kern#1\relax % was \hskip
+ \kern\ifnum\c_tabl_tabulate_columns=\c_tabl_tabulate_nofcolumns#2\else#1\fi\relax
\else\ifnum\c_tabl_tabulate_columns=\c_tabl_tabulate_nofcolumns
\ifconditional\c_tabl_tabulate_autorulespacing
\ifcase\c_tabl_tabulate_has_rule_spec_last\else
@@ -516,7 +519,9 @@
\egroup
\aligntab
\noexpand\dostoptagged
- \tabl_tabulate_inject_post_skip{\the\dimexpr\s_tabl_tabulate_post}% get rid of plus
+ \tabl_tabulate_inject_post_skip
+ {\the\ifconditional\c_tabl_post_is_set\s_tabl_tabulate_post\else\s_tabl_tabulate_last\fi}%
+ {\the\s_tabl_tabulate_post}%
\alignmark\alignmark
}%
\toksapp\t_tabl_tabulate_dummy{\NC}%
@@ -527,7 +532,9 @@
\s_tabl_tabulate_post\zeropoint
\fi
%\let\gettabulateexit\dogettabulateexit % still needed ?
- \d_tabl_tabulate_width\zeropoint}
+ \d_tabl_tabulate_width\zeropoint
+ %setfalse\c_tabl_pre_is_set
+ \setfalse\c_tabl_post_is_set}
\unexpanded\def\installtabulatepreambleoption#1#2%
{\setvalue{\??tabulatepreamble\string#1}{#2}}%
@@ -622,17 +629,21 @@
\tabl_tabulate_set_preamble}
\def\tabl_tabulate_set_preskip#1%
- {\doifelsenumber{#1}%
+ {%settrue\c_tabl_pre_is_set
+ \doifelsenumber{#1}%
{\s_tabl_tabulate_pre#1\d_tabl_tabulate_unit\tabl_tabulate_set_preamble }%
{\s_tabl_tabulate_pre.5\d_tabl_tabulate_unit\tabl_tabulate_set_preamble#1}}
\def\tabl_tabulate_set_posskip#1%
- {\doifelsenumber{#1}%
+ {\settrue\c_tabl_post_is_set
+ \doifelsenumber{#1}%
{\s_tabl_tabulate_post#1\d_tabl_tabulate_unit\tabl_tabulate_set_preamble }%
{\s_tabl_tabulate_post.5\d_tabl_tabulate_unit\tabl_tabulate_set_preamble#1}}
\def\tabl_tabulate_set_preposskip#1%
- {\doifelsenumber{#1}%
+ {%settrue\c_tabl_pre_is_set
+ \settrue\c_tabl_post_is_set
+ \doifelsenumber{#1}%
{\s_tabl_tabulate_pre#1\d_tabl_tabulate_unit\s_tabl_tabulate_post\s_tabl_tabulate_pre\tabl_tabulate_set_preamble }%
{\s_tabl_tabulate_pre.5\d_tabl_tabulate_unit\s_tabl_tabulate_post\s_tabl_tabulate_pre\tabl_tabulate_set_preamble#1}}
@@ -803,6 +814,8 @@
\c_tabl_tabulate_modus\zerocount
\setfalse\c_tabl_tabulate_pwidth_set
\setfalse\c_tabl_tabulate_reshape
+ %setfalse\c_tabl_pre_is_set
+ \setfalse\c_tabl_post_is_set
\t_tabl_tabulate_before\emptytoks
\t_tabl_tabulate_after\emptytoks
\t_tabl_tabulate_bmath\emptytoks
diff --git a/tex/context/base/mkiv/trac-deb.lua b/tex/context/base/mkiv/trac-deb.lua
index a6154e5dc..07865e4bf 100644
--- a/tex/context/base/mkiv/trac-deb.lua
+++ b/tex/context/base/mkiv/trac-deb.lua
@@ -326,8 +326,6 @@ directives.register("system.showerror", lmx.overloaderror)
-- end
-- end)
-local implement = interfaces.implement
-
implement { name = "showtrackers", actions = trackers.show }
implement { name = "enabletrackers", actions = trackers.enable, arguments = "string" }
implement { name = "disabletrackers", actions = trackers.disable, arguments = "string" }
diff --git a/tex/context/base/mkiv/trac-deb.mkiv b/tex/context/base/mkiv/trac-deb.mkiv
index fefd55142..fcbacfb9e 100644
--- a/tex/context/base/mkiv/trac-deb.mkiv
+++ b/tex/context/base/mkiv/trac-deb.mkiv
@@ -18,8 +18,6 @@
\unprotect
-\unexpanded\def\breakpoint {\showdebuginfo\wait}
-
\unexpanded\def\showtrackers {\clf_showtrackers}
\unexpanded\def\enabletrackers [#1]{\clf_enabletrackers{#1}}
\unexpanded\def\disabletrackers [#1]{\clf_disabletrackers{#1}}
@@ -33,7 +31,6 @@
\unexpanded\def\enableexperiments [#1]{\clf_enableexperiments{#1}}
\unexpanded\def\disableexperiments[#1]{\clf_disableexperiments{#1}}
-\unexpanded\def\showdebuginfo {\clf_showdebuginfo}
\unexpanded\def\overloaderror {\clf_overloaderror}
\unexpanded\def\showlogcategories {\clf_showlogcategories}
diff --git a/tex/context/base/mkxl/catc-ini.mkxl b/tex/context/base/mkxl/catc-ini.mkxl
index 7d23c37d8..186e6f820 100644
--- a/tex/context/base/mkxl/catc-ini.mkxl
+++ b/tex/context/base/mkxl/catc-ini.mkxl
@@ -39,13 +39,13 @@
%D We predefine some prefixes ahead of syst-aux and mult-sys. We reserve 8 slots for
%D catcodes. (This active mess probably needs an update some day.)
-\installsystemnamespace {catcodelet} % let : \let
-\installsystemnamespace {catcodedef} % def : \def
-\installsystemnamespace {catcodeued} % ued : \protected\def
-\installsystemnamespace {catcodeget} % \meaning
+\installsystemnamespace{catcodelet} % let : \let
+\installsystemnamespace{catcodedef} % def : \def
+\installsystemnamespace{catcodeued} % ued : \protected\def
+\installsystemnamespace{catcodeget} % \meaning
-\installsystemnamespace {catcodetablet}
-\installsystemnamespace {catcodetablen}
+\installsystemnamespace{catcodetablet}
+\installsystemnamespace{catcodetablen}
\newcount\c_syst_catcodes_n \c_syst_catcodes_n\zerocount % 0 = signal, so advance before allocate
\newcount\c_syst_catcodes_a
diff --git a/tex/context/base/mkxl/colo-grp.mkxl b/tex/context/base/mkxl/colo-grp.mkxl
index 82dd67959..9237952d7 100644
--- a/tex/context/base/mkxl/colo-grp.mkxl
+++ b/tex/context/base/mkxl/colo-grp.mkxl
@@ -102,7 +102,7 @@
%D
%D \showsetup{showcolorgroup}
-\fetchruntimecommand \showcolorgroup \f!colo_run
+\fetchmodulecommand \showcolorgroup \f!colo_run
%D There are ten predefined color groups, like \color [green] {\em groen}, \color
%D [red] {\em rood}, \color [blue] {\em blauw}, \color [cyan] {\em cyaan}, \color
@@ -158,6 +158,6 @@
%D
%D \showsetup{comparecolorgroup}
-\fetchruntimecommand \comparecolorgroup \f!colo_run
+\fetchmodulecommand \comparecolorgroup \f!colo_run
\protect \endinput
diff --git a/tex/context/base/mkxl/colo-ini.mkxl b/tex/context/base/mkxl/colo-ini.mkxl
index cad33514b..7d2e419bc 100644
--- a/tex/context/base/mkxl/colo-ini.mkxl
+++ b/tex/context/base/mkxl/colo-ini.mkxl
@@ -581,7 +581,7 @@
%D
%D \showsetup{showpalet}
-\fetchruntimecommand \showpalet \f!colo_run
+\fetchmodulecommand \showpalet \f!colo_run
%D \macros
%D {showcolorcomponents}
@@ -590,7 +590,7 @@
%D \showcolorcomponents[color-1,color-2]
%D \stoptyping
-\fetchruntimecommand \showcolorcomponents \f!colo_run
+\fetchmodulecommand \showcolorcomponents \f!colo_run
%D \macros
%D {comparepalet}
@@ -613,7 +613,7 @@
%D
%D \showsetup{comparepalet}
-\fetchruntimecommand \comparepalet \f!colo_run
+\fetchmodulecommand \comparepalet \f!colo_run
%D \macros
%D {showcolor}
@@ -629,7 +629,7 @@
%D
%D \showsetup{showcolor}
-\fetchruntimecommand \showcolor \f!colo_run
+\fetchmodulecommand \showcolor \f!colo_run
%D It would make sense to put the following code in \type {colo-mps}, but it it
%D rather low level.
@@ -727,16 +727,16 @@
\letvalue{\??colorsetter -}\empty % used?
\letvalue{\??transparencysetter-}\empty % used?
-% new: expandable (see tbl)
+% new: expandable (see tbl preamble)
-\def\colo_helpers_fast_activate
+\def\colo_helpers_direct_activate
{\ifempty\currentcolorprefix
- \expandafter\colo_helpers_fast_activate_nop
+ \expandafter\colo_helpers_direct_activate_nop
\else
- \expandafter\colo_helpers_fast_activate_yes
+ \expandafter\colo_helpers_direct_activate_yes
\fi}
-\def\colo_helpers_fast_activate_yes#1%
+\def\colo_helpers_direct_activate_yes#1%
{\ifcsname\??colorsetter\currentcolorprefix#1\endcsname
\lastnamedcs
\begincsname\??transparencysetter\currentcolorprefix#1\endcsname
@@ -745,7 +745,7 @@
\begincsname\??transparencysetter#1\endcsname
\fi}
-\def\colo_helpers_fast_activate_nop#1%
+\def\colo_helpers_direct_activate_nop#1%
{\ifcsname\??colorsetter#1\endcsname
\lastnamedcs
\begincsname\??transparencysetter#1\endcsname
@@ -755,17 +755,13 @@
{\begincsname\??colorsetter \v_colo_dummy_name\endcsname
\begincsname\??transparencysetter\v_colo_dummy_name\endcsname}
-\let\dofastcoloractivation\colo_helpers_fast_activate
-
% so far
\permanent\protected\def\colo_helpers_activate#1% two-step is not that much faster but less tracing
{\edef\currentcolorname{#1}%
\ifempty\currentcolorprefix
- %\expandafter
\colo_helpers_activate_nop
\else
- %\expandafter
\colo_helpers_activate_yes
\fi}
@@ -1010,11 +1006,17 @@
%D \stoptyping
%D
%D \stopmode
+%D
+%D All this will move to m-tikz.mkxl as it doesn't belong in the core. They are
+%D mutable because \quote {who knows what gets redefined}.
+
+\mutable\let\color@ \relax
+\mutable\let\xcolor@\relax
-\protected\def\pgf@context@registercolor#1{\setevalue{\string\color@#1}{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\zerocount\thecolorattribute{#1}}}
-\protected\def\pgf@context@registergray #1{\setevalue{\string\color@#1}{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\plustwo \thecolorattribute{#1}}}
-\protected\def\pgf@context@registerrgb #1{\setevalue{\string\color@#1}{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\plusthree\thecolorattribute{#1}}}
-\protected\def\pgf@context@registercmyk #1{\setevalue{\string\color@#1}{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\plusfour \thecolorattribute{#1}}}
+\mutable\protected\def\pgf@context@registercolor#1{\edefcsname\string\color@#1\endcsname{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\zerocount\thecolorattribute{#1}}}
+\mutable\protected\def\pgf@context@registergray #1{\edefcsname\string\color@#1\endcsname{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\plustwo \thecolorattribute{#1}}}
+\mutable\protected\def\pgf@context@registerrgb #1{\edefcsname\string\color@#1\endcsname{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\plusthree\thecolorattribute{#1}}}
+\mutable\protected\def\pgf@context@registercmyk #1{\edefcsname\string\color@#1\endcsname{\noexpand\xcolor@{}{}\clf_pgfxcolorspec\plusfour \thecolorattribute{#1}}}
%D \starttyping
%D \ifdefined\pgf@context@registercolor
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index ce21a1b79..9bcddeee0 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.01.24 16:02}
+\newcontextversion{2021.01.26 18:02}
%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 6ca3eca99..f576a1ad8 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.01.24 16:02}
+\immutable\edef\contextversion{2021.01.26 18:02}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
@@ -539,7 +539,7 @@
% new bibtex support:
\loadmkxlfile{publ-ini}
-\loadmkxlfile{publ-tra}
+%loadmkxlfile{publ-tra}
\loadmkxlfile{publ-xml}
\loadmkxlfile{publ-old}
diff --git a/tex/context/base/mkxl/core-sys.mkxl b/tex/context/base/mkxl/core-sys.mkxl
index 302cdaa99..e27e0734d 100644
--- a/tex/context/base/mkxl/core-sys.mkxl
+++ b/tex/context/base/mkxl/core-sys.mkxl
@@ -106,9 +106,9 @@
%D \NC \type{\operatingsystem} \NC \operatingsystem \NC \NR
%D \stoptabulate
-\appendtoks
- \edef\outputresolution{\directsystemparameter\c!resolution}%
-\to \everysetupsystem
+% \appendtoks
+% \edef\outputresolution{\directsystemparameter\c!resolution}%
+% \to \everysetupsystem
%D The system modes set by the setup command can be used in situations like:
%D
@@ -142,7 +142,7 @@
\setupsystem
[\c!directory=,
\c!n=0, % 0:unknown 1: one run 2: first 3: successive 4: final run
- \c!resolution=600,% in dpi, no unit in mkiv
+ % \c!resolution=600,% in dpi, no unit in mkiv, not used in lmtx
% \c!random=, % obsolete here
% \c!file=\jobname,
% \c!inputfile=\outputfilename,
diff --git a/tex/context/base/mkxl/file-ini.mklx b/tex/context/base/mkxl/file-ini.mklx
index 66d03b2f9..35a49c72d 100644
--- a/tex/context/base/mkxl/file-ini.mklx
+++ b/tex/context/base/mkxl/file-ini.mklx
@@ -207,7 +207,7 @@
%D This command obeys the standard method for locating files. We could move this
%D function to the \LUA\ end.
-\installsystemnamespace {fileonce}
+\installsystemnamespace{fileonce}
\permanent\protected\def\doonlyonce#whatever%
{\ifcsname\??fileonce#whatever\endcsname
diff --git a/tex/context/base/mkxl/file-mod.mklx b/tex/context/base/mkxl/file-mod.mklx
index 2f9f13f1c..c353b8c61 100644
--- a/tex/context/base/mkxl/file-mod.mklx
+++ b/tex/context/base/mkxl/file-mod.mklx
@@ -177,37 +177,6 @@
% will become file-run
-%D To save memory, we implement some seldomly used commands in a lazy way. Nota
-%D bene: such runtime definitions are to be defined global.
-%D
-%D \starttyping
-%D \fetchruntimecommand \showaccents \f!file_run % last is a file name
-%D \stoptyping
-
-\installcorenamespace{runtimeloaded}
-
-\permanent\protected\def\fetchruntimecommand#1#2%
- {\protected\def#1{\dofetchruntimecommand#1{#2}}}
-
-\def\dofetchruntimecommand#1#2% actually a test on #1 being define would be ok as well
- {\ifcsname\??runtimeloaded#2\endcsname
- % already loaded
- \else
- \glet#1\undefined
- \startreadingfile
- \startnointerference % \bgroup
- \cleanupfeatures % better \setnormalcatcodes / test first
- \readfile{#2.\mksuffix}\donothing\donothing
- \stopnointerference % \egroup
- \stopreadingfile
- \letgvalue{\??runtimeloaded#2}\empty
- \fi
- \ifdefined#1\else
- \writestatus\m!system{command \string#1 not found in file #2}%
- \protected\gdef#1{{\infofont[unknown command \string#1]}}%
- \fi
- #1}
-
%D \macros
%D {doifolderversionelse}
%D
@@ -274,4 +243,20 @@
\permanent\protected\def\installmodulecommandluaone#1#2{\enforced\permanent\protected\def#1{\normalexpanded{\syst_modules_one_lua{\csstring#1}{#2}}}}
\permanent\protected\def\installmodulecommandluatwo#1#2{\enforced\permanent\protected\def#1{\normalexpanded{\syst_modules_two_lua{\csstring#1}{#2}}}}
+%D This replaces \type {\fetchruntimecommand}:
+%D
+%D \starttyping
+%D \fetchmodulecommand \csname {module}
+%D \stoptyping
+
+\permanent\protected\def\fetchmodulecommand#1#2%
+ {\mutable\protected\def#1{\syst_fetch_module_command#1{#2}}}
+
+\def\syst_fetch_module_command#1#2% actually a test on #1 being define would be ok as well
+ {%writestatus\m!systems{fetching \string#1}%
+ \usemodule[#2]%
+ #1}
+
+\aliased\let\fetchruntimecommand\fetchmodulecommand % obsolete
+
\protect \endinput
diff --git a/tex/context/base/mkxl/font-fil.mklx b/tex/context/base/mkxl/font-fil.mklx
index 08c9241aa..dcbe568b1 100644
--- a/tex/context/base/mkxl/font-fil.mklx
+++ b/tex/context/base/mkxl/font-fil.mklx
@@ -69,7 +69,7 @@
\let\m_font_file\empty
\def \defaultfontfile{\truefontname{Normal}} % was cmtt10, but that one is gone
-\edef\nullfontname {\fontname\nullfont}
+%edef\nullfontname {\fontname\nullfont}
\permanent\protected\def\definefontsynonym[#name]#spacer[#file]%
{\edef\m_font_name{#name}%
diff --git a/tex/context/base/mkxl/font-ini.mklx b/tex/context/base/mkxl/font-ini.mklx
index c52fb7f4b..daa551487 100644
--- a/tex/context/base/mkxl/font-ini.mklx
+++ b/tex/context/base/mkxl/font-ini.mklx
@@ -1880,12 +1880,12 @@
\orelse\ifcsname\??fontclassnop#class\endcsname
% already tried
\else % too messy: \ifcase\currentgrouplevel % (unpredictable)
- \trycurrentfontclass{#class}%
+ \fonts_helpers_try_currentfontclass{#class}%
\fi}
-\ifdefined\trycurrentfontclass \else
+\ifdefined\fonts_helpers_try_currentfontclass \else
- \protected\def\trycurrentfontclass#typeface%
+ \protected\def\fonts_helpers_try_currentfontclass#typeface%
{\letcsname\??fontclassnop#typeface\endcsname\empty}
\fi
@@ -2428,15 +2428,7 @@
\fullrestoreglobalbodyfont
\fi}
-\permanent\protected\def\showbodyfontstate
- {\dontleavehmode
- \start
- \infofont
- [fontclass: \fontclass,\space
- fontbody: \fontbody ,\space
- fontface: \fontface ,\space
- fontsize: \fontsize ]%
- \stop}
+\fetchmodulecommand \showbodyfontstate \f!font_run
%D Handy for manuals:
diff --git a/tex/context/base/mkxl/font-tex.lmt b/tex/context/base/mkxl/font-tex.lmt
index ba356bc29..c960953a7 100644
--- a/tex/context/base/mkxl/font-tex.lmt
+++ b/tex/context/base/mkxl/font-tex.lmt
@@ -63,17 +63,21 @@ end
local function setboxglyph(specification)
if specification then
- local name = specification.name
- if name then
- local private = newprivateslot(name)
- local font = currentfont()
+ local name = specification.name
+ local unicode = specification.unicode
+ local font = currentfont()
+ if not unicode and name then
+ unicode = newprivateslot(name)
+ specification.unicode = unicode
+ end
+ if unicode then
if not specification.setups then
specification.setups = name
end
-- we can actually delay font if needed
- register(font,private,function(font,private)
- makeglyphbox(private,specification)
- return setboxglyphs(category,font,private,specification)
+ register(font,unicode,function(font,private)
+ makeglyphbox(unicode,specification)
+ return setboxglyphs(category,font,unicode,specification)
end)
checkenabled()
end
@@ -133,7 +137,12 @@ interfaces.implement {
public = true,
protected = true,
actions = setboxglyph,
- arguments = { { "*" } },
+ arguments = { {
+ { "category" },
+ { "unicode", "integer" },
+ { "name" },
+ { "*" }
+ } },
}
fonts.handlers.otf.features.register {
diff --git a/tex/context/base/mkxl/font-tex.mkxl b/tex/context/base/mkxl/font-tex.mkxl
index 957b28916..ae936be31 100644
--- a/tex/context/base/mkxl/font-tex.mkxl
+++ b/tex/context/base/mkxl/font-tex.mkxl
@@ -116,5 +116,6 @@
\permanent\protected\def\makeglyphbox#1%
{\begingroup
\global\setbox\glyphbox\hbox{\directsetup{#1}}%
+ \finalizeobjectbox\glyphbox
% \writestatus{glyphbox}{#1 => (\the\wd\glyphbox,\the\ht\glyphbox,\the\dp\glyphbox)}%
\endgroup}
diff --git a/tex/context/base/mkxl/font-tra.mkxl b/tex/context/base/mkxl/font-tra.mkxl
index b24eab865..1452244af 100644
--- a/tex/context/base/mkxl/font-tra.mkxl
+++ b/tex/context/base/mkxl/font-tra.mkxl
@@ -31,19 +31,18 @@
%D
%D The implementation is rather straightforward in using \type {\halign}.
-\fetchruntimecommand \showbodyfont \f!font_run
+\fetchmodulecommand \showbodyfont \f!font_run
%D \macros
-%D {showfontstrip, testminimalbaseline, showminimalbaseline}
+%D {showfontstrip, showminimalbaseline}
%D
%D The next command can come in handy when combining different fonts into a
%D collection (typeface) and determining optimal baseline distances.
%D
%D \showfontstrip \blank \showminimalbaseline
-\fetchruntimecommand \showfontstrip \f!font_run
-\fetchruntimecommand \testminimalbaseline \f!font_run
-\fetchruntimecommand \showminimalbaseline \f!font_run
+\fetchmodulecommand \showfontstrip \f!font_run
+\fetchmodulecommand \showminimalbaseline \f!font_run
%D \macros
%D {showkerning}
@@ -52,7 +51,7 @@
%D
%D \showkerning{Can you guess what kerning is?}
-\fetchruntimecommand \showkerning \f!font_run
+\fetchmodulecommand \showkerning \f!s_fonts_show
%D \macros
%D {showbodyfontenvironment,showfont,showfontstyle,showligatures}
@@ -65,7 +64,7 @@
%D
%D \showsetup{showbodyfontenvironment}
-\fetchruntimecommand \showbodyfontenvironment \f!font_run
+\fetchmodulecommand \showbodyfontenvironment \f!font_run
%D The following command generates a fontmap:
%D
@@ -76,12 +75,12 @@
%D \typebuffer
%D \getbuffer
-\fetchruntimecommand \showfont \f!font_run
-\fetchruntimecommand \showfontstyle \f!font_run
-\fetchruntimecommand \showligature \f!font_run
-\fetchruntimecommand \showligatures \f!font_run
-\fetchruntimecommand \showcharratio \f!font_run
-\fetchruntimecommand \showfontparameters \f!font_run
+\fetchmodulecommand \showfont \f!font_run
+\fetchmodulecommand \showfontstyle \f!font_run
+\fetchmodulecommand \showligature \f!font_run
+\fetchmodulecommand \showligatures \f!font_run
+\fetchmodulecommand \showcharratio \f!font_run
+\fetchmodulecommand \showfontparameters \f!font_run
\permanent\protected\def\showchardata#1{\ctxcommand{showchardata("#1")}} % todo: direct implementor
\permanent\protected\def\showfontdata {\ctxcommand{showfontparameters()}} % todo: direct implementor
@@ -98,237 +97,13 @@
\aliased\let\doiffontpresentelse\doifelsefontpresent
-% experimental, maybe this becomes a module
+%D The otf tracer code is now moved. If the individual commands are needed
+%D one can just load the module.
-\newbox\otfcollector
-
-\permanent\protected\def\startotfcollecting{\ctxlua{nodes.tracers.steppers.start()}}
-\permanent\protected\def\stopotfcollecting {\ctxlua{nodes.tracers.steppers.stop()}}
-\permanent\protected\def\resetotfcollecting{\ctxlua{nodes.tracers.steppers.reset()}}
-
-% \page \showotfcomposition{arabtype*arab-default at 48pt}{-1}{الضَّرَّ} \page
-% \page \showotfcomposition{arabtype*arab-default at 48pt}{-1}{لِلّٰهِ} \page
-
-\permanent\protected\def\showotfstepglyphs#1%
- {\ctxlua{nodes.tracers.steppers.glyphs(\number\otfcollector,#1)}%
- \unhbox\otfcollector}
-
-\permanent\protected\def\otfstepspace
- {\removeunwantedspaces
- \hskip.5\emwidth \s!plus .125\emwidth \s!minus .125\emwidth\relax}
-
-\permanent\protected\def\otfstepcharcommand#1#2#3% font char class
- {\otfstepspace
- \doif{#3}{mark}{\underbar}{U+\hexnumber{#2}}:%
- \setbox\scratchbox\hbox{\ctxlua{nodes.tracers.fontchar(#1,#2)}}%
- \ifzeropt\wd\scratchbox
- \scratchwidth.125\onepoint
- \scratchdistance\dimexpr(\emwidth/2-\scratchwidth)\relax
- \kern\scratchdistance
- \ruledhbox to \scratchwidth{\hss\box\scratchbox\hss}%
- \kern-\scratchwidth
- \hskip\scratchdistance
- \else
- \ruledhbox{\box\scratchbox}%
- \fi
- \otfstepspace}
-
-\permanent\protected\def\otfstepfontcommand#1#2#3% id font size
- {\begingroup
- \tttf #1: #2 @ \the\dimexpr#3\scaledpoint\relax
- \endgroup}
-
-\permanent\protected\def\otfstepmessagecommand#1#2%
- {\begingroup
- \tttf\language\minusone
- \veryraggedright
- \forgetparindent
- \forgeteverypar
- \hangindent\emwidth
- \hangafter\plusone
- \dontleavehmode\detokenize{#1}\removeunwantedspaces
- \doifsomething{#2}{,\space\detokenize{#2}}\endgraf
- \endgroup
- \blank}
-
-\permanent\protected\def\showotfstepfont
- {\ctxlua{nodes.tracers.steppers.font("otfstepfontcommand")}}
-
-\permanent\protected\def\showotfstepchars#1%
- {\ctxlua{nodes.tracers.steppers.codes(#1,"otfstepcharcommand","otfstepspace")}}
-
-\permanent\protected\def\showotfstepmessages#1%
- {\ctxlua{nodes.tracers.steppers.messages(#1,"otfstepmessagecommand",true)}}
-
-\permanent\protected\def\showotfstepfeatures
- {\ctxlua{nodes.tracers.steppers.features()}}
-
-\permanent\protected\def\otfnoffeaturesteps
- {\ctxlua{nodes.tracers.steppers.nofsteps()}}
-
-\newconstant\showotfstepsmode \showotfstepsmode\plusfour
-
-\protected\def\showotfsteps_n
- {\blank
- \begingroup
- \advance\leftskip6\emwidth
- \showotfstepmessages\recurselevel
- \par
- \endgroup
- \blank
- \dontleavehmode
- \hbox to \hsize \bgroup
- \hbox to 6\emwidth \bgroup
- \bf
- \ifnum\recurselevel=\scratchcounter result\else step \recurselevel\fi
- \hss
- \egroup
- \vtop \bgroup
- \hsize\dimexpr\hsize-6\emwidth\relax
- \resetallattributes
- \lefttoright
- \dontleavehmode
- \ifnum\recurselevel=\scratchcounter
- \ruledhbox{\box\otfcompositionbox}%
- \else
- \ruledhbox{\showotfstepglyphs\recurselevel}%
- \fi
- \quad
- \showotfstepchars\recurselevel
- \hfill
- \par
- \egroup
- \egroup
- \blank}
-
-\permanent\protected\def\showotfsteps
- {\begingroup
- \veryraggedright
- \forgetparindent
- \forgeteverypar
- \tt
- \lefttoright
- \hbox to \hsize \bgroup
- \hbox to 6\emwidth{\bf font\hss}%
- \vtop \bgroup
- \hsize\dimexpr\hsize-6\emwidth\relax
- \language\minusone
- \bf
- \showotfstepfont
- \egroup
- \egroup
- \blank
- \hbox to \hsize \bgroup
- \hbox to 6\emwidth{\bf features\hss}%
- \vtop \bgroup
- \hsize\dimexpr\hsize-6\emwidth\relax
- \language\minusone
- \showotfstepfeatures
- \egroup
- \egroup
- \blank
- \scratchcounter\otfnoffeaturesteps\relax
- \dorecurse\scratchcounter
- {\ifcase\showotfstepsmode
- \or % 1 = only first
- \ifnum\recurselevel=\plusone
- \showotfsteps_n
- \fi
- \or % 2 = only last
- \ifnum\recurselevel=\scratchcounter
- \showotfsteps_n
- \fi
- \or % 3 = first and last
- \ifnum\recurselevel=\plusone
- \showotfsteps_n
- \orelse\ifnum\recurselevel=\scratchcounter
- \showotfsteps_n
- \fi
- \else % everything
- \showotfsteps_n
- \fi}%
- \endgroup}
-
-\permanent\protected\def\startotfsample
- {\enabletrackers[otf.sample.silent]% beware, kind of global
- \startotfcollecting
- \begingroup
- \veryraggedright
- \forgetparindent
- \forgeteverypar}
-
-\permanent\protected\def\stopotfsample
- {\endgroup
- \stopotfcollecting
- \disabletrackers[otf.sample]% beware, kind of global: otf.sample
- \showotfsteps
- \resetotfcollecting}
-
-\newbox\otfcompositionbox
-
-% this should go in spac-ali:
-
-\installcorenamespace{otfcompositiondir}
-
-\letvalue{\??otfcompositiondir -1}\righttoleft
-\letvalue{\??otfcompositiondir r2l}\righttoleft
-\letvalue{\??otfcompositiondir l2r}\lefttoright
-\letvalue{\??otfcompositiondir +1}\lefttoright
-\letvalue{\??otfcompositiondir 1}\lefttoright
-
-\permanent\protected\def\setotfcompositiondirection#1%
- {\begincsname\??otfcompositiondir#1\endcsname}
-
-\permanent\protected\def\showotfcomposition#1#2#3% {font*features at size}, rl=-1, text
- {\begingroup
- \forgetparindent
- \forgeteverypar
- % \setupcolors[\c!state=\v!start]%
- \setupalign[\v!verytolerant,\v!flushleft]%
- \startotfsample
- \nohyphens
- \global\setbox\otfcompositionbox\hbox{\definedfont[#1]\relax\setotfcompositiondirection{#2}\relax#3}%
- \stopotfsample
- \endgroup}
-
-%D \startbuffer
-%D \startotfcompositionlist{Serif*default @ 11pt}{l2r}%
-%D \showotfcompositionsample{effe}
-%D \stopotfcompositionlist
-%D \stopbuffer
-%D
-%D \typebuffer \getbuffer
-
-\permanent\protected\def\showotfcompositionlist#1#2#3%
- {\begingroup
- \definedfont[#1]%
- \setbox\scratchbox\hbox\bgroup
- \setotfcompositiondirection{#2}%
- #3%
- \egroup
- \strut
- \def|##1|{\kern\onepoint\string|\kern\onepoint##1\kern\onepoint\string|\kern\onepoint}%
- \cldcontext{nodes.listtoutf(tex.box[\number\scratchbox].list,"{\\kern\\onepoint}",true)}%
- \endgroup}
-
-\aliased\let\showotfcompositionsample\gobbleoneargument
-
-\permanent\protected\def\startotfcompositionlist#1#2#3\stopotfcompositionlist
- {\begingroup
- \enforced\protected\def\showotfcompositionsample##1%
- {\NC\type{##1}%
- \NC\showotfcompositionlist{Mono}{#2}{##1}%
- \NC\showotfcompositionlist{#1}{#2}{##1}%
- \NC\definedfont[#1]##1%
- \NC\NR}%
- \starttabulate[|||||]%
- #3%
- \stoptabulate
- \endgroup}
-
-\aliased\let\stopotfcompositionlist\relax
-
-% new
+\fetchmodulecommand \showotfcomposition \f!font_run
+\fetchmodulecommand \showotfcompositionlist \f!font_run
+\fetchmodulecommand \startotfsample \f!font_run
+\fetchmodulecommand \startotfcompositionlist \f!font_run
% \permanent\protected\def\savefontdata[#1]% not yet in i-*.xml
% {\begingroup
diff --git a/tex/context/base/mkxl/lpdf-emb.lmt b/tex/context/base/mkxl/lpdf-emb.lmt
index a4fcb1b6b..5517d8051 100644
--- a/tex/context/base/mkxl/lpdf-emb.lmt
+++ b/tex/context/base/mkxl/lpdf-emb.lmt
@@ -1504,7 +1504,7 @@ do
local f_stream = formatters["%.6N 0 d0 %s"]
local f_stream_c = formatters["%.6N 0 0 0 0 0 d1 %s"]
local f_stream_d = formatters["%.6N 0 d0 1 0 0 1 0 %.6N cm %s"]
- local f_stream_s = formatters["%N 0 0 %N 0 0 cm /%s Do"]
+ -- local f_stream_s = formatters["%.6N 0 0 %.6N 0 0 cm /%s Do"]
-- A type 3 font has at most 256 characters and Acrobat also wants a zero slot
-- to be filled. We can share a mandate zero slot character. We also need to
@@ -1546,11 +1546,11 @@ do
local used = setmetatableindex("table")
- function lpdf.registerfontmethod(name,f)
- if f and not methods[name] then
- methods[name] = f
- end
- end
+ -- function lpdf.registerfontmethod(name,f)
+ -- if f and not methods[name] then
+ -- methods[name] = f
+ -- end
+ -- end
function methods.pdf(filename,details)
local properties = details.properties
@@ -1614,7 +1614,7 @@ do
-- box inclusion (todo: we can share identical glyphs if needed but the gain
-- is minimal especially when we use compact font mode)
- lpdf.registerfontmethod("box",function(filename,details)
+ function methods.box(filename,details)
local properties = details.properties
local boxes = properties.indexdata[1]
local xforms = pdfdictionary()
@@ -1625,8 +1625,9 @@ do
nofglyphs = nofglyphs + 1
local scale = units / scale -- e.g. 1000 / 12
local width = (data.width or 0) * bpfactor * scale
+ local depth = - (data.depth or 0) * bpfactor * scale
local name = f_glyph(nofglyphs)
- local stream = f_stream_s(scale,scale,name)
+ local stream = f_image_c_xy(scale,scale,0,depth,name)
image.embedded_name = name
image.embedded_stream = stream
image.embedded_reference = pdfreference(image.objnum)
@@ -1639,7 +1640,7 @@ do
return pdfdictionary { XObject = xforms }
end
return boxes, 1/units, boxtopdf, wrapup, getresources
- end)
+ end
-- mps inclusion
diff --git a/tex/context/base/mkxl/lpdf-lmt.lmt b/tex/context/base/mkxl/lpdf-lmt.lmt
index a0c730b71..fbc002a93 100644
--- a/tex/context/base/mkxl/lpdf-lmt.lmt
+++ b/tex/context/base/mkxl/lpdf-lmt.lmt
@@ -416,23 +416,54 @@ do
local hshift = false
local vshift = false
+ -- local naturalwidths = setmetatableindex(function(t,font)
+ -- local d = descriptions[font]
+ -- local c = characters[font]
+ -- local f = parameters[font].hfactor or parameters[font].factor
+ -- local v = setmetatableindex(function(t,char)
+ -- local w
+ -- local e = d and d[char]
+ -- if e then
+ -- w = e.width
+ -- if w then
+ -- w = w * f
+ -- end
+ -- end
+ -- if not w then
+ -- e = c and c[char]
+ -- if e then
+ -- w = e.width or 0
+ -- end
+ -- end
+ -- if not w then
+ -- w = 0
+ -- end
+ -- t[char] = w
+ -- return w
+ -- end)
+ -- t[font] = v
+ -- return v
+ -- end)
+
+ -- when changing this, check math: compact-001.tex (rule width)
+
local naturalwidths = setmetatableindex(function(t,font)
local d = descriptions[font]
local c = characters[font]
local f = parameters[font].hfactor or parameters[font].factor
local v = setmetatableindex(function(t,char)
local w
- local e = d and d[char]
+ local e = c and c[char]
if e then
- w = e.width
- if w then
- w = w * f
- end
+ w = e.width or 0
end
if not w then
- e = c[char]
+ e = d and d[char]
if e then
- w = e.width or 0
+ w = e.width
+ if w then
+ w = w * f
+ end
end
end
if not w then
diff --git a/tex/context/base/mkxl/luat-ini.mkxl b/tex/context/base/mkxl/luat-ini.mkxl
index 472e8326e..4373131e1 100644
--- a/tex/context/base/mkxl/luat-ini.mkxl
+++ b/tex/context/base/mkxl/luat-ini.mkxl
@@ -30,8 +30,8 @@
\aliased\let\stoplua \relax % tex catcodes
\aliased\let\stopluacode\relax % lua catcodes
-%D It might makes sense to have a \type {\directelua} so that we can avoid the \type
-%D {\normalexpanded} around \type {\directlua}. Something to discuss in the team.
+%D In the meantime the \LUATEX\ interface has become stable but we still
+%D see traces of old here (needs checking).
\permanent\protected\def\startlua % \stoplua
{\begingroup
@@ -39,7 +39,7 @@
\luat_start_lua_indeed}
\def\luat_start_lua_indeed#1\stoplua
- {\normalexpanded{\endgroup\noexpand\directlua{#1}}} % \zerocount is default
+ {\normalexpanded{\endgroup\noexpand\directlua{#1}}}
\permanent\protected\def\startluacode % \stopluacode
{\begingroup
@@ -48,7 +48,8 @@
\luat_start_lua_code_indeed}
\def\luat_start_lua_code_indeed#1\stopluacode
- {\normalexpanded{\endgroup\noexpand\directlua{#1}}} % \zerocount is default
+ %{\normalexpanded{\endgroup\noexpand\directlua{#1}}}
+ {\directlua{#1\beginlocalcontrol\endgroup\endlocalcontrol}}
%D Some delayed definitions:
@@ -57,12 +58,16 @@
\ifdefined\obeyspaces \else \let\obeyspaces \relax \fi
\ifdefined\obeyedspace \else \let\obeyedspace \relax \fi
-\let\obeylualines\relax
+\aliased\let\obeylualines\relax % not used, will go away
\newtoks\everyluacode
%D It is nicer for checking with \type {s-system-macros} if we have some meaning:
+\pushoverloadmode
+ \let\-\explicitdiscretionary
+\popoverloadmode
+
\ifdefined\n \else \def\n{n} \fi \ifdefined\r \else \def\r{r} \fi
\ifdefined\f \else \def\f{f} \fi \ifdefined\t \else \def\t{t} \fi
\ifdefined\a \else \def\a{a} \fi \ifdefined\b \else \def\b{b} \fi
@@ -91,10 +96,6 @@
\immutable\edef\lua_letter_seven {\string\7} \immutable\edef\lua_letter_eight {\string\8}
\immutable\edef\lua_letter_nine {\string\9} \immutable\edef\lua_letter_zero {\string\0}
-\pushoverloadmode
- \let\-\explicitdiscretionary
-\popoverloadmode
-
\everyluacode {% \appendtoks
\enforced\let\\\lua_letter_backslash
\enforced\let\|\lua_letter_bar \enforced\let\-\lua_letter_dash
@@ -127,9 +128,9 @@
%D \ctxlua {something([\luastringsep[anything tricky can go here]\luastringsep])}
%D \stoptyping
-\def\luastringsep{===} % this permits \typefile{self} otherwise nested b/e sep problems
+\def\luastringsep{===} % this permits \typefile{self} otherwise nested b/e sep problems
-\edef\!!bs{[\luastringsep[}
+\edef\!!bs{[\luastringsep[} % later redefined as mutable
\edef\!!es{]\luastringsep]}
%D We have a the following available as primitive so there is no need for it:
diff --git a/tex/context/base/mkxl/math-ini.mkxl b/tex/context/base/mkxl/math-ini.mkxl
index 01ecd63a2..b568ef126 100644
--- a/tex/context/base/mkxl/math-ini.mkxl
+++ b/tex/context/base/mkxl/math-ini.mkxl
@@ -704,9 +704,15 @@
\chardef\c_math_strut"28
-\protected\def\math_strut_htdp#1%
- {\s!height\fontcharht#1\c_math_strut
- \s!depth \fontchardp#1\c_math_strut}
+% \protected\def\math_strut_htdp#1%
+% {\s!height\fontcharht#1\c_math_strut
+% \s!depth \fontchardp#1\c_math_strut}
+%
+% now we need this (kind of inefficient):
+
+\protected\def\math_strut_htdp#1% nasty!
+ {\s!height\dimexpr\mathscale#1\fontcharht#1\c_math_strut/\glyphscale\relax
+ \s!depth \dimexpr\mathscale#1\fontchardp#1\c_math_strut/\glyphscale\relax}
\protected\def\math_strut_normal
{\vrule
@@ -2675,7 +2681,7 @@
\scratchdepth \dimexpr\scratchbottomoffset+\m_math_inline_openup_dp\relax
\vrule\s!width\zeropoint\s!height\scratchheight\s!depth\scratchdepth\relax
\begingroup
- \dofastcoloractivation{darkred}%
+ \dousecolorparameter{darkred}%
\vrule\s!width\emwidth\s!height\scratchheight\s!depth-\scratchtopoffset\relax
\endgroup
\kern-\emwidth
@@ -2686,7 +2692,7 @@
{\endgroup
\kern-\emwidth
\begingroup
- \dofastcoloractivation{darkblue}%
+ \dousecolorparameter{darkblue}%
\vrule\s!width\emwidth\s!height-\scratchbottomoffset\s!depth\scratchdepth\relax
\endgroup
\vrule\s!width\zeropoint\s!height\scratchheight\s!depth\scratchdepth\relax}
diff --git a/tex/context/base/mkxl/meta-ini.mkxl b/tex/context/base/mkxl/meta-ini.mkxl
index d9b8eeff8..9d32e2dbf 100644
--- a/tex/context/base/mkxl/meta-ini.mkxl
+++ b/tex/context/base/mkxl/meta-ini.mkxl
@@ -754,6 +754,8 @@
\protected\def\meta_start_reusable_graphic_indeed#1#2#3\stopreusableMPgraphic
{\gdefcsname\??mpgraphic#1\endcsname{\meta_handle_reusable_graphic{#1}{#2}{#3}}}
+\mutable\let\usedMPgraphicname\empty
+
\permanent\tolerant\protected\def\useMPgraphic#=#*#=%
{\meta_begin_graphic_group{#1}%
\ifcsname\??mpgraphic#1\endcsname
diff --git a/tex/context/base/mkxl/mult-sys.mkxl b/tex/context/base/mkxl/mult-sys.mkxl
index 38355f4cb..efd39a4a5 100644
--- a/tex/context/base/mkxl/mult-sys.mkxl
+++ b/tex/context/base/mkxl/mult-sys.mkxl
@@ -566,11 +566,11 @@
%D The setup files for the language, font, color and special subsystems have a common
%D prefix. This means that we have at most three characters for unique filenames.
-\definefileconstant {colo_run} {colo-run}
-\definefileconstant {font_run} {font-run}
-\definefileconstant {page_run} {page-run}
-\definefileconstant {symb_run} {symb-run}
-\definefileconstant {publ_tra} {publ-tra}
+\definefileconstant {colo_run} {s-colors-run}
+\definefileconstant {font_run} {s-fonts-show}
+\definefileconstant {page_run} {s-layout-show}
+\definefileconstant {symb_run} {s-symbols-show}
+\definefileconstant {publ_tra} {s-publications-show}
%D For figure inclusion we need(ed):
diff --git a/tex/context/base/mkxl/page-box.mklx b/tex/context/base/mkxl/page-box.mklx
index 9b6868b04..b34de6de0 100644
--- a/tex/context/base/mkxl/page-box.mklx
+++ b/tex/context/base/mkxl/page-box.mklx
@@ -110,8 +110,8 @@
\def\page_boxes_apply_orientate_indeed#odd#even#box%
{\setbox#box\vpack
- {\edef\somerotation{\number\ifdoublesided\ifodd\realpageno#odd\else#even\fi\else#odd\fi}%
- \dorotatebox\somerotation\hpack{\box#box}}}
+ {\edef\p_rotation{\number\ifdoublesided\ifodd\realpageno#odd\else#even\fi\else#odd\fi}%
+ \dorotatebox\p_rotation\hpack{\box#box}}}
\def\page_boxes_apply_mirror#box%
{\setbox#box\vpack{\mirror{\box#box}}}
diff --git a/tex/context/base/mkxl/page-lay.mkxl b/tex/context/base/mkxl/page-lay.mkxl
index dbdcfc323..29698cb67 100644
--- a/tex/context/base/mkxl/page-lay.mkxl
+++ b/tex/context/base/mkxl/page-lay.mkxl
@@ -1320,12 +1320,12 @@
%D %showsetup{showgrid}
%D %showsetup{showusage}
-\fetchruntimecommand \showprint \f!page_run
-\fetchruntimecommand \showframe \f!page_run
-\fetchruntimecommand \showlayout \f!page_run
-\fetchruntimecommand \showsetups \f!page_run
-\fetchruntimecommand \showmargins \f!page_run
-\fetchruntimecommand \showgrid \f!page_run
+\fetchmodulecommand \showprint \f!page_run
+\fetchmodulecommand \showframe \f!page_run
+\fetchmodulecommand \showlayout \f!page_run
+\fetchmodulecommand \showsetups \f!page_run
+\fetchmodulecommand \showmargins \f!page_run
+\fetchmodulecommand \showgrid \f!page_run
\glet\page_grids_add_to_box\gobbleoneargument
\glet\page_grids_add_to_one\gobbleoneargument
diff --git a/tex/context/base/mkxl/page-otr.lmt b/tex/context/base/mkxl/page-otr.lmt
new file mode 100644
index 000000000..5c0bc96a9
--- /dev/null
+++ b/tex/context/base/mkxl/page-otr.lmt
@@ -0,0 +1,14 @@
+if not modules then modules = { } end modules ['page-otr'] = {
+ version = 1.001,
+ comment = "companion to page-otr.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+interfaces.implement {
+ name = "triggerpagebuilder",
+ public = true,
+ protected = true,
+ actions = tex.triggerbuildpage,
+}
diff --git a/tex/context/base/mkxl/page-otr.mklx b/tex/context/base/mkxl/page-otr.mklx
index e93590bf6..2cc8f4809 100644
--- a/tex/context/base/mkxl/page-otr.mklx
+++ b/tex/context/base/mkxl/page-otr.mklx
@@ -19,11 +19,11 @@
% When issuing two \par\penalty-\plustenthousand's, only the first triggers the
% otr. Is this an obscure feature or an optimization?
-\registerctxluafile{page-otr}{}
+\registerctxluafile{page-otr}{autosuffix}
\unprotect
-\let\triggerpagebuilder\clf_triggerpagebuilder
+% triggerpagebuilder % defined at the lua end
\def\m!otr{otr} % todo
diff --git a/tex/context/base/mkxl/publ-ini.mkxl b/tex/context/base/mkxl/publ-ini.mkxl
index c2d421e4c..b550fef39 100644
--- a/tex/context/base/mkxl/publ-ini.mkxl
+++ b/tex/context/base/mkxl/publ-ini.mkxl
@@ -56,6 +56,7 @@
\registerctxluafile{publ-fnd}{} % new method (for the moment only local)
\registerctxluafile{publ-jrn}{}
\registerctxluafile{publ-reg}{}
+\registerctxluafile{publ-tra}{} % has more general helpers too
\unprotect
@@ -2009,12 +2010,12 @@
%D Delayed loading:
-\fetchruntimecommand \showbtxdatasetfields \f!publ_tra
-\fetchruntimecommand \showbtxdatasetcompleteness \f!publ_tra
-\fetchruntimecommand \showbtxdatasetauthors \f!publ_tra
-\fetchruntimecommand \showbtxhashedauthors \f!publ_tra
-\fetchruntimecommand \showbtxfields \f!publ_tra
-\fetchruntimecommand \showbtxtables \f!publ_tra
+\fetchmodulecommand \showbtxdatasetfields \f!publ_tra
+\fetchmodulecommand \showbtxdatasetcompleteness \f!publ_tra
+\fetchmodulecommand \showbtxdatasetauthors \f!publ_tra
+\fetchmodulecommand \showbtxhashedauthors \f!publ_tra
+\fetchmodulecommand \showbtxfields \f!publ_tra
+\fetchmodulecommand \showbtxtables \f!publ_tra
%D Some potential crap:
%D
diff --git a/tex/context/base/mkxl/publ-tra.mkxl b/tex/context/base/mkxl/publ-tra.mkxl
deleted file mode 100644
index ccad4c22a..000000000
--- a/tex/context/base/mkxl/publ-tra.mkxl
+++ /dev/null
@@ -1,84 +0,0 @@
-%D \module
-%D [ file=publ-tra,
-%D version=2013.12.24,
-%D title=\CONTEXT\ Publication Support,
-%D subtitle=Tracing,
-%D author=Hans Hagen,
-%D date=\currentdate,
-%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
-%C
-%C This module is part of the \CONTEXT\ macro||package and is
-%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
-%C details.
-
-% todo: make this a runtime module
-% todo: use the module interface
-
-\writestatus{loading}{ConTeXt Publication Support / Tracing}
-
-\registerctxluafile{publ-tra}{}
-
-\unprotect
-
-\permanent\protected\gdef\showbtxdatasetfields {\publ_show_dataset_whatever{showbtxdatasetfields}}
-\permanent\protected\gdef\showbtxdatasetcompleteness{\publ_show_dataset_whatever{showbtxdatasetcompleteness}}
-\permanent\protected\gdef\showbtxdatasetauthors {\publ_show_dataset_whatever{showbtxdatasetauthors}}
-
-\tolerant\gdef\publ_show_dataset_whatever#1[#2]%
- {\begingroup
- \letdummyparameter\c!specification\currentbtxspecification
- \setdummyparameter\c!dataset {\currentbtxdataset}%
- \letdummyparameter\c!field \empty
- \ifparameter#2\or
- \ifhastok={#2}%
- \getdummyparameters[#2]%
- \else
- \setdummyparameter\c!dataset{#2}%
- \fi
- \fi
- \ctxcommand{#1{
- dataset = "\dummyparameter\c!dataset",
- specification = "\dummyparameter\c!specification",
- field = "\dummyparameter\c!field",
- }}%
- \endgroup}
-
-\permanent\tolerant\protected\gdef\showbtxfields[#1]%
- {\begingroup
- \setdummyparameter\c!rotation{90}%
- \ifparameter#1\or
- \ifhastok={#1}%
- \letdummyparameter\c!specification\currentbtxspecification
- \getdummyparameters[#1]%
- \else
- \setdummyparameter\c!specification{#1}%
- \fi
- \else
- \letdummyparameter\c!specification\currentbtxspecification
- \fi
- \ctxcommand{showbtxfields{
- rotation = "\dummyparameter\c!rotation",
- specification = "\dummyparameter\c!specification"
- }}%
- \endgroup}
-
-\permanent\tolerant\protected\gdef\showbtxtables[#1]%
- {\begingroup
- \ctxcommand{showbtxtables{}}%
- \endgroup}
-
-\permanent\tolerant\protected\gdef\showbtxhashedauthors[#1]%
- {\ctxcommand{showbtxhashedauthors{}}}
-
-\protect
-
-\continueifinputfile{publ-tra.mkiv}
-
-\starttext
-
- \showbtxfields[rotation=85] \page
- \showbtxfields[rotation=90] \page
-
- \showbtxtables \page
-
-\stoptext
diff --git a/tex/context/base/mkxl/spac-hor.mkxl b/tex/context/base/mkxl/spac-hor.mkxl
index 13d1f9021..1e7781026 100644
--- a/tex/context/base/mkxl/spac-hor.mkxl
+++ b/tex/context/base/mkxl/spac-hor.mkxl
@@ -105,7 +105,7 @@
% case two
\else
\edef\v_spac_indentation_current{#1}% single entry in list
- \let\normalindentation\v_spac_indentation_current
+ \let\v_spac_indentation_normal\v_spac_indentation_current
\spac_indentation_setup_size
\fi}
@@ -143,8 +143,8 @@
\installindentingmethod \v!odd {\c_spac_indentation_toggle_state\plusone}
\installindentingmethod \v!even {\c_spac_indentation_toggle_state\plustwo}
-\installindentingmethod \v!normal{\ifempty\normalindentation\else
- \let\v_spac_indentation_current\normalindentation
+\installindentingmethod \v!normal{\ifempty\v_spac_indentation_normal\else
+ \let\v_spac_indentation_current\v_spac_indentation_normal
\spac_indentation_setup_size
\fi}
@@ -1192,14 +1192,14 @@
\newsignal\d_spac_ignore_spaces_signal
\newcount \c_spac_ignore_spaces
-\protected\def\startignorespaces
+\permanent\protected\def\startignorespaces
{\advance\c_spac_ignore_spaces\plusone
\ifcase\c_spac_ignore_spaces\or \ifhmode
\hskip\d_spac_ignore_spaces_signal
\fi \fi
\ignorespaces}
-\protected\def\stopignorespaces
+\permanent\protected\def\stopignorespaces
{\ifcase\c_spac_ignore_spaces \or
\ifhmode
\doloop\spac_ignore_spaces_body
diff --git a/tex/context/base/mkxl/strc-con.mklx b/tex/context/base/mkxl/strc-con.mklx
index d64be35f0..db1b84654 100644
--- a/tex/context/base/mkxl/strc-con.mklx
+++ b/tex/context/base/mkxl/strc-con.mklx
@@ -979,8 +979,8 @@
\installcorenamespace{constructionclosesymbol}
-\let\placeclosesymbol\donothing
-\let\qed \donothing
+\mutable\let\placeclosesymbol\donothing
+\mutable\let\qed \donothing
\def\strc_constructions_close_symbol_reset % no need for global
{\global\expandafter\settrue\csname\??constructionclosesymbol\currentconstruction\endcsname
diff --git a/tex/context/base/mkxl/strc-itm.mklx b/tex/context/base/mkxl/strc-itm.mklx
index 01155fa10..be663edc8 100644
--- a/tex/context/base/mkxl/strc-itm.mklx
+++ b/tex/context/base/mkxl/strc-itm.mklx
@@ -1588,7 +1588,7 @@
\ifdefined\noitem \else \aliased\let\noitem \relax \fi
\ifdefined\itm \else \aliased\let\itm \relax \fi
\ifdefined\but \else \aliased\let\but \relax \fi
-\ifdefined\nop \else \aliased\let\nop \relax \fi
+\ifdefined\nop \else \let\nop \relax \fi % used often by myself
\ifdefined\txt \else \aliased\let\txt \relax \fi
\ifdefined\head \else \let\head \relax \fi % defined later
\ifdefined\headsym \else \aliased\let\headsym \relax \fi
diff --git a/tex/context/base/mkxl/strc-sec.mkxl b/tex/context/base/mkxl/strc-sec.mkxl
index acc7e494e..0ede2f153 100644
--- a/tex/context/base/mkxl/strc-sec.mkxl
+++ b/tex/context/base/mkxl/strc-sec.mkxl
@@ -522,16 +522,16 @@
% structure sections (the parents of chapter etc)
-\let\firstsectionname\empty
-\let\lastsectionname \empty
+\permanent\let\firstsectionname\empty
+\permanent\let\lastsectionname \empty
-\let\resetallstructuremarks \relax
-\let\resetcurrentstructuremarks \relax
-\let\resetcurrentstructuremarkswithpage\relax
+%aliased\let\resetallstructuremarks \relax
+%aliased\let\resetcurrentstructuremarks \relax
+\aliased\let\resetcurrentstructuremarkswithpage\relax
-\def\resetallstructuremarks {\resetmarking[\firstsectionname]} % will become option (was \v!section-1)
-\def\resetcurrentstructuremarks {\resetmarking[\lastsectionname]} % will become option
-%def\resetcurrentstructuremarkswithpage{\resetmarking[\lastsectionname]} % will become option
+\permanent\protected\def\resetallstructuremarks {\resetmarking[\firstsectionname]} % will become option (was \v!section-1)
+\permanent\protected\def\resetcurrentstructuremarks {\resetmarking[\lastsectionname]} % will become option
+%permanent\protected\def\resetcurrentstructuremarkswithpage{\resetmarking[\lastsectionname]} % will become option
% We could use a commandhandler here but sections are somewhat special in the
% sense that we have two ways of chaining: the main section (levels) as well
@@ -582,9 +582,9 @@
\ifnum\maxstructuredepth>\plusone
\normalexpanded{\relatemarking[#1][\lastsectionname]}% so, the parent will reset the child
\fi
- \xdef\lastsectionname{#1}%
+ \enforced\xdef\lastsectionname{#1}%
\ifempty\firstsectionname
- \glet\firstsectionname\lastsectionname
+ \enforced\glet\firstsectionname\lastsectionname
\fi
\fi}
@@ -1304,8 +1304,8 @@
% list references, will be redone in lua when we need it
-\let\startlistreferences\relax
-\let\stoplistreferences \relax
+% \let\startlistreferences\relax
+% \let\stoplistreferences \relax
% experimental
diff --git a/tex/context/base/mkxl/symb-ini.mkxl b/tex/context/base/mkxl/symb-ini.mkxl
index 0346e39bb..458e212aa 100644
--- a/tex/context/base/mkxl/symb-ini.mkxl
+++ b/tex/context/base/mkxl/symb-ini.mkxl
@@ -324,7 +324,7 @@
%D
%D \showsetup{showsymbolset}
-\fetchruntimecommand \showsymbolset \f!symb_run
+\fetchmodulecommand \showsymbolset \f!symb_run
%D \macros
%D {usesymbols}
diff --git a/tex/context/base/mkxl/syst-aux.mkxl b/tex/context/base/mkxl/syst-aux.mkxl
index ce6177b3b..c116e9d46 100644
--- a/tex/context/base/mkxl/syst-aux.mkxl
+++ b/tex/context/base/mkxl/syst-aux.mkxl
@@ -87,7 +87,7 @@
\writestatus\m!system{duplicate system namespace '#1'}\wait
\else
\global\advance\c_syst_helpers_n_of_namespaces\plusone
- \edefcsname ??#1\endcsname{\v_interfaces_prefix_template_system}%
+ \immutable\edefcsname ??#1\endcsname{\v_interfaces_prefix_template_system}%
\fi}
%D \macros
diff --git a/tex/context/base/mkxl/syst-ini.mkxl b/tex/context/base/mkxl/syst-ini.mkxl
index 50b61231f..dbd82c166 100644
--- a/tex/context/base/mkxl/syst-ini.mkxl
+++ b/tex/context/base/mkxl/syst-ini.mkxl
@@ -266,18 +266,18 @@
%D The allocators share a common helper macro.
-\protected\permanent\def\newcount {\syst_basics_allocate\c_syst_last_allocated_count \count \countdef \c_syst_max_allocated_register}
-\protected\permanent\def\newdimen {\syst_basics_allocate\c_syst_last_allocated_dimen \dimen \dimendef \c_syst_max_allocated_register}
-\protected\permanent\def\newskip {\syst_basics_allocate\c_syst_last_allocated_skip \skip \skipdef \c_syst_max_allocated_register}
-\protected\permanent\def\newmuskip {\syst_basics_allocate\c_syst_last_allocated_muskip \muskip \muskipdef \c_syst_max_allocated_register}
-\protected\permanent\def\newbox {\syst_basics_allocate\c_syst_last_allocated_box \box \integerdef\c_syst_max_allocated_register}
-\protected\permanent\def\newtoks {\syst_basics_allocate\c_syst_last_allocated_toks \toks \toksdef \c_syst_max_allocated_register}
-\protected\permanent\def\newread {\syst_basics_allocate\c_syst_last_allocated_read \read \integerdef\c_syst_max_allocated_read}
-\protected\permanent\def\newwrite {\syst_basics_allocate\c_syst_last_allocated_write \write \integerdef\c_syst_max_allocated_write}
-\protected\permanent\def\newmarks {\syst_basics_allocate\c_syst_last_allocated_marks \marks \integerdef\c_syst_max_allocated_register}
-\protected\permanent\def\newinsert {\syst_basics_allocate\c_syst_last_allocated_insertion\insert \chardef \c_syst_max_allocated_insert}
-\protected\permanent\def\newlanguage{\syst_basics_allocate\c_syst_last_allocated_language \language\integerdef\c_syst_max_allocated_language} % not needed in context
-\protected\permanent\def\newfamily {\syst_basics_allocate\c_syst_last_allocated_family \fam \integerdef\c_syst_max_allocated_family} % not needed in context
+\permanent\protected\def\newcount {\syst_basics_allocate\c_syst_last_allocated_count \count \countdef \c_syst_max_allocated_register}
+\permanent\protected\def\newdimen {\syst_basics_allocate\c_syst_last_allocated_dimen \dimen \dimendef \c_syst_max_allocated_register}
+\permanent\protected\def\newskip {\syst_basics_allocate\c_syst_last_allocated_skip \skip \skipdef \c_syst_max_allocated_register}
+\permanent\protected\def\newmuskip {\syst_basics_allocate\c_syst_last_allocated_muskip \muskip \muskipdef \c_syst_max_allocated_register}
+\permanent\protected\def\newbox {\syst_basics_allocate\c_syst_last_allocated_box \box \integerdef\c_syst_max_allocated_register}
+\permanent\protected\def\newtoks {\syst_basics_allocate\c_syst_last_allocated_toks \toks \toksdef \c_syst_max_allocated_register}
+\permanent\protected\def\newread {\syst_basics_allocate\c_syst_last_allocated_read \read \integerdef\c_syst_max_allocated_read}
+\permanent\protected\def\newwrite {\syst_basics_allocate\c_syst_last_allocated_write \write \integerdef\c_syst_max_allocated_write}
+\permanent\protected\def\newmarks {\syst_basics_allocate\c_syst_last_allocated_marks \marks \integerdef\c_syst_max_allocated_register}
+\permanent\protected\def\newinsert {\syst_basics_allocate\c_syst_last_allocated_insertion\insert \chardef \c_syst_max_allocated_insert}
+\permanent\protected\def\newlanguage{\syst_basics_allocate\c_syst_last_allocated_language \language\integerdef\c_syst_max_allocated_language} % not needed in context
+\permanent\protected\def\newfamily {\syst_basics_allocate\c_syst_last_allocated_family \fam \integerdef\c_syst_max_allocated_family} % not needed in context
\aliased\let\newfam\newfamily
@@ -286,10 +286,10 @@
% Watch out, for the moment we disable the check for already being defined
% later we will revert this but first all chardefs must be replaced.
-\protected\def\setconstant {}
-\protected\def\setconstantvalue#1#2{\csname#1\endcsname\numexpr#2\relax}
+\permanent\protected\def\setconstant {}
+\permanent\protected\def\setconstantvalue#1#2{\csname#1\endcsname\numexpr#2\relax}
-\protected\def\newconstant#1%
+\permanent\protected\def\newconstant#1%
{\ifrelax#1%
%\writestatus{!!!!!!!!!!}{\string #1 => RELAX}%
\unletfrozen#1%
@@ -300,7 +300,7 @@
\newcount#1%
\fi}
-\protected\def\setnewconstant#1{\newconstant#1#1}
+\permanent\protected\def\setnewconstant#1{\newconstant#1#1}
% %D The next definitions are really needed (in \CONTEXT):
diff --git a/tex/context/base/mkxl/tabl-tbl.mkxl b/tex/context/base/mkxl/tabl-tbl.mkxl
index f29389f15..64a865a2a 100644
--- a/tex/context/base/mkxl/tabl-tbl.mkxl
+++ b/tex/context/base/mkxl/tabl-tbl.mkxl
@@ -224,6 +224,9 @@
\newconstant \c_tabl_tabulate_localcolorspan
\newconstant \c_tabl_tabulate_modus
+%newconditional \c_tabl_pre_is_set
+\newconditional \c_tabl_post_is_set
+
\let \m_tabl_tabulate_separator_factor \empty % fraction
\aliased\let\tabulatesplitlinemode\c_tabl_tabulate_splitlinemode % temp hack, we need an interface
@@ -409,9 +412,9 @@
\fi}
% \protected % we can expand this one
-\def\tabl_tabulate_inject_post_skip#1%
+\def\tabl_tabulate_inject_post_skip#1#2%
{\ifdim#1>\zeropoint
- \kern#1\relax % was \hskip
+ \kern\ifnum\c_tabl_tabulate_columns=\c_tabl_tabulate_nofcolumns#2\else#1\fi\relax
\orelse\ifnum\c_tabl_tabulate_columns=\c_tabl_tabulate_nofcolumns
\ifconditional\c_tabl_tabulate_autorulespacing
\ifcase\c_tabl_tabulate_has_rule_spec_last\else
@@ -478,7 +481,7 @@
\ifempty\m_tabl_tabulate_text_color
\expandafter\gobbleoneargument
\else
- \expandafter\dofastcoloractivation
+ \expandafter\colo_helpers_direct_activate
\fi\m_tabl_tabulate_text_color
\noexpand\fi
% grouping needs to be outside macros (or expandable), nice test
@@ -501,7 +504,9 @@
\egroup
\aligntab
\noexpand\dostoptagged
- \tabl_tabulate_inject_post_skip{\the\dimexpr\s_tabl_tabulate_post}% get rid of plus
+ \tabl_tabulate_inject_post_skip
+ {\the\ifconditional\c_tabl_post_is_set\s_tabl_tabulate_post\else\s_tabl_tabulate_last\fi}%
+ {\the\s_tabl_tabulate_post}%
\alignmark\alignmark
}%
\toksapp\t_tabl_tabulate_dummy{\NC}%
@@ -512,7 +517,9 @@
\s_tabl_tabulate_post\zeropoint
\fi
%\let\gettabulateexit\dogettabulateexit % still needed ?
- \d_tabl_tabulate_width\zeropoint}
+ \d_tabl_tabulate_width\zeropoint
+ %setfalse\c_tabl_pre_is_set
+ \setfalse\c_tabl_post_is_set}
\permanent\protected\def\installtabulatepreambleoption#1#2%
{\defcsname\??tabulatepreamble\string#1\endcsname{#2}}%
@@ -592,17 +599,21 @@
\tabl_tabulate_set_preamble}
\def\tabl_tabulate_set_preskip#1%
- {\doifelsenumber{#1}%
+ {%settrue\c_tabl_pre_is_set
+ \doifelsenumber{#1}%
{\s_tabl_tabulate_pre#1\d_tabl_tabulate_unit\tabl_tabulate_set_preamble }%
{\s_tabl_tabulate_pre.5\d_tabl_tabulate_unit\tabl_tabulate_set_preamble#1}}
\def\tabl_tabulate_set_posskip#1%
- {\doifelsenumber{#1}%
+ {\settrue\c_tabl_post_is_set
+ \doifelsenumber{#1}%
{\s_tabl_tabulate_post#1\d_tabl_tabulate_unit\tabl_tabulate_set_preamble }%
{\s_tabl_tabulate_post.5\d_tabl_tabulate_unit\tabl_tabulate_set_preamble#1}}
\def\tabl_tabulate_set_preposskip#1%
- {\doifelsenumber{#1}%
+ {%settrue\c_tabl_pre_is_set
+ \settrue\c_tabl_post_is_set
+ \doifelsenumber{#1}%
{\s_tabl_tabulate_pre#1\d_tabl_tabulate_unit\s_tabl_tabulate_post\s_tabl_tabulate_pre\tabl_tabulate_set_preamble }%
{\s_tabl_tabulate_pre.5\d_tabl_tabulate_unit\s_tabl_tabulate_post\s_tabl_tabulate_pre\tabl_tabulate_set_preamble#1}}
@@ -773,6 +784,8 @@
\c_tabl_tabulate_modus\zerocount
\setfalse\c_tabl_tabulate_pwidth_set
\setfalse\c_tabl_tabulate_reshape
+ %setfalse\c_tabl_pre_is_set
+ \setfalse\c_tabl_post_is_set
\t_tabl_tabulate_before\emptytoks
\t_tabl_tabulate_after\emptytoks
\t_tabl_tabulate_bmath\emptytoks
@@ -1175,9 +1188,9 @@
\fi
\tabl_tabulate_start_building}
-\letvalue{\e!stop\v!tabulate }\relax
-\letvalue{\e!stop\v!tabulatehead}\relax
-\letvalue{\e!stop\v!tabulatetail}\relax
+\permanent\letcsname\e!stop\v!tabulate \endcsname\relax
+\permanent\letcsname\e!stop\v!tabulatehead\endcsname\relax
+\permanent\letcsname\e!stop\v!tabulatetail\endcsname\relax
\permanent\protected\def\tabl_tabulate_start_ignore % todo when we go frozen
{\em Nested tabulate is not (yet) supported.\relax
@@ -1290,7 +1303,7 @@
\edef\p_line {\tabulationparameter\c!rule}%
\edef\p_rulecolor {\tabulationparameter\c!rulecolor}%
\edef\p_rulethickness{\tabulationparameter\c!rulethickness}%
- \edef\p_bodyfont {\tabulationparameter\c!bodyfont}
+ \edef\p_bodyfont {\tabulationparameter\c!bodyfont}%
\edef\p_indenting {\tabulationparameter\c!indenting}%
\edef\p_keeptogether {\tabulationparameter\c!keeptogether}%
\edef\p_blank {\tabulationparameter\c!blank}%
@@ -1468,7 +1481,7 @@
\tabl_tabulate_column_normal}
\def\tabl_tabulate_column_vruled_step#1%
- {\doifelsenumber{#1}
+ {\doifelsenumber{#1}%
{\global\d_tabl_tabulate_vrulethickness_local#1\d_tabl_tabulate_vrulethickness_default}
{\xdef\m_tabl_tabulate_vrule_color_local{#1}}}
@@ -1572,7 +1585,7 @@
\egroup}
\def\tabl_tabulate_hrule_preset_step#1%
- {\doifelsenumber{#1}
+ {\doifelsenumber{#1}%
{\global\d_tabl_tabulate_hrulethickness_local#1\d_tabl_tabulate_hrulethickness_default}
{\xdef\currenttabulationlocalhrulecolor{#1}}}
@@ -2161,6 +2174,8 @@
\s_tabl_tabulate_last\s_tabl_tabulate_first
\s_tabl_tabulate_pre\zeropoint
\s_tabl_tabulate_post\zeropoint
+ %setfalse\s_tabl_pre_is_set
+ \setfalse\s_tabl_post_is_set
\global\c_tabl_tabulate_columns\zerocount
\global\c_tabl_tabulate_nofauto\zerocount
\global\c_tabl_tabulate_noflines\zerocount
diff --git a/tex/context/base/mkxl/trac-deb.lmt b/tex/context/base/mkxl/trac-deb.lmt
index b9827c3a9..8ff124105 100644
--- a/tex/context/base/mkxl/trac-deb.lmt
+++ b/tex/context/base/mkxl/trac-deb.lmt
@@ -31,7 +31,7 @@ local runlocal = tex.runlocal
local terminaldata = false
local context = context
-interfaces.implement {
+implement {
name = "fetchterminaldata",
actions = function()
context(terminaldata)
@@ -53,7 +53,7 @@ function texio.terminal()
end
end
-interfaces.implement {
+implement {
name = "readfromterminal",
public = true,
protected = true,
@@ -386,8 +386,6 @@ directives.register("system.showerror", lmx.overloaderror)
-- end
-- end)
-local implement = interfaces.implement
-
implement { name = "showtrackers", public = true, protected = true, actions = trackers.show }
implement { name = "enabletrackers", public = true, protected = true, actions = trackers.enable, arguments = "optional" }
implement { name = "disabletrackers", public = true, protected = true, actions = trackers.disable, arguments = "optional" }
diff --git a/tex/context/base/mkxl/trac-deb.mkxl b/tex/context/base/mkxl/trac-deb.mkxl
index 37a901aa3..0eab24d29 100644
--- a/tex/context/base/mkxl/trac-deb.mkxl
+++ b/tex/context/base/mkxl/trac-deb.mkxl
@@ -18,8 +18,6 @@
\unprotect
-\permanent\protected\def\breakpoint{\showdebuginfo\wait}
-
% \showtrackers % defined at the lua end
% \enabletrackers [#1] % defined at the lua end
% \disabletrackers [#1] % defined at the lua end
@@ -33,7 +31,6 @@
% \enableexperiments [#1] % defined at the lua end
% \disableexperiments[#1] % defined at the lua end
%
-% \showdebuginfo % defined at the lua end
% \overloaderror % defined at the lua end
%
% \showlogcategories % defined at the lua end
diff --git a/tex/context/base/mkxl/type-ini.mklx b/tex/context/base/mkxl/type-ini.mklx
index 0e1c4340e..167ea3d33 100644
--- a/tex/context/base/mkxl/type-ini.mklx
+++ b/tex/context/base/mkxl/type-ini.mklx
@@ -417,7 +417,7 @@
\settrue\autotypescripts
-\protected\def\trycurrentfontclass#typeface%
+\protected\def\fonts_helpers_try_currentfontclass#typeface%
{\ifconditional\autotypescripts
\usetypescript[#typeface]%
\ifcsname\??fontclassyes#typeface\endcsname
diff --git a/tex/context/base/mkxl/typo-dir.mkxl b/tex/context/base/mkxl/typo-dir.mkxl
index 1d696d8c5..78c0b8e44 100644
--- a/tex/context/base/mkxl/typo-dir.mkxl
+++ b/tex/context/base/mkxl/typo-dir.mkxl
@@ -51,6 +51,9 @@
% maybe use chardefs
+\mutable\let\currentbidimode\empty
+\mutable\let\currentbidistamp\empty
+
\def\typo_dir_get_mode
{\def\currentbidimode{\clf_getbidimode % test edef
scope {\directionsparameter\c!bidi}%