summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-02-12 18:57:41 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-02-12 18:57:41 +0100
commit79bdc958cec8c084f8c8472e8f600c60969b03fa (patch)
tree97e489a6c23b01dae519aa36a535d62c301fabee /tex
parent45e121c1d9414786e677d931101af1357294e9b7 (diff)
downloadcontext-79bdc958cec8c084f8c8472e8f600c60969b03fa.tar.gz
2021-02-12 18:48: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/mkiv/char-def.lua477
-rw-r--r--tex/context/base/mkiv/char-utf.lua94
-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/core-con.lua18
-rw-r--r--tex/context/base/mkiv/core-con.mkiv6
-rw-r--r--tex/context/base/mkiv/core-sys.mkiv6
-rw-r--r--tex/context/base/mkiv/grph-fig.mkiv2
-rw-r--r--tex/context/base/mkiv/lang-def.mkiv3
-rw-r--r--tex/context/base/mkiv/lpdf-aux.lua2
-rw-r--r--tex/context/base/mkiv/lpdf-ini.lua2
-rw-r--r--tex/context/base/mkiv/mult-low.lua5
-rw-r--r--tex/context/base/mkiv/page-flt.mkiv2
-rw-r--r--tex/context/base/mkiv/page-txt.mkvi15
-rw-r--r--tex/context/base/mkiv/publ-imp-commands.mkvi6
-rw-r--r--tex/context/base/mkiv/scrn-fld.mkvi2
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin26122 -> 25323 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin255719 -> 254423 bytes
-rw-r--r--tex/context/base/mkiv/strc-lnt.mkvi20
-rw-r--r--tex/context/base/mkiv/strc-sec.mkiv18
-rw-r--r--tex/context/base/mkiv/supp-ran.mkiv1
-rw-r--r--tex/context/base/mkiv/symb-imp-mis.mkiv6
-rw-r--r--tex/context/base/mkiv/syst-aux.mkiv6
-rw-r--r--tex/context/base/mkxl/anch-tab.mkxl7
-rw-r--r--tex/context/base/mkxl/attr-ini.mkxl9
-rw-r--r--tex/context/base/mkxl/attr-lay.mkxl2
-rw-r--r--tex/context/base/mkxl/buff-ini.lmt900
-rw-r--r--tex/context/base/mkxl/buff-ini.mkxl7
-rw-r--r--tex/context/base/mkxl/buff-ver.mkxl58
-rw-r--r--tex/context/base/mkxl/catc-def.mkxl20
-rw-r--r--tex/context/base/mkxl/catc-sym.mkxl2
-rw-r--r--tex/context/base/mkxl/char-tex.lmt219
-rw-r--r--tex/context/base/mkxl/chem-str.mkxl7
-rw-r--r--tex/context/base/mkxl/colo-ini.mkxl14
-rw-r--r--tex/context/base/mkxl/cont-new.mkxl6
-rw-r--r--tex/context/base/mkxl/context.mkxl2
-rw-r--r--tex/context/base/mkxl/core-con.mkxl32
-rw-r--r--tex/context/base/mkxl/core-def.mkxl4
-rw-r--r--tex/context/base/mkxl/core-sys.mkxl12
-rw-r--r--tex/context/base/mkxl/enco-ini.mkxl314
-rw-r--r--tex/context/base/mkxl/font-col.mklx6
-rw-r--r--tex/context/base/mkxl/font-ctx.lmt3
-rw-r--r--tex/context/base/mkxl/font-fil.mklx2
-rw-r--r--tex/context/base/mkxl/font-ini.mklx4
-rw-r--r--tex/context/base/mkxl/font-sty.mklx16
-rw-r--r--tex/context/base/mkxl/font-sym.mklx6
-rw-r--r--tex/context/base/mkxl/grph-epd.mkxl2
-rw-r--r--tex/context/base/mkxl/grph-fig.mkxl4
-rw-r--r--tex/context/base/mkxl/grph-inc.mkxl6
-rw-r--r--tex/context/base/mkxl/lang-def.mkxl3
-rw-r--r--tex/context/base/mkxl/lang-ini.mkxl3
-rw-r--r--tex/context/base/mkxl/lang-mis.mkxl10
-rw-r--r--tex/context/base/mkxl/lpdf-aux.lmt2
-rw-r--r--tex/context/base/mkxl/lpdf-ini.lmt5
-rw-r--r--tex/context/base/mkxl/luat-ini.mkxl12
-rw-r--r--tex/context/base/mkxl/luat-usr.mkxl8
-rw-r--r--tex/context/base/mkxl/math-ali.mkxl22
-rw-r--r--tex/context/base/mkxl/math-fen.mkxl23
-rw-r--r--tex/context/base/mkxl/math-frc.mkxl10
-rw-r--r--tex/context/base/mkxl/math-ini.mkxl38
-rw-r--r--tex/context/base/mkxl/math-int.mkxl2
-rw-r--r--tex/context/base/mkxl/math-pln.mkxl22
-rw-r--r--tex/context/base/mkxl/math-stc.mklx2
-rw-r--r--tex/context/base/mkxl/meta-ini.mkxl6
-rw-r--r--tex/context/base/mkxl/meta-nod.mkxl2
-rw-r--r--tex/context/base/mkxl/mlib-lmt.lmt31
-rw-r--r--tex/context/base/mkxl/mult-aux.mkxl6
-rw-r--r--tex/context/base/mkxl/pack-box.mkxl76
-rw-r--r--tex/context/base/mkxl/pack-fen.mkxl40
-rw-r--r--tex/context/base/mkxl/pack-lyr.mkxl38
-rw-r--r--tex/context/base/mkxl/pack-rul.mkxl5
-rw-r--r--tex/context/base/mkxl/page-app.mkxl12
-rw-r--r--tex/context/base/mkxl/page-box.mklx2
-rw-r--r--tex/context/base/mkxl/page-brk.mkxl18
-rw-r--r--tex/context/base/mkxl/page-ffl.mkxl2
-rw-r--r--tex/context/base/mkxl/page-flt.mkxl6
-rw-r--r--tex/context/base/mkxl/page-imp.mkxl3
-rw-r--r--tex/context/base/mkxl/page-ins.mkxl2
-rw-r--r--tex/context/base/mkxl/page-lay.mkxl2
-rw-r--r--tex/context/base/mkxl/page-mix.mkxl2
-rw-r--r--tex/context/base/mkxl/page-mrk.mkxl11
-rw-r--r--tex/context/base/mkxl/page-one.mkxl4
-rw-r--r--tex/context/base/mkxl/page-pst.mkxl2
-rw-r--r--tex/context/base/mkxl/page-txt.mklx11
-rw-r--r--tex/context/base/mkxl/phys-dim.mkxl60
-rw-r--r--tex/context/base/mkxl/scrn-but.mklx41
-rw-r--r--tex/context/base/mkxl/scrn-fld.mklx23
-rw-r--r--tex/context/base/mkxl/scrn-hlp.mklx28
-rw-r--r--tex/context/base/mkxl/scrn-ini.mklx14
-rw-r--r--tex/context/base/mkxl/scrn-pag.mklx20
-rw-r--r--tex/context/base/mkxl/scrp-ini.mkxl4
-rw-r--r--tex/context/base/mkxl/spac-ali.mkxl31
-rw-r--r--tex/context/base/mkxl/spac-flr.mkxl10
-rw-r--r--tex/context/base/mkxl/spac-grd.mkxl2
-rw-r--r--tex/context/base/mkxl/spac-hor.mkxl86
-rw-r--r--tex/context/base/mkxl/spac-par.mkxl38
-rw-r--r--tex/context/base/mkxl/spac-ver.mkxl40
-rw-r--r--tex/context/base/mkxl/strc-con.mklx12
-rw-r--r--tex/context/base/mkxl/strc-des.mklx3
-rw-r--r--tex/context/base/mkxl/strc-enu.mklx19
-rw-r--r--tex/context/base/mkxl/strc-flt.mklx77
-rw-r--r--tex/context/base/mkxl/strc-itm.mklx49
-rw-r--r--tex/context/base/mkxl/strc-lab.mkxl19
-rw-r--r--tex/context/base/mkxl/strc-lnt.mklx28
-rw-r--r--tex/context/base/mkxl/strc-lst.mklx6
-rw-r--r--tex/context/base/mkxl/strc-mat.mkxl28
-rw-r--r--tex/context/base/mkxl/strc-not.mklx140
-rw-r--r--tex/context/base/mkxl/strc-pag.mkxl16
-rw-r--r--tex/context/base/mkxl/strc-ref.mklx16
-rw-r--r--tex/context/base/mkxl/strc-reg.mkxl10
-rw-r--r--tex/context/base/mkxl/strc-ren.mkxl19
-rw-r--r--tex/context/base/mkxl/strc-sec.mkxl31
-rw-r--r--tex/context/base/mkxl/strc-syn.mkxl6
-rw-r--r--tex/context/base/mkxl/supp-box.mkxl111
-rw-r--r--tex/context/base/mkxl/supp-mat.mkxl2
-rw-r--r--tex/context/base/mkxl/supp-ran.mkxl1
-rw-r--r--tex/context/base/mkxl/syst-aux.mkxl45
-rw-r--r--tex/context/base/mkxl/syst-ini.mkxl48
-rw-r--r--tex/context/base/mkxl/tabl-com.mkxl4
-rw-r--r--tex/context/base/mkxl/tabl-frm.mkxl2
-rw-r--r--tex/context/base/mkxl/tabl-mis.mkxl2
-rw-r--r--tex/context/base/mkxl/tabl-ntb.mkxl6
-rw-r--r--tex/context/base/mkxl/tabl-tab.mkxl35
-rw-r--r--tex/context/base/mkxl/tabl-tbl.mkxl19
-rw-r--r--tex/context/base/mkxl/tabl-tsp.mkxl3
-rw-r--r--tex/context/base/mkxl/type-ini.mklx4
-rw-r--r--tex/context/base/mkxl/typo-del.mkxl5
-rw-r--r--tex/context/base/mkxl/typo-dir.mkxl2
-rw-r--r--tex/context/base/mkxl/typo-txt.mklx33
-rw-r--r--tex/context/fonts/mkiv/type-imp-stix.mkiv22
-rw-r--r--tex/context/modules/mkiv/s-fonts-coverage.mkiv2
-rw-r--r--tex/context/modules/mkiv/s-fonts-shapes.mkiv4
-rw-r--r--tex/context/modules/mkiv/s-system-macros.mkxl12
-rw-r--r--tex/context/modules/mkxl/s-characters-combinations.lmt30
-rw-r--r--tex/context/modules/mkxl/s-characters-combinations.mkxl61
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
138 files changed, 2727 insertions, 1410 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index f761ac5da..22ce5d100 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.02.08 16:58}
+\newcontextversion{2021.02.12 18:45}
%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 370bcbd2b..3f7659e9d 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.02.08 16:58}
+\edef\contextversion{2021.02.12 18:45}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/char-def.lua b/tex/context/base/mkiv/char-def.lua
index 79a210338..7a04e869d 100644
--- a/tex/context/base/mkiv/char-def.lua
+++ b/tex/context/base/mkiv/char-def.lua
@@ -429,7 +429,6 @@ characters.data={
direction="on",
linebreak="al",
mathclass="binary",
---mathname="ast",
mathsymbol=0x2217,
synonyms={ "star" },
unicodeslot=0x2A,
@@ -1675,8 +1674,8 @@ characters.data={
contextname="nobreakspace",
description="NO-BREAK SPACE",
direction="cs",
- mongolian="nj",
linebreak="gl",
+ mongolian="nj",
specials={ "nobreak", 0x20 },
synonyms={ "nbsp", "non-breaking space" },
unicodeslot=0xA0,
@@ -2352,6 +2351,7 @@ characters.data={
lccode=0xF8,
linebreak="al",
shcode=0x4F,
+ specials={ "with", 0x4F, 0x2F },
synonyms={ "latin capital letter o slash" },
unicodeslot=0xD8,
},
@@ -2749,6 +2749,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x6F,
+ specials={ "with", 0x6F, 0x2F },
synonyms={ "latin small letter o slash" },
uccode=0xD8,
unicodeslot=0xF8,
@@ -3041,6 +3042,7 @@ characters.data={
lccode=0x111,
linebreak="al",
shcode=0x44,
+ specials={ "with", 0x44, 0x2F },
unicodeslot=0x110,
},
{
@@ -3052,6 +3054,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x64,
+ specials={ "with", 0x64, 0x2F },
uccode=0x110,
unicodeslot=0x111,
},
@@ -3307,6 +3310,7 @@ characters.data={
lccode=0x127,
linebreak="al",
shcode=0x48,
+ specials={ "with", 0x48, 0x2F },
unicodeslot=0x126,
},
{
@@ -3318,6 +3322,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x68,
+ specials={ "with", 0x68, 0x2F },
uccode=0x126,
unicodeslot=0x127,
},
@@ -3634,6 +3639,7 @@ characters.data={
lccode=0x142,
linebreak="al",
shcode=0x4C,
+ specials={ "with", 0x4C, 0x2F },
unicodeslot=0x141,
},
{
@@ -3645,6 +3651,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x6C,
+ specials={ "with", 0x6C, 0x2F },
uccode=0x141,
unicodeslot=0x142,
},
@@ -4079,6 +4086,7 @@ characters.data={
lccode=0x167,
linebreak="al",
shcode=0x54,
+ specials={ "with", 0x54, 0x2F },
unicodeslot=0x166,
},
{
@@ -4090,6 +4098,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x74,
+ specials={ "with", 0x74, 0x2F },
uccode=0x166,
unicodeslot=0x167,
},
@@ -4389,6 +4398,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x62,
+ specials={ "with", 0x62, 0x2F },
uccode=0x243,
unicodeslot=0x180,
},
@@ -4401,6 +4411,7 @@ characters.data={
lccode=0x253,
linebreak="al",
shcode=0x42,
+ specials={ "with", 0x42, 0x1FA9D },
unicodeslot=0x181,
},
{
@@ -4459,6 +4470,7 @@ characters.data={
lccode=0x188,
linebreak="al",
shcode=0x43,
+ specials={ "with", 0x43, 0x1FA9D },
unicodeslot=0x187,
},
{
@@ -4469,6 +4481,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x63,
+ specials={ "with", 0x63, 0x1FA9D },
uccode=0x187,
unicodeslot=0x188,
},
@@ -4491,6 +4504,7 @@ characters.data={
lccode=0x257,
linebreak="al",
shcode=0x44,
+ specials={ "with", 0x44, 0x1FA9D },
unicodeslot=0x18A,
},
{
@@ -4560,6 +4574,7 @@ characters.data={
lccode=0x192,
linebreak="al",
shcode=0x46,
+ specials={ "with", 0x46, 0x1FA9D },
unicodeslot=0x191,
},
{
@@ -4570,6 +4585,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x66,
+ specials={ "with", 0x66, 0x1FA9D },
synonyms={ "florin currency symbol", "folder", "function symbol", "latin small letter script f" },
uccode=0x191,
unicodeslot=0x192,
@@ -4583,6 +4599,7 @@ characters.data={
lccode=0x260,
linebreak="al",
shcode=0x47,
+ specials={ "with", 0x47, 0x1FA9D },
unicodeslot=0x193,
},
{
@@ -4621,6 +4638,7 @@ characters.data={
lccode=0x268,
linebreak="al",
shcode=0x49,
+ specials={ "with", 0x49, 0x2F },
synonyms={ "latin capital letter i bar" },
unicodeslot=0x197,
},
@@ -4633,6 +4651,7 @@ characters.data={
lccode=0x199,
linebreak="al",
shcode=0x4B,
+ specials={ "with", 0x4B, 0x1FA9D },
unicodeslot=0x198,
},
{
@@ -4643,6 +4662,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x6B,
+ specials={ "with", 0x6B, 0x1FA9D },
uccode=0x198,
unicodeslot=0x199,
},
@@ -4759,6 +4779,7 @@ characters.data={
lccode=0x1A5,
linebreak="al",
shcode=0x50,
+ specials={ "with", 0x50, 0x1FA9D },
unicodeslot=0x1A4,
},
{
@@ -4769,6 +4790,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x70,
+ specials={ "with", 0x70, 0x1FA9D },
uccode=0x1A4,
unicodeslot=0x1A5,
},
@@ -4834,6 +4856,7 @@ characters.data={
lccode=0x1AD,
linebreak="al",
shcode=0x54,
+ specials={ "with", 0x54, 0x1FA9D },
unicodeslot=0x1AC,
},
{
@@ -4844,6 +4867,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x74,
+ specials={ "with", 0x74, 0x1FA9D },
uccode=0x1AC,
unicodeslot=0x1AD,
},
@@ -4899,6 +4923,7 @@ characters.data={
lccode=0x28B,
linebreak="al",
shcode=0x56,
+ specials={ "with", 0x56, 0x1FA9D },
synonyms={ "latin capital letter script v" },
unicodeslot=0x1B2,
},
@@ -4911,6 +4936,7 @@ characters.data={
lccode=0x1B4,
linebreak="al",
shcode=0x59,
+ specials={ "with", 0x59, 0x1FA9D },
unicodeslot=0x1B3,
},
{
@@ -4921,6 +4947,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x79,
+ specials={ "with", 0x79, 0x1FA9D },
uccode=0x1B3,
unicodeslot=0x1B4,
},
@@ -4933,6 +4960,7 @@ characters.data={
lccode=0x1B6,
linebreak="al",
shcode=0x5A,
+ specials={ "with", 0x5A, 0x2F },
unicodeslot=0x1B5,
},
{
@@ -4943,6 +4971,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x7A,
+ specials={ "with", 0x7A, 0x2F },
synonyms={ "latin small letter z bar" },
uccode=0x1B5,
unicodeslot=0x1B6,
@@ -5015,6 +5044,7 @@ characters.data={
description="LATIN LETTER INVERTED GLOTTAL STOP WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x296, 0x2F },
unicodeslot=0x1BE,
},
{
@@ -5466,6 +5496,7 @@ characters.data={
lccode=0x1E5,
linebreak="al",
shcode=0x47,
+ specials={ "with", 0x47, 0x2F },
unicodeslot=0x1E4,
},
{
@@ -5476,6 +5507,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x67,
+ specials={ "with", 0x67, 0x2F },
uccode=0x1E4,
unicodeslot=0x1E5,
},
@@ -6192,6 +6224,7 @@ characters.data={
lccode=0x225,
linebreak="al",
shcode=0x5A,
+ specials={ "with", 0x5A, 0x1FA9D },
unicodeslot=0x224,
},
{
@@ -6201,6 +6234,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x7A,
+ specials={ "with", 0x7A, 0x1FA9D },
uccode=0x224,
unicodeslot=0x225,
},
@@ -6415,6 +6449,7 @@ characters.data={
lccode=0x2C65,
linebreak="al",
shcode=0x41,
+ specials={ "with", 0x41, 0x2F },
unicodeslot=0x23A,
},
{
@@ -6425,6 +6460,7 @@ characters.data={
lccode=0x23C,
linebreak="al",
shcode=0x43,
+ specials={ "with", 0x43, 0x2F },
unicodeslot=0x23B,
},
{
@@ -6434,6 +6470,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x63,
+ specials={ "with", 0x63, 0x2F },
uccode=0x23B,
unicodeslot=0x23C,
},
@@ -6495,6 +6532,7 @@ characters.data={
lccode=0x180,
linebreak="al",
shcode=0x42,
+ specials={ "with", 0x42, 0x2F },
unicodeslot=0x243,
},
{
@@ -6520,6 +6558,7 @@ characters.data={
lccode=0x247,
linebreak="al",
shcode=0x45,
+ specials={ "with", 0x45, 0x2F },
unicodeslot=0x246,
},
{
@@ -6528,6 +6567,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x65,
+ specials={ "with", 0x65, 0x2F },
uccode=0x246,
unicodeslot=0x247,
},
@@ -6538,6 +6578,7 @@ characters.data={
lccode=0x249,
linebreak="al",
shcode=0x4A,
+ specials={ "with", 0x4A, 0x2F },
unicodeslot=0x248,
},
{
@@ -6546,6 +6587,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x6A,
+ specials={ "with", 0x6A, 0x2F },
uccode=0x248,
unicodeslot=0x249,
},
@@ -6573,6 +6615,7 @@ characters.data={
lccode=0x24D,
linebreak="al",
shcode=0x52,
+ specials={ "with", 0x52, 0x2F },
unicodeslot=0x24C,
},
{
@@ -6581,6 +6624,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x72,
+ specials={ "with", 0x72, 0x2F },
uccode=0x24C,
unicodeslot=0x24D,
},
@@ -6591,6 +6635,7 @@ characters.data={
lccode=0x24F,
linebreak="al",
shcode=0x59,
+ specials={ "with", 0x59, 0x2F },
unicodeslot=0x24E,
},
{
@@ -6599,6 +6644,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x79,
+ specials={ "with", 0x79, 0x2F },
uccode=0x24E,
unicodeslot=0x24F,
},
@@ -6636,6 +6682,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x62,
+ specials={ "with", 0x62, 0x1FA9D },
uccode=0x181,
unicodeslot=0x253,
},
@@ -6678,6 +6725,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x64,
+ specials={ "with", 0x64, 0x1FA9D },
uccode=0x18A,
unicodeslot=0x257,
},
@@ -6707,6 +6755,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x259,
+ specials={ "with", 0x259, 0x1FA9D },
unicodeslot=0x25A,
},
{
@@ -6733,6 +6782,7 @@ characters.data={
description="LATIN SMALL LETTER REVERSED OPEN E WITH HOOK",
direction="l",
linebreak="al",
+ specials={ "with", 0x25C, 0x1FA9D },
unicodeslot=0x25D,
},
{
@@ -6751,6 +6801,7 @@ characters.data={
description="LATIN SMALL LETTER DOTLESS J WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x237, 0x2F },
unicodeslot=0x25F,
},
{
@@ -6760,6 +6811,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x67,
+ specials={ "with", 0x67, 0x1FA9D },
uccode=0x193,
unicodeslot=0x260,
},
@@ -6812,6 +6864,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x68,
+ specials={ "with", 0x68, 0x1FA9D },
unicodeslot=0x266,
},
{
@@ -6820,6 +6873,7 @@ characters.data={
description="LATIN SMALL LETTER HENG WITH HOOK",
direction="l",
linebreak="al",
+ specials={ "with", 0xA727, 0x1FA9D },
unicodeslot=0x267,
},
{
@@ -6829,6 +6883,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x69,
+ specials={ "with", 0x69, 0x2F },
uccode=0x197,
unicodeslot=0x268,
},
@@ -6908,6 +6963,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x6D,
+ specials={ "with", 0x6D, 0x1FA9D },
unicodeslot=0x271,
},
{
@@ -6991,6 +7047,7 @@ characters.data={
description="LATIN SMALL LETTER TURNED R WITH HOOK",
direction="l",
linebreak="al",
+ specials={ "with", 0x279, 0x1FA9D },
unicodeslot=0x27B,
},
{
@@ -7052,6 +7109,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x73,
+ specials={ "with", 0x73, 0x1FA9D },
unicodeslot=0x282,
},
{
@@ -7131,6 +7189,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x76,
+ specials={ "with", 0x76, 0x1FA9D },
synonyms={ "latin small letter script v" },
uccode=0x1B2,
unicodeslot=0x28B,
@@ -7269,6 +7328,7 @@ characters.data={
description="LATIN LETTER SMALL CAPITAL G WITH HOOK",
direction="l",
linebreak="al",
+ specials={ "with", 0x262, 0x1FA9D },
unicodeslot=0x29B,
},
{
@@ -7309,6 +7369,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x71,
+ specials={ "with", 0x71, 0x1FA9D },
unicodeslot=0x2A0,
},
{
@@ -7317,6 +7378,7 @@ characters.data={
description="LATIN LETTER GLOTTAL STOP WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x294, 0x2F },
unicodeslot=0x2A1,
},
{
@@ -10546,7 +10608,6 @@ characters.data={
direction="l",
linebreak="al",
mathclass="ordinary",
---mathname="varkappa",
specials={ "compat", 0x3BA },
uccode=0x39A,
unicodeslot=0x3F0,
@@ -12232,6 +12293,7 @@ characters.data={
lccode=0x493,
linebreak="al",
shcode=0x413,
+ specials={ "with", 0x413, 0x2F },
unicodeslot=0x492,
},
[0x493]={
@@ -12242,6 +12304,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x433,
+ specials={ "with", 0x433, 0x2F },
uccode=0x492,
unicodeslot=0x493,
},
@@ -12364,6 +12427,7 @@ characters.data={
lccode=0x49F,
linebreak="al",
shcode=0x41A,
+ specials={ "with", 0x41A, 0x2F },
unicodeslot=0x49E,
},
[0x49F]={
@@ -12374,6 +12438,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x43A,
+ specials={ "with", 0x43A, 0x2F },
uccode=0x49E,
unicodeslot=0x49F,
},
@@ -12553,6 +12618,7 @@ characters.data={
direction="l",
lccode=0x4B1,
linebreak="al",
+ specials={ "with", 0x4AE, 0x2F },
unicodeslot=0x4B0,
},
[0x4B1]={
@@ -12562,6 +12628,7 @@ characters.data={
description="CYRILLIC SMALL LETTER STRAIGHT U WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x4AF, 0x2F },
uccode=0x4B0,
unicodeslot=0x4B1,
},
@@ -12754,6 +12821,7 @@ characters.data={
lccode=0x4C4,
linebreak="al",
shcode=0x41A,
+ specials={ "with", 0x41A, 0x1FA9D },
unicodeslot=0x4C3,
},
[0x4C4]={
@@ -12764,6 +12832,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x43A,
+ specials={ "with", 0x43A, 0x1FA9D },
uccode=0x4C3,
unicodeslot=0x4C4,
},
@@ -12796,6 +12865,7 @@ characters.data={
lccode=0x4C8,
linebreak="al",
shcode=0x41D,
+ specials={ "with", 0x41D, 0x1FA9D },
unicodeslot=0x4C7,
},
[0x4C8]={
@@ -12806,6 +12876,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x43D,
+ specials={ "with", 0x43D, 0x1FA9D },
uccode=0x4C7,
unicodeslot=0x4C8,
},
@@ -13380,6 +13451,7 @@ characters.data={
lccode=0x4FD,
linebreak="al",
shcode=0x425,
+ specials={ "with", 0x425, 0x1FA9D },
unicodeslot=0x4FC,
},
[0x4FD]={
@@ -13388,6 +13460,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x445,
+ specials={ "with", 0x445, 0x1FA9D },
uccode=0x4FC,
unicodeslot=0x4FD,
},
@@ -13398,6 +13471,7 @@ characters.data={
lccode=0x4FF,
linebreak="al",
shcode=0x425,
+ specials={ "with", 0x425, 0x2F },
unicodeslot=0x4FE,
},
[0x4FF]={
@@ -13406,6 +13480,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x445,
+ specials={ "with", 0x445, 0x2F },
uccode=0x4FE,
unicodeslot=0x4FF,
},
@@ -13560,6 +13635,7 @@ characters.data={
lccode=0x513,
linebreak="al",
shcode=0x41B,
+ specials={ "with", 0x41B, 0x1FA9D },
unicodeslot=0x512,
},
[0x513]={
@@ -13568,6 +13644,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x43B,
+ specials={ "with", 0x43B, 0x1FA9D },
uccode=0x512,
unicodeslot=0x513,
},
@@ -45902,48 +45979,48 @@ characters.data={
category="po",
description="MONGOLIAN BIRGA",
direction="on",
- mongolian="nj",
linebreak="al",
+ mongolian="nj",
unicodeslot=0x1800,
},
[0x1801]={
category="po",
description="MONGOLIAN ELLIPSIS",
direction="on",
- mongolian="nj",
linebreak="al",
+ mongolian="nj",
unicodeslot=0x1801,
},
[0x1802]={
category="po",
description="MONGOLIAN COMMA",
direction="on",
- mongolian="nj",
linebreak="ex",
+ mongolian="nj",
unicodeslot=0x1802,
},
[0x1803]={
category="po",
description="MONGOLIAN FULL STOP",
direction="on",
- mongolian="nj",
linebreak="ex",
+ mongolian="nj",
unicodeslot=0x1803,
},
[0x1804]={
category="po",
description="MONGOLIAN COLON",
direction="on",
- mongolian="nj",
linebreak="ba",
+ mongolian="nj",
unicodeslot=0x1804,
},
[0x1805]={
category="po",
description="MONGOLIAN FOUR DOTS",
direction="on",
- mongolian="nj",
linebreak="ba",
+ mongolian="nj",
unicodeslot=0x1805,
},
[0x1806]={
@@ -45951,8 +46028,8 @@ characters.data={
category="pd",
description="MONGOLIAN TODO SOFT HYPHEN",
direction="on",
- mongolian="nj",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x1806,
},
[0x1807]={
@@ -45960,24 +46037,24 @@ characters.data={
category="po",
description="MONGOLIAN SIBE SYLLABLE BOUNDARY MARKER",
direction="on",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1807,
},
[0x1808]={
category="po",
description="MONGOLIAN MANCHU COMMA",
direction="on",
- mongolian="nj",
linebreak="ex",
+ mongolian="nj",
unicodeslot=0x1808,
},
[0x1809]={
category="po",
description="MONGOLIAN MANCHU FULL STOP",
direction="on",
- mongolian="nj",
linebreak="ex",
+ mongolian="nj",
unicodeslot=0x1809,
},
[0x180A]={
@@ -45985,16 +46062,16 @@ characters.data={
category="po",
description="MONGOLIAN NIRUGU",
direction="on",
- mongolian="jc",
linebreak="al",
+ mongolian="jc",
unicodeslot=0x180A,
},
[0x180B]={
category="mn",
description="MONGOLIAN FREE VARIATION SELECTOR ONE",
direction="nsm",
- mongolian="t",
linebreak="cm",
+ mongolian="t",
synonyms={ "fvs1" },
unicodeslot=0x180B,
},
@@ -46002,16 +46079,16 @@ characters.data={
category="mn",
description="MONGOLIAN FREE VARIATION SELECTOR TWO",
direction="nsm",
- mongolian="t",
linebreak="cm",
+ mongolian="t",
unicodeslot=0x180C,
},
[0x180D]={
category="mn",
description="MONGOLIAN FREE VARIATION SELECTOR THREE",
direction="nsm",
- mongolian="t",
linebreak="cm",
+ mongolian="t",
unicodeslot=0x180D,
},
[0x180E]={
@@ -46019,88 +46096,88 @@ characters.data={
category="zs",
description="MONGOLIAN VOWEL SEPARATOR",
direction="bn",
- mongolian="nj",
linebreak="gl",
+ mongolian="nj",
unicodeslot=0x180E,
},
[0x1810]={
category="nd",
description="MONGOLIAN DIGIT ZERO",
direction="l",
- mongolian="nj",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1810,
},
[0x1811]={
category="nd",
description="MONGOLIAN DIGIT ONE",
direction="l",
- mongolian="nj",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1811,
},
[0x1812]={
category="nd",
description="MONGOLIAN DIGIT TWO",
direction="l",
- mongolian="nj",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1812,
},
[0x1813]={
category="nd",
description="MONGOLIAN DIGIT THREE",
direction="l",
- mongolian="nj",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1813,
},
[0x1814]={
category="nd",
description="MONGOLIAN DIGIT FOUR",
direction="l",
- mongolian="nj",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1814,
},
[0x1815]={
category="nd",
description="MONGOLIAN DIGIT FIVE",
direction="l",
- mongolian="nj",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1815,
},
[0x1816]={
category="nd",
description="MONGOLIAN DIGIT SIX",
direction="l",
- mongolian="nj",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1816,
},
[0x1817]={
category="nd",
description="MONGOLIAN DIGIT SEVEN",
direction="l",
- mongolian="nj",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1817,
},
[0x1818]={
category="nd",
description="MONGOLIAN DIGIT EIGHT",
direction="l",
- mongolian="nj",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1818,
},
[0x1819]={
category="nd",
description="MONGOLIAN DIGIT NINE",
direction="l",
- mongolian="nj",
linebreak="nu",
+ mongolian="nj",
unicodeslot=0x1819,
},
[0x1820]={
@@ -46108,8 +46185,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER A",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1820,
variants={
[0x180B]="second form",
@@ -46121,8 +46198,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER E",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1821,
variants={
[0x180B]="second form",
@@ -46133,8 +46210,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER I",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1822,
variants={
[0x180B]="second form",
@@ -46145,8 +46222,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER O",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1823,
variants={
[0x180B]="second form",
@@ -46157,8 +46234,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER U",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1824,
variants={
[0x180B]="second form",
@@ -46169,8 +46246,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER OE",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1825,
variants={
[0x180B]="second form",
@@ -46182,8 +46259,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER UE",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1826,
variants={
[0x180B]="second form",
@@ -46194,9 +46271,9 @@ characters.data={
arabic="d",
category="lo",
description="MONGOLIAN LETTER EE",
- mongolian="d",
direction="l",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1827,
},
[0x1828]={
@@ -46204,8 +46281,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER NA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1828,
variants={
[0x180B]="second form",
@@ -46218,8 +46295,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ANG",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1829,
},
[0x182A]={
@@ -46227,8 +46304,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER BA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x182A,
variants={
[0x180B]="alternative form",
@@ -46239,8 +46316,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER PA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x182B,
},
[0x182C]={
@@ -46248,8 +46325,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER QA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x182C,
variants={
[0x180B]="second form",
@@ -46262,8 +46339,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER GA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x182D,
variants={
[0x180B]="second form",
@@ -46276,8 +46353,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x182E,
},
[0x182F]={
@@ -46285,8 +46362,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER LA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x182F,
},
[0x1830]={
@@ -46294,8 +46371,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1830,
variants={
[0x180B]="second form",
@@ -46307,8 +46384,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1831,
},
[0x1832]={
@@ -46316,8 +46393,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1832,
variants={
[0x180B]="second form",
@@ -46328,8 +46405,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER DA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1833,
variants={
[0x180B]="second form",
@@ -46340,8 +46417,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER CHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1834,
},
[0x1835]={
@@ -46349,8 +46426,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER JA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1835,
variants={
[0x180B]="second form",
@@ -46361,8 +46438,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER YA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1836,
variants={
[0x180B]="second form",
@@ -46374,8 +46451,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER RA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1837,
},
[0x1838]={
@@ -46383,8 +46460,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER WA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1838,
variants={
[0x180B]="second form",
@@ -46395,8 +46472,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER FA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1839,
},
[0x183A]={
@@ -46404,8 +46481,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER KA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x183A,
},
[0x183B]={
@@ -46413,8 +46490,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER KHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x183B,
},
[0x183C]={
@@ -46422,8 +46499,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TSA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x183C,
},
[0x183D]={
@@ -46431,8 +46508,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ZA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x183D,
},
[0x183E]={
@@ -46440,8 +46517,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER HAA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x183E,
},
[0x183F]={
@@ -46449,8 +46526,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ZRA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x183F,
},
[0x1840]={
@@ -46458,8 +46535,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER LHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1840,
},
[0x1841]={
@@ -46467,8 +46544,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ZHI",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1841,
},
[0x1842]={
@@ -46476,8 +46553,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER CHI",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1842,
},
[0x1843]={
@@ -46485,8 +46562,8 @@ characters.data={
category="lm",
description="MONGOLIAN LETTER TODO LONG VOWEL SIGN",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1843,
},
[0x1844]={
@@ -46494,8 +46571,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO E",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1844,
variants={
[0x180B]="second form",
@@ -46506,8 +46583,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO I",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1845,
variants={
[0x180B]="second form",
@@ -46518,8 +46595,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO O",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1846,
variants={
[0x180B]="second form",
@@ -46530,8 +46607,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO U",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1847,
variants={
[0x180B]="second form",
@@ -46543,8 +46620,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO OE",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1848,
variants={
[0x180B]="second form",
@@ -46555,8 +46632,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO UE",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1849,
variants={
[0x180B]="second form",
@@ -46567,8 +46644,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO ANG",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x184A,
},
[0x184B]={
@@ -46576,8 +46653,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO BA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x184B,
},
[0x184C]={
@@ -46585,8 +46662,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO PA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x184C,
},
[0x184D]={
@@ -46594,8 +46671,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO QA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x184D,
variants={
[0x180B]="feminine form",
@@ -46606,8 +46683,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO GA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x184E,
variants={
[0x180B]="second form",
@@ -46618,8 +46695,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO MA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x184F,
},
[0x1850]={
@@ -46627,8 +46704,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO TA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1850,
},
[0x1851]={
@@ -46636,8 +46713,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO DA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1851,
},
[0x1852]={
@@ -46645,8 +46722,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO CHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1852,
},
[0x1853]={
@@ -46654,8 +46731,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO JA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1853,
},
[0x1854]={
@@ -46663,8 +46740,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO TSA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1854,
},
[0x1855]={
@@ -46672,8 +46749,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO YA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1855,
},
[0x1856]={
@@ -46681,8 +46758,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO WA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1856,
},
[0x1857]={
@@ -46690,8 +46767,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO KA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1857,
},
[0x1858]={
@@ -46699,8 +46776,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO GAA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1858,
},
[0x1859]={
@@ -46708,8 +46785,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO HAA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1859,
},
[0x185A]={
@@ -46717,8 +46794,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO JIA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x185A,
},
[0x185B]={
@@ -46726,8 +46803,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO NIA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x185B,
},
[0x185C]={
@@ -46735,8 +46812,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO DZA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x185C,
},
[0x185D]={
@@ -46744,8 +46821,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE E",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x185D,
variants={
[0x180B]="second form",
@@ -46756,8 +46833,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE I",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x185E,
variants={
[0x180B]="second form",
@@ -46769,8 +46846,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE IY",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x185F,
},
[0x1860]={
@@ -46778,8 +46855,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE UE",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1860,
variants={
[0x180B]="second form",
@@ -46790,8 +46867,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE U",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1861,
},
[0x1862]={
@@ -46799,8 +46876,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE ANG",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1862,
},
[0x1863]={
@@ -46808,8 +46885,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE KA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1863,
variants={
[0x180B]="second form",
@@ -46820,8 +46897,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE GA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1864,
},
[0x1865]={
@@ -46829,8 +46906,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE HA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1865,
},
[0x1866]={
@@ -46838,8 +46915,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE PA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1866,
},
[0x1867]={
@@ -46847,8 +46924,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE SHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1867,
},
[0x1868]={
@@ -46856,8 +46933,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE TA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1868,
variants={
[0x180B]="second form",
@@ -46869,8 +46946,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE DA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1869,
variants={
[0x180B]="second form",
@@ -46881,8 +46958,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE JA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x186A,
},
[0x186B]={
@@ -46890,8 +46967,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE FA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x186B,
},
[0x186C]={
@@ -46899,8 +46976,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE GAA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x186C,
},
[0x186D]={
@@ -46908,8 +46985,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE HAA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x186D,
},
[0x186E]={
@@ -46917,8 +46994,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE TSA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x186E,
},
[0x186F]={
@@ -46926,8 +47003,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE ZA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x186F,
variants={
[0x180B]="second form",
@@ -46938,8 +47015,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE RAA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1870,
},
[0x1871]={
@@ -46947,8 +47024,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE CHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1871,
},
[0x1872]={
@@ -46956,8 +47033,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER SIBE ZHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1872,
},
[0x1873]={
@@ -46965,8 +47042,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU I",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1873,
variants={
[0x180B]="second form",
@@ -46979,8 +47056,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU KA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1874,
variants={
[0x180B]="second form",
@@ -46993,8 +47070,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU RA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1875,
},
[0x1876]={
@@ -47002,8 +47079,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU FA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1876,
variants={
[0x180B]="second form",
@@ -47014,8 +47091,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU ZHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1877,
},
[0x1878]={
@@ -47023,8 +47100,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER CHA WITH TWO DOTS",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1878,
},
[0x1880]={
@@ -47032,8 +47109,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI ANUSVARA ONE",
direction="l",
- mongolian="nj",
linebreak="al",
+ mongolian="nj",
unicodeslot=0x1880,
variants={
[0x180B]="second form",
@@ -47044,8 +47121,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI VISARGA ONE",
direction="l",
- mongolian="nj",
linebreak="al",
+ mongolian="nj",
unicodeslot=0x1881,
variants={
[0x180B]="second form",
@@ -47056,8 +47133,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI DAMARU",
direction="l",
- mongolian="nj",
linebreak="al",
+ mongolian="nj",
unicodeslot=0x1882,
},
[0x1883]={
@@ -47065,8 +47142,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI UBADAMA",
direction="l",
- mongolian="nj",
linebreak="al",
+ mongolian="nj",
unicodeslot=0x1883,
},
[0x1884]={
@@ -47074,8 +47151,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI INVERTED UBADAMA",
direction="l",
- mongolian="nj",
linebreak="al",
+ mongolian="nj",
unicodeslot=0x1884,
},
[0x1885]={
@@ -47083,8 +47160,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI BALUDA",
direction="nsm",
- mongolian="t",
linebreak="cm",
+ mongolian="t",
unicodeslot=0x1885,
},
[0x1886]={
@@ -47092,8 +47169,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI THREE BALUDA",
direction="nsm",
- mongolian="t",
linebreak="cm",
+ mongolian="t",
unicodeslot=0x1886,
},
[0x1887]={
@@ -47101,8 +47178,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI A",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1887,
variants={
[0x180B]="second form",
@@ -47115,8 +47192,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI I",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1888,
variants={
[0x180B]="second form",
@@ -47127,8 +47204,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI KA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1889,
},
[0x188A]={
@@ -47136,8 +47213,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI NGA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x188A,
variants={
[0x180B]="second form",
@@ -47148,8 +47225,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI CA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x188B,
},
[0x188C]={
@@ -47157,8 +47234,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI TTA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x188C,
},
[0x188D]={
@@ -47166,8 +47243,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI TTHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x188D,
},
[0x188E]={
@@ -47175,8 +47252,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI DDA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x188E,
},
[0x188F]={
@@ -47184,8 +47261,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI NNA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x188F,
},
[0x1890]={
@@ -47193,8 +47270,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI TA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1890,
},
[0x1891]={
@@ -47202,8 +47279,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI DA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1891,
},
[0x1892]={
@@ -47211,8 +47288,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI PA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1892,
},
[0x1893]={
@@ -47220,8 +47297,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI PHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1893,
},
[0x1894]={
@@ -47229,8 +47306,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI SSA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1894,
},
[0x1895]={
@@ -47238,8 +47315,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI ZHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1895,
},
[0x1896]={
@@ -47247,8 +47324,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI ZA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1896,
},
[0x1897]={
@@ -47256,8 +47333,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI AH",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1897,
},
[0x1898]={
@@ -47265,8 +47342,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO ALI GALI TA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1898,
},
[0x1899]={
@@ -47274,8 +47351,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER TODO ALI GALI ZHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x1899,
},
[0x189A]={
@@ -47283,8 +47360,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU ALI GALI GHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x189A,
},
[0x189B]={
@@ -47292,8 +47369,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU ALI GALI NGA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x189B,
},
[0x189C]={
@@ -47301,8 +47378,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU ALI GALI CA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x189C,
},
[0x189D]={
@@ -47310,8 +47387,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU ALI GALI JHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x189D,
},
[0x189E]={
@@ -47319,8 +47396,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU ALI GALI TTA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x189E,
},
[0x189F]={
@@ -47328,8 +47405,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU ALI GALI DDHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x189F,
},
[0x18A0]={
@@ -47337,8 +47414,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU ALI GALI TA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18A0,
},
[0x18A1]={
@@ -47346,8 +47423,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU ALI GALI DHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18A1,
},
[0x18A2]={
@@ -47355,8 +47432,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU ALI GALI SSA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18A2,
},
[0x18A3]={
@@ -47364,8 +47441,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU ALI GALI CYA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18A3,
},
[0x18A4]={
@@ -47373,8 +47450,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU ALI GALI ZHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18A4,
},
[0x18A5]={
@@ -47382,8 +47459,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU ALI GALI ZA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18A5,
},
[0x18A6]={
@@ -47391,8 +47468,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI HALF U",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18A6,
},
[0x18A7]={
@@ -47400,8 +47477,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER ALI GALI HALF YA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18A7,
},
[0x18A8]={
@@ -47409,8 +47486,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU ALI GALI BHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18A8,
},
[0x18A9]={
@@ -47418,8 +47495,8 @@ characters.data={
combining=0xE4,
description="MONGOLIAN LETTER ALI GALI DAGALGA",
direction="nsm",
- mongolian="t",
linebreak="cm",
+ mongolian="t",
unicodeslot=0x18A9,
},
[0x18AA]={
@@ -47427,8 +47504,8 @@ characters.data={
category="lo",
description="MONGOLIAN LETTER MANCHU ALI GALI LHA",
direction="l",
- mongolian="d",
linebreak="al",
+ mongolian="d",
unicodeslot=0x18AA,
},
[0x18B0]={
@@ -54123,6 +54200,7 @@ characters.data={
description="LATIN LETTER SMALL CAPITAL L WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x29F, 0x2F },
unicodeslot=0x1D0C,
},
[0x1D0D]={
@@ -54172,6 +54250,7 @@ characters.data={
description="LATIN SMALL LETTER SIDEWAYS O WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x1D11, 0x2F },
unicodeslot=0x1D13,
},
[0x1D14]={
@@ -54980,6 +55059,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x269,
+ specials={ "with", 0x269, 0x2F },
unicodeslot=0x1D7C,
},
[0x1D7D]={
@@ -54988,6 +55068,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x70,
+ specials={ "with", 0x70, 0x2F },
uccode=0x2C63,
unicodeslot=0x1D7D,
},
@@ -55004,6 +55085,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x28A,
+ specials={ "with", 0x28A, 0x2F },
unicodeslot=0x1D7F,
},
[0x1D80]={
@@ -61508,8 +61590,8 @@ characters.data={
contextname="zwnj",
description="ZERO WIDTH NON-JOINER",
direction="bn",
- mongolian="nj",
linebreak="cm",
+ mongolian="nj",
synonyms={ "zwnj" },
unicodeslot=0x200C,
},
@@ -61520,8 +61602,8 @@ characters.data={
contextname="zwj",
description="ZERO WIDTH JOINER",
direction="bn",
- mongolian="nj",
linebreak="zwj",
+ mongolian="nj",
synonyms={ "zwj" },
unicodeslot=0x200D,
},
@@ -61549,16 +61631,16 @@ characters.data={
cjkwd="a",
description="HYPHEN",
direction="on",
- mongolian="nj",
linebreak="ba",
+ mongolian="nj",
unicodeslot=0x2010,
},
[0x2011]={
category="pd",
description="NON-BREAKING HYPHEN",
direction="on",
- mongolian="nj",
linebreak="gl",
+ mongolian="nj",
specials={ "nobreak", 0x2010 },
unicodeslot=0x2011,
},
@@ -61568,8 +61650,8 @@ characters.data={
contextname="textminus",
description="FIGURE DASH",
direction="on",
- mongolian="nj",
linebreak="ba",
+ mongolian="nj",
unicodeslot=0x2012,
},
[0x2013]={
@@ -61579,8 +61661,8 @@ characters.data={
contextname="endash",
description="EN DASH",
direction="on",
- mongolian="nj",
linebreak="ba",
+ mongolian="nj",
unicodeslot=0x2013,
},
[0x2014]={
@@ -61590,8 +61672,8 @@ characters.data={
contextname="emdash",
description="EM DASH",
direction="on",
- mongolian="nj",
linebreak="b2",
+ mongolian="nj",
unicodeslot=0x2014,
},
[0x2015]={
@@ -61903,8 +61985,8 @@ characters.data={
contextname="narrownobreakspace",
description="NARROW NO-BREAK SPACE",
direction="cs",
- mongolian="nj",
linebreak="gl",
+ mongolian="nj",
specials={ "nobreak", 0x20 },
synonyms={ "nnbsp" },
unicodeslot=0x202F,
@@ -63210,10 +63292,6 @@ characters.data={
direction="nsm",
linebreak="cm",
mathspec={
--- {
--- class="default",
--- name="bigcircle",
--- },
{
class="binary",
name="bigcircle",
@@ -74507,8 +74585,8 @@ characters.data={
contextname="dottedcircle",
description="DOTTED CIRCLE",
direction="on",
- mongolian="nj",
linebreak="al",
+ mongolian="nj",
unicodeslot=0x25CC,
},
[0x25CD]={
@@ -81942,7 +82020,7 @@ characters.data={
},
{
class="open",
- name="rlointerval",
+ name="llointerval",
},
{
class="close",
@@ -87383,6 +87461,7 @@ characters.data={
lccode=0x1D7D,
linebreak="al",
shcode=0x50,
+ specials={ "with", 0x50, 0x2F },
unicodeslot=0x2C63,
},
[0x2C64]={
@@ -87400,6 +87479,7 @@ characters.data={
direction="l",
linebreak="al",
shcode=0x61,
+ specials={ "with", 0x61, 0x2F },
uccode=0x23A,
unicodeslot=0x2C65,
},
@@ -87478,6 +87558,7 @@ characters.data={
description="LATIN CAPITAL LETTER M WITH HOOK",
direction="l",
linebreak="al",
+ specials={ "with", 0x4D, 0x1FA9D },
unicodeslot=0x2C6E,
},
[0x2C6F]={
@@ -87506,6 +87587,7 @@ characters.data={
description="LATIN CAPITAL LETTER W WITH HOOK",
direction="l",
linebreak="al",
+ specials={ "with", 0x57, 0x1FA9D },
unicodeslot=0x2C72,
},
[0x2C73]={
@@ -87513,6 +87595,7 @@ characters.data={
description="LATIN SMALL LETTER W WITH HOOK",
direction="l",
linebreak="al",
+ specials={ "with", 0x77, 0x1FA9D },
unicodeslot=0x2C73,
},
[0x2C74]={
@@ -117821,6 +117904,7 @@ characters.data={
description="LATIN CAPITAL LETTER CUATRILLO WITH COMMA",
direction="l",
linebreak="al",
+ specials={ "with", 0xA72C, 0x2C },
unicodeslot=0xA72E,
},
[0xA72F]={
@@ -117828,6 +117912,7 @@ characters.data={
description="LATIN SMALL LETTER CUATRILLO WITH COMMA",
direction="l",
linebreak="al",
+ specials={ "with", 0xA72D, 0x2C },
unicodeslot=0xA72F,
},
[0xA730]={
@@ -117905,6 +117990,7 @@ characters.data={
description="LATIN CAPITAL LETTER AV WITH HORIZONTAL BAR",
direction="l",
linebreak="al",
+ specials={ "with", 0xA738, 0x2015 },
unicodeslot=0xA73A,
},
[0xA73B]={
@@ -117912,6 +117998,7 @@ characters.data={
description="LATIN SMALL LETTER AV WITH HORIZONTAL BAR",
direction="l",
linebreak="al",
+ specials={ "with", 0xA739, 0x2015 },
unicodeslot=0xA73B,
},
[0xA73C]={
@@ -117947,6 +118034,7 @@ characters.data={
description="LATIN CAPITAL LETTER K WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x4B, 0x2F },
unicodeslot=0xA740,
},
[0xA741]={
@@ -117954,6 +118042,7 @@ characters.data={
description="LATIN SMALL LETTER K WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x6B, 0x2F },
unicodeslot=0xA741,
},
[0xA742]={
@@ -118199,6 +118288,7 @@ characters.data={
description="LATIN CAPITAL LETTER THORN WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0xDE, 0x2F },
unicodeslot=0xA764,
},
[0xA765]={
@@ -118206,6 +118296,7 @@ characters.data={
description="LATIN SMALL LETTER THORN WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0xFE, 0x2F },
unicodeslot=0xA765,
},
[0xA766]={
@@ -118564,6 +118655,7 @@ characters.data={
description="LATIN CAPITAL LETTER F WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x46, 0x2F },
unicodeslot=0xA798,
},
[0xA799]={
@@ -118571,6 +118663,7 @@ characters.data={
description="LATIN SMALL LETTER F WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x66, 0x2F },
unicodeslot=0xA799,
},
[0xA79A]={
@@ -118690,6 +118783,7 @@ characters.data={
description="LATIN CAPITAL LETTER H WITH HOOK",
direction="l",
linebreak="al",
+ specials={ "with", 0x48, 0x1FA9D },
unicodeslot=0xA7AA,
},
[0xA7AB]={
@@ -118788,6 +118882,7 @@ characters.data={
description="LATIN CAPITAL LETTER U WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x55, 0x2F },
unicodeslot=0xA7B8,
},
[0xA7B9]={
@@ -118795,6 +118890,7 @@ characters.data={
description="LATIN SMALL LETTER U WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x75, 0x2F },
unicodeslot=0xA7B9,
},
[0xA7BA]={
@@ -118865,6 +118961,7 @@ characters.data={
description="LATIN CAPITAL LETTER S WITH HOOK",
direction="l",
linebreak="al",
+ specials={ "with", 0x53, 0x1FA9D },
unicodeslot=0xA7C5,
},
[0xA7C6]={
@@ -124227,6 +124324,7 @@ characters.data={
description="LATIN SMALL LETTER L WITH INVERTED LAZY S",
direction="l",
linebreak="al",
+ specials={ "with", 0x6C, 0x223E },
unicodeslot=0xAB37,
},
[0xAB38]={
@@ -124276,6 +124374,7 @@ characters.data={
description="LATIN SMALL LETTER BLACKLETTER O WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0xAB3D, 0x2F },
unicodeslot=0xAB3E,
},
[0xAB3F]={
@@ -124283,6 +124382,7 @@ characters.data={
description="LATIN SMALL LETTER OPEN O WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x254, 0x2F },
unicodeslot=0xAB3F,
},
[0xAB40]={
@@ -124297,6 +124397,7 @@ characters.data={
description="LATIN SMALL LETTER TURNED OE WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0x1D14, 0x2F },
unicodeslot=0xAB41,
},
[0xAB42]={
@@ -124318,6 +124419,7 @@ characters.data={
description="LATIN SMALL LETTER TURNED O OPEN-O WITH STROKE",
direction="l",
linebreak="al",
+ specials={ "with", 0xAB43, 0x2F },
unicodeslot=0xAB44,
},
[0xAB45]={
@@ -124374,6 +124476,7 @@ characters.data={
description="LATIN SMALL LETTER SCRIPT R WITH RING",
direction="l",
linebreak="al",
+ specials={ "with", 0xAB4B, 0x1F48D },
unicodeslot=0xAB4C,
},
[0xAB4D]={
@@ -165457,104 +165560,104 @@ characters.data={
category="po",
description="MONGOLIAN BIRGA WITH ORNAMENT",
direction="on",
- mongolian="nj",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11660,
},
[0x11661]={
category="po",
description="MONGOLIAN ROTATED BIRGA",
direction="on",
- mongolian="nj",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11661,
},
[0x11662]={
category="po",
description="MONGOLIAN DOUBLE BIRGA WITH ORNAMENT",
direction="on",
- mongolian="nj",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11662,
},
[0x11663]={
category="po",
description="MONGOLIAN TRIPLE BIRGA WITH ORNAMENT",
direction="on",
- mongolian="nj",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11663,
},
[0x11664]={
category="po",
description="MONGOLIAN BIRGA WITH DOUBLE ORNAMENT",
direction="on",
- mongolian="nj",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11664,
},
[0x11665]={
category="po",
description="MONGOLIAN ROTATED BIRGA WITH ORNAMENT",
direction="on",
- mongolian="nj",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11665,
},
[0x11666]={
category="po",
description="MONGOLIAN ROTATED BIRGA WITH DOUBLE ORNAMENT",
direction="on",
- mongolian="nj",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11666,
},
[0x11667]={
category="po",
description="MONGOLIAN INVERTED BIRGA",
direction="on",
- mongolian="nj",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11667,
},
[0x11668]={
category="po",
description="MONGOLIAN INVERTED BIRGA WITH DOUBLE ORNAMENT",
direction="on",
- mongolian="nj",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11668,
},
[0x11669]={
category="po",
description="MONGOLIAN SWIRL BIRGA",
direction="on",
- mongolian="nj",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x11669,
},
[0x1166A]={
category="po",
description="MONGOLIAN SWIRL BIRGA WITH ORNAMENT",
direction="on",
- mongolian="nj",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x1166A,
},
[0x1166B]={
category="po",
description="MONGOLIAN SWIRL BIRGA WITH DOUBLE ORNAMENT",
direction="on",
- mongolian="nj",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x1166B,
},
[0x1166C]={
category="po",
description="MONGOLIAN TURNED SWIRL BIRGA WITH DOUBLE ORNAMENT",
direction="on",
- mongolian="nj",
linebreak="bb",
+ mongolian="nj",
unicodeslot=0x1166C,
},
[0x11680]={
diff --git a/tex/context/base/mkiv/char-utf.lua b/tex/context/base/mkiv/char-utf.lua
index fb47b5208..7d8ca219b 100644
--- a/tex/context/base/mkiv/char-utf.lua
+++ b/tex/context/base/mkiv/char-utf.lua
@@ -86,33 +86,40 @@ characters.decomposed = decomposed
local graphemes = characters.graphemes
local collapsed = characters.collapsed
+local combined = characters.combined
local mathlists = characters.mathlists
if graphemes then
mark(graphemes)
mark(collapsed)
+ mark(combined)
mark(mathlists)
else
graphemes = allocate()
collapsed = allocate()
+ combined = allocate()
mathlists = allocate()
characters.graphemes = graphemes
characters.collapsed = collapsed
+ characters.combined = combined
characters.mathlists = mathlists
local function backtrack(v,last,target)
local vs = v.specials
- if vs and #vs == 3 and vs[1] == "char" then
- local one = vs[2]
- local two = vs[3]
- local first = utfchar(one)
- local second = utfchar(two) .. last
- collapsed[first..second] = target
- backtrack(data[one],second,target)
+ if vs and #vs == 3 then
+ local kind = vs[1]
+ if kind == "char" or kind == "with" then
+ local one = vs[2]
+ local two = vs[3]
+ local first = utfchar(one)
+ local second = utfchar(two) .. last
+ collapsed[first..second] = target
+ backtrack(data[one],second,target)
+ end
end
end
@@ -141,28 +148,39 @@ else
if vs then
local kind = vs[1]
local size = #vs
- if kind == "char" and size == 3 then -- what if more than 3
- --
- local one = vs[2]
- local two = vs[3]
- local first = utfchar(one)
- local second = utfchar(two)
- local combination = utfchar(unicode)
- --
- collapsed[first..second] = combination
- backtrack(data[one],second,combination)
- -- sort of obsolete:
- local cgf = graphemes[first]
- if not cgf then
- cgf = { [second] = combination }
- graphemes[first] = cgf
- else
- cgf[second] = combination
+ if kind == "char" then
+ if size == 3 then
+ local one = vs[2]
+ local two = vs[3]
+ local first = utfchar(one)
+ local second = utfchar(two)
+ local combination = utfchar(unicode)
+ --
+ collapsed[first..second] = combination
+ backtrack(data[one],second,combination)
+ -- sort of obsolete:
+ local cgf = graphemes[first]
+ if not cgf then
+ cgf = { [second] = combination }
+ graphemes[first] = cgf
+ else
+ cgf[second] = combination
+ end
+ end
+ if size > 2 and (v.mathclass or v.mathspec) then
+ setlist(unicode,vs,2,"specials")
+ end
+ elseif kind == "with" then
+ if size == 3 then
+ combined[utfchar(vs[2])..utfchar(vs[3])] = utfchar(unicode)
+ end
+ elseif kind == "compat" then
+ if size == 3 then
+ combined[utfchar(vs[2])..utfchar(vs[3])] = utfchar(unicode)
+ end
+ if size > 2 and (v.mathclass or v.mathspec) then
+ setlist(unicode,vs,2,"specials")
end
- --
- end
- if (kind == "char" or kind == "compat") and (size > 2) and (v.mathclass or v.mathspec) then
- setlist(unicode,vs,2,"specials")
end
end
local ml = v.mathlist
@@ -182,6 +200,7 @@ else
if storage then
storage.register("characters/graphemes", graphemes, "characters.graphemes")
storage.register("characters/collapsed", collapsed, "characters.collapsed")
+ storage.register("characters/combined", combined, "characters.combined")
storage.register("characters/mathlists", mathlists, "characters.mathlists")
end
@@ -226,6 +245,25 @@ function utffilters.collapse(str,filename)
end
end
+local p_combine = nil -- only for tex
+
+local function prepare()
+ local tree = utfchartabletopattern(combined)
+ p_combine = Cs((tree/combined + p_utf8character)^0)
+end
+
+function utffilters.combine(str) -- not in files
+ -- we could merge collapse into combine ... maybe
+ if not p_combine then
+ prepare()
+ end
+ if not str or str == "" or #str == 1 then
+ return str
+ else
+ return lpegmatch(p_combine,str) or str
+ end
+end
+
local p_decompose = nil
local function prepare()
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index cf28adc74..0aac29de3 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.02.08 16:58}
+\newcontextversion{2021.02.12 18:45}
%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 70860c06e..9ef91ed8e 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.02.08 16:58}
+\edef\contextversion{2021.02.12 18:45}
%D Kind of special:
diff --git a/tex/context/base/mkiv/core-con.lua b/tex/context/base/mkiv/core-con.lua
index 276561ad4..4bf1424bc 100644
--- a/tex/context/base/mkiv/core-con.lua
+++ b/tex/context/base/mkiv/core-con.lua
@@ -1224,7 +1224,7 @@ local words = {
[1000000000000] = "trillion",
}
-local function translate(n)
+local function translate(n,connector)
local w = words[n]
if w then
return w
@@ -1274,7 +1274,7 @@ local function translate(n)
if n > 0 then
compose_one(n)
end
- return #t > 0 and concat(t," ") or tostring(n)
+ return #t > 0 and concat(t,connector or " ") or tostring(n)
end
data.english = {
@@ -1346,7 +1346,7 @@ local words = {
[1000000000000] = "billón",
}
-local function translate(n)
+local function translate(n,connector)
local w = words[n]
if w then
return w
@@ -1401,7 +1401,7 @@ local function translate(n)
if n > 0 then
compose_one(n)
end
- return #t > 0 and concat(t," ") or tostring(n)
+ return #t > 0 and concat(t,connector or " ") or tostring(n)
end
data.spanish = {
@@ -1417,20 +1417,20 @@ data.es = data.spanish
-- verbose handler:
-function converters.verbose.translate(n,language)
+function converters.verbose.translate(n,language,connector)
local t = language and data[language]
- return t and t.translate(n) or n
+ return t and t.translate(n,connector) or n
end
-local function verbose(n,language)
+local function verbose(n,language,connector)
local t = language and data[language]
- context(t and t.translate(n) or n)
+ context(t and t.translate(n,connector) or n)
end
implement {
name = "verbose",
actions = verbose,
- arguments = { "integer", "string" }
+ arguments = { "integer", "string", "string" }
}
-- These are just helpers but not really for the tex end. Do we have to
diff --git a/tex/context/base/mkiv/core-con.mkiv b/tex/context/base/mkiv/core-con.mkiv
index da2648e87..953a99395 100644
--- a/tex/context/base/mkiv/core-con.mkiv
+++ b/tex/context/base/mkiv/core-con.mkiv
@@ -664,8 +664,10 @@
\def\ordinalnumber #1{\clf_ordinal\numexpr#1\relax{\currentlanguage}}
\def\Ordinalnumber #1{\Words{\clf_ordinal\numexpr#1\relax{\currentlanguage}}}
-\def\verbosenumber #1{\clf_verbose\numexpr#1\relax{\currentlanguage}}
-\def\VerboseNumber #1{\Words{\clf_verbose\numexpr#1\relax{\currentlanguage}}}
+\let\verbosenumberconnector\space
+
+\def\verbosenumber #1{\clf_verbose\numexpr#1\relax{\currentlanguage}{\verbosenumberconnector}}
+\def\VerboseNumber #1{\Words{\clf_verbose\numexpr#1\relax{\currentlanguage}{\verbosenumberconnector}}}
%D As longs as symbols are linked to levels or numbers, we can also use the
%D conversion mechanism, but in for instance the itemization macros, we prefer
diff --git a/tex/context/base/mkiv/core-sys.mkiv b/tex/context/base/mkiv/core-sys.mkiv
index 7a04df840..728d37908 100644
--- a/tex/context/base/mkiv/core-sys.mkiv
+++ b/tex/context/base/mkiv/core-sys.mkiv
@@ -132,10 +132,10 @@
[ \v!small=>\divide\scratchcounter 15, % 900,
\v!medium=>\divide\scratchcounter 30, % 1800,
\v!big=>\divide\scratchcounter 60, % 3600,
- \v!normal=>\getnewrandomseed\scratchcounter,
- \s!default=>\getnewrandomseed\scratchcounter,
+ \v!normal=>\scratchcounter\newrandomseed,
+ \s!default=>\scratchcounter\newrandomseed,
\s!unknown=>\scratchcounter#1]%
- \expanded{\setrandomseed{\the\scratchcounter}}%
+ \setrandomseed\scratchcounter
% \writestatus\m!system{randomseed: \the\scratchcounter}%
\endgroup}}
diff --git a/tex/context/base/mkiv/grph-fig.mkiv b/tex/context/base/mkiv/grph-fig.mkiv
index c196d1420..9d34a8417 100644
--- a/tex/context/base/mkiv/grph-fig.mkiv
+++ b/tex/context/base/mkiv/grph-fig.mkiv
@@ -327,7 +327,7 @@
\thisissomeinternal\s!vwb
{#8}%
\gotosomeinternal\s!vwa{#8}\realfolio
- {\hbox to 1.5em{\the\c_grph_steps_reference\presetgoto\hfill}}%
+ {\hbox to 1.5em{\the\c_grph_steps_reference\hfill}}%
\quad#1 (#2,#3) (#5,#6) [#8]\hfill}%
\endgraf}
diff --git a/tex/context/base/mkiv/lang-def.mkiv b/tex/context/base/mkiv/lang-def.mkiv
index 5698bb4af..f74fb5339 100644
--- a/tex/context/base/mkiv/lang-def.mkiv
+++ b/tex/context/base/mkiv/lang-def.mkiv
@@ -606,9 +606,6 @@
% Sardian, Catalan, French, Ladino, Portuguese, Proven\c{c}al,
% Spanish
-\ifdefined\guillemotspace \else \let\guillemotspace\empty \fi
-\ifdefined\sentencespace \else \let\sentencespace \empty \fi
-
\installlanguage
[\s!fr]
[\c!spacing=\v!packed,
diff --git a/tex/context/base/mkiv/lpdf-aux.lua b/tex/context/base/mkiv/lpdf-aux.lua
index 0d7cecbb8..71b018c5f 100644
--- a/tex/context/base/mkiv/lpdf-aux.lua
+++ b/tex/context/base/mkiv/lpdf-aux.lua
@@ -22,7 +22,7 @@ local cache = table.setmetatableindex(function(t,k) -- can be made weak
if v < 0x10000 then
v = format("%04x",v)
else
- v = format("%04x%04x",rshift(v,10),v%1024+0xDC00)
+ v = format("%04x%04x",rshift(v,10)+0xD800,v%1024+0xDC00)
end
t[k] = v
return v
diff --git a/tex/context/base/mkiv/lpdf-ini.lua b/tex/context/base/mkiv/lpdf-ini.lua
index c27270747..ccb6e6628 100644
--- a/tex/context/base/mkiv/lpdf-ini.lua
+++ b/tex/context/base/mkiv/lpdf-ini.lua
@@ -298,7 +298,7 @@ do
if v < 0x10000 then
v = format("%04x",v)
else
- v = format("%04x%04x",rshift(v,10),v%1024+0xDC00)
+ v = format("%04x%04x",rshift(v,10)+0xD800,v%1024+0xDC00)
end
t[k] = v
return v
diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua
index a14246a58..c4078692d 100644
--- a/tex/context/base/mkiv/mult-low.lua
+++ b/tex/context/base/mkiv/mult-low.lua
@@ -163,7 +163,7 @@ return {
"automaticpenaltyhyphenationmodecode", "explicitpenaltyhyphenationmodecode",
"permitgluehyphenationmodecode", "permitallhyphenationmodecode", "permitmathreplacehyphenationmodecode",
--
- "normalizelinecode", "parindentskipcode", "swaphangindentcode", "swapparsshapecode", "breakafterdircode", "removemarginkernscode",
+ "normalizelinecode", "parindentskipcode", "swaphangindentcode", "swapparsshapecode", "breakafterdircode", "removemarginkernscode", "clipwidthcode",
--
"noligaturingcode", "nokerningcode", "noleftligaturecode", "noleftkerncode", "norightligaturecode", "norightkerncode",
"noexpansioncode", "noprotrusioncode",
@@ -251,6 +251,7 @@ return {
--
"filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk",
--
+ "scratchstringone", "scratchstringtwo", "tempstring",
"scratchcounter", "globalscratchcounter", "privatescratchcounter",
"scratchdimen", "globalscratchdimen", "privatescratchdimen",
"scratchskip", "globalscratchskip", "privatescratchskip",
@@ -548,5 +549,7 @@ return {
"futureletnexttoken", "defbackslashbreak", "letbackslashbreak",
--
"pushoverloadmode", "popoverloadmode",
+ --
+ "suggestedalias",
}
}
diff --git a/tex/context/base/mkiv/page-flt.mkiv b/tex/context/base/mkiv/page-flt.mkiv
index cbbae223b..87476adeb 100644
--- a/tex/context/base/mkiv/page-flt.mkiv
+++ b/tex/context/base/mkiv/page-flt.mkiv
@@ -131,7 +131,7 @@
\unexpanded\def\page_floats_collect#1#2#3%
{\clf_collectfloat{#1}\dimexpr#2\relax\dimexpr#3\relax}
-\def\nofstackedfloatincategory#1%
+\def\nofstackedfloatsincategory#1%
{\clf_nofstackedfloats{#1}}
\let\page_floats_column_push_saved\page_floats_push_saved % overloaded in page-mul
diff --git a/tex/context/base/mkiv/page-txt.mkvi b/tex/context/base/mkiv/page-txt.mkvi
index 8b021acca..9bc78ec92 100644
--- a/tex/context/base/mkiv/page-txt.mkvi
+++ b/tex/context/base/mkiv/page-txt.mkvi
@@ -463,10 +463,19 @@
\unexpanded\def\resettextcontent
{\dotripleempty\page_layouts_reset_text_content}
+% \def\page_layouts_reset_text_content[#vertical][#horizontal][#tag]% header text middle
+% {\edef\currentlayoutelement{#vertical:#horizontal}%
+% \ifthirdargument
+% \letvalueempty{\layoutelementhash\executeifdefined{\??layouttextcontent\v!text:#tag}\c!middletext}%
+% \else\ifsecondargument
+% \resetlayoutelementparameter\c!lefttext
+% \resetlayoutelementparameter\c!middletext
+% \resetlayoutelementparameter\c!righttext
+% \fi\fi}
+
\def\page_layouts_reset_text_content[#vertical][#horizontal][#tag]% header text middle
- {\edef\currentlayoutelement{#vertical:#horizontal}%
- \ifthirdargument
- \letvalueempty{\layoutelementhash\executeifdefined{\??layouttextcontent\v!text:#tag}\c!middletext}%
+ {\ifthirdargument
+ \letvalueempty{\namedlayoutelementhash{#vertical:#horizontal}\executeifdefined{\??layouttextcontent\v!text:#tag}\c!middletext}%
\else\ifsecondargument
\resetlayoutelementparameter\c!lefttext
\resetlayoutelementparameter\c!middletext
diff --git a/tex/context/base/mkiv/publ-imp-commands.mkvi b/tex/context/base/mkiv/publ-imp-commands.mkvi
index 281b8324a..a5e6bd6de 100644
--- a/tex/context/base/mkiv/publ-imp-commands.mkvi
+++ b/tex/context/base/mkiv/publ-imp-commands.mkvi
@@ -2,6 +2,8 @@
% for tugboat
+\mutable\protected\def\acro#1{\dontleavehmode{\smallcaps#1}} % can be redefined
+
\definebtxcommand\hbox {\hbox}
\definebtxcommand\vbox {\vbox}
\definebtxcommand\llap {\llap}
@@ -9,7 +11,7 @@
\definebtxcommand\url #1{\hyphenatedurl{#1}}
\definebtxcommand\acro #1{\dontleavehmode{\smallcaps#1}}
-\let\<<
-\let\>>
+\mutable\let\<< % for now \mutable, maybe \definebtxcommand\<{<}
+\mutable\let\>> % for now \mutable, maybe \definebtxcommand\>{>}
\protect \endinput
diff --git a/tex/context/base/mkiv/scrn-fld.mkvi b/tex/context/base/mkiv/scrn-fld.mkvi
index ecd38606d..6c0e97a9a 100644
--- a/tex/context/base/mkiv/scrn-fld.mkvi
+++ b/tex/context/base/mkiv/scrn-fld.mkvi
@@ -390,6 +390,8 @@
\installparameterhandler \??fieldcontent {fieldcontentframed}
\installparameterhandler \??fieldtotal {fieldtotalframed}
+\installparametersethandler \??fieldcontent {fieldcontentframed}
+
\installsetuphandler \??fieldlabel {fieldlabelframed}
\installsetuphandler \??fieldcontent {fieldcontentframed}
\installsetuphandler \??fieldtotal {fieldtotalframed}
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 1440a78aa..53148beec 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 c7fe78f1c..8079e1fb2 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/strc-lnt.mkvi b/tex/context/base/mkiv/strc-lnt.mkvi
index ad8c80d93..0d35be90c 100644
--- a/tex/context/base/mkiv/strc-lnt.mkvi
+++ b/tex/context/base/mkiv/strc-lnt.mkvi
@@ -234,17 +234,15 @@
\let\strc_linenotes_traced\gobbleoneargument
\def\strc_linenotes_traced_indeed#1%
- {\iftracelinenotes
- \hpack to \zeropoint
- {\forgetall
- \hsize\zeropoint
- \hss
- \vpack to \strutheight{\llap{\red\infofont\setstrut\the\c_strc_linenotes}\vss}%
- {\color[blue]{\vl}}%
- \vpack to \strutheight{\rlap{\red\infofont\setstrut#1}\vss}%
- \hss}%
- \prewordbreak
- \fi}
+ {\hpack to \zeropoint
+ {\forgetall
+ \hsize\zeropoint
+ \hss
+ \vpack to \strutheight{\llap{\red\infofont\setstrut\the\c_strc_linenotes}\vss}%
+ {\color[blue]{\vl}}%
+ \vpack to \strutheight{\rlap{\red\infofont\setstrut#1}\vss}%
+ \hss}%
+ \prewordbreak}
\unexpanded\def\tracelinenotes
{\let\strc_linenotes_traced\strc_linenotes_traced_indeed}
diff --git a/tex/context/base/mkiv/strc-sec.mkiv b/tex/context/base/mkiv/strc-sec.mkiv
index fb21254f2..8d326e300 100644
--- a/tex/context/base/mkiv/strc-sec.mkiv
+++ b/tex/context/base/mkiv/strc-sec.mkiv
@@ -798,7 +798,7 @@
\glet\currentstructuresynchronize\donothing
\to \everyheadsynchronization
-\unexpanded\def\theheadsynchonization
+\unexpanded\def\theheadsynchronization
{% no, interferes: \signalcharacter
\the\everyheadsynchronization}
@@ -927,7 +927,7 @@
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
\dostarttagged\t!sectioncaption\empty
- \let\getheadsyncs\theheadsynchonization
+ \let\getheadsyncs\theheadsynchronization
\let\getheadtitle\fullheadtitle
\ifconditional\headshownumber
\let\getheadnumber\fullheadnumber
@@ -941,7 +941,7 @@
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
\dostarttagged\t!sectioncaption\empty
- \let\getheadsyncs\theheadsynchonization
+ \let\getheadsyncs\theheadsynchronization
\ifconditional\c_strc_sectioning_section
\strc_rendering_place_head_section
\else
@@ -953,7 +953,7 @@
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
\dostarttagged\t!sectioncaption\empty
- \let\getheadsyncs\theheadsynchonization
+ \let\getheadsyncs\theheadsynchronization
\strc_rendering_place_head_empty % just flush 'm
\dostoptagged
\strc_sectioning_after_nop
@@ -964,7 +964,7 @@
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
\dostarttagged\t!sectioncaption\empty
- \let\getheadsyncs\theheadsynchonization
+ \let\getheadsyncs\theheadsynchronization
\let\getheadtitle\fullheadtitle
\strc_rendering_place_head_text
\dostoptagged
@@ -972,7 +972,7 @@
\else\ifconditional\c_strc_sectioning_hidden
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
- \let\getheadsyncs\theheadsynchonization
+ \let\getheadsyncs\theheadsynchronization
\dostarttagged\t!sectioncaption\empty
\ifconditional\c_strc_sectioning_section
\strc_rendering_place_head_section
@@ -986,7 +986,7 @@
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
\dostarttagged\t!sectioncaption\empty
- \let\getheadsyncs\theheadsynchonization
+ \let\getheadsyncs\theheadsynchronization
\strc_rendering_place_head_empty % just flush 'm
\dostoptagged
\strc_sectioning_after_nop
@@ -1051,7 +1051,7 @@
{\global\setbox\b_sectioning_delayed\hpack\bgroup
\setmarking[\currentheadcoupling]{li::\currentstructurelistnumber}%
\hpack\headreferenceattributes{}% also does the mark
- \theheadsynchonization
+ \theheadsynchronization
\egroup}
\unexpanded\def\strc_rendering_place_head_hidden % maybe trialtypesetting check
@@ -1061,7 +1061,7 @@
{\noexpand\letgvalue{\??hiddenheadsync\currenthead}\relax
\noexpand\setmarking[\currentheadcoupling]{li::\currentstructurelistnumber}%
\hpack\headreferenceattributes{}% otherwise no destination ... maybe tag ref as hidden and fall back on page reference
- \theheadsynchonization}} % and it's a node anyway
+ \theheadsynchronization}} % and it's a node anyway
\def\synchronizehead #1{\csname\??hiddenheadsync#1\endcsname}
\def\theheadreferenceattributes#1{\csname\??hiddenheadattr#1\endcsname}
diff --git a/tex/context/base/mkiv/supp-ran.mkiv b/tex/context/base/mkiv/supp-ran.mkiv
index d3cc00a6e..4deb6f689 100644
--- a/tex/context/base/mkiv/supp-ran.mkiv
+++ b/tex/context/base/mkiv/supp-ran.mkiv
@@ -36,6 +36,7 @@
\protected\def\getrandomfloat #1#2#3{\edef#1{\clf_getrandomfloat\dimexpr#2\relax\dimexpr#3\relax}}
\protected\def\setrandomseed #1{\clf_setrandomseed\numexpr#1\relax}
\protected\def\getrandomseed #1{\edef#1{\clf_getrandomseed}}
+\protected\def\newrandomseed {\clf_getrandomseed}
%protected\def\pushrandomseed {\clf_pushrandomseed}
%protected\def\poprandomseed {\clf_poprandomseed}
%protected\def\reuserandomseed {\clf_reuserandomseed} % within push/pop
diff --git a/tex/context/base/mkiv/symb-imp-mis.mkiv b/tex/context/base/mkiv/symb-imp-mis.mkiv
index 2320ea59a..b02233baa 100644
--- a/tex/context/base/mkiv/symb-imp-mis.mkiv
+++ b/tex/context/base/mkiv/symb-imp-mis.mkiv
@@ -72,9 +72,9 @@
\definesymbol [numero] [\textnumero]
\definesymbol [euro] [\texteuro]
-\let\euro\texteuro
+\aliased\let\euro\texteuro
-\def\Numero{\symbol[Numero]} % obsolete
-\def\numero{\symbol[numero]} % obsolete
+\permanent\protected\def\Numero{\symbol[Numero]} % obsolete
+\permanent\protected\def\numero{\symbol[numero]} % obsolete
\protect \endinput
diff --git a/tex/context/base/mkiv/syst-aux.mkiv b/tex/context/base/mkiv/syst-aux.mkiv
index cd0c133cd..194f1de2c 100644
--- a/tex/context/base/mkiv/syst-aux.mkiv
+++ b/tex/context/base/mkiv/syst-aux.mkiv
@@ -7554,9 +7554,9 @@
\def\comparedimension#1#2%
{\compresult
- \ifdim#1<#2%
+ \ifdim#1<#2 % space wil be skipped
\zerocount
- \else\ifdim#1<#2%
+ \else\ifdim#1<#2 % space wil be skipped
\plusone
\else
\plustwo
@@ -7568,7 +7568,7 @@
\zerocount
\else\ifdim\dimexpr#2-#1\relax<\roudingeps
\zerocount
- \else\ifdim#1<#2%
+ \else\ifdim#1<#2 % space wil be skipped
\plusone
\else
\plustwo
diff --git a/tex/context/base/mkxl/anch-tab.mkxl b/tex/context/base/mkxl/anch-tab.mkxl
index 48e4ae4cb..6783b1314 100644
--- a/tex/context/base/mkxl/anch-tab.mkxl
+++ b/tex/context/base/mkxl/anch-tab.mkxl
@@ -224,7 +224,12 @@
\glet\anch_tabulate_flush_epos\relax
\to \everytabulate
-%D In order to prevent potential clashes with abbreviations, postpone the mapping.
+%D In order to prevent potential clashes with abbreviations, postpone the mapping and
+%D make them mutable.
+
+\mutable\let\GSC\empty
+\mutable\let\GFC\empty
+\mutable\let\GTC\empty
\appendtoks
\enforced\let\GSC\tbGSC
diff --git a/tex/context/base/mkxl/attr-ini.mkxl b/tex/context/base/mkxl/attr-ini.mkxl
index 8cef1ec56..ae749ff29 100644
--- a/tex/context/base/mkxl/attr-ini.mkxl
+++ b/tex/context/base/mkxl/attr-ini.mkxl
@@ -13,10 +13,6 @@
\writestatus{loading}{ConTeXt Attribute Macros / Initialization}
-%D Although it's still somewhat experimental, here we introduce code
-%D related to attributes. Housekeeping will move completely to \LUA\
-%D and \type {\newattribute} will go away.
-
\unprotect
\registerctxluafile{attr-ini}{}
@@ -70,12 +66,13 @@
{\xtoksapp\t_attr_list_nomath{\csname\??attributeprefix#2\endcsname\attributeunsetvalue}}%
\doifinset\s!public{#3}%
{\aliased\gletcsname#2\s!attribute\expandafter\endcsname\csname\??attributeid#2\endcsname}% \attribute\fooattribute
+ % used to sync in the page builder .. used for directions and scripts ... i start forgetting these details .. (seldom used)
\doifinset\s!pickup{#3}%
{\global\expandafter\integerdef\csname\??attributepickup#2\endcsname\attributeunsetvalue
\xtoksapp\t_attr_list_pickup{\csname\??attributeprefix#2\endcsname\csname\??attributepickup#2\endcsname}%
\ifcsname#2\s!attribute\endcsname
- \xdefcsname\s!pickup#2\s!attribute\endcsname{\expandafter\integerdef\csname\??attributepickup#2\endcsname\csname\??attributeprefix#2\endcsname}%
- \xdefcsname\s!forget#2\s!attribute\endcsname{\expandafter\integerdef\csname\??attributepickup#2\endcsname\attributeunsetvalue}%
+ \permanent\xdefcsname\s!pickup#2\s!attribute\endcsname{\expandafter\integerdef\csname\??attributepickup#2\endcsname\csname\??attributeprefix#2\endcsname}%
+ \permanent\xdefcsname\s!forget#2\s!attribute\endcsname{\expandafter\integerdef\csname\??attributepickup#2\endcsname\attributeunsetvalue}%
\fi}%
\fi}
diff --git a/tex/context/base/mkxl/attr-lay.mkxl b/tex/context/base/mkxl/attr-lay.mkxl
index f9ff18be7..00c633533 100644
--- a/tex/context/base/mkxl/attr-lay.mkxl
+++ b/tex/context/base/mkxl/attr-lay.mkxl
@@ -73,6 +73,8 @@
\installcorenamespace{layoutcomponentattribute}
+\mutable\let\layoutcomponentboxattribute\empty
+
\permanent\def\attr_layoutcomponent_initialize#1%
{\edef\layoutcomponentboxattribute{\clf_definedlayoutcomponent{#1}}%
\edef\layoutcomponentboxattribute{attr \viewerlayerattribute \layoutcomponentboxattribute\relax}%
diff --git a/tex/context/base/mkxl/buff-ini.lmt b/tex/context/base/mkxl/buff-ini.lmt
new file mode 100644
index 000000000..41e8a5078
--- /dev/null
+++ b/tex/context/base/mkxl/buff-ini.lmt
@@ -0,0 +1,900 @@
+if not modules then modules = { } end modules ['buff-ini'] = {
+ version = 1.001,
+ comment = "companion to buff-ini.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+local concat = table.concat
+local type, next, load = type, next, load
+local sub, format = string.sub, string.format
+local splitlines, validstring, replacenewlines = string.splitlines, string.valid, string.replacenewlines
+local P, Cs, patterns, lpegmatch = lpeg.P, lpeg.Cs, lpeg.patterns, lpeg.match
+local utfchar = utf.char
+local nameonly = file.nameonly
+local totable = string.totable
+local md5hex = md5.hex
+local isfile = lfs.isfile
+local savedata = io.savedata
+
+local trace_run = false trackers.register("buffers.run", function(v) trace_run = v end)
+local trace_grab = false trackers.register("buffers.grab", function(v) trace_grab = v end)
+local trace_visualize = false trackers.register("buffers.visualize", function(v) trace_visualize = v end)
+
+local report_buffers = logs.reporter("buffers","usage")
+local report_typeset = logs.reporter("buffers","typeset")
+----- report_grabbing = logs.reporter("buffers","grabbing")
+
+local context = context
+local commands = commands
+
+local implement = interfaces.implement
+
+local scanners = tokens.scanners
+local scanstring = scanners.string
+local scancsname = scanners.csname
+local scaninteger = scanners.integer
+local scanboolean = scanners.boolean
+local scancode = scanners.code
+local scantokencode = scanners.tokencode
+----- scantoken = scanners.token
+
+local getters = tokens.getters
+local gettoken = getters.token
+
+local getcommand = token.get_command
+----- getcsname = token.get_csname
+local getnextchar = token.scan_next_char or token.get_next_char
+
+local variables = interfaces.variables
+local settings_to_array = utilities.parsers.settings_to_array
+local formatters = string.formatters
+local addsuffix = file.addsuffix
+local replacesuffix = file.replacesuffix
+
+local registertempfile = luatex.registertempfile
+
+local v_yes = variables.yes
+
+local eol = patterns.eol
+local space = patterns.space
+local whitespace = patterns.whitespace
+local blackspace = whitespace - eol
+local whatever = (1-eol)^1 * eol^0
+local emptyline = space^0 * eol
+
+local catcodenumbers = catcodes.numbers
+
+local ctxcatcodes = catcodenumbers.ctxcatcodes
+local txtcatcodes = catcodenumbers.txtcatcodes
+
+local setdata = job.datasets.setdata
+local getdata = job.datasets.getdata
+
+local ctx_viafile = context.viafile
+local ctx_getbuffer = context.getbuffer
+local ctx_pushcatcodetable = context.pushcatcodetable
+local ctx_popcatcodetable = context.popcatcodetable
+local ctx_setcatcodetable = context.setcatcodetable
+local ctx_printlines = context.printlines
+
+buffers = buffers or { }
+local buffers = buffers
+
+local cache = { }
+
+local function erase(name)
+ cache[name] = nil
+end
+
+local function assign(name,str,catcodes)
+ cache[name] = {
+ data = str,
+ catcodes = catcodes,
+ typeset = false,
+ }
+end
+
+local function combine(name,str,prepend)
+ local buffer = cache[name]
+ if buffer then
+ buffer.data = prepend and (str .. buffer.data) or (buffer.data .. str)
+ buffer.typeset = false
+ else
+ cache[name] = {
+ data = str,
+ typeset = false,
+ }
+ end
+end
+
+local function prepend(name,str)
+ combine(name,str,true)
+end
+
+local function append(name,str)
+ combine(name,str)
+end
+
+local function exists(name)
+ return cache[name]
+end
+
+local function getcontent(name)
+ local buffer = name and cache[name]
+ return buffer and buffer.data or ""
+end
+
+local function getlines(name)
+ local buffer = name and cache[name]
+ return buffer and splitlines(buffer.data)
+end
+
+local function getnames(name)
+ if type(name) == "string" then
+ return settings_to_array(name)
+ else
+ return name
+ end
+end
+
+local function istypeset(name)
+ local names = getnames(name)
+ if #names == 0 then
+ return false
+ end
+ for i=1,#names do
+ local c = cache[names[i]]
+ if c and not c.typeset then
+ return false
+ end
+ end
+ return true
+end
+
+local function markastypeset(name)
+ local names = getnames(name)
+ for i=1,#names do
+ local c = cache[names[i]]
+ if c then
+ c.typeset = true
+ end
+ end
+end
+
+local function collectcontent(name,separator) -- no print
+ local names = getnames(name)
+ local nnames = #names
+ if nnames == 0 then
+ return getcontent("") -- default buffer
+ elseif nnames == 1 then
+ return getcontent(names[1])
+ else
+ local t = { }
+ local n = 0
+ for i=1,nnames do
+ local c = getcontent(names[i])
+ if c ~= "" then
+ n = n + 1
+ t[n] = c
+ end
+ end
+ -- the default separator was \r, then \n and is now os.newline because buffers
+ -- can be loaded in other applications
+ return concat(t,separator or os.newline)
+ end
+end
+
+local function loadcontent(name) -- no print
+ local content = collectcontent(name,"\n") -- tex likes \n hm, elsewhere \r
+ local ok, err = load(content)
+ if ok then
+ return ok()
+ else
+ report_buffers("invalid lua code in buffer %a: %s",name,err or "unknown error")
+ end
+end
+
+buffers.raw = getcontent
+buffers.erase = erase
+buffers.assign = assign
+buffers.prepend = prepend
+buffers.append = append
+buffers.exists = exists
+buffers.getcontent = getcontent
+buffers.getlines = getlines
+buffers.collectcontent = collectcontent
+buffers.loadcontent = loadcontent
+
+-- the context interface
+
+implement {
+ name = "assignbuffer",
+ actions = assign,
+ arguments = { "string", "string", "integer" }
+}
+
+implement {
+ name = "erasebuffer",
+ actions = erase,
+ arguments = "string"
+}
+
+-- local anything = patterns.anything
+-- local alwaysmatched = patterns.alwaysmatched
+-- local utf8character = patterns.utf8character
+--
+-- local function countnesting(b,e)
+-- local n
+-- local g = P(b) / function() n = n + 1 end
+-- + P(e) / function() n = n - 1 end
+-- -- + anything
+-- + utf8character
+-- local p = alwaysmatched / function() n = 0 end
+-- * g^0
+-- * alwaysmatched / function() return n end
+-- return p
+-- end
+
+local counters = { }
+local nesting = 0
+local autoundent = true
+local continue = false
+
+-- Beware: the first character of bufferdata has to be discarded as it's there to
+-- prevent gobbling of newlines in the case of nested buffers. The last one is
+-- a newlinechar and is removed too.
+--
+-- An \n is unlikely to show up as \r is the endlinechar but \n is more generic
+-- for us.
+
+-- This fits the way we fetch verbatim: the indentation before the sentinel
+-- determines the stripping.
+
+-- str = [[
+-- test test test test test test test
+-- test test test test test test test
+-- test test test test test test test
+--
+-- test test test test test test test
+-- test test test test test test test
+-- test test test test test test test
+-- ]]
+
+-- local function undent(str)
+-- local margin = match(str,"[\n\r]( +)[\n\r]*$") or ""
+-- local indent = #margin
+-- if indent > 0 then
+-- local lines = splitlines(str)
+-- local ok = true
+-- local pattern = "^" .. margin
+-- for i=1,#lines do
+-- local l = lines[i]
+-- if find(l,pattern) then
+-- lines[i] = sub(l,indent+1)
+-- else
+-- ok = false
+-- break
+-- end
+-- end
+-- if ok then
+-- return concat(lines,"\n")
+-- end
+-- end
+-- return str
+-- end
+
+-- how about tabs
+
+local strippers = { }
+local nofspaces = 0
+
+local normalline = space^0 / function(s) local n = #s if n < nofspaces then nofspaces = n end end
+ * whatever
+
+local getmargin = (emptyline + normalline)^1
+
+local function undent(str) -- new version, needs testing: todo: not always needed, like in xtables
+ nofspaces = #str
+ local margin = lpegmatch(getmargin,str)
+ if nofspaces == #str or nofspaces == 0 then
+ return str
+ end
+ local stripper = strippers[nofspaces]
+ if not stripper then
+ stripper = Cs(((space^-nofspaces)/"" * whatever + emptyline)^1)
+ strippers[nofspaces] = stripper
+ end
+ return lpegmatch(stripper,str) or str
+end
+
+buffers.undent = undent
+
+-- function commands.grabbuffer(name,begintag,endtag,bufferdata,catcodes,doundent) -- maybe move \\ to call
+-- local dn = getcontent(name)
+-- if dn == "" then
+-- nesting = 0
+-- continue = false
+-- end
+-- if trace_grab then
+-- if #bufferdata > 30 then
+-- report_grabbing("%s => |%s..%s|",name,sub(bufferdata,1,10),sub(bufferdata,-10,#bufferdata))
+-- else
+-- report_grabbing("%s => |%s|",name,bufferdata)
+-- end
+-- end
+-- local counter = counters[begintag]
+-- if not counter then
+-- counter = countnesting(begintag,endtag)
+-- counters[begintag] = counter
+-- end
+-- nesting = nesting + lpegmatch(counter,bufferdata)
+-- local more = nesting > 0
+-- if more then
+-- dn = dn .. sub(bufferdata,2,-1) .. endtag
+-- nesting = nesting - 1
+-- continue = true
+-- else
+-- if continue then
+-- dn = dn .. sub(bufferdata,2,-2) -- no \r, \n is more generic
+-- elseif dn == "" then
+-- dn = sub(bufferdata,2,-2)
+-- else
+-- dn = dn .. "\n" .. sub(bufferdata,2,-2) -- no \r, \n is more generic
+-- end
+-- local last = sub(dn,-1)
+-- if last == "\n" or last == "\r" then -- \n is unlikely as \r is the endlinechar
+-- dn = sub(dn,1,-2)
+-- end
+-- if doundent or (autoundent and doundent == nil) then
+-- dn = undent(dn)
+-- end
+-- end
+-- assign(name,dn,catcodes)
+-- commands.doifelse(more)
+-- end
+
+local split = table.setmetatableindex(function(t,k)
+ local v = totable(k)
+ t[k] = v
+ return v
+end)
+
+local tochar = {
+ [ 0] = "\\",
+ [ 1] = "{",
+ [ 2] = "}",
+ [ 3] = "$",
+ [ 4] = "&",
+ [ 5] = "\n",
+ [ 6] = "#",
+ [ 7] = "^",
+ [ 8] = "_",
+ [10] = " ",
+ [14] = "%",
+}
+
+local experiment = false
+local experiment = scantokencode and true
+
+local function pickup(start,stop)
+ local stoplist = split[stop] -- totable(stop)
+ local stoplength = #stoplist
+ local stoplast = stoplist[stoplength]
+ local startlist = split[start] -- totable(start)
+ local startlength = #startlist
+ local startlast = startlist[startlength]
+ local list = { }
+ local size = 0
+ local depth = 0
+-- local done = 32
+ local scancode = experiment and scantokencode or scancode
+ while true do -- or use depth
+ local char = scancode()
+ if char then
+-- if char < done then
+-- -- we skip leading control characters so that we can use them to
+-- -- obey spaces (a dirty trick)
+-- else
+-- done = 0
+ char = utfchar(char)
+ size = size + 1
+ list[size] = char
+ if char == stoplast and size >= stoplength then
+ local done = true
+ local last = size
+ for i=stoplength,1,-1 do
+ if stoplist[i] ~= list[last] then
+ done = false
+ break
+ end
+ last = last - 1
+ end
+ if done then
+ if depth > 0 then
+ depth = depth - 1
+ else
+ break
+ end
+ char = false -- trick: let's skip the next (start) test
+ end
+ end
+ if char == startlast and size >= startlength then
+ local done = true
+ local last = size
+ for i=startlength,1,-1 do
+ if startlist[i] ~= list[last] then
+ done = false
+ break
+ end
+ last = last - 1
+ end
+ if done then
+ depth = depth + 1
+ end
+ end
+-- end
+ else
+ -- local t = scantoken()
+ local t = gettoken()
+ if t then
+ -- we're skipping leading stuff, like obeyedlines and relaxes
+ if experiment and size > 0 then
+ -- we're probably in a macro
+ local char = tochar[getcommand(t)]
+ if char then
+ size = size + 1 ; list[size] = char
+ else
+-- local csname = getcsname(t)
+ local csname = scancsname(t)
+ if csname == stop then
+ stoplength = 0
+ break
+ else
+ size = size + 1 ; list[size] = "\\"
+ size = size + 1 ; list[size] = csname
+ size = size + 1 ; list[size] = " "
+ end
+ end
+ else
+ -- ignore and hope for the best
+ end
+ else
+ break
+ end
+ end
+ end
+ local start = 1
+ local stop = size - stoplength - 1
+ -- not good enough: only empty lines, but even then we miss the leading
+ -- for verbatim
+ --
+ -- the next is not yet adapted to the new scanner ... we don't need lpeg here
+ --
+ for i=start,stop do
+ local li = list[i]
+ if lpegmatch(blackspace,li) then
+ -- keep going
+ elseif lpegmatch(eol,li) then
+ -- okay
+ start = i + 1
+ else
+ break
+ end
+ end
+ for i=stop,start,-1 do
+ if lpegmatch(whitespace,list[i]) then
+ stop = i - 1
+ else
+ break
+ end
+ end
+ --
+ if start <= stop then
+ return concat(list,"",start,stop)
+ else
+ return ""
+ end
+end
+
+-- -- lmtx:
+--
+-- local function pickup(start,stop)
+-- local stoplist = split[stop] -- totable(stop)
+-- local stoplength = #stoplist
+-- local stoplast = stoplist[stoplength]
+-- local startlist = split[start] -- totable(start)
+-- local startlength = #startlist
+-- local startlast = startlist[startlength]
+-- local list = { }
+-- local size = 0
+-- local depth = 0
+-- getnextchar() -- we start with a \relax
+-- while true do -- or use depth
+-- local char = getnextchar()
+-- if char then
+-- size = size + 1
+-- list[size] = char
+-- if char == stoplast and size >= stoplength then
+-- local done = true
+-- local last = size
+-- for i=stoplength,1,-1 do
+-- if stoplist[i] ~= list[last] then
+-- done = false
+-- break
+-- end
+-- last = last - 1
+-- end
+-- if done then
+-- if depth > 0 then
+-- depth = depth - 1
+-- else
+-- break
+-- end
+-- char = false -- trick: let's skip the next (start) test
+-- end
+-- end
+-- if char == startlast and size >= startlength then
+-- local done = true
+-- local last = size
+-- for i=startlength,1,-1 do
+-- if startlist[i] ~= list[last] then
+-- done = false
+-- break
+-- end
+-- last = last - 1
+-- end
+-- if done then
+-- depth = depth + 1
+-- end
+-- end
+-- else
+-- local t = gettoken()
+-- if t then
+-- -- we're skipping leading stuff, like obeyedlines and relaxes
+-- if experiment and size > 0 then
+-- -- we're probably in a macro
+-- local char = tochar[getcommand(t)]
+-- if char then
+-- size = size + 1 ; list[size] = char
+-- else
+-- local csname = getcsname(t)
+ local csname = scancsname(t)
+-- if csname == stop then
+-- stoplength = 0
+-- break
+-- else
+-- size = size + 1 ; list[size] = "\\"
+-- size = size + 1 ; list[size] = csname
+-- size = size + 1 ; list[size] = " "
+-- end
+-- end
+-- else
+-- -- ignore and hope for the best
+-- end
+-- else
+-- break
+-- end
+-- end
+-- end
+-- local start = 1
+-- local stop = size - stoplength - 1
+-- -- not good enough: only empty lines, but even then we miss the leading
+-- -- for verbatim
+-- --
+-- -- the next is not yet adapted to the new scanner ... we don't need lpeg here
+-- --
+-- for i=start,stop do
+-- local li = list[i]
+-- if lpegmatch(blackspace,li) then
+-- -- keep going
+-- elseif lpegmatch(eol,li) then
+-- -- okay
+-- start = i + 1
+-- else
+-- break
+-- end
+-- end
+-- for i=stop,start,-1 do
+-- if lpegmatch(whitespace,list[i]) then
+-- stop = i - 1
+-- else
+-- break
+-- end
+-- end
+-- --
+-- if start <= stop then
+-- return concat(list,"",start,stop)
+-- else
+-- return ""
+-- end
+-- end
+
+-- function buffers.pickup(name,start,stop,finish,catcodes,doundent)
+-- local data = tokens.pickup(start,stop)
+-- if doundent or (autoundent and doundent == nil) then
+-- data = buffers.undent(data)
+-- end
+-- buffers.assign(name,data,catcodes)
+-- context(finish)
+-- end
+
+-- commands.pickupbuffer = buffers.pickup
+
+tokens.pickup = pickup
+
+implement {
+ name = "pickupbuffer",
+ actions = function()
+ -- let's pickup all here (no arguments)
+ local name = scanstring()
+ local start = scanstring()
+ local stop = scanstring()
+ local finish = scancsname()
+ local catcodes = scaninteger()
+ local doundent = scanboolean()
+ -- could be a scanner:
+ local data = pickup(start,stop)
+ if doundent or (autoundent and doundent == nil) then
+ data = undent(data)
+ end
+ buffers.assign(name,data,catcodes)
+ context[finish]()
+ end
+}
+
+local function savebuffer(list,name,prefix) -- name is optional
+ if not list or list == "" then
+ list = name
+ end
+ if not name or name == "" then
+ name = list
+ end
+ local content = collectcontent(list,nil) or ""
+ if content == "" then
+ content = "empty buffer"
+ end
+ if prefix == v_yes then
+ name = addsuffix(tex.jobname .. "-" .. name,"tmp")
+ end
+ io.savedata(name,replacenewlines(content))
+end
+
+implement {
+ name = "savebuffer",
+ actions = savebuffer,
+ arguments = "3 strings",
+}
+
+-- we can consider adding a size to avoid unlikely clashes
+
+local olddata = nil
+local newdata = nil
+local getrunner = sandbox.getrunner
+
+local runner = sandbox.registerrunner {
+ name = "run buffer",
+ program = "context",
+ method = "execute",
+ template = jit and "--purgeall --jit %filename%" or "--purgeall %filename%",
+ reporter = report_typeset,
+ checkers = {
+ filename = "readable",
+ }
+}
+
+local function runbuffer(name,encapsulate,runnername,suffixes)
+ if not runnername or runnername == "" then
+ runnername = "run buffer"
+ end
+ local suffix = "pdf"
+ if type(suffixes) == "table" then
+ suffix = suffixes[1]
+ elseif type(suffixes) == "string" and suffixes ~= "" then
+ suffix = suffixes
+ suffixes = { suffix }
+ else
+ suffixes = { suffix }
+ end
+ local runner = getrunner(runnername)
+ if not runner then
+ report_typeset("unknown runner %a",runnername)
+ return
+ end
+ if not olddata then
+ olddata = getdata("buffers","runners") or { }
+ local suffixes = olddata.suffixes
+ local hashes = olddata.hashes
+ if hashes and suffixes then
+ for k, hash in next, hashes do
+ for h, v in next, hash do
+ for s, v in next, suffixes do
+ local tmp = addsuffix(h,s)
+ -- report_typeset("mark for deletion: %s",tmp)
+ registertempfile(tmp)
+ end
+ end
+ end
+ end
+ end
+ if not newdata then
+ newdata = {
+ version = environment.version,
+ suffixes = { },
+ hashes = { },
+ }
+ setdata {
+ name = "buffers",
+ tag = "runners",
+ data = newdata,
+ }
+ end
+ local oldhashes = olddata.hashes or { }
+ local newhashes = newdata.hashes or { }
+ local old = oldhashes[suffix]
+ local new = newhashes[suffix]
+ if not old then
+ old = { }
+ oldhashes[suffix] = old
+ for hash, n in next, old do
+ local tag = formatters["%s-t-b-%s"](tex.jobname,hash)
+ local tmp = addsuffix(tag,"tmp")
+ -- report_typeset("mark for deletion: %s",tmp)
+ registertempfile(tmp) -- to be sure
+ end
+ end
+ if not new then
+ new = { }
+ newhashes[suffix] = new
+ end
+ local names = getnames(name)
+ local content = collectcontent(names,nil) or ""
+ if content == "" then
+ content = "empty buffer"
+ end
+ if encapsulate then
+ content = formatters["\\starttext\n%s\n\\stoptext\n"](content)
+ end
+ --
+ local hash = md5hex(content)
+ local tag = formatters["%s-t-b-%s"](nameonly(tex.jobname),hash) -- make sure we run on the local path
+ --
+ local filename = addsuffix(tag,"tmp")
+ local resultname = addsuffix(tag,suffix)
+ --
+ if new[tag] then
+ -- done
+ elseif not old[tag] or olddata.version ~= newdata.version or not isfile(resultname) then
+ if trace_run then
+ report_typeset("changes in %a, processing forced",name)
+ end
+ savedata(filename,content)
+ report_typeset("processing saved buffer %a\n",filename)
+ runner { filename = filename }
+ end
+ new[tag] = (new[tag] or 0) + 1
+ report_typeset("no changes in %a, processing skipped",name)
+ registertempfile(filename)
+ -- report_typeset("mark for persistence: %s",filename)
+ for i=1,#suffixes do
+ local suffix = suffixes[i]
+ newdata.suffixes[suffix] = true
+ local tmp = addsuffix(tag,suffix)
+ -- report_typeset("mark for persistance: %s",tmp)
+ registertempfile(tmp,nil,true)
+ end
+ --
+ return resultname -- first result
+end
+
+local f_getbuffer = formatters["buffer.%s"]
+
+local function getbuffer(name)
+ local str = getcontent(name)
+ if str ~= "" then
+ -- characters.showstring(str)
+ ctx_viafile(str,f_getbuffer(validstring(name,"noname")))
+ end
+end
+
+local function getbuffermkvi(name) -- rather direct !
+ ctx_viafile(resolvers.macros.preprocessed(getcontent(name)),formatters["buffer.%s.mkiv"](validstring(name,"noname")))
+end
+
+local function gettexbuffer(name)
+ local buffer = name and cache[name]
+ if buffer and buffer.data ~= "" then
+ ctx_pushcatcodetable()
+ if buffer.catcodes == txtcatcodes then
+ ctx_setcatcodetable(txtcatcodes)
+ else
+ ctx_setcatcodetable(ctxcatcodes)
+ end
+ -- context(function() ctx_viafile(buffer.data) end)
+ ctx_getbuffer { name } -- viafile flushes too soon
+ ctx_popcatcodetable()
+ end
+end
+
+buffers.get = getbuffer
+buffers.getmkiv = getbuffermkiv
+buffers.gettexbuffer = gettexbuffer
+buffers.run = runbuffer
+
+implement { name = "getbufferctxlua", actions = loadcontent, arguments = "string" }
+implement { name = "getbuffer", actions = getbuffer, arguments = "string" }
+implement { name = "getbuffermkvi", actions = getbuffermkvi, arguments = "string" }
+implement { name = "gettexbuffer", actions = gettexbuffer, arguments = "string" }
+
+interfaces.implement {
+ name = "getbuffercontent",
+ arguments = "string",
+ actions = { getcontent, context },
+}
+
+implement {
+ name = "typesetbuffer",
+ actions = { runbuffer, context },
+ arguments = { "string", true }
+}
+
+implement {
+ name = "runbuffer",
+ actions = { runbuffer, context },
+ arguments = { "string", false, "string" }
+}
+
+implement {
+ name = "doifelsebuffer",
+ actions = { exists, commands.doifelse },
+ arguments = "string"
+}
+
+-- This only used for mp buffers and is a kludge. Don't change the
+-- texprint into texsprint as it fails because "p<nl>enddef" becomes
+-- "penddef" then.
+
+implement {
+ name = "feedback", -- bad name, maybe rename to injectbuffercontent
+ actions = { collectcontent, ctx_printlines },
+ arguments = "string"
+}
+
+do
+
+ local context = context
+ local ctxcore = context.core
+
+ local ctx_startbuffer = ctxcore.startbuffer
+ local ctx_stopbuffer = ctxcore.stopbuffer
+
+ local ctx_startcollecting = context.startcollecting
+ local ctx_stopcollecting = context.stopcollecting
+
+ function ctxcore.startbuffer(...)
+ ctx_startcollecting()
+ ctx_startbuffer(...)
+ end
+
+ function ctxcore.stopbuffer()
+ ctx_stopbuffer()
+ ctx_stopcollecting()
+ end
+
+end
+
+-- moved here:
+
+function buffers.samplefile(name)
+ if not buffers.exists(name) then
+ buffers.assign(name,io.loaddata(resolvers.findfile(name)))
+ end
+ buffers.get(name)
+end
+
+implement {
+ name = "samplefile", -- bad name, maybe rename to injectbuffercontent
+ actions = buffers.samplefile,
+ arguments = "string"
+}
diff --git a/tex/context/base/mkxl/buff-ini.mkxl b/tex/context/base/mkxl/buff-ini.mkxl
index 815107851..bb1468e61 100644
--- a/tex/context/base/mkxl/buff-ini.mkxl
+++ b/tex/context/base/mkxl/buff-ini.mkxl
@@ -13,7 +13,7 @@
\writestatus{loading}{ConTeXt Buffer Macros / Buffers}
-\registerctxluafile{buff-ini}{}
+\registerctxluafile{buff-ini}{autosuffix}
\unprotect
@@ -76,7 +76,7 @@
\scratchcounter\catcodetable
\clf_erasebuffer{#1}%
\setcatcodetable\vrbcatcodes
- \protected\def\dofinishpickupbuffer
+ \protected\def\buff_finish
{\endgroup % (1)
\endgroup % (2)
#5}%
@@ -88,7 +88,8 @@
{#1}%
{#2}%
{#3}%
- {\string\dofinishpickupbuffer}%
+% {\string\dofinishpickupbuffer}%
+ \buff_finish
\scratchcounter
\ifnum#6=\plusone\s!true\else\s!false\fi
% \relax}
diff --git a/tex/context/base/mkxl/buff-ver.mkxl b/tex/context/base/mkxl/buff-ver.mkxl
index 7a34729fb..68a07df60 100644
--- a/tex/context/base/mkxl/buff-ver.mkxl
+++ b/tex/context/base/mkxl/buff-ver.mkxl
@@ -46,23 +46,23 @@
{\spaceskip\fontcharwd\font`x\relax
\xspaceskip\spaceskip}
-\setvalue{\??typinglines\v!no }{\buff_verbatim_ignore_hyphens}
-\setvalue{\??typinglines\v!normal }{\buff_verbatim_ignore_hyphens}
-\setvalue{\??typinglines\v!yes }{\buff_verbatim_obey_breakpoints}
-\setvalue{\??typinglines\v!hyphenated}{\buff_verbatim_obey_hyphens}
-
-\setvalue{\??typingspace\v!on }{\enforced\let\obeyedspace\specialcontrolspace}
-\setvalue{\??typingspace\v!stretch }{\enforced\let\obeyedspace\specialstretchedspace}
-\setvalue{\??typingspace\v!normal }{}
-\setvalue{\??typingspace\v!fixed }{\enforced\let\obeyedspace\specialfixedspace}
-
-\setvalue{\??typingblank\v!standard }{\s_spac_whitespace_parskip}
-\setvalue{\??typingblank\v!small }{\smallskipamount}
-\setvalue{\??typingblank\v!medium }{\medskipamount}
-\setvalue{\??typingblank\v!big }{\bigskipamount}
-\setvalue{\??typingblank\v!halfline }{.5\baselineskip}
-\setvalue{\??typingblank\v!line }{\baselineskip}
-\setvalue{\??typingblank\v!none }{\zeropoint}
+\defcsname\??typinglines\v!no \endcsname{\buff_verbatim_ignore_hyphens}
+\defcsname\??typinglines\v!normal \endcsname{\buff_verbatim_ignore_hyphens}
+\defcsname\??typinglines\v!yes \endcsname{\buff_verbatim_obey_breakpoints}
+\defcsname\??typinglines\v!hyphenated\endcsname{\buff_verbatim_obey_hyphens}
+
+\defcsname\??typingspace\v!on \endcsname{\enforced\let\obeyedspace\specialcontrolspace}
+\defcsname\??typingspace\v!stretch \endcsname{\enforced\let\obeyedspace\specialstretchedspace}
+\defcsname\??typingspace\v!normal \endcsname{}
+\defcsname\??typingspace\v!fixed \endcsname{\enforced\let\obeyedspace\specialfixedspace}
+
+\defcsname\??typingblank\v!standard \endcsname{\s_spac_whitespace_parskip}
+\defcsname\??typingblank\v!small \endcsname{\smallskipamount}
+\defcsname\??typingblank\v!medium \endcsname{\medskipamount}
+\defcsname\??typingblank\v!big \endcsname{\bigskipamount}
+\defcsname\??typingblank\v!halfline \endcsname{.5\baselineskip}
+\defcsname\??typingblank\v!line \endcsname{\baselineskip}
+\defcsname\??typingblank\v!none \endcsname{\zeropoint}
\protected\def\buff_verbatim_obey_hyphens
{}
@@ -96,7 +96,7 @@
\begincsname\??typingspace\p_buff_space\endcsname
\relax\the\everyinitializeverbatim\relax}
-\protected\def\doinitializeverbatim % for use elsewhere .. temp hack (see lxml-ini)
+\permanent\protected\def\doinitializeverbatim % for use elsewhere .. temp hack (see lxml-ini)
{\buff_verbatim_initialize_type_one
\buff_verbatim_initialize_type_two}
@@ -577,6 +577,8 @@
% [category] [settings] {name} % for historic reasons, all filenames are {}
+\mutable\let\currenttypingfile\empty
+
\appendtoks
\frozen\instance\setuevalue{\e!type\currenttyping\v!file}{\typefile[\currenttyping]}%
\to \everydefinetyping
@@ -602,15 +604,15 @@
\def\buff_verbatim_type_file_checked#1#2%
{\doifelsetypingfile{#2}
- {\buff_verbatim_type_file_indeed{#1}\askedtypingfile}
+ {\buff_verbatim_type_file_indeed{#1}\currenttypingfile}
{\showmessage\m!verbatims1{#2}}}
\permanent\protected\def\doifelsetypingfile#1%
- {\edef\askedtypingfile{\locfilename{#1}}%
- \ifempty\askedtypingfile
- \edef\askedtypingfile{\locfilename{#1.tex}}% downward compatible
+ {\edef\currenttypingfile{\locfilename{#1}}%
+ \ifempty\currenttypingfile
+ \edef\currenttypingfile{\locfilename{#1.tex}}% downward compatible
\fi
- \ifempty\askedtypingfile
+ \ifempty\currenttypingfile
\expandafter\secondoftwoarguments
\else
\expandafter\firstoftwoarguments
@@ -656,16 +658,16 @@
\c!stop=\typingparameter\c!stop, % ?
\c!step=\typingparameter\c!step]}
-\overloaded\protected\def\endofverbatimlinenumbering
+\permanent\protected\def\endofverbatimlinenumbering
{\stoplinenumbering}
\def\buff_verbatim_setup_line_numbering
{\ifdefined\startlinenumbering
- \edef\currenttypingnumbering{\typingparameter\c!numbering}%
- \ifx\currenttypingnumbering\v!file
+ \edef\p_numbering{\typingparameter\c!numbering}%
+ \ifx\p_numbering\v!file
\setuplinenumbering[\currenttyping][\c!method=\v!file]%
\settrue\verbatimnumberinglines
- \orelse\ifx\currenttypingnumbering\v!line
+ \orelse\ifx\p_numbering\v!line
\settrue\verbatimnumberinglines
\else
\setfalse\verbatimnumberinglines
@@ -959,7 +961,7 @@
\nobreak
\fi}
-\protected\def\dodisplayverbatiminitialize#1%
+\permanent\protected\def\dodisplayverbatiminitialize#1%
{\forgetparindent % maybe more
\c_buff_verbatim_noflines#1\relax
\c_buff_verbatim_current\zerocount}
diff --git a/tex/context/base/mkxl/catc-def.mkxl b/tex/context/base/mkxl/catc-def.mkxl
index b7332a41d..a7d48714a 100644
--- a/tex/context/base/mkxl/catc-def.mkxl
+++ b/tex/context/base/mkxl/catc-def.mkxl
@@ -254,16 +254,16 @@
%D Because some characters have a special meaning, we provide shortcuts to their
%D character representation. Some will be overloaded (which might change).
-\chardef \^ = \circumflexasciicode
-\chardef \_ = \underscoreasciicode
-\chardef \& = \ampersandasciicode
-\chardef \% = \commentasciicode
-\chardef \# = \hashasciicode
-\chardef \$ = \dollarasciicode
-\chardef \{ = \leftbraceasciicode
-\chardef \} = \rightbraceasciicode
-\chardef \\ = \backslashasciicode
-\chardef \| = \barasciicode
+\permanent\chardef \^ = \circumflexasciicode
+\permanent\chardef \_ = \underscoreasciicode
+\permanent\chardef \& = \ampersandasciicode
+\permanent\chardef \% = \commentasciicode
+\permanent\chardef \# = \hashasciicode
+\permanent\chardef \$ = \dollarasciicode
+\permanent\chardef \{ = \leftbraceasciicode
+\permanent\chardef \} = \rightbraceasciicode
+\permanent\chardef \\ = \backslashasciicode
+\permanent\chardef \| = \barasciicode
\pushoverloadmode
\catcodetable \ctxcatcodes
diff --git a/tex/context/base/mkxl/catc-sym.mkxl b/tex/context/base/mkxl/catc-sym.mkxl
index c0a55e12e..a96ffb865 100644
--- a/tex/context/base/mkxl/catc-sym.mkxl
+++ b/tex/context/base/mkxl/catc-sym.mkxl
@@ -57,7 +57,7 @@
%immutable\edef\s!s_o_h_token{\expandtoken \othercatcode \plusone } % start of header ^^^^0001
%immutable\edef\s!s_t_x_token{\expandtoken \othercatcode \plustwo } % start of text ^^^^0002
%immutable\edef\s!e_t_x_token{\expandtoken \othercatcode \plusthree} % end of text ^^^^0003
-%immutable\edef\s!e_o_t_token{\expandtoken \othercatcode \plusfour } % end of transmission ^^^^0004
+\immutable\edef\s!e_o_t_token{\expandtoken \othercatcode \plusfour } % end of transmission ^^^^0004
%immutable\edef\s!e_n_q_token{\expandtoken \othercatcode \plusfive } % enquiry
%immutable\edef\s!a_c_k_token{\expandtoken \othercatcode \plussix } % aknowledgement
diff --git a/tex/context/base/mkxl/char-tex.lmt b/tex/context/base/mkxl/char-tex.lmt
index 918b6cc39..3d8f6a259 100644
--- a/tex/context/base/mkxl/char-tex.lmt
+++ b/tex/context/base/mkxl/char-tex.lmt
@@ -8,7 +8,7 @@ if not modules then modules = { } end modules ['char-tex'] = {
local lpeg = lpeg
local tonumber, next, type = tonumber, next, type
-local format, find, gmatch, match = string.format, string.find, string.gmatch, string.match
+local format, find, gmatch, match, gsub = string.format, string.find, string.gmatch, string.match, string.gsub
local utfchar, utfbyte = utf.char, utf.byte
local concat, tohash = table.concat, table.tohash
local P, C, R, S, V, Cs, Cc = lpeg.P, lpeg.C, lpeg.R, lpeg.S, lpeg.V, lpeg.Cs, lpeg.Cc
@@ -28,6 +28,9 @@ local texcharacters = { }
characters.tex = texcharacters
local utffilters = characters.filters.utf
+local allocate = utilities.storage.allocate or function() return { } end
+local mark = utilities.storage.mark or allocate
+
local is_character = characters.is_character
local is_letter = characters.is_letter
local is_command = characters.is_command
@@ -393,61 +396,100 @@ texcharacters.strtoutfpattern = toutfpattern
texcharacters.strtextoutf = textoutf
local collapse = utffilters.collapse
+local combine = utffilters.combine
---
+if not interfaces then return end
+
+local implement = interfaces.implement
local pattern
-local hash = {
- ["acute"] = "́", -- 0x300
- ["breve"] = "̆", -- 0x301
- ["caron"] = "̌", -- 0x302
- ["cedilla"] = "̧", -- 0x303
- ["circumflex"] = "̂", -- 0x304
- ["diaeresis"] = "̈", -- 0x305
- ["dieresis"] = "̈", -- 0x305
- ["umlaut"] = "̈", -- 0x305
- ["dot"] = "̇", -- 0x306
- ["doublegrave"] = "̏", -- 0x307
- ["doubleverticalline"] = "̎", -- 0x308
- ["grave"] = "̀", -- 0x309
- ["hook"] = "̉", -- 0x30A
- ["hungarumlaut"] = "̋", -- 0x30B
- ["macron"] = "̄", -- 0x30C
- ["ogonek"] = "̨", -- 0x30D -- hm
- ["overline"] = "̅", -- 0x30E
- ["ring"] = "̊", -- 0x30F
- ["tilde"] = "̃", -- 0x327
- ["verticalline"] = "̍", -- 0x328
-}
+local verbosemarks = characters.verbosemarks
+
+if verbosemarks then
+
+ mark(verbosemarks)
+
+else
+
+ verbosemarks = allocate {
+ ["stroke"] = utfchar(0x02F), ["slash"] = utfchar(0x02F),
+ ["middle dot"] = utfchar(0x0B7),
+
+ ["grave"] = utfchar(0x300),
+ ["acute"] = utfchar(0x301),
+ ["circumflex"] = utfchar(0x302),
+ ["tilde"] = utfchar(0x303),
+ ["macron"] = utfchar(0x304), ["line"] = utfchar(0x304),
+ ["overline"] = utfchar(0x305),
+ ["breve"] = utfchar(0x306),
+ ["dot"] = utfchar(0x307),
+ ["dieresis"] = utfchar(0x308), ["diaeresis"] = utfchar(0x308),
+ ["hook"] = utfchar(0x309),
+ ["ring"] = utfchar(0x30A),
+ ["double acute"] = utfchar(0x30B), ["hungarumlaut"] = utfchar(0x30B), -- tex speak
+ ["caron"] = utfchar(0x30C),
+ ["vertical line"] = utfchar(0x30D),
+ ["double vertical line"] = utfchar(0x30E),
+ ["double grave"] = utfchar(0x30F),
+ ["inverted breve"] = utfchar(0x311),
+ ["dot below"] = utfchar(0x323),
+ ["ring below"] = utfchar(0x325),
+ ["cedilla"] = utfchar(0x327), ["comma below"] = utfchar(0x327),
+ ["ogonek"] = utfchar(0x328),
+ ["caron below"] = utfchar(0x32C),
+ ["circumflex below"] = utfchar(0x32D),
+ ["tilde below"] = utfchar(0x330),
+ ["macron below"] = utfchar(0x331), ["line below"] = utfchar(0x331),
+
+ ["hook below"] = utfchar(0x1FA9D),
+ }
+
+ characters.verbosemarks = verbosemarks
+
+ if storage then
+ storage.register("characters/verbosemarks", verbosemarks, "characters.verbosemarks")
+ end
+
+end
local function prepare()
- pattern = Cs((utfchartabletopattern(hash) / hash + lpegpatterns.space/"" + lpegpatterns.utf8character)^0)
+ pattern = Cs((utfchartabletopattern(verbosemarks) / verbosemarks + lpegpatterns.space/"" + lpegpatterns.utf8character)^0)
return pattern
end
local hash = table.setmetatableindex(function(t,k)
local f = ""
k = lpegmatch(pattern or prepare(),k) or k
- local v = collapse(k) or k
- if k == v then
- v = commandmapping[k] or k
- if k ~= v then
- f = "\\"
- end
- end
- if k == v then
- v = textoutf(k) or k
- if k ~= v then
- f = "\\"
- end
- end
+ local v = collapse(k) or k -- char specials
+-- print("collapse",k,v)
+ if k ~= v then
+ goto DONE
+ end
+ v = combine(k) or k -- with specials
+-- print("combine",k,v)
+ if k ~= v then
+ goto DONE
+ end
+ v = commandmapping[k] or k
+-- print("command",k,v)
+ if k ~= v then
+ f = "\\"
+ goto DONE
+ end
+ v = textoutf(k) or k
+-- print("utf",k,v)
+ if k ~= v then
+ f = "\\"
+ goto DONE
+ end
+ ::DONE::
report_defining("instead of old school '%s%s' you can input the utf sequence %s",f,k,v)
t[k] = v
return v
end)
-interfaces.implement {
+implement {
name = "chr",
arguments = "argument",
public = true,
@@ -472,10 +514,6 @@ end
-- all kind of initializations
-if not interfaces then return end
-
-local implement = interfaces.implement
-
local tex = tex
local texsetlccode = tex.setlccode
local texsetsfcode = tex.setsfcode
@@ -504,11 +542,11 @@ local texsetchar = tokens.setters.char
-- end
function texcharacters.defineaccents()
- -- local ctx_dodefinecombine = context.dodefinecombine
+ local ctx_dodefinecombine = context.dodefinecombine
local ctx_dodefinecommand = context.dodefinecommand
- -- for accent, group in next, accentmapping do
- -- ctx_dodefinecombine(accent)
- -- end
+ for verbose, mark in next, verbosemarks do
+ ctx_dodefinecombine((gsub(verbose," ","")),mark)
+ end
for command, mapping in next, commandmapping do
ctx_dodefinecommand(command,mapping)
end
@@ -856,7 +894,7 @@ local function overload(c,u,code,codes)
end
end
-interfaces.implement {
+implement {
name = "overloaduppercase",
arguments = "2 strings",
actions = function(c,u)
@@ -864,10 +902,93 @@ interfaces.implement {
end
}
-interfaces.implement {
+implement {
name = "overloadlowercase",
arguments = "2 strings",
actions = function(c,u)
overload(c,u,"lccode","lccodes")
end
}
+
+-- Just for fun we support keywords:
+--
+-- \startTEXpage[offset=10pt]
+-- abg"
+-- \sl \showboxes
+-- \accent `" h%
+-- \accent `" x%
+-- \accent yoffset .2ex `" x
+-- \accent yoffset 1.1ex `x x%
+-- \stopTEXpage
+--
+-- We could do this:
+--
+-- \startTEXpage[offset=10pt]
+-- abg"
+-- \sl \showboxes
+-- \withaccent `" h%
+-- \withaccent `" x%
+-- \withaccent yoffset .2ex `" x
+-- \withaccent yoffset 1.1ex accent `x base `x%
+-- \stopTEXpage
+--
+-- But only when users demand it:
+--
+-- do
+--
+-- local new_glyph = nodes.pool.glyph
+--
+-- local scankeyword = tokens.scanners.keyword
+-- local scaninteger = tokens.scanners.integer
+-- local scandimension = tokens.scanners.dimension
+-- local scantoken = tokens.scanners.token
+--
+-- implement {
+-- name = "withaccent",
+-- public = true,
+-- protected = true,
+-- actions = function()
+-- local xoffset = 0
+-- local yoffset = 0
+-- local accent = false
+-- local base = false
+-- local zwj = 0x200D
+-- while true do
+-- if scankeyword("xoffset") then
+-- xoffset = scandimension()
+-- elseif scankeyword("yoffset") then
+-- yoffset = scandimension()
+-- elseif scankeyword("accent") then
+-- accent = scaninteger()
+-- elseif scankeyword("base") then
+-- base = scaninteger()
+-- else
+-- break
+-- end
+-- end
+-- if not accent then
+-- accent = scaninteger()
+-- end
+-- if not base then
+-- local nxttok = scantoken()
+-- base = nxttok.cmdname == "char_number" and scaninteger() or nxttok.index
+-- end
+-- if base and accent and base > 0 and accent > 0 then
+-- base = new_glyph(true,base)
+-- zwj = new_glyph(true,zwj)
+-- accent = new_glyph(true,accent)
+-- local slant = fonts.hashes.parameters[true].slant / 65536 -- a la tex
+-- local xheight = fonts.hashes.parameters[true].xheight -- hm, compensated for glyphscale?
+-- accent.xoffset = xoffset - .5*(base.width -accent.width) + .5*(base.height-accent.height) * slant
+-- accent.yoffset = yoffset - (xheight - accent.height)
+-- accent.left = accent.width
+-- accent.options = accent.options | 0x40 | 0x80
+-- context.dontleavehmode()
+-- context(base)
+-- context(zwj)
+-- context(accent)
+-- end
+-- end,
+-- }
+--
+-- end
diff --git a/tex/context/base/mkxl/chem-str.mkxl b/tex/context/base/mkxl/chem-str.mkxl
index bd35ddb12..6c591225e 100644
--- a/tex/context/base/mkxl/chem-str.mkxl
+++ b/tex/context/base/mkxl/chem-str.mkxl
@@ -445,6 +445,13 @@
\hss
\egroup}
+\permanent\let\X\relax
+\permanent\let\T\relax
+\permanent\let\B\relax
+\permanent\let\L\relax
+\permanent\let\M\relax
+\permanent\let\R\relax
+
\appendtoks
\enforced\let |\chemicalbar % \SR{N|NH}
\enforced\let \+\chemicaloxidationplus
diff --git a/tex/context/base/mkxl/colo-ini.mkxl b/tex/context/base/mkxl/colo-ini.mkxl
index 0e3ea9c6f..9c291ea9f 100644
--- a/tex/context/base/mkxl/colo-ini.mkxl
+++ b/tex/context/base/mkxl/colo-ini.mkxl
@@ -126,22 +126,22 @@
\permanent\protected\def\transparent[#1]%
{\bgroup
- \edef\currenttransparencyname{#1}%
+ \edef\scratchstringone{#1}%
% the \relax catches a non existent csname
- \ifx\currenttransparencyname\v!reset
+ \ifx\scratchstringone\v!reset
\c_attr_transparency\attributeunsetvalue
\else
- \begincsname\??transparencysetter\currenttransparencyname\endcsname\relax
+ \begincsname\??transparencysetter\scratchstringone\endcsname\relax
\fi
\let\nexttoken}
\permanent\protected\def\starttransparent[#1]%$
{\begingroup
- \edef\currenttransparencyname{#1}%
- \ifx\currenttransparencyname\v!reset
+ \edef\scratchstringone{#1}%
+ \ifx\scratchstringone\v!reset
\c_attr_transparency\attributeunsetvalue
\else
- \begincsname\??transparencysetter\currenttransparencyname\endcsname\relax
+ \begincsname\??transparencysetter\scratchstringone\endcsname\relax
\fi}
\permanent\protected\def\stoptransparent
@@ -243,7 +243,7 @@
\colo_helpers_activate{#1}%
\normalexpanded{\endgroup\edef\noexpand#2{\ifnum\c_attr_color=\attributeunsetvalue\else\number\c_attr_color\fi}}}
-\let\grey\graycolor % these macros are only used in tracing
+% \aliased\let\grey\graycolor % these macros are only used in tracing
%D \macros
%D {startcurrentcolor,stopcurrentcolor}
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index 314016e36..4485f0cf6 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.02.08 16:58}
+\newcontextversion{2021.02.12 18:45}
%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
@@ -39,9 +39,13 @@
\enforced\aliased\let\w\mathword
\to \everymathematics
+% so we need to be able to load modules in ini mode
+
\pushoverloadmode
% charts needs these
\overloaded\unletfrozen\name % for now
+ \mutable\let\name\name
+ \mutable\let\text\text
\overloaded\frozen\let\type\type
\popoverloadmode
diff --git a/tex/context/base/mkxl/context.mkxl b/tex/context/base/mkxl/context.mkxl
index 6b6495394..ddaafb93e 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.02.08 16:58}
+\immutable\edef\contextversion{2021.02.12 18:45}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
diff --git a/tex/context/base/mkxl/core-con.mkxl b/tex/context/base/mkxl/core-con.mkxl
index e2e23298c..9a88e8f8f 100644
--- a/tex/context/base/mkxl/core-con.mkxl
+++ b/tex/context/base/mkxl/core-con.mkxl
@@ -26,14 +26,14 @@
%D considered splitting this module in a support one and a core one, but to keep
%D things simple as well as preserve the overview, I decided against splitting.
-\let\spr\firstofoneargument % separator
-\let\stp\firstofoneargument % stopper
+\aliased\let\spr\firstofoneargument % separator
+\aliased\let\stp\firstofoneargument % stopper
-% needed for arab:
+% needed for arab (but can disappear as no ons used it, experiment for idris)
\permanent\protected\def\isolateseparators % even works with list separator overloading
- {\def\spr##1{{##1}}% % we can probably best mess around with zwj
- \def\stp##1{{##1}}} % and friends
+ {\enforced\permanent\def\spr##1{{##1}}% % we can probably best mess around with zwj
+ \enforced\permanent\def\stp##1{{##1}}} % and friends
%D \macros
%D {numbers}
@@ -127,8 +127,6 @@
%D \showsetup{character}
%D \showsetup{Character}
-\def\unknowncharacter{-} % else in lists \relax
-
\permanent\def\character#1{\clf_character\numexpr#1\relax}
\permanent\def\Character#1{\clf_Character\numexpr#1\relax}
@@ -302,6 +300,8 @@
\aliased\let\doifleapyearelse\doifelseleapyear
+\mutable\let\numberofdays\!!zerocount
+
\permanent\protected\def\getdayspermonth#1#2%
{\edef\numberofdays{\clf_nofdays\numexpr#1\relax\numexpr#2\relax}}
@@ -432,11 +432,11 @@
{\dontleavehmode
\begingroup
\the\everycurrentdate
- \edef\forceddatespecification{#1}%
- \syst_converters_check_date_specification\forceddatespecification
+ \edef\m_syst_converters_date{#1}%
+ \syst_converters_check_date_specification\m_syst_converters_date
\syst_converters_check_date_specification\currentdatespecification
\clf_currentdate
- {\forceddatespecification}{\currentdatespecification}{\labellanguage}%
+ {\m_syst_converters_date}{\currentdatespecification}{\labellanguage}%
\normalyear\normalmonth\normalday
\endgroup}
@@ -457,11 +457,11 @@
\begingroup
\setdate[#1]% sets the date !
\the\everycurrentdate
- \edef\forceddatespecification{#2}%
- \syst_converters_check_date_specification\forceddatespecification
+ \edef\m_syst_converters_date{#2}%
+ \syst_converters_check_date_specification\m_syst_converters_date
\syst_converters_check_date_specification\currentdatespecification
\clf_currentdate
- {\forceddatespecification}{\currentdatespecification}{\labellanguage}%
+ {\m_syst_converters_date}{\currentdatespecification}{\labellanguage}%
\normalyear\normalmonth\normalday
\endgroup}
@@ -641,8 +641,10 @@
\permanent\def\ordinalnumber #1{\clf_ordinal\numexpr#1\relax{\currentlanguage}}
\permanent\def\Ordinalnumber #1{\Words{\clf_ordinal\numexpr#1\relax{\currentlanguage}}}
-\permanent\def\verbosenumber#1{\clf_verbose\numexpr#1\relax{\currentlanguage}}
-\permanent\def\VerboseNumber#1{\Words{\clf_verbose\numexpr#1\relax{\currentlanguage}}}
+\mutable\let\verbosenumberconnector\space
+
+\permanent\def\verbosenumber#1{\clf_verbose\numexpr#1\relax{\currentlanguage}{\verbosenumberconnector}}
+\permanent\def\VerboseNumber#1{\Words{\clf_verbose\numexpr#1\relax{\currentlanguage}{\verbosenumberconnector}}}
%D As longs as symbols are linked to levels or numbers, we can also use the
%D conversion mechanism, but in for instance the itemization macros, we prefer
diff --git a/tex/context/base/mkxl/core-def.mkxl b/tex/context/base/mkxl/core-def.mkxl
index e82026d21..96570bc36 100644
--- a/tex/context/base/mkxl/core-def.mkxl
+++ b/tex/context/base/mkxl/core-def.mkxl
@@ -38,13 +38,13 @@
% \flushmargincontents
% \flushcommentanchors
\flushnotes
- \synchronizenotes
+ % \synchronizenotes
% \OTRSETshowstatus
\registerparoptions
% \flushsyncpositions
\flushpostponednodedata
\typo_delimited_repeat
- \insertparagraphintro
+ \spac_paragraphs_flush_intro
\typo_initial_handle
\typo_firstline_handle
%
diff --git a/tex/context/base/mkxl/core-sys.mkxl b/tex/context/base/mkxl/core-sys.mkxl
index 946e5630f..5b23e4eab 100644
--- a/tex/context/base/mkxl/core-sys.mkxl
+++ b/tex/context/base/mkxl/core-sys.mkxl
@@ -132,10 +132,10 @@
[ \v!small=>\divide\scratchcounter 15, % 900,
\v!medium=>\divide\scratchcounter 30, % 1800,
\v!big=>\divide\scratchcounter 60, % 3600,
- \v!normal=>\getnewrandomseed\scratchcounter,
- \s!default=>\getnewrandomseed\scratchcounter,
+ \v!normal=>\scratchcounter\newrandomseed,
+ \s!default=>\scratchcounter\newrandomseed,
\s!unknown=>\scratchcounter#1]%
- \expanded{\setrandomseed{\the\scratchcounter}}%
+ \setrandomseed\scratchcounter
% \writestatus\m!system{randomseed: \the\scratchcounter}%
\endgroup}}
@@ -303,11 +303,15 @@
\fi
#1#2{#3}}
-% new:
+\aliased\let\redefine\define
+
+% new but maybe not needed:
%
% \checked\def \whatever#alpha#beta{#alpha + #beta}
% \checked\edef\whatever#alpha#beta{#alpha + #beta}
+\mutable\let\gobbleddefinition\relax % only for diagnostics
+
\permanent\protected\def\unique#1#2%
{\ifdefined#2%
\showmessage\m!system4{\string#2}%
diff --git a/tex/context/base/mkxl/enco-ini.mkxl b/tex/context/base/mkxl/enco-ini.mkxl
index 169f49465..c93ef7f61 100644
--- a/tex/context/base/mkxl/enco-ini.mkxl
+++ b/tex/context/base/mkxl/enco-ini.mkxl
@@ -13,32 +13,29 @@
%D This is stripped down version of the original enco-ini.tex file. For more details
%D you might want to study the \MKII\ file but since \LUATEX\ is unicode inside we
-%D need less code.
-
-%D Much in here will disappear in \LMTX\ because we assume proper \UNICODE\ usage.
-
-% When dealing with characters we have four cases to take into account when moving
-% from \MKII\ to \MKIV:
-
-% 1. <byte 200> => ref to slot 200 in current font
-% 2. \char 200 => ref to slot 200 in current font
-% 3. <active 200> => can (e.g.) map to another slot in current font
-% 4. \namedglyph => can map to some slot in some font
-
-% Using case 2 for special characters is doomed to fail because we are not going
-% to intercept these on the fly as happens automatically with traditional font
-% encoding handling. We could do that in a node pass but it's not worth the effort
-% because we seldom use this case in a document source.
-
-% We can consider using utf as internal format for mkii. The main reason for not
-% doing this before was that it was slow. On the other hand, it would make dealing
-% with utility files easier. However, we've now kind of frozen mkii.
+%D need less code. When we moved to \LMTX\ again some disappeared and the composition
+%D macros were upgraded in the process.
+%D
+%D An historic note: When dealing with characters we have four cases to take into
+%D account when moving from \MKII\ to \MKIV:
+%D
+%D \starttabulate[|l|l|]
+%D \NC \type {<byte 200>} \NC ref to slot 200 in current font \NC \NR
+%D \NC \type {\char 200} \NC ref to slot 200 in current font \NC \NR
+%D \NC \type {<active 200>} \NC can (e.g.) map to another slot in current font \NC \NR
+%D \NC \type {\namedglyph} \NC can map to some slot in some font \NC \NR
+%D \stoptabulate
+%D
+%D Using case 2 for special characters is doomed to fail because we are not going to
+%D intercept these on the fly as happens automatically with traditional font
+%D encoding handling. We could do that in a node pass but it's not worth the effort
+%D because we seldom use this case in a document source.
\writestatus{loading}{ConTeXt Encoding Macros / Initialization}
\unprotect
-%D Obsolete (but sometimes used in styles)
+%D This one is obsolete but maybe sometimes still used in styles:
\immutable\let\defaultencoding\s!default
@@ -49,7 +46,7 @@
\installcorenamespace{accents}
-%D These will go away:
+%D These might go away:
\permanent\protected\def\defineaccent#1 #2 #3 %
{\dodefineaccentcommand{#1}%
@@ -57,60 +54,11 @@
\permanent\protected\def\dodefineaccentcommand#1%
{\ifcsname\string#1\endcsname\else
- \setevalue{\string#1}{\noexpand\dohandleaccent{\string#1}}%
+ \edefcsname\string#1\endcsname{\noexpand\dohandleaccent{\string#1}}%
\fi}
\permanent\protected\def\dodefineaccent#1#2#3% no spaces, used low level
- {\setvalue{\??accents\string#1\string#2\empty}{#3}}
-
-%D Because now have this (\type {\chr} issues a one|-|time warning):
-
-% \permanent\protected\def\dodefinecombine#1% \" \' \. \= \H \^ \` \c \k \r \u \v \~
-% {\ifcsname\string#1\endcsname\else
-% % for now permanent even as these are kind of obsolete
-% \permanent\protected\edefcsname\string#1\endcsname##1{\noexpand\chr{\string#1##1}}%
-% \fi}
-
-%D But, we now go for this:
-
-\permanent\protected\edef\withgrave #1{\noexpand\chr{#1\Uchar"300}} \aliased\let\` \withgrave
-\permanent\protected\edef\withacute #1{\noexpand\chr{#1\Uchar"301}} \aliased\let\' \withacute
-\permanent\protected\edef\withcircumflex #1{\noexpand\chr{#1\Uchar"302}} \aliased\let\^ \withcircumflex
-\permanent\protected\edef\withtilde #1{\noexpand\chr{#1\Uchar"303}} \aliased\let\~ \withtilde
-\permanent\protected\edef\withmacron #1{\noexpand\chr{#1\Uchar"304}} \aliased\let\= \withmacron
-% permanent\protected\edef\withoverline #1{\noexpand\chr{#1\Uchar"305}}
-\permanent\protected\edef\withbreve #1{\noexpand\chr{#1\Uchar"306}} \aliased\let\u \withbreve
-\permanent\protected\edef\withdot #1{\noexpand\chr{#1\Uchar"307}} \aliased\let\. \withdot
-\permanent\protected\edef\withdieresis #1{\noexpand\chr{#1\Uchar"308}} \aliased\let\" \withdieresis
-% permanent\protected\edef\withhook #1{\noexpand\chr{#1\Uchar"309}}
-\permanent\protected\edef\withring #1{\noexpand\chr{#1\Uchar"30A}} \aliased\let\r \withring
-\permanent\protected\edef\withhungarumlaut #1{\noexpand\chr{#1\Uchar"30B}} \aliased\let\H \withhungarumlaut
-\permanent\protected\edef\withcaron #1{\noexpand\chr{#1\Uchar"30C}} \aliased\let\v \withcaron
-% permanent\protected\edef\withverticalline #1{\noexpand\chr{#1\Uchar"30D}}
-% permanent\protected\edef\withdoubleverticalline#1{\noexpand\chr{#1\Uchar"30E}}
-% permanent\protected\edef\withdoublegrave #1{\noexpand\chr{#1\Uchar"30F}}
-\permanent\protected\edef\withcedilla #1{\noexpand\chr{#1\Uchar"327}} \aliased\let\c \withcedilla
-\permanent\protected\edef\withogonek #1{\noexpand\chr{#1\Uchar"328}} \aliased\let\k \withogonek
-
-\aliased\let\withdiaeresis\withdieresis
-
-% \starttabulate[||||]
-% \NC \getvalue{agrave} \NC \withgrave {a} \NC \`{a} \NC \NR
-% \NC \getvalue{aacute} \NC \withacute {a} \NC \'{a} \NC \NR
-% \NC \getvalue{acircumflex} \NC \withcircumflex {a} \NC \^{a} \NC \NR
-% \NC \getvalue{atilde} \NC \withtilde {a} \NC \~{a} \NC \NR
-% \NC \getvalue{amacron} \NC \withmacron {a} \NC \={a} \NC \NR
-% \NC \getvalue{ebreve} \NC \withbreve {e} \NC \u{e} \NC \NR
-% \NC \getvalue{cdotaccent} \NC \withdot {c} \NC \.{c} \NC \NR
-% \NC \getvalue{ediaeresis} \NC \withdieresis {e} \NC \"{e} \NC \NR
-% \NC \getvalue{uring} \NC \withring {u} \NC \r{u} \NC \NR
-% \NC \getvalue{uhungarumlaut} \NC \withhungarumlaut{u} \NC \H{u} \NC \NR
-% \NC \getvalue{ecaron} \NC \withcaron {e} \NC \v{e} \NC \NR
-% \NC \getvalue{ecedilla} \NC \withcedilla {e} \NC \c{e} \NC \NR
-% \NC \getvalue{eogonek} \NC \withogonek {e} \NC \k{e} \NC \NR
-% \stoptabulate
-
-% the following dirty trick is needed to catch \asciimath{\^{1/5}log}:
+ {\defcsname\??accents\string#1\string#2\empty\endcsname{#3}}
\permanent\protected\def\dohandleaccent#1#2% expandable because we want them in the tuc file
{\csname\??accents
@@ -125,27 +73,93 @@
\immutable\letvalue{\??accents}\empty
+%D Because now have this (\type {\chr} issues a one|-|time warning):
+
+\permanent\protected\def\dodefinecombine#1#2%
+ {\ifcsname\string#1\endcsname\else
+ \permanent\protected\defcsname with#1\endcsname##1{\chr{##1#2}}%
+ \fi}
+
+%D The following dirty trick is needed to catch \asciimath{\^{1/5}log}, although:
+%D do we?
+
\permanent\protected\def\definecharacter#1 #2 %
{\doifelsenumber{\string#2}
- {\setevalue{\string#1}{\utfchar{#2}}} % or {\expandafter\chardef\csname#1\endcsname#2\relax}
- {\setuvalue{\string#1}{#2}}}
+ {\edefcsname\string#1\endcsname{\Uchar#2}}
+ {\protected\defcsname\string#1\endcsname{#2}}}
%D specials: \aa \ae \cc \i \ij \l \o \oe \sz \par
%D SPECIALS: \AA \AE \CC \j \IJ \L \O \OE \SZ \par
\permanent\protected\def\definecommand#1 #2 %
- {\setuvalue{\string#1}{#2}}
+ {\protected\defcsname\string#1\endcsname{#2}}
\permanent\protected\def\dodefinecommand#1#2% \O \L \AE ...
{% not permanent as these are kind of obsolete
\frozen\protected\defcsname\string#1\endcsname{#2}}
-%D \macros
-%D {everyuppercase, everylowercase, everysanitize}
+%D We set up some things in \LUA:
+
+\clf_defineaccents % one time
+
+%D This defined commands like \type {\withgrave} and \type {\withcaronbelow} and
+%D some of these have aliases. Below ee also alias the traditional one character
+%D accent commands.
+%D
+%D \starttabulate[||||]
+%D \NC \getvalue{agrave} \NC \withgrave {a} \NC \`{a} \NC \NR
+%D \NC \getvalue{aacute} \NC \withacute {a} \NC \'{a} \NC \NR
+%D \NC \getvalue{acircumflex} \NC \withcircumflex {a} \NC \^{a} \NC \NR
+%D \NC \getvalue{atilde} \NC \withtilde {a} \NC \~{a} \NC \NR
+%D \NC \getvalue{amacron} \NC \withmacron {a} \NC \={a} \NC \NR
+%D \NC \getvalue{ebreve} \NC \withbreve {e} \NC \u{e} \NC \NR
+%D \NC \getvalue{cdotaccent} \NC \withdot {c} \NC \.{c} \NC \NR
+%D \NC \getvalue{ediaeresis} \NC \withdieresis {e} \NC \"{e} \NC \NR
+%D \NC \getvalue{uring} \NC \withring {u} \NC \r{u} \NC \NR
+%D \NC \getvalue{uhungarumlaut} \NC \withhungarumlaut{u} \NC \H{u} \NC \NR
+%D \NC \getvalue{ecaron} \NC \withcaron {e} \NC \v{e} \NC \NR
+%D \NC \getvalue{ecedilla} \NC \withcedilla {e} \NC \c{e} \NC \NR
+%D \NC \getvalue{eogonek} \NC \withogonek {e} \NC \k{e} \NC \NR
+%D \stoptabulate
+%D
+%D Now we alias these traditional shortcuts:
+
+\pushoverloadmode
+
+\suggestedalias \` \withgrave
+\suggestedalias \' \withacute
+\suggestedalias \^ \withcircumflex
+\suggestedalias \~ \withtilde
+\suggestedalias \= \withmacron
+\suggestedalias \u \withbreve
+\suggestedalias \. \withdot
+\suggestedalias \" \withdieresis
+\suggestedalias \r \withring
+\suggestedalias \H \withdoubleacute
+\suggestedalias \v \withcaron
+\suggestedalias \c \withcedilla
+\suggestedalias \k \withogonek
+\suggestedalias \d \withdotbelow
+
+\popoverloadmode
+
+% From \type {enco-com} we had these, maybe that's better:
+
+% \aliased\let\AE\AEligature \aliased\let\ae\aeligature
+% \aliased\let\OE\OEligature \aliased\let\oe\oeligature
+% \aliased\let\IJ\IJligature \aliased\let\ij\ijligature
+% \aliased\let\AA\textAngstrom \aliased\let\aa\aring
+% \aliased\let\CC\Ccedilla \aliased\let\cc\ccedilla
+% \aliased\let\L \Lslash \aliased\let\l \lslash
+% \aliased\let\O \Oslash \aliased\let\o \oslash
+% \aliased\let\SZ\Eszett \aliased\let\sz\eszett % \aliased\let\SS\Ssharp
-\newtoks \everyuppercase
-\newtoks \everylowercase
-\newtoks \everysanitize
+% %D \macros
+% %D {everyuppercase, everylowercase, everysanitize}
+%
+% \newtoks \everyuppercase
+% \newtoks \everylowercase
+% \newtoks \everysanitize
%D Accent handling (try to avoid this):
@@ -153,7 +167,7 @@
% \buildtextaccent\textacute q
%D We can use offsets in \LMTX\ but even that makes no sense because we have
-%D a virtual feature already in \MKIV.
+%D a virtual feature already in \MKIV. These builders are depricated:
\newbox\b_enco_accent
@@ -206,8 +220,6 @@
\permanent\protected\def\buildtextogonek {\bottomaccent{-.1ex}{.5}{0}{\textogonek}}
\permanent\protected\def\buildtextbottomcomma{\bottomaccent{.15ex}{0}{5}{\tx,}}
-\aliased\let\d\buildtextbottomdot
-
\permanent\protected\def\topaccent#1#2#3#4#5% down right slantcorrection accent char
{\dontleavehmode
\bgroup
@@ -226,21 +238,6 @@
\permanent\protected\def\definemathaccent#1 #2%
{\setvalue{#1}{\mathaccent#2 }}
-%D Math (will move):
-
-%definemathaccent acute \mathacute
-%definemathaccent grave \mathgrave
-%definemathaccent ddot \mathddot
-%definemathaccent tilde \mathtilde
-%definemathaccent bar \mathbar
-%definemathaccent breve \mathbreve
-%definemathaccent check \mathcheck
-%definemathaccent hat \mathhat
-%definemathaccent vec \mathvec
-%definemathaccent dot \mathdot
-%definemathaccent widetilde \mathwidetilde
-%definemathaccent widehat \mathwidehat
-
% from enco-def:
% \aliased\let\i\dotlessi
@@ -264,17 +261,6 @@
\immutable\def\oumlaut {ö} \immutable\def\Oumlaut {Ö}
\immutable\def\uumlaut {ü} \immutable\def\Uumlaut {Ü}
-% From \type {enco-com} we had these:
-
-% \aliased\let\AE\AEligature \aliased\let\ae\aeligature
-% \aliased\let\OE\OEligature \aliased\let\oe\oeligature
-% \aliased\let\IJ\IJligature \aliased\let\ij\ijligature
-% \aliased\let\AA\textAngstrom \aliased\let\aa\aring
-% \aliased\let\CC\Ccedilla \aliased\let\cc\ccedilla
-% \aliased\let\L \Lslash \aliased\let\l \lslash
-% \aliased\let\O \Oslash \aliased\let\o \oslash
-% \aliased\let\SZ\Eszett \aliased\let\sz\eszett % \aliased\let\SS\Ssharp
-
%D For old times sake we keep these (obsolete):
\immutable\def\textflorin{ƒ} \immutable\def\florin {ƒ}
@@ -294,27 +280,6 @@
\popoverloadmode
-%D These come from the \MKII\ file \type {enco-mis}:
-
-\permanent\protected\def\fakepercent
- {\mathematics{\normalsuperscript{\scriptscriptstyle0}\kern-.25\emwidth/\kern-.2\emwidth\normalsubscript{\scriptscriptstyle0}}}
-
-\permanent\protected\def\fakeperthousand
- {\mathematics{\normalsuperscript{\scriptscriptstyle0}\kern-.25\emwidth/\kern-.2\emwidth\normalsubscript{\scriptscriptstyle00}}}
-
-\permanent\protected\def\fakepermine
- {\dontleavehmode
- \bgroup
- \setbox\scratchbox\hbox
- {\mathematics{+}}%
- \hbox to \wd\scratchbox
- {\hss
- \mathematics{\normalsuperscript{\scriptscriptstyle-}\kern-.4\emwidth/\kern-.3\emwidth\normalsubscript{\scriptscriptstyle-}}%
- \hss}%
- \egroup}
-
-\def\permine{\fakepermine}
-
%D some more: what with freezing here?
\ifdefined\softhyphen \else
@@ -337,27 +302,27 @@
%D from \unknown\ long long ago when we had no real useful names for them. Some
%D ancient styles might still use them.
-\aliased\let\lowerleftsingleninequote \quotesinglebase
-\aliased\let\lowerleftdoubleninequote \quotedblbase
-\aliased\let\lowerrightsingleninequote\quotesinglebase
-\aliased\let\lowerrightdoubleninequote\quotedblbase
+\aliased\let\lowerleftsingleninequote \quotesinglebase % ‚
+\aliased\let\lowerleftdoubleninequote \quotedblbase % „
+\aliased\let\lowerrightsingleninequote\quotesinglebase % ‚
+\aliased\let\lowerrightdoubleninequote\quotedblbase % „
-\aliased\let\upperleftsingleninequote \quoteright
-\aliased\let\upperleftdoubleninequote \quotedblright
-\aliased\let\upperrightsingleninequote\quoteright
-\aliased\let\upperrightdoubleninequote\quotedblright
+\aliased\let\upperleftsingleninequote \quoteright % ’
+\aliased\let\upperleftdoubleninequote \quotedblright % ”
+\aliased\let\upperrightsingleninequote\quoteright % ’
+\aliased\let\upperrightdoubleninequote\quotedblright % ”
-\aliased\let\upperleftsinglesixquote \quoteleft
-\aliased\let\upperleftdoublesixquote \quotedblleft
-\aliased\let\upperrightsinglesixquote \quoteleft
-\aliased\let\upperrightdoublesixquote \quotedblleft
+\aliased\let\upperleftsinglesixquote \quoteleft % ‘
+\aliased\let\upperleftdoublesixquote \quotedblleft % “
+\aliased\let\upperrightsinglesixquote \quoteleft % ‘
+\aliased\let\upperrightdoublesixquote \quotedblleft % “
-\aliased\let\leftsubguillemot \guilsingleleft
-\aliased\let\rightsubguillemot \guilsingleright
+\aliased\let\leftsubguillemot \guilsingleleft % ‹
+\aliased\let\rightsubguillemot \guilsingleright % ›
-% Some left-overs that wil go away!
+% Some left-overs that will go away!
-\permanent\protected\def\textblacksquare{\dontleavehmode\hbox{\vrule\s!width.3\s!em\s!height.4\s!em\s!depth-.1\s!em}}
+\permanent\protected\def\textblacksquare{\dontleavehmode\hpack{\vrule\s!width.3\s!em\s!height.4\s!em\s!depth-.1\s!em}}
%permanent\protected\def\schwa {\hbox{\rotate[\c!rotation=180,\c!location=\v!high]{\hbox{e}}}}
\permanent\protected\def\schwagrave {\buildtextgrave\schwa}
@@ -396,26 +361,6 @@
\asciispacechar % used for export !
\fi}
-% a few defaults (\<whatever>{}), we really need the verbose \empty as it will be
-% stringified .. anyhow, we define this at the lua end now but keep it here as a
-% reference
-%
-% \defineaccent ^ {\empty} {\textcircumflex}
-% \defineaccent ` {\empty} {\textgrave}
-% \defineaccent ~ {\empty} {\texttilde}
-% \defineaccent " {\empty} {\textdiaeresis}
-% \defineaccent ' {\empty} {\textacute}
-% \defineaccent . {\empty} {\textdotaccent}
-% \defineaccent = {\empty} {\textmacron}
-% \defineaccent c {\empty} {\textcedilla}
-% \defineaccent H {\empty} {\texthungarumlaut}
-% \defineaccent k {\empty} {\textogonek}
-% \defineaccent r {\empty} {\textring}
-% \defineaccent u {\empty} {\textbreve}
-% \defineaccent v {\empty} {\textcaron}
-
-\clf_defineaccents % one time
-
%D A smaller and bolder variant, more like the math and monospaced ones.
\permanent\protected\def\fakeunderscore
@@ -457,9 +402,13 @@
%D Moved from core-mis:
-\permanent\protected\def\celsius #1{#1\mathematics{^\circ}C}
-\permanent\protected\def\inch {\mathematics{\prime\prime}} % was: \hbox{\rm\char125\relax}
-\permanent\protected\def\fraction#1#2{\mathematics{#1\over#2}}
+% \permanent\protected\def\celsius #1{#1\mathematics{^\circ}C}
+% \permanent\protected\def\inch {\mathematics{\prime\prime}} % was: \hbox{\rm\char125\relax}
+% \permanent\protected\def\fraction#1#2{\mathematics{#1\over#2}}
+
+\permanent\protected\def\celsius #1{#1\iffontchar\font`℃℃\else\mathematics{^\circ}C\fi} % 0x2103
+\permanent\protected\def\inch {\iffontchar\font`″″\else\mathematics{\prime\prime}\fi} % 0x2103
+\permanent\protected\def\fraction#1#2{\mathematics{\Uabove exact .125\exheight {#1}{#2}}}
%D \startbuffer
%D \startlines
@@ -534,29 +483,6 @@
\enforced\let\buildtextaccent\secondoftwoarguments
\to \everysimplifycommands
-%D A plain one:
-
-% \protected\def\t#1{%
-% \dontleavehmode
-% \begingroup
-% \setbox\scratchboxone\hpack{#1}%
-% \setbox\scratchboxtwo\hpack\bgroup
-% \iffontchar\font"0361\relax
-% \char"0361\relax
-% \else
-% \iffontchar\font"2040\relax\else
-% \the\textfont0
-% \fi
-% \char"2040
-% \fi
-% \egroup
-% \scratchdimenone\wd\ifdim\wd\scratchboxone>\wd\scratchboxtwo\scratchboxone\else\scratchboxtwo\fi
-% \scratchdimentwo\dimexpr-\ht\scratchboxtwo+\ht\scratchboxone+.45\exheight\relax
-% \hpack to \scratchdimenone\bgroup
-% \hpack to \scratchdimenone{\hss\box\scratchboxone\hss}%
-% \hskip -\scratchdimenone
-% \hpack to \scratchdimenone{\hss\raise\scratchdimentwo\box\scratchboxtwo\hss}%
-% \egroup
-% \endgroup}
+%D See enco-ini.mkivc for a definition of the obsolete \type {\t}.
\protect \endinput
diff --git a/tex/context/base/mkxl/font-col.mklx b/tex/context/base/mkxl/font-col.mklx
index f9874958d..e6500dd76 100644
--- a/tex/context/base/mkxl/font-col.mklx
+++ b/tex/context/base/mkxl/font-col.mklx
@@ -68,9 +68,11 @@
\fi
\to\everydefinefont
+\let\m_font_fallbacks_spec\empty
+
\def\font_fallbacks_start_cloning
{\begingroup
- \let\savedfontspec\somefontspec}
+ \let\m_font_fallbacks_spec\somefontspec}
\def\font_fallbacks_stop_cloning
{\endgroup}
@@ -86,7 +88,7 @@
\setfalse\c_font_auto_size} % no \setfontcharacteristics and \the\everyfontswitch needed
\def\font_fallbacks_clone_inherited#font% also a second argument
- {\font_fallbacks_clone_unique{#font \savedfontspec}}
+ {\font_fallbacks_clone_unique{#font \m_font_fallbacks_spec}}
\def\font_fallbacks_register_main #name{\clf_fontcollectionregister{#name}}
\def\font_fallbacks_prepare_clone_vectors#name{\clf_fontcollectionclone{#name}}
diff --git a/tex/context/base/mkxl/font-ctx.lmt b/tex/context/base/mkxl/font-ctx.lmt
index f1949c816..b735e3d2f 100644
--- a/tex/context/base/mkxl/font-ctx.lmt
+++ b/tex/context/base/mkxl/font-ctx.lmt
@@ -2932,8 +2932,11 @@ do
helpers.getinstancespec = getinstancespec
+ -- expandable
+
implement {
name = "currentfontinstancespec",
+ public = true,
actions = function()
local t = getinstancespec() -- current font
if t then
diff --git a/tex/context/base/mkxl/font-fil.mklx b/tex/context/base/mkxl/font-fil.mklx
index 3733644cd..57ed47fa2 100644
--- a/tex/context/base/mkxl/font-fil.mklx
+++ b/tex/context/base/mkxl/font-fil.mklx
@@ -379,6 +379,6 @@
% bonus
-\let\currentfontinstancespec\clf_currentfontinstancespec % expandable
+% \currentfontinstancespec % define ad the lua end
\protect \endinput
diff --git a/tex/context/base/mkxl/font-ini.mklx b/tex/context/base/mkxl/font-ini.mklx
index 65a60c837..1066a5ee6 100644
--- a/tex/context/base/mkxl/font-ini.mklx
+++ b/tex/context/base/mkxl/font-ini.mklx
@@ -459,7 +459,7 @@
\installcorenamespace{mappedfontsize}
\permanent\tolerant\protected\def\mapfontsize[#from]#spacer[#to]%
- {\ifarguments\or\or\setvalue{\??mappedfontsize\the\dimexpr#from\relax}{#to}\fi}
+ {\ifarguments\or\or\defcsname\??mappedfontsize\the\dimexpr#from\relax\endcsname{#to}\fi}
\def\font_basics_set_mapped_fontsize#from%
{\ifcsname\??mappedfontsize\the\dimexpr#from\relax\endcsname
@@ -663,7 +663,7 @@
\mutable\let\somefontspec \s!unknown
\mutable\let\somefontfile \s!unknown
\mutable\let\somefontsize \zerocount
-\mutable\let\somefontsizey\empty
+\mutable\let\somefontsizex\empty
\mutable\let\somefontsizey\empty
\newcount\scaledfontmode % also used at the lua end
diff --git a/tex/context/base/mkxl/font-sty.mklx b/tex/context/base/mkxl/font-sty.mklx
index 48964b04c..866e355c3 100644
--- a/tex/context/base/mkxl/font-sty.mklx
+++ b/tex/context/base/mkxl/font-sty.mklx
@@ -180,12 +180,12 @@
\setfalse\fontattributeisset
-\let\currentstyleparameter \empty % these might become private (possible conflict with defines)
-\let\currentdetokenizedstyleparameter\empty % these might become private (possible conflict with defines)
+\let\m_font_style_parameter \empty % was \currentstyleparameter
+\let\m_font_detokenized_style_parameter\empty % was \currentdetokenizedstyleparameter
\permanent\protected\def\dousestyleparameter#value%
- {\edef\currentstyleparameter{#value}%
- \ifempty\currentstyleparameter\else
+ {\edef\m_font_style_parameter{#value}%
+ \ifempty\m_font_style_parameter\else
\expandafter\dousecurrentstyleparameter
\fi}
@@ -195,14 +195,14 @@
\fi}
\permanent\protected\def\dousecurrentstyleparameter % empty check outside here
- {\edef\currentdetokenizedstyleparameter{\detokenize\expandafter{\currentstyleparameter}}%
+ {\edef\m_font_detokenized_style_parameter{\detokenize\expandafter{\m_font_style_parameter}}%
\settrue\fontattributeisset % reset is done elsewhere
- \ifcsname\??alternativestyle\currentdetokenizedstyleparameter\endcsname
+ \ifcsname\??alternativestyle\m_font_detokenized_style_parameter\endcsname
\lastnamedcs
- \orelse\ifcsname\currentdetokenizedstyleparameter\endcsname
+ \orelse\ifcsname\m_font_detokenized_style_parameter\endcsname
\lastnamedcs
\else
- \currentstyleparameter
+ \m_font_style_parameter
\fi}
%D New commands (not yet interfaced):
diff --git a/tex/context/base/mkxl/font-sym.mklx b/tex/context/base/mkxl/font-sym.mklx
index 806d2aff6..c908ad849 100644
--- a/tex/context/base/mkxl/font-sym.mklx
+++ b/tex/context/base/mkxl/font-sym.mklx
@@ -129,7 +129,9 @@
\installcorenamespace{symbolfont}
-\let\thedefinedfont\relax
+\mutable\let\skedsymbolfont \empty % for diagnostics
+\mutable\let\currentsymbolfont\empty
+\mutable\let\askedsymbolfont \empty
\permanent\protected\def\setscaledstyledsymbolicfont#1#2#3% quite a slowdown, glyphfontfile
{\edef\askedsymbolfont{\truefontname{\glyphfontfile{#3}} at \the\dimexpr#2\dimexpr\currentfontbodyscale\dimexpr#1}%
@@ -163,8 +165,6 @@
\font_basics_define_symbolic_font
\fi}
-\mutable\let\currentsymbolfont\empty
-
\def\font_basics_define_symbolic_font
{\definefont[currentsymbolfont][\askedsymbolfont]%
\currentsymbolfont
diff --git a/tex/context/base/mkxl/grph-epd.mkxl b/tex/context/base/mkxl/grph-epd.mkxl
index 6d5f6ff2a..7ff9b8675 100644
--- a/tex/context/base/mkxl/grph-epd.mkxl
+++ b/tex/context/base/mkxl/grph-epd.mkxl
@@ -19,8 +19,6 @@
% hm, this one is globally overloaded
-\def\figurereference{\clf_figurestatus{reference}{}} % might become private
-
\mutable\let\mergedfigurereference\empty
\defineoverlay[system:graphics:epdf][\directsetup{system:graphics:epdf}]
diff --git a/tex/context/base/mkxl/grph-fig.mkxl b/tex/context/base/mkxl/grph-fig.mkxl
index dee441c98..92d2c7dc6 100644
--- a/tex/context/base/mkxl/grph-fig.mkxl
+++ b/tex/context/base/mkxl/grph-fig.mkxl
@@ -31,7 +31,7 @@
\newconstant\c_grph_buffers_mode
-\let\lasttypesetbuffer\empty
+\mutable\let\lasttypesetbuffer\empty
\permanent\protected\def\typesetbuffer {\bgroup\setconstant\c_grph_buffers_mode\plusone \grph_buffers_typeset}
\permanent\protected\def\typesetbufferonly{\bgroup\setconstant\c_grph_buffers_mode\zerocount\grph_buffers_typeset}
@@ -302,7 +302,7 @@
\hbox % \hpack ?
{\quad
\thisissomeinternal\s!vwb{#6}%
- \gotosomeinternal\s!vwa{#6}\realfolio{\hbox to 1.5\emwidth{\the\c_grph_steps_reference\presetgoto\hfill}}%
+ \gotosomeinternal\s!vwa{#6}\realfolio{\hbox to 1.5\emwidth{\the\c_grph_steps_reference\hfill}}%
\quad#1 (#2,#3) (#4,#5) [#6]\hfill}%
\endgraf}
diff --git a/tex/context/base/mkxl/grph-inc.mkxl b/tex/context/base/mkxl/grph-inc.mkxl
index c56155888..3c2e8e5c1 100644
--- a/tex/context/base/mkxl/grph-inc.mkxl
+++ b/tex/context/base/mkxl/grph-inc.mkxl
@@ -499,6 +499,7 @@
\permanent\def\figureheight {\clf_figurestatus{height}{0}sp}
\permanent\def\figurexscale {\clf_figurestatus{xscale}{1}}
\permanent\def\figureyscale {\clf_figurestatus{yscale}{1}}
+\permanent\def\figurereference {\clf_figurestatus{reference}{}}
\permanent\def\figuresize {\clf_figurerequest{size}{}}
\permanent\def\figurelabel {\clf_figurerequest{label}{}}
@@ -526,6 +527,7 @@
\permanent\def\figurefullname {\clf_figureused{fullname}{}}
\permanent\def\noffigurepages {\clf_figureused{pages}{0}}
+
% \permanent\def\figurefilepath {\clf_figurefilepath} % public in lua
% \permanent\def\figurefilename {\clf_figurefilename} % public in lua
% \permanent\def\figurefiletype {\clf_figurefiletype} % public in lua
@@ -705,7 +707,7 @@
\iftrialtypesetting \else \feedbackexternalfigure \fi
\fi}}
-\let\feedbackexternalfigure\relax % hook
+\mutable\let\feedbackexternalfigure\relax % hook
\permanent\protected\def\getfiguredimensions
{\dodoubleempty\grph_include_get_dimensions}
@@ -796,6 +798,8 @@
\ifdim\scratchdimen<\d_grph_include_collection_minheight \d_grph_include_collection_minheight\scratchdimen \fi
\fi}
+\mutable\let\currentexternalfigurecollection\empty
+
\permanent\protected\def\startexternalfigurecollection[#1]%
{\begingroup
\def\currentexternalfigurecollection{#1}%
diff --git a/tex/context/base/mkxl/lang-def.mkxl b/tex/context/base/mkxl/lang-def.mkxl
index 5698bb4af..f74fb5339 100644
--- a/tex/context/base/mkxl/lang-def.mkxl
+++ b/tex/context/base/mkxl/lang-def.mkxl
@@ -606,9 +606,6 @@
% Sardian, Catalan, French, Ladino, Portuguese, Proven\c{c}al,
% Spanish
-\ifdefined\guillemotspace \else \let\guillemotspace\empty \fi
-\ifdefined\sentencespace \else \let\sentencespace \empty \fi
-
\installlanguage
[\s!fr]
[\c!spacing=\v!packed,
diff --git a/tex/context/base/mkxl/lang-ini.mkxl b/tex/context/base/mkxl/lang-ini.mkxl
index 151b5be02..5df975c66 100644
--- a/tex/context/base/mkxl/lang-ini.mkxl
+++ b/tex/context/base/mkxl/lang-ini.mkxl
@@ -58,6 +58,7 @@
%D \startmode[*nl] dutch \stopmode}
%D \stoptyping
+\mutable\let\askedlanguage \empty
\mutable\let\currentlanguage \empty
\mutable\let\currentmainlanguage\empty
@@ -190,6 +191,8 @@
% \language[#1] gave unwanted side effect of loading language specifics
+\mutable\let\currentsetuplanguage\empty
+
\permanent\tolerant\protected\def\installlanguage[#1]#*[#2]%
{\ifcondition\validassignment{#2}%
\doifelselanguage{#1}
diff --git a/tex/context/base/mkxl/lang-mis.mkxl b/tex/context/base/mkxl/lang-mis.mkxl
index f1ed3cb18..7b6c90857 100644
--- a/tex/context/base/mkxl/lang-mis.mkxl
+++ b/tex/context/base/mkxl/lang-mis.mkxl
@@ -521,7 +521,7 @@
\discretionary{-}{}{}%
\fi}
-\let\ignorecompoundcharacter\relax
+% \aliased\let\ignorecompoundcharacter\relax
%D \macros
%D {disablediscretionaries,disablecompoundcharacter}
@@ -529,15 +529,15 @@
%D Occasionally we need to disable this mechanism. For the moment we assume that
%D \type {|} is used.
-\let\disablediscretionaries \ignorediscretionaries
-\let\disablecompoundcharacters\ignorecompoundcharacter
+\aliased\let\disablediscretionaries \ignorediscretionaries
+%aliased\let\disablecompoundcharacters\ignorecompoundcharacter
%D \macros
%D {normalcompound}
%D
%D Handy in for instance XML. (Kind of obsolete)
-\ifdefined\normalcompound \else \let\normalcompound=| \fi
+\ifdefined\normalcompound \else \aliased\let\normalcompound=| \fi
%D \macros
%D {compound}
@@ -564,7 +564,7 @@
%D Here we hook some code into the clean up mechanism needed for verbatim data.
\appendtoks
- %\disablecompoundcharacters
+ %disablecompoundcharacters
\disablediscretionaries
\to \everycleanupfeatures
diff --git a/tex/context/base/mkxl/lpdf-aux.lmt b/tex/context/base/mkxl/lpdf-aux.lmt
index 0d7cecbb8..71b018c5f 100644
--- a/tex/context/base/mkxl/lpdf-aux.lmt
+++ b/tex/context/base/mkxl/lpdf-aux.lmt
@@ -22,7 +22,7 @@ local cache = table.setmetatableindex(function(t,k) -- can be made weak
if v < 0x10000 then
v = format("%04x",v)
else
- v = format("%04x%04x",rshift(v,10),v%1024+0xDC00)
+ v = format("%04x%04x",rshift(v,10)+0xD800,v%1024+0xDC00)
end
t[k] = v
return v
diff --git a/tex/context/base/mkxl/lpdf-ini.lmt b/tex/context/base/mkxl/lpdf-ini.lmt
index ea9466d39..785242b8a 100644
--- a/tex/context/base/mkxl/lpdf-ini.lmt
+++ b/tex/context/base/mkxl/lpdf-ini.lmt
@@ -171,14 +171,12 @@ local tosixteen, fromsixteen, topdfdoc, frompdfdoc, toeight, fromeight
do
- local escaped = Cs(Cc("(") * (S("\\()\n\r\t\b\f")/"\\%0" + P(1))^0 * Cc(")"))
-
local cache = table.setmetatableindex(function(t,k) -- can be made weak
local v = utfbyte(k)
if v < 0x10000 then
v = format("%04x",v)
else
- v = format("%04x%04x",rshift(v,10),v%1024+0xDC00)
+ v = format("%04x%04x",rshift(v,10)+0xD800,v%1024+0xDC00)
end
t[k] = v
return v
@@ -222,6 +220,7 @@ do
local toregime = regimes.toregime
local fromregime = regimes.fromregime
+ local escaped = Cs(Cc("(") * (S("\\()\n\r\t\b\f")/"\\%0" + P(1))^0 * Cc(")"))
topdfdoc = function(str,default)
if not str or str == "" then
diff --git a/tex/context/base/mkxl/luat-ini.mkxl b/tex/context/base/mkxl/luat-ini.mkxl
index 5c29afc53..9a78c3934 100644
--- a/tex/context/base/mkxl/luat-ini.mkxl
+++ b/tex/context/base/mkxl/luat-ini.mkxl
@@ -68,14 +68,14 @@
\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
-\ifdefined\v \else \def\v{v} \fi \ifdefined\s \else \def\s{s} \fi
+\ifdefined\n \else \mutable\def\n{n} \fi \ifdefined\r \else \mutable\def\r{r} \fi
+\ifdefined\f \else \mutable\def\f{f} \fi \ifdefined\t \else \mutable\def\t{t} \fi
+\ifdefined\a \else \mutable\def\a{a} \fi \ifdefined\b \else \mutable\def\b{b} \fi
+\ifdefined\v \else \mutable\def\v{v} \fi \ifdefined\s \else \mutable\def\s{s} \fi
-\ifdefined\+ \else \def\+{+} \fi \ifdefined\- \else \def\-{-} \fi
+\ifdefined\+ \else \mutable\def\+{+} \fi \ifdefined\- \else \mutable\def\-{-} \fi
-\ifdefined\? \else \def\?{?} \fi \ifdefined\! \else \def\!{!} \fi % bonus
+\ifdefined\? \else \mutable\def\?{?} \fi \ifdefined\! \else \mutable\def\!{!} \fi % bonus
\ifdefined\1 \else \mutable\def\1{1} \fi \ifdefined\2 \else \mutable\def\2{2} \fi
\ifdefined\3 \else \mutable\def\3{3} \fi \ifdefined\4 \else \mutable\def\4{4} \fi
diff --git a/tex/context/base/mkxl/luat-usr.mkxl b/tex/context/base/mkxl/luat-usr.mkxl
index b266044ce..199d22b8e 100644
--- a/tex/context/base/mkxl/luat-usr.mkxl
+++ b/tex/context/base/mkxl/luat-usr.mkxl
@@ -54,9 +54,9 @@
{\ifarguments \orelse \ifcsname\??luacode#1\endcsname \else
\bgroup
%
- \edef\fullname{lua_code_#1}%
+ \edef\m_syst_lua_name{lua_code_#1}%
%
- \clf_registernamedlua{#1}{#2}{\fullname}%
+ \clf_registernamedlua{#1}{#2}{\m_syst_lua_name}%
%
\frozen\instance\protected\xdefcsname\s!start#1\s!code\endcsname
{\begingroup
@@ -69,9 +69,9 @@
\normalexpanded{\xdefcsname\??luacode#1\endcsname##1\csname\s!stop#1\s!code\endcsname}%
{\noexpand\expandafter\endgroup
\noexpand\expandafter
- \expandafter\noexpand\csname clf_\fullname\endcsname
+ \expandafter\noexpand\csname clf_\m_syst_lua_name\endcsname
\noexpand\expandafter{\noexpand\normalexpanded{##1}}}%
- \frozen\instance\gletcsname#1\s!code\expandafter\endcsname\csname clf_\fullname\endcsname
+ \frozen\instance\gletcsname#1\s!code\expandafter\endcsname\csname clf_\m_syst_lua_name\endcsname
\egroup
\fi}
diff --git a/tex/context/base/mkxl/math-ali.mkxl b/tex/context/base/mkxl/math-ali.mkxl
index 008313f09..371c1b9af 100644
--- a/tex/context/base/mkxl/math-ali.mkxl
+++ b/tex/context/base/mkxl/math-ali.mkxl
@@ -30,8 +30,8 @@
%D \macros
%D {definemathalignment, setupmathalignment, startmathalignment}
%D
-%D Modules may provide additional alignment features. The following mechanisms are
-%D provided by the core.
+%D Modules may provide additional alignment features. The following kind of plain
+%D mechanisms are provided by the core.
\newtoks\t_math_align_a
\newtoks\t_math_align_b
@@ -49,7 +49,7 @@
\mathalignmentparameter\c!separator
\relax}
-\def\displayopenupvalue{.25\bodyfontsize}
+\mutable\def\displayopenupvalue{.25\bodyfontsize}
\def\math_build_eqalign
{\scratchtoks\emptytoks
@@ -83,8 +83,8 @@
#1%
\stopimath}
-\def\eqalign#1% why no halign here, probably because of displaywidth
- {\emptyhbox
+\permanent\protected\def\eqalign#1% why no halign here, probably because of displaywidth
+ {\emptyhbox % why no \dontleavehmode
\mskip\thinmuskip
\vcenter
{\math_openup\displayopenupvalue % was: \openup\jot
@@ -262,9 +262,9 @@
\def\math_handle_eqalign_no_l_aligned{\math_both_eqalign_no_aligned\math_prepare_l_eqalign_no}
\def\math_finish_eqalign_no {\crcr\egroup}
-\let\reqalignno\relax
-\let\leqalignno\relax
-\let\eqalignno \relax
+\aliased\let\reqalignno\relax % just in case someone used that
+\aliased\let\leqalignno\relax % just in case someone used that
+\aliased\let\eqalignno \relax % just in case someone used that
%D Here we implement the user interface part. We start with basic math alignments:
@@ -709,7 +709,7 @@
\mathcasesparameter\c!left
\vcenter\bgroup
\push_macro_math_cases_NC
- \enforced\let\endmath\relax
+ % \enforced\let\endmath\relax
\enforced\let\NC\math_cases_NC_zero
\enforced\let\MC\math_cases_MC_zero
\enforced\let\NR\math_cases_NR_zero
@@ -734,7 +734,7 @@
\hfil
\aligntab
\hskip\mathcasesparameter\c!numberdistance\relax
- \let\formuladistance\!!zeropoint
+ % \let\formuladistance\!!zeropoint
\span\math_text_in_eqalign{\alignmark\alignmark}%
\crcr} % todo: number
@@ -960,7 +960,7 @@
\math_matrix_pickup
\the\everymathmatrix
%
- \enforced\let\endmath\relax
+ % \enforced\let\endmath\relax
%
\setbox\nextbox\vbox\bgroup
\math_matrix_start_table
diff --git a/tex/context/base/mkxl/math-fen.mkxl b/tex/context/base/mkxl/math-fen.mkxl
index ed680b948..8aa0e62a8 100644
--- a/tex/context/base/mkxl/math-fen.mkxl
+++ b/tex/context/base/mkxl/math-fen.mkxl
@@ -434,7 +434,7 @@
\expandafter\math_unknown_middle
\fi}
-\protected\def\lfence#1%
+\permanent\protected\def\lfence#1%
{\settrue\c_math_fenced_done
\let\nexttoken#1%
\ifcsname\??mathleft\normalmeaning\nexttoken\endcsname
@@ -443,7 +443,7 @@
\expandafter\math_unknown_left
\fi}
-\protected\def\rfence#1%
+\permanent\protected\def\rfence#1%
{\settrue\c_math_fenced_done
\let\nexttoken#1%
\ifcsname\??mathright\normalmeaning\nexttoken\endcsname
@@ -452,7 +452,7 @@
\expandafter\math_unknown_right
\fi}
-\protected\def\mfence#1%
+\permanent\protected\def\mfence#1%
{\settrue\c_math_fenced_done
\let\nexttoken#1%
\ifcsname\??mathmiddle\normalmeaning\nexttoken\endcsname
@@ -628,7 +628,7 @@
\setvalue{\??mathbig3}{1.45}
\setvalue{\??mathbig4}{1.75}
-\protected\def\choosemathbig#1#2% so we accept \big{||} as well
+\permanent\protected\def\choosemathbig#1#2% so we accept \big{||} as well
{{\naturalhbox\bgroup
\startimath
\ifcase\bigmathdelimitermethod
@@ -681,7 +681,7 @@
\fi
\fi}
-\protected\def\mathdelimiterstep#1#2%
+\permanent\protected\def\mathdelimiterstep#1#2%
{\begingroup
\math_fenced_force_size\plusone{#1}%
\math_fenced_step#2\relax
@@ -750,13 +750,13 @@
\newconditional\c_math_fences_auto
-\protected\def\enableautofences
+\permanent\protected\def\enableautofences
{\clf_enableautofences
\glet\clf_enableautofences\relax % onlyonce anyway
- \protected\gdef\enableautofences{\settrue\c_math_fences_auto}%
+ \enforced\permanent\protected\gdef\enableautofences{\settrue\c_math_fences_auto}%
\enableautofences}
-\protected\def\disableautofences
+\permanent\protected\def\disableautofences
{\setfalse\c_math_fences_auto}
\protected\def\math_fences_used_left
@@ -818,10 +818,9 @@
\newconstant\c_math_fences_delimiters_mode \c_math_fences_delimiters_mode"16 % \numexpr"02+"04+"10\relax
-%protected\def\enableautofencemode {\mathdelimitersmode\plussix} % the shift (1) is too fragile
-\protected\def\enableautofencemode {\mathdelimitersmode\c_math_fences_delimiters_mode}
-
-\protected\def\disableautofencemode{\mathdelimitersmode\zerocount}
+%permanent\protected\def\enableautofencemode {\mathdelimitersmode\plussix} % the shift (1) is too fragile
+\permanent\protected\def\enableautofencemode {\mathdelimitersmode\c_math_fences_delimiters_mode}
+\permanent\protected\def\disableautofencemode{\mathdelimitersmode\zerocount}
\appendtoks
\ifempty\currentmathfence
diff --git a/tex/context/base/mkxl/math-frc.mkxl b/tex/context/base/mkxl/math-frc.mkxl
index c1a0935a7..8295195b5 100644
--- a/tex/context/base/mkxl/math-frc.mkxl
+++ b/tex/context/base/mkxl/math-frc.mkxl
@@ -119,7 +119,7 @@
\c!rule=\v!auto]
\appendtoks
- \instance\setuevalue{\currentmathfraction}{\math_frac{\currentmathfraction}}%
+ \instance\frozen\protected\edefcsname\currentmathfraction\endcsname{\math_frac{\currentmathfraction}}%
\to \everydefinemathfraction
% Sometimes users want control over the distances:
@@ -440,9 +440,9 @@
\definemathfraction[xfrac] [\c!alternative=\v!inner,\c!mathstyle=\s!script]
\definemathfraction[xxfrac][\c!alternative=\v!inner,\c!mathstyle=\s!scriptscript]
-\let\normalxfrac\xfrac
+\aliased\let\normalxfrac\xfrac
-\protected\def\xfrac#1#2{\normalxfrac{\let\xfrac\xxfrac#1}{\let\xfrac\xxfrac#2}}
+\permanent\protected\def\xfrac#1#2{\normalxfrac{\enforced\let\xfrac\xxfrac#1}{\enforced\let\xfrac\xxfrac#2}}
%D Spacing (sensitive for definition of \triggermathstyle:
@@ -700,8 +700,8 @@
%D These macros are based on Michael J.~Downes posting on
%D comp.text.tex on 2001/12/06 but adapted a bit.
-\protected\def\splitfrac #1#2{{\textstyle {{\textstyle#1\quad\hfill}\normalabove\zeropoint{\textstyle\hfill\quad\mathstrut#2}}}}
-\protected\def\splitdfrac#1#2{{\displaystyle{{ #1\quad\hfill}\normalabove\zeropoint{ \hfill\quad\mathstrut#2}}}}
+\permanent\protected\def\splitfrac #1#2{{\textstyle {{\textstyle#1\quad\hfill}\normalabove\zeropoint{\textstyle\hfill\quad\mathstrut#2}}}}
+\permanent\protected\def\splitdfrac#1#2{{\displaystyle{{ #1\quad\hfill}\normalabove\zeropoint{ \hfill\quad\mathstrut#2}}}}
%D For testing:
diff --git a/tex/context/base/mkxl/math-ini.mkxl b/tex/context/base/mkxl/math-ini.mkxl
index 6b77db469..35092ceba 100644
--- a/tex/context/base/mkxl/math-ini.mkxl
+++ b/tex/context/base/mkxl/math-ini.mkxl
@@ -638,8 +638,8 @@
\permanent\protected\def\mathbox #1{\dontleavehmode\hbox\Ustartmath\mathsurround\zeropoint#1\Ustopmath}
\permanent\protected\def\mathnolop#1{\mathop{#1}\nolimits}
-\let\mathnothing\firstofoneunexpanded
-\let\mathalpha \firstofoneunexpanded
+\aliased\let\mathnothing\firstofoneunexpanded
+\aliased\let\mathalpha \firstofoneunexpanded
\setnewconstant\mathordcode \zerocount \letvalue{\??mathcodecommand ord}\mathord
\setnewconstant\mathopcode \plusone \letvalue{\??mathcodecommand op}\mathop
@@ -681,10 +681,10 @@
\permanent\tolerant\protected\def\definemathcommand[#1]#*[#2]#*[#3]#:#*#4% command class args meaning
{\ifparameter#3\or
- \edef\nofmathcommandarguments{#3}% make this one m_arguments
- \ifx\nofmathcommandarguments\v!one
+ \edef\scratchstringone{#3}% make this one m_arguments
+ \ifx\scratchstringone\v!one
\frozen\protected\defcsname\??mathcommand#1\endcsname##1{\mathcodecommand{#2}{#4{##1}}}%
- \orelse\ifx\nofmathcommandarguments\v!two
+ \orelse\ifx\scratchstringone\v!two
\frozen\protected\defcsname\??mathcommand#1\endcsname##1##2{\mathcodecommand{#2}{#4{##1}{##2}}}%
\else
\frozen\protected\defcsname\??mathcommand#1\endcsname{\mathcodecommand{#2}{#4}}%
@@ -758,7 +758,7 @@
%D
%D Todo:
-\protected\def\mf{\begincsname\fontalternative\endcsname} % todo: \frozen
+\permanent\protected\def\mf{\begincsname\fontalternative\endcsname} % todo: \frozen
% \let\normalmathop\mathop % already defined
@@ -932,7 +932,7 @@
% \let\mfunction \math_function_style_mfunction
% \let\mfunctionlabeltext\math_function_style_mfunctionlabeltext}}
-\def\currentmscaledstyle{rm} % will be plugged into the typeface text=ss option
+\mutable\def\currentmscaledstyle{rm} % will be plugged into the typeface text=ss option
\permanent\protected\def\mscaledtext#1%
{\mathchoice
@@ -992,12 +992,14 @@
\activatemathcharacter\underscoreasciicode
\activatemathcharacter\ampersandasciicode
+\permanent\def\normalmathaligntab{&} % \let\normalmathaligntab\aligntab does to work well in a let to & (a def works ok)
+
\appendtoks
\edef\p_ampersand{\mathematicsparameter\s!ampersand}%
\ifx\p_ampersand\v!normal
- \let\specialmathaligntab\normalmathaligntab
+ \enforced\let\specialmathaligntab\normalmathaligntab
\else
- \let\specialmathaligntab\mathampersand
+ \enforced\let\specialmathaligntab\mathampersand
\fi
\to \everysetupmathematics
@@ -1189,13 +1191,13 @@
\catcode\circumflexasciicode\activecatcode
\catcode\ampersandasciicode \activecatcode
- \glet\specialmathaligntab\normalmathaligntab
+ \aliased\glet\specialmathaligntab\normalmathaligntab
- \permanent\protected\gdef\obeymathcatcodes
- {\let _\normalsubscript
- \let ^\normalsuperscript
- \def &\specialmathaligntab
- }
+ \permanent\protected\gdef\obeymathcatcodes{%
+ \enforced\let _\normalsubscript
+ \enforced\let ^\normalsuperscript
+ \enforced\def &\specialmathaligntab
+ }
\doglobal\appendtoks
\enforced\let _\normalsubscript
@@ -1770,8 +1772,8 @@
\fi
\to \everysetupmathematics
-\def\enablemathpunctuation {\csname\??mathautopunctuation\v!no \endcsname}
-\def\disablemathpunctuation{\csname\??mathautopunctuation\v!yes\endcsname}
+\permanent\protected\def\enablemathpunctuation {\csname\??mathautopunctuation\v!no \endcsname}
+\permanent\protected\def\disablemathpunctuation{\csname\??mathautopunctuation\v!yes\endcsname}
\setupmathematics
[\v!autopunctuation=\v!no] % no | yes | all | comma | yes,semicolon | all,semicolon
@@ -2579,7 +2581,7 @@
% force text mode, will be overloaded later
-\ifdefined\text\else \let\text\hbox \fi
+\ifdefined\text\else \aliased\let\text\hbox \fi
% \protected\def\mathoptext#1{\mathop{\text{#1}}}
diff --git a/tex/context/base/mkxl/math-int.mkxl b/tex/context/base/mkxl/math-int.mkxl
index 4b3d63f2b..a8dcd3c95 100644
--- a/tex/context/base/mkxl/math-int.mkxl
+++ b/tex/context/base/mkxl/math-int.mkxl
@@ -40,7 +40,7 @@
\newconstant\mathintlimitmode
-\def\intlimits % also used elsewhere
+\permanent\def\intlimits % also used elsewhere
{\ifcase\mathintlimitmode
\nolimits
\or
diff --git a/tex/context/base/mkxl/math-pln.mkxl b/tex/context/base/mkxl/math-pln.mkxl
index 2fcf6e4cb..81008f37b 100644
--- a/tex/context/base/mkxl/math-pln.mkxl
+++ b/tex/context/base/mkxl/math-pln.mkxl
@@ -104,21 +104,13 @@
\permanent\protected\def\pmatrix#1%
{\left(\matrix{#1}\right)}
-% \protected\def\openup
-% {\afterassignment\math_openup\scratchdimen=}
-%
-% \def\math_openup
-% {\advance\lineskip \scratchdimen
-% \advance\baselineskip \scratchdimen
-% \advance\lineskiplimit\scratchdimen}
-
-\let\math_closeup\relax
-
-\protected\def\math_openup
+\permanent\protected\def\math_openup
{\afterassignment\math_openup_indeed\scratchdimen}
+\aliased\let\math_closeup\relax
+
\def\math_openup_indeed
- {\protected\edef\math_closeup
+ {\enforced\permanent\protected\edef\math_closeup
{\lineskip \the\lineskip
\baselineskip \the\baselineskip
\lineskiplimit\the\lineskiplimit
@@ -127,10 +119,10 @@
\advance \baselineskip \scratchdimen
\advance \lineskiplimit \scratchdimen}
-\let\openup \math_openup
-\def\closeup{\math_closeup} % dynamic
+\permanent\protected\def\openup {\math_openup } % the low level ones are used elsewhere
+\permanent\protected\def\closeup{\math_closeup} % the low level ones are used elsewhere
-\protected\def\displaylines#1%
+\permanent\protected\def\displaylines#1%
{\the\mathdisplayaligntweaks
\tabskip\zeroskip
\halign
diff --git a/tex/context/base/mkxl/math-stc.mklx b/tex/context/base/mkxl/math-stc.mklx
index 76aeda030..917fd97ba 100644
--- a/tex/context/base/mkxl/math-stc.mklx
+++ b/tex/context/base/mkxl/math-stc.mklx
@@ -1265,7 +1265,7 @@
%\immutable\letcsname#1\expandafter\endcsname\csname#1\endcsname
} % huh?
-\defineextensiblefiller [barfill] ["203E]
+%defineextensiblefiller [barfill] ["203E] % yet undefined
\defineextensiblefiller [relfill] ["002D]
\defineextensiblefiller [equalfill] ["003D]
\defineextensiblefiller [leftarrowfill] ["2190]
diff --git a/tex/context/base/mkxl/meta-ini.mkxl b/tex/context/base/mkxl/meta-ini.mkxl
index 227e3499a..41d39dee4 100644
--- a/tex/context/base/mkxl/meta-ini.mkxl
+++ b/tex/context/base/mkxl/meta-ini.mkxl
@@ -1255,9 +1255,9 @@
%D $(x,y) = (\MPrunset{point}{,})$
%D \stoptyping
-\permanent\def\MPrunvar #1{\clf_mprunvar{#1}} \let\mprunvar\MPrunvar
-\permanent\def\MPruntab#1#2{\clf_mpruntab{#1}#2\relax} \let\mpruntab\MPruntab % #2 is number
-\permanent\def\MPrunset#1#2{\clf_mprunset{#1}{#2}} \let\mprunset\MPrunset
+\permanent\def\MPrunvar #1{\clf_mprunvar{#1}} \aliased\let\mprunvar\MPrunvar
+\permanent\def\MPruntab#1#2{\clf_mpruntab{#1}#2\relax} \aliased\let\mpruntab\MPruntab % #2 is number
+\permanent\def\MPrunset#1#2{\clf_mprunset{#1}{#2}} \aliased\let\mprunset\MPrunset
\prependtoks \clf_mppushvariables \to \everybeforepagebody
\appendtoks \clf_mppopvariables \to \everyafterpagebody
diff --git a/tex/context/base/mkxl/meta-nod.mkxl b/tex/context/base/mkxl/meta-nod.mkxl
index 3f7a5a79f..0fbfefde0 100644
--- a/tex/context/base/mkxl/meta-nod.mkxl
+++ b/tex/context/base/mkxl/meta-nod.mkxl
@@ -156,6 +156,8 @@
}}%
\advance\c_meta_nodes_n\plusone}
+\aliased\let\placenode\relax
+
\appendtoks
\enforced\let\placenode\grph_nodes_node
\to \t_every_meta_nodes
diff --git a/tex/context/base/mkxl/mlib-lmt.lmt b/tex/context/base/mkxl/mlib-lmt.lmt
index 355674582..cf60774f3 100644
--- a/tex/context/base/mkxl/mlib-lmt.lmt
+++ b/tex/context/base/mkxl/mlib-lmt.lmt
@@ -9,6 +9,7 @@ if not modules then modules = { } end modules ['mlib-lmt'] = {
-- todo: check for possible inject usage
local type = type
+local round = math.round
local aux = mp.aux
local mpdirect = aux.direct
@@ -18,6 +19,8 @@ local scan = mp.scan
local scannumeric = scan.numeric
local scanpath = scan.path
+local injectpath = mp.inject.path
+
local getparameter = metapost.getparameter
local registerscript = metapost.registerscript
@@ -146,3 +149,31 @@ do
end
todecimal = xdecimal and xdecimal.new or tonumber -- bonus
+
+-- mail on list by Mikael Sundqvist and Taco's analysis of near duplicate points (2021/02/11+)
+
+registerscript("scrutenized", function()
+ local p = scanpath()
+ local d = 10^scannumeric()
+ for i=1,#p do
+ local pi = p[i]
+ pi[1] = round(pi[1] * d) / d
+ pi[2] = round(pi[2] * d) / d
+ end
+ local x1 = round(p[1][1])
+ local y1 = round(p[1][2])
+ local n = 1
+ local t = { p[1], cycle = p.cycle }
+ for i=2,#p do
+ local pi = p[i]
+ local x2 = round(pi[1])
+ local y2 = round(pi[2])
+ if x1 ~= x2 or y1 ~= y2 then
+ n = n + 1
+ t[n] = p[i]
+ x1 = x2
+ y1 = y2
+ end
+ end
+ injectpath(t)
+end)
diff --git a/tex/context/base/mkxl/mult-aux.mkxl b/tex/context/base/mkxl/mult-aux.mkxl
index 31b8ae878..40667e17d 100644
--- a/tex/context/base/mkxl/mult-aux.mkxl
+++ b/tex/context/base/mkxl/mult-aux.mkxl
@@ -716,9 +716,9 @@
\installdirectstyleandcolorhandler{#1}{#2}}
\permanent\protected\def\installsetuponlycommandhandler#1#2%
- {\installdirectparameterhandler{#1}{#2}%
- \installdirectsetuphandler {#1}{#2}%
- }% maybe \installdirectparametersethandler {#1}{#2}%
+ {\installdirectparameterhandler {#1}{#2}%
+ \installdirectsetuphandler {#1}{#2}%
+ \installdirectparametersethandler{#1}{#2}}
% Experiment:
diff --git a/tex/context/base/mkxl/pack-box.mkxl b/tex/context/base/mkxl/pack-box.mkxl
index 71a2dd326..0d56b8175 100644
--- a/tex/context/base/mkxl/pack-box.mkxl
+++ b/tex/context/base/mkxl/pack-box.mkxl
@@ -787,43 +787,43 @@
\fi{\flushnextbox}%
\egroup}
-\letvalue{\??alignedboxes }\middlebox
-\letvalue{\??alignedboxes\v!middle }\middlebox
-\letvalue{\??alignedboxes\v!middle\v!middle}\middlebox
-\letvalue{\??alignedboxes\v!left }\leftbox
-\letvalue{\??alignedboxes\v!left \v!top }\lefttopbox
-\letvalue{\??alignedboxes\v!left \v!bottom}\leftbottombox
-\letvalue{\??alignedboxes\v!right }\rightbox
-\letvalue{\??alignedboxes\v!right \v!top }\righttopbox
-\letvalue{\??alignedboxes\v!right \v!bottom}\rightbottombox
-\letvalue{\??alignedboxes\v!bottom }\bottombox
-\letvalue{\??alignedboxes\v!bottom\v!left }\bottomleftbox
-\letvalue{\??alignedboxes\v!bottom\v!right }\bottomrightbox
-\letvalue{\??alignedboxes\v!top }\topbox
-\letvalue{\??alignedboxes\v!top \v!left }\topleftbox
-\letvalue{\??alignedboxes\v!top \v!right }\toprightbox
-\letvalue{\??alignedboxes\v!line }\baselinemiddlebox % \v!grid is taken
-\letvalue{\??alignedboxes\v!line \v!left }\baselineleftbox
-\letvalue{\??alignedboxes\v!line \v!middle}\baselinemiddlebox
-\letvalue{\??alignedboxes\v!line \v!right }\baselinerightbox
-\letvalue{\??alignedboxes c}\middlebox
-\letvalue{\??alignedboxes l}\leftbox
-\letvalue{\??alignedboxes r}\rightbox
-\letvalue{\??alignedboxes b}\bottombox
-\letvalue{\??alignedboxes t}\topbox
-\letvalue{\??alignedboxes lt}\lefttopbox
-\letvalue{\??alignedboxes lb}\leftbottombox
-\letvalue{\??alignedboxes rt}\righttopbox
-\letvalue{\??alignedboxes rb}\rightbottombox
-\letvalue{\??alignedboxes tl}\topleftbox
-\letvalue{\??alignedboxes bl}\bottomleftbox
-\letvalue{\??alignedboxes tr}\toprightbox
-\letvalue{\??alignedboxes br}\bottomrightbox
-\letvalue{\??alignedboxes m}\middlebox
-\letvalue{\??alignedboxes g}\baselinemiddlebox
-\letvalue{\??alignedboxes gl}\baselineleftbox
-\letvalue{\??alignedboxes gc}\baselinemiddlebox
-\letvalue{\??alignedboxes gr}\baselinerightbox
+\letcsname\??alignedboxes \endcsname\middlebox
+\letcsname\??alignedboxes\v!middle \endcsname\middlebox
+\letcsname\??alignedboxes\v!middle\v!middle\endcsname\middlebox
+\letcsname\??alignedboxes\v!left \endcsname\leftbox
+\letcsname\??alignedboxes\v!left \v!top \endcsname\lefttopbox
+\letcsname\??alignedboxes\v!left \v!bottom\endcsname\leftbottombox
+\letcsname\??alignedboxes\v!right \endcsname\rightbox
+\letcsname\??alignedboxes\v!right \v!top \endcsname\righttopbox
+\letcsname\??alignedboxes\v!right \v!bottom\endcsname\rightbottombox
+\letcsname\??alignedboxes\v!bottom \endcsname\bottombox
+\letcsname\??alignedboxes\v!bottom\v!left \endcsname\bottomleftbox
+\letcsname\??alignedboxes\v!bottom\v!right \endcsname\bottomrightbox
+\letcsname\??alignedboxes\v!top \endcsname\topbox
+\letcsname\??alignedboxes\v!top \v!left \endcsname\topleftbox
+\letcsname\??alignedboxes\v!top \v!right \endcsname\toprightbox
+\letcsname\??alignedboxes\v!line \endcsname\baselinemiddlebox % \v!grid is taken
+\letcsname\??alignedboxes\v!line \v!left \endcsname\baselineleftbox
+\letcsname\??alignedboxes\v!line \v!middle\endcsname\baselinemiddlebox
+\letcsname\??alignedboxes\v!line \v!right \endcsname\baselinerightbox
+\letcsname\??alignedboxes c\endcsname\middlebox
+\letcsname\??alignedboxes l\endcsname\leftbox
+\letcsname\??alignedboxes r\endcsname\rightbox
+\letcsname\??alignedboxes b\endcsname\bottombox
+\letcsname\??alignedboxes t\endcsname\topbox
+\letcsname\??alignedboxes lt\endcsname\lefttopbox
+\letcsname\??alignedboxes lb\endcsname\leftbottombox
+\letcsname\??alignedboxes rt\endcsname\righttopbox
+\letcsname\??alignedboxes rb\endcsname\rightbottombox
+\letcsname\??alignedboxes tl\endcsname\topleftbox
+\letcsname\??alignedboxes bl\endcsname\bottomleftbox
+\letcsname\??alignedboxes tr\endcsname\toprightbox
+\letcsname\??alignedboxes br\endcsname\bottomrightbox
+\letcsname\??alignedboxes m\endcsname\middlebox
+\letcsname\??alignedboxes g\endcsname\baselinemiddlebox
+\letcsname\??alignedboxes gl\endcsname\baselineleftbox
+\letcsname\??alignedboxes gc\endcsname\baselinemiddlebox
+\letcsname\??alignedboxes gr\endcsname\baselinerightbox
% left/right/top/bottomoffset -> dimensions change
% x/y | method=fixed -> dimensions don't change
@@ -978,7 +978,7 @@
\permanent\protected\def\rtabbed{\pack_boxes_tabbed\hss \relax}
\permanent\protected\def\ctabbed{\pack_boxes_tabbed\hss \hss}
-\let\mtabbed\ctabbed
+\aliased\let\mtabbed\ctabbed
% to be documented
diff --git a/tex/context/base/mkxl/pack-fen.mkxl b/tex/context/base/mkxl/pack-fen.mkxl
index 8fa74b884..fc9817f92 100644
--- a/tex/context/base/mkxl/pack-fen.mkxl
+++ b/tex/context/base/mkxl/pack-fen.mkxl
@@ -28,57 +28,41 @@
\unprotect
\permanent\protected\def\installleftframerenderer#1#2%
- {\setvalue{\??framedleft\v!on#1}{\whateverleftframe{#2}}%
+ {\defcsname\??framedleft\v!on#1\endcsname{\whateverleftframe{#2}}%
\letcsname\??framedleft\v!off#1\expandafter\endcsname\csname\??framedleft\v!on#1\endcsname}
\permanent\protected\def\installrightframerenderer#1#2%
- {\setvalue{\??framedright\v!on#1}{\whateverrightframe{#2}}%
+ {\defcsname\??framedright\v!on#1\endcsname{\whateverrightframe{#2}}%
\letcsname\??framedright\v!off#1\expandafter\endcsname\csname\??framedright\v!on#1\endcsname}
\permanent\protected\def\installtopframerenderer#1#2%
- {\setvalue{\??framedtop\v!on#1}{\whatevertopframe{#2}}%
+ {\defcsname\??framedtop\v!on#1\endcsname{\whatevertopframe{#2}}%
\letcsname\??framedtop\v!off#1\expandafter\endcsname\csname\??framedtop\v!on#1\endcsname}
\permanent\protected\def\installbottomframerenderer#1#2%
- {\setvalue{\??framedbottom\v!on#1}{\whateverbottomframe{#2}}%
+ {\defcsname\??framedbottom\v!on#1\endcsname{\whateverbottomframe{#2}}%
\letcsname\??framedbottom\v!off#1\expandafter\endcsname\csname\??framedbottom\v!on#1\endcsname}
-\ifdefined \pack_framed_overlay_initialize_indeed
-
- \aliased\let\setinstalledframedimensions\pack_framed_overlay_initialize_indeed
-
-\else
-
- \permanent\protected\def\setinstalledframedimensions
- {\d_overlay_width \frameddimenwd
- \d_overlay_height \dimexpr\frameddimenht+\frameddimendp\relax
- \d_overlay_depth \frameddimendp
- \d_overlay_linewidth \ruledlinewidth
- \edef\overlaycolor {\framedparameter\c!backgroundcolor}%
- \edef\overlaylinecolor{\framedparameter\c!framecolor}}
-
-\fi
-
\newbox\b_framed_rendered
-\permanent\def\whateverleftframe#1%
- {\setinstalledframedimensions
+\permanent\protected\def\whateverleftframe#1%
+ {\pack_framed_overlay_initialize_indeed
\setbox\b_framed_rendered\vpack to \d_overlay_height{\vss#1\vss}%
\setbox\b_framed_rendered\hpack to \zeropoint{\box\b_framed_rendered\hss}%
\ht\b_framed_rendered\zeropoint
\dp\b_framed_rendered\zeropoint
\box\b_framed_rendered}
-\permanent\def\whateverrightframe#1%
- {\setinstalledframedimensions
+\permanent\protected\def\whateverrightframe#1%
+ {\pack_framed_overlay_initialize_indeed
\setbox\b_framed_rendered\vpack to \d_overlay_height{\vss#1\vss}%
\setbox\b_framed_rendered\hpack to \zeropoint{\hss\box\b_framed_rendered}%
\ht\b_framed_rendered\zeropoint
\dp\b_framed_rendered\zeropoint
\box\b_framed_rendered}
-\permanent\def\whatevertopframe#1%
- {\setinstalledframedimensions
+\permanent\protected\def\whatevertopframe#1%
+ {\pack_framed_overlay_initialize_indeed
\setbox\b_framed_rendered\hpack to \d_overlay_width{\hss#1\hss}%
\setbox\b_framed_rendered\vpack to \zeropoint{\box\b_framed_rendered\vss}%
\ht\b_framed_rendered\zeropoint
@@ -86,8 +70,8 @@
\box\b_framed_rendered
\nointerlineskip}
-\permanent\def\whateverbottomframe#1%
- {\setinstalledframedimensions
+\permanent\protected\def\whateverbottomframe#1%
+ {\pack_framed_overlay_initialize_indeed
\setbox\b_framed_rendered\hpack to \d_overlay_width{\hss#1\hss}%
\setbox\b_framed_rendered\vpack to \zeropoint{\vss\box\b_framed_rendered}%
\ht\b_framed_rendered\zeropoint
diff --git a/tex/context/base/mkxl/pack-lyr.mkxl b/tex/context/base/mkxl/pack-lyr.mkxl
index bb4926db5..3c0352bf3 100644
--- a/tex/context/base/mkxl/pack-lyr.mkxl
+++ b/tex/context/base/mkxl/pack-lyr.mkxl
@@ -303,6 +303,8 @@
\defcsname\??layerpreset#1\endcsname{\csname\??layerpreset#2\endcsname}%
\fi}
+\mutable\integerdef\b_layers_page\zerocount
+
\def\pack_layers_set_content#1%
{\layerwidth \layerparameter\c!width % global (local later)
\layerheight\layerparameter\c!height % global (local later)
@@ -365,24 +367,24 @@
\expandafter\newbox\csname\??layerbox\m_pack_layers_target\currentlayer\m_pack_layers_page\endcsname
\fi
\fi
- \chardef\layerpagebox\csname\??layerbox\m_pack_layers_target\currentlayer\m_pack_layers_page\endcsname
- \ifvoid\layerpagebox
- \gsetboxllx\layerpagebox\zeropoint
- \gsetboxlly\layerpagebox\zeropoint
+ \integerdef\b_layers_page\csname\??layerbox\m_pack_layers_target\currentlayer\m_pack_layers_page\endcsname
+ \ifvoid\b_layers_page
+ \gsetboxllx\b_layers_page\zeropoint
+ \gsetboxlly\b_layers_page\zeropoint
\fi
- \global\setbox\layerpagebox\vpack %to \layerparameter\c!height % new, otherwise no negative y possible
+ \global\setbox\b_layers_page\vpack %to \layerparameter\c!height % new, otherwise no negative y possible
{\offinterlineskip
- \ifvoid\layerpagebox
+ \ifvoid\b_layers_page
\scratchwidth \zeropoint
\scratchheight\zeropoint
\else
- \scratchwidth \wd\layerpagebox
- \scratchheight\ht\layerpagebox
- \ht\layerpagebox\zeropoint
- \dp\layerpagebox\zeropoint
- \wd\layerpagebox\zeropoint
+ \scratchwidth \wd\b_layers_page
+ \scratchheight\ht\b_layers_page
+ \ht\b_layers_page\zeropoint
+ \dp\b_layers_page\zeropoint
+ \wd\b_layers_page\zeropoint
\ifx\p_pack_layers_direction\v!reverse\else
- \box\layerpagebox
+ \box\b_layers_page
\fi
\fi
% don't move
@@ -409,14 +411,14 @@
\fi
% ll registration
\scratchdimen\dimexpr\d_pack_layers_x_position+\d_pack_layers_x_offset\relax
- \ifdim\scratchdimen<\getboxllx\layerpagebox
- \gsetboxllx\layerpagebox\scratchdimen
+ \ifdim\scratchdimen<\getboxllx\b_layers_page
+ \gsetboxllx\b_layers_page\scratchdimen
\fi
\advance\scratchdimen\wd\nextbox
\wd\nextbox\ifdim\scratchdimen>\scratchwidth \scratchdimen \else \scratchwidth \fi
\scratchdimen\dimexpr\d_pack_layers_y_position+\d_pack_layers_y_offset\relax
- \ifdim\scratchdimen<\getboxlly\layerpagebox
- \gsetboxlly\layerpagebox\scratchdimen
+ \ifdim\scratchdimen<\getboxlly\b_layers_page
+ \gsetboxlly\b_layers_page\scratchdimen
\fi
% ll compensation
\advance\scratchdimen\dimexpr\ht\nextbox+\dp\nextbox\relax
@@ -431,12 +433,12 @@
% or maybe instead of the \vskip
% \raise-\dimexpr\d_pack_layers_y_position+\d_pack_layers_y_offset\relax
\box\nextbox
- \ifvoid\layerpagebox
+ \ifvoid\b_layers_page
% already flushed
\else
% the reverse case % check !
\vskip-\dimexpr\d_pack_layers_y_position+\d_pack_layers_y_offset\relax
- \box\layerpagebox
+ \box\b_layers_page
\fi
\egroup}%
% when position is true, the layerbox holds the compensation and needs
diff --git a/tex/context/base/mkxl/pack-rul.mkxl b/tex/context/base/mkxl/pack-rul.mkxl
index 47f1b0a19..e89989dfa 100644
--- a/tex/context/base/mkxl/pack-rul.mkxl
+++ b/tex/context/base/mkxl/pack-rul.mkxl
@@ -939,7 +939,7 @@
\box\b_framed_normal
\egroup}
-\protected\def\localbackgroundframed#1% namespace component box
+\permanent\protected\def\localbackgroundframed#1% namespace component box
{\bgroup
\edef\currentframed{#1}%
\pack_framed_initialize
@@ -1181,6 +1181,9 @@
\edef\framedwidth {\the\ifdim\d_framed_width >\zeropoint \d_framed_width \else\zeropoint\fi}% public
\edef\framedheight{\the\ifdim\d_framed_height>\zeropoint \d_framed_height\else\zeropoint\fi}% public
\edef\framedoffset{\the\dimexpr\ifconditional\c_framed_has_offset\localoffset \else\zeropoint\fi}% public
+ % for now: i need to think of something better
+ \bitwiseflip \normalizelinemode -\clipwidthcode
+ % but that's for later
\ifempty\p_framed_orientation
\let\pack_framed_stop_orientation\relax
\else
diff --git a/tex/context/base/mkxl/page-app.mkxl b/tex/context/base/mkxl/page-app.mkxl
index 73235a887..d75366cca 100644
--- a/tex/context/base/mkxl/page-app.mkxl
+++ b/tex/context/base/mkxl/page-app.mkxl
@@ -45,8 +45,8 @@
\c!location=\v!middle]
\appendtoks
- \frozen\instance\setuevalue{\e!start\currentfittingpage}{\startfittingpage[\currentfittingpage]}%
- \frozen\instance\setuevalue{\e!stop \currentfittingpage}{\stopfittingpage}%
+ \frozen\instance\protected\edefcsname\e!start\currentfittingpage\endcsname{\startfittingpage[\currentfittingpage]}%
+ \frozen\instance\protected\edefcsname\e!stop \currentfittingpage\endcsname{\stopfittingpage}%
\to \everydefinefittingpage
\permanent\tolerant\protected\def\startfittingpage[#1]#*[#2]%
@@ -107,10 +107,10 @@
\enforced\let\checkcurrentlayout\relax % else interference with odd/even layout
\processaction
[\fittingpageparameter\c!paper]
- [ \v!auto=>\def\fittingpapersize{\printpapersize},
- \s!unknown=>\let\fittingpapersize\commalistelement,
- \s!default=>\def\fittingpapersize{fittingpage}]%
- \normalexpanded{\setuppapersize[fittingpage][\fittingpapersize]}%
+ [ \v!auto=>\let\scratchstringone\printpapersize,
+ \s!unknown=>\let\scratchstringone\commalistelement,
+ \s!default=>\def\scratchstringone{fittingpage}]%
+ \normalexpanded{\setuppapersize[fittingpage][\scratchstringone]}%
\startmakeup[fittingpage]%
\box\b_page_fitting
\stopmakeup
diff --git a/tex/context/base/mkxl/page-box.mklx b/tex/context/base/mkxl/page-box.mklx
index b34de6de0..c8ceeb828 100644
--- a/tex/context/base/mkxl/page-box.mklx
+++ b/tex/context/base/mkxl/page-box.mklx
@@ -256,7 +256,7 @@
\newconditional\c_page_areas_enabled
\newbox \b_page_areas_registered
-\def\enabletextarearegistration
+\permanent\protected\def\enabletextarearegistration
{\global\settrue\c_page_areas_enabled}
\def\page_areas_registered_box
diff --git a/tex/context/base/mkxl/page-brk.mkxl b/tex/context/base/mkxl/page-brk.mkxl
index 3e3a1c1d4..7256efefa 100644
--- a/tex/context/base/mkxl/page-brk.mkxl
+++ b/tex/context/base/mkxl/page-brk.mkxl
@@ -69,12 +69,12 @@
{\begincsname\??pagebreakmethod#1\endcsname}
\permanent\protected\def\installpagebreakmethod#1#2% low level definer
- {\setvalue{\??pagebreakmethod#1}{#2}}
+ {\defcsname\??pagebreakmethod#1\endcsname{#2}}
\aliased\let\installpagebreakhandler\installpagebreakmethod % will go
\permanent\tolerant\protected\def\definepagebreak[#1]#*[#2]%
- {\setvalue{\??pagebreaks#1}{#2}}
+ {\defcsname\??pagebreaks#1\endcsname{#2}}
\appendtoks
\flushnotes
@@ -123,7 +123,7 @@
\permanent\protected\def\simplifypagebreak % to be used grouped !
{\enforced\permanent\protected\def\pagebreak[##1]{\goodbreak}}
-\protected\def\disablepagebreaks % to be used grouped !
+\permanent\protected\def\disablepagebreaks % to be used grouped !
{\enforced\let\page_breaks_process\gobbleoneoptional}
\installpagebreakmethod \s!dummy
@@ -309,12 +309,12 @@
{\begincsname\??columnbreakmethod\currentoutputroutine:#1\endcsname}
\permanent\protected\def\installcolumnbreakmethod#1#2#3% #1=otr-id #2=tag #3=action
- {\setvalue{\??columnbreakmethod#1:#2}{#3}}
+ {\defcsname\??columnbreakmethod#1:#2\endcsname{#3}}
\aliased\let\installcolumnbreakhandler\installcolumnbreakmethod % will go
\permanent\tolerant\protected\def\definecolumnbreak[#1]#*[#2]%
- {\setvalue{\??columnbreaks#1}{#2}}
+ {\defcsname\??columnbreaks#1\endcsname{#2}}
%D So, page ornaments are reset after a pagebreak command, unless set!
@@ -381,7 +381,7 @@
\endgroup
\fi}
-\setvalue{\??pagecheckermethod 0}%
+\defcsname\??pagecheckermethod 0\endcsname
{\ifdim\pagegoal<\maxdimen \relax
\ifdim\pagetotal<\pagegoal \relax
\ifdim\page_check_amount>.99\pagegoal
@@ -398,7 +398,7 @@
\pagecheckerparameter\c!inbetween
\fi}
-\setvalue{\??pagecheckermethod 1}%
+\defcsname\??pagecheckermethod 1\endcsname
{\ifdim\pagegoal<\maxdimen \relax
\ifdim\pagetotal<\pagegoal \relax
\ifdim\dimexpr\page_check_amount-\pagegoal\relax>-\lineheight
@@ -416,7 +416,7 @@
\pagecheckerparameter\c!inbetween
\fi}
-\setvalue{\??pagecheckermethod 2}%
+\defcsname\??pagecheckermethod 2\endcsname
{\ifdim\pagegoal<\maxdimen \relax
\ifdim\pagetotal<\pagegoal \relax
\getnoflines\pagegoal
@@ -434,7 +434,7 @@
\pagecheckerparameter\c!inbetween
\fi}
-\setvalue{\??pagecheckermethod 3}%
+\defcsname\??pagecheckermethod 3\endcsname
{\ifdim\pagegoal<\maxdimen \relax
\ifdim\pagetotal<\pagegoal \relax
\ifdim\dimexpr\page_check_amount-10\scaledpoint\relax>\pagegoal
diff --git a/tex/context/base/mkxl/page-ffl.mkxl b/tex/context/base/mkxl/page-ffl.mkxl
index de016fdf6..350c45000 100644
--- a/tex/context/base/mkxl/page-ffl.mkxl
+++ b/tex/context/base/mkxl/page-ffl.mkxl
@@ -91,7 +91,7 @@
\let\m_strc_floats_state\relax
-\protected\def\strc_floats_facing_flush
+\permanent\protected\def\strc_floats_facing_flush
{\ifnum\c_strc_floats_facing_flushed<\c_strc_floats_facing_saved
\ifodd\c_strc_floats_facing_flushed
\ifodd\realpageno
diff --git a/tex/context/base/mkxl/page-flt.mkxl b/tex/context/base/mkxl/page-flt.mkxl
index b6049833e..a97cc7f0d 100644
--- a/tex/context/base/mkxl/page-flt.mkxl
+++ b/tex/context/base/mkxl/page-flt.mkxl
@@ -127,7 +127,7 @@
\protected\def\page_floats_collect#1#2#3%
{\clf_collectfloat{#1}\dimexpr#2\relax\dimexpr#3\relax}
-\def\nofstackedfloatincategory#1%
+\permanent\def\nofstackedfloatsincategory#1% was singular
{\clf_nofstackedfloats{#1}}
\let\page_floats_column_push_saved\page_floats_push_saved % overloaded in page-mul
@@ -187,6 +187,8 @@
\mutable\let\floatsetupwidth \empty
\mutable\let\floatsetupheight \empty
+\aliased\let\placesetupfloat\gobbleoneoptional
+
\permanent\tolerant\protected\def\placefloatwithsetups[#1]#*[#2]#*[#3]#:#4%
{\def\floatsetupcaption{#4}%
\def\floatsetupcontent{\copy\nextbox}%
@@ -252,7 +254,7 @@
{\ifconditional\c_page_floats_room \else
\ifdim\dimexpr\pagegoal-\pagetotal-3\lineheight\relax>\zeropoint
\startlinecorrection[blank]
- \mhbox{\inframed{\labeltexts{placeholder}{\lastcaptiontag}}}%
+ \mhbox{\inframed{\labeltexts{placeholder}{\m_strc_floats_last_caption_tag}}}%
\stoplinecorrection
\else
\allowbreak
diff --git a/tex/context/base/mkxl/page-imp.mkxl b/tex/context/base/mkxl/page-imp.mkxl
index 1e8586be5..89a2be030 100644
--- a/tex/context/base/mkxl/page-imp.mkxl
+++ b/tex/context/base/mkxl/page-imp.mkxl
@@ -433,8 +433,7 @@
\box\scratchbox\box#5\hss}}
\permanent\protected\def\gotonextarrangepage
- {\global\advance\arrangeno \plusone
- \def\pagecutmarksymbol{\the\arrangeno}}
+ {\global\advance\arrangeno\plusone}
\permanent\protected\def\outputarrangedbox#1%
{\begingroup
diff --git a/tex/context/base/mkxl/page-ins.mkxl b/tex/context/base/mkxl/page-ins.mkxl
index 5c275516c..2ab7449ab 100644
--- a/tex/context/base/mkxl/page-ins.mkxl
+++ b/tex/context/base/mkxl/page-ins.mkxl
@@ -60,7 +60,7 @@
\newtoks\t_page_inserts_list
-\let\doprocessinsert\relax
+\mutable\let\doprocessinsert\relax % probably kind of obsolete now
%D Maybe some day we will move settings here.
diff --git a/tex/context/base/mkxl/page-lay.mkxl b/tex/context/base/mkxl/page-lay.mkxl
index 6a5b5c09e..21cb48f20 100644
--- a/tex/context/base/mkxl/page-lay.mkxl
+++ b/tex/context/base/mkxl/page-lay.mkxl
@@ -756,7 +756,7 @@
\letvalue{\??layoutcolumn0}\zeropoint
-\def\layoutcolumnoffset#1% can travel around so we can't use \lastnamedcs
+\permanent\def\layoutcolumnoffset#1% can travel around so we can't use \lastnamedcs
{\csname\??layoutcolumn\ifcsname\??layoutcolumn#1\endcsname#1\else0\fi\endcsname}
\def\page_layouts_synchronize_at_start
diff --git a/tex/context/base/mkxl/page-mix.mkxl b/tex/context/base/mkxl/page-mix.mkxl
index 7fb4512e5..433d94ab6 100644
--- a/tex/context/base/mkxl/page-mix.mkxl
+++ b/tex/context/base/mkxl/page-mix.mkxl
@@ -387,7 +387,7 @@
%D \stopmixedcolumns
%D \stoptyping
-\let\currentmixedcolumnsmethod\empty
+\mutable\let\currentmixedcolumnsmethod\empty
\installmacrostack\currentmixedcolumns
\installmacrostack\currentmixedcolumnsmethod
diff --git a/tex/context/base/mkxl/page-mrk.mkxl b/tex/context/base/mkxl/page-mrk.mkxl
index 697cafdea..143fab180 100644
--- a/tex/context/base/mkxl/page-mrk.mkxl
+++ b/tex/context/base/mkxl/page-mrk.mkxl
@@ -156,16 +156,7 @@
\installcorenamespace{layoutmarking}
\permanent\protected\def\installpagecutmark#1#2%
- {\setvalue{\??layoutmarking#1}{#2}}
-
-% \installpagecutmark\v!off
-% {}
-
-% \installpagecutmark\v!text
-% {\settrue\c_page_marks_add_more_lines
-% \settrue\c_page_marks_add_more_number
-% \let\pagecutmarksymbol\empty
-% \let\pagecutmarkbottomtext\extrapagecutmarkbottomtext}
+ {\defcsname\??layoutmarking#1\endcsname{#2}}
\installpagecutmark\v!on
{%settrue\c_page_marks_add_page_lines
diff --git a/tex/context/base/mkxl/page-one.mkxl b/tex/context/base/mkxl/page-one.mkxl
index 444feff1d..9d0fb2065 100644
--- a/tex/context/base/mkxl/page-one.mkxl
+++ b/tex/context/base/mkxl/page-one.mkxl
@@ -61,8 +61,8 @@
% We really need a setting! Todo, what key to use?
\pushoverloadmode
- \setnewconstant\kindofpagetextareas\plustwo % \plusone can become default some day
- \overloaded\let\kindofpagetextareas\kindofpagetextareas
+ \setnewconstant\kindofpagetextareas\plustwo % \plusone can become default some day
+ \overloaded\mutable\let\kindofpagetextareas\kindofpagetextareas % fo rnow mutable, can become a key/value
\popoverloadmode
\def\page_one_registered_text_area_a % two arguments: (un)vbox n
diff --git a/tex/context/base/mkxl/page-pst.mkxl b/tex/context/base/mkxl/page-pst.mkxl
index 88e962805..026c64d62 100644
--- a/tex/context/base/mkxl/page-pst.mkxl
+++ b/tex/context/base/mkxl/page-pst.mkxl
@@ -52,6 +52,8 @@
\newcount \c_page_postponed_blocks_next_page % set at the lua end
\newconditional\c_page_postponed_busy
+\mutable\let\currentpostponedpage\empty
+
\permanent\protected\setvalue{\e!start\v!postponing}%
{\bgroup
\obeylines
diff --git a/tex/context/base/mkxl/page-txt.mklx b/tex/context/base/mkxl/page-txt.mklx
index 10b5d1a74..4a217538e 100644
--- a/tex/context/base/mkxl/page-txt.mklx
+++ b/tex/context/base/mkxl/page-txt.mklx
@@ -411,13 +411,14 @@
\resetlayoutelementparameter\c!middletext
\resetlayoutelementparameter\c!righttext
\or % 3
- \edef\currentlayoutelement{#vertical:#horizontal}%
- \letcsname\layoutelementhash\begincsname\??layouttextcontent\v!text:#tag\endcsname\c!middletext\endcsname\empty
+% \edef\currentlayoutelement{#vertical:#horizontal}%
+% \letcsname\layoutelementhash\begincsname\??layouttextcontent\v!text:#tag\endcsname\c!middletext\endcsname\empty
+ \letcsname\namedlayoutelementhash{#vertical:#horizontal}\begincsname\??layouttextcontent\v!text:#tag\endcsname\c!middletext\endcsname\empty
\fi}
-\letvalue{\??layouttextcontent\v!text:\c!middle}\c!middletext
-\letvalue{\??layouttextcontent\v!text:\c!left }\c!lefttext
-\letvalue{\??layouttextcontent\v!text:\c!right }\c!righttext
+\letcsname\??layouttextcontent\v!text:\c!middle\endcsname\c!middletext
+\letcsname\??layouttextcontent\v!text:\c!left \endcsname\c!lefttext
+\letcsname\??layouttextcontent\v!text:\c!right \endcsname\c!righttext
%D The placement of a whole line is handled by the next two macros. These are hooked
%D into the general purpose token list registers mentioned before.
diff --git a/tex/context/base/mkxl/phys-dim.mkxl b/tex/context/base/mkxl/phys-dim.mkxl
index 5df7b5a16..51ebbe172 100644
--- a/tex/context/base/mkxl/phys-dim.mkxl
+++ b/tex/context/base/mkxl/phys-dim.mkxl
@@ -195,39 +195,39 @@
\frozen\protected\def\normaldigitscommasymbol {,}
\frozen\protected\def\normaldigitsperiodsymbol{.}
-\aliased\let\normaldigitsseparatorspace\digitsseparatorspace
+\frozen\let\normaldigitsseparatorspace\digitsseparatorspace
\installcorenamespace{digitscomma}
\installcorenamespace{digitsperiod}
\installcorenamespace{digitsspace}
-\letvalue{\??digitscomma 0}\normaldigitscommasymbol
-\letvalue{\??digitsperiod0}\normaldigitsperiodsymbol
-\letvalue{\??digitsspace 0}\normaldigitsseparatorspace
+\letcsname\??digitscomma 0\endcsname\normaldigitscommasymbol
+\letcsname\??digitsperiod0\endcsname\normaldigitsperiodsymbol
+\letcsname\??digitsspace 0\endcsname\normaldigitsseparatorspace
-\letvalue{\??digitscomma 1}\normaldigitsperiodsymbol
-\letvalue{\??digitsperiod1}\normaldigitscommasymbol
-\letvalue{\??digitsspace 1}\normaldigitsseparatorspace
+\letcsname\??digitscomma 1\endcsname\normaldigitsperiodsymbol
+\letcsname\??digitsperiod1\endcsname\normaldigitscommasymbol
+\letcsname\??digitsspace 1\endcsname\normaldigitsseparatorspace
-\letvalue{\??digitscomma 2}\normaldigitscommasymbol
-\letvalue{\??digitsperiod2}\normaldigitsperiodsymbol
-\letvalue{\??digitsspace 2}\normaldigitsseparatorspace
+\letcsname\??digitscomma 2\endcsname\normaldigitscommasymbol
+\letcsname\??digitsperiod2\endcsname\normaldigitsperiodsymbol
+\letcsname\??digitsspace 2\endcsname\normaldigitsseparatorspace
-\letvalue{\??digitscomma 3}\thinspace
-\letvalue{\??digitsperiod3}\normaldigitscommasymbol
-\letvalue{\??digitsspace 3}\thinspace
+\letcsname\??digitscomma 3\endcsname\thinspace
+\letcsname\??digitsperiod3\endcsname\normaldigitscommasymbol
+\letcsname\??digitsspace 3\endcsname\thinspace
-\letvalue{\??digitscomma 4}\thinspace
-\letvalue{\??digitsperiod4}\normaldigitsperiodsymbol
-\letvalue{\??digitsspace 4}\thinspace
+\letcsname\??digitscomma 4\endcsname\thinspace
+\letcsname\??digitsperiod4\endcsname\normaldigitsperiodsymbol
+\letcsname\??digitsspace 4\endcsname\thinspace
-\letvalue{\??digitscomma 5}\thickspace
-\letvalue{\??digitsperiod5}\normaldigitscommasymbol
-\letvalue{\??digitsspace 5}\thickspace
+\letcsname\??digitscomma 5\endcsname\thickspace
+\letcsname\??digitsperiod5\endcsname\normaldigitscommasymbol
+\letcsname\??digitsspace 5\endcsname\thickspace
-\letvalue{\??digitscomma 6}\thickspace
-\letvalue{\??digitsperiod6}\normaldigitsperiodsymbol
-\letvalue{\??digitsspace 6}\thickspace
+\letcsname\??digitscomma 6\endcsname\thickspace
+\letcsname\??digitsperiod6\endcsname\normaldigitsperiodsymbol
+\letcsname\??digitsspace 6\endcsname\thickspace
\frozen\protected\def\digitscommasymbol {\csname\??digitscomma \number\c_phys_digits_method\endcsname}
\frozen\protected\def\digitsperiodsymbol {\csname\??digitsperiod\number\c_phys_digits_method\endcsname}
@@ -390,11 +390,10 @@
\frozen\protected\def\unitsbackspace {\negthinspace}
\permanent\protected\def\installunitsseparator#1#2%
- {\setvalue{\??unitseparator#1}{#2}}
+ {\defcsname\??unitseparator#1\endcsname{#2}}
\protected\def\phys_units_separator
- {\edef\currentunitsseparator{\unitparameter\c!separator}% no longer needed
- \ifcsname\??unitseparator\currentunitsseparator\endcsname\lastnamedcs\else\cdot\fi}
+ {\ifcsname\??unitseparator\unitparameter\c!separator\endcsname\lastnamedcs\else\cdot\fi}
\installunitsseparator\v!normal {\cdot}
\installunitsseparator\v!big {\unitsbigspace}
@@ -403,12 +402,11 @@
\installunitsseparator\v!none {}
\permanent\protected\def\installunitsspace#1#2%
- {\setvalue{\??unitspace#1}{#2}}
+ {\defcsname\??unitspace#1\endcsname{#2}}
\protected\def\phys_units_space
{\unskip % weird, why is unskip needed
- \edef\currentunitsspace{\unitparameter\c!space}%
- \ifcsname\??unitspace\currentunitsspace\endcsname\lastnamedcs\else\unitsmediumspace\fi}
+ \ifcsname\??unitspace\unitparameter\c!space\endcsname\lastnamedcs\else\unitsmediumspace\fi}
\installunitsspace\v!normal{\unitsmediumspace}
\installunitsspace\v!big {\unitsbigspace}
@@ -443,15 +441,15 @@
% \the\everyunits
%\removeunwantedspaces % not ok yet
\useunitstyleandcolor\c!style\c!color
- \edef\currentunitsalternative{\unitparameter\c!alternative}%
+ \edef\scratchstringone{\unitparameter\c!alternative}%
\ifmmode
- \ifx\currentunitsalternative\v!text
+ \ifx\scratchstringone\v!text
\expandafter\expandafter\expandafter\phys_units_direct_text_in_math
\else
\expandafter\expandafter\expandafter\phys_units_direct_math
\fi
\else
- \ifx\currentunitsalternative\v!mathematics
+ \ifx\scratchstringone\v!mathematics
\expandafter\expandafter\expandafter\phys_units_direct_math_in_text
\else
\expandafter\expandafter\expandafter\phys_units_direct_text
diff --git a/tex/context/base/mkxl/scrn-but.mklx b/tex/context/base/mkxl/scrn-but.mklx
index d9d7d22ed..76694e1d9 100644
--- a/tex/context/base/mkxl/scrn-but.mklx
+++ b/tex/context/base/mkxl/scrn-but.mklx
@@ -146,12 +146,13 @@
\aliased\letcsname\??buttonlocation \endcsname\plusone % default
\newconditional\c_scrn_button_skipped
+\newconstant \locationboxpagestate
\def\scrn_button_make#currentparameter#inheritedframed#letparameter#setparameter#text#action%
{\begingroup
\c_attr_reference\attributeunsetvalue
\global\setfalse\c_scrn_button_skipped
- \chardef\locationboxpagestate\csname\??buttonlocation#currentparameter\c!samepage\endcsname % ?? bt: todo
+ \locationboxpagestate\csname\??buttonlocation#currentparameter\c!samepage\endcsname % ?? bt: todo
\doifelsereferencefound{#action}\scrn_button_make_yes\scrn_button_make_nop
#currentparameter%
#inheritedframed%
@@ -433,6 +434,8 @@
\newconditional\c_scrn_menu_zerodimensions
+\mutable\let\currentinteractionmenulocation\empty
+
\def\scrn_menu_set_used
{\d_scrn_menu_offset_left \ifchkdim\interactionmenuparameter\c!leftoffset \or\lastchkdim\else\zeropoint\fi
\d_scrn_menu_offset_right \ifchkdim\interactionmenuparameter\c!rightoffset \or\lastchkdim\else\zeropoint\fi
@@ -448,8 +451,8 @@
\relax}
\def\scrn_menu_set_final
- {\d_scrn_menu_final_width \namedinteractionmenuparameter\askedinteractionmenulocation\c!maxwidth
- \d_scrn_menu_final_height\namedinteractionmenuparameter\askedinteractionmenulocation\c!maxheight}
+ {\d_scrn_menu_final_width \namedinteractionmenuparameter\currentinteractionmenulocation\c!maxwidth
+ \d_scrn_menu_final_height\namedinteractionmenuparameter\currentinteractionmenulocation\c!maxheight}
\def\scrn_menu_apply_final
{\ifconditional\c_scrn_menu_zerodimensions
@@ -505,14 +508,14 @@
\def\scrn_menu_insert_indeed#location%
{\begingroup
- \xdef\askedinteractionmenulocation{#location}%
+ \xdef\currentinteractionmenulocation{#location}%
\scrn_menu_set_final
\ifcase\d_scrn_menu_final_width \orelse \ifcase\d_scrn_menu_final_height \else
\forgetall
\global\d_scrn_menu_next_distance\zeropoint
\let\scrn_menu_action\scrn_menu_package_indeed
\the\everysetmenucommands
- \csname\??menupacker\namedinteractionmenuparameter\askedinteractionmenulocation\c!alternative\endcsname
+ \csname\??menupacker\namedinteractionmenuparameter\currentinteractionmenulocation\c!alternative\endcsname
\fi
\endgroup}
@@ -520,13 +523,13 @@
\setvalue{\??menupacker\v!vertical}% all menus
{\let\scrn_menu_packager\scrn_menu_packager_vertical
- \setbox\b_scrn_menu\hbox{\scrn_menu_actions\askedinteractionmenulocation}%
+ \setbox\b_scrn_menu\hbox{\scrn_menu_actions\currentinteractionmenulocation}%
\scrn_menu_apply_final
\box\b_scrn_menu}
\setvalue{\??menupacker\v!horizontal}% all menus
{\let\scrn_menu_packager\scrn_menu_packager_horizontal
- \setbox\b_scrn_menu\vbox{\scrn_menu_actions\askedinteractionmenulocation}%
+ \setbox\b_scrn_menu\vbox{\scrn_menu_actions\currentinteractionmenulocation}%
\scrn_menu_apply_final
\box\b_scrn_menu}
@@ -609,10 +612,10 @@
\newtoks \t_scrn_menu_meta_data
\def\scrn_menu_button_meta_template
- {\askedinteractionmenulocation _menu_button(%
+ {\currentinteractionmenulocation _menu_button(%
\number\c_scrn_menu_position,%
\number\c_scrn_menu_page_mode,%
- \MPpos{\askedinteractionmenulocation:\number\c_scrn_menu_position}%
+ \MPpos{\currentinteractionmenulocation:\number\c_scrn_menu_position}%
);}
\permanent\def\MPmenubuttons#1{\the\t_scrn_menu_meta_data}
@@ -623,7 +626,7 @@
\def\scrn_menu_whole_position % cannot happen in previous due to align
{\setbox\b_scrn_menu\hbox \bgroup
- \hpos{menu:\askedinteractionmenulocation:\the\realpageno}{\box\b_scrn_menu}%
+ \hpos{menu:\currentinteractionmenulocation:\the\realpageno}{\box\b_scrn_menu}%
\egroup}
% removed: \restorestandardblank (vspacing) ... should happen elsewhere
@@ -675,13 +678,13 @@
\endgroup
\ignorespaces}
-\aliased\let\startraw \aliased\let\stopraw\relax
-\aliased\let\startbut \aliased\let\stopbut\relax
-\aliased\let\startgot \aliased\let\stopgot\relax
-\aliased\let\startnop \aliased\let\stopnop\relax
-\aliased\let\starttxt \aliased\let\stoptxt\relax
-\aliased\let\startrul \aliased\let\stoprul\relax
-\aliased\let\startcom \aliased\let\stopcom\relax
+\aliased\let\startraw \aliased\let\stopraw\relax \ifdefined\raw\else \aliased\let\raw\relax \fi
+\aliased\let\startbut \aliased\let\stopbut\relax \ifdefined\but\else \aliased\let\but\relax \fi
+\aliased\let\startgot \aliased\let\stopgot\relax \ifdefined\got\else \aliased\let\got\relax \fi
+\aliased\let\startnop \aliased\let\stopnop\relax \ifdefined\nop\else \aliased\let\nop\relax \fi
+\aliased\let\starttxt \aliased\let\stoptxt\relax \ifdefined\txt\else \aliased\let\txt\relax \fi
+\aliased\let\startrul \aliased\let\stoprul\relax \ifdefined\rul\else \aliased\let\rul\relax \fi
+\aliased\let\startcom \aliased\let\stopcom\relax \ifdefined\com\else \aliased\let\com\relax \fi
\protected\def\scrn_menu_raw_start[#action]#text\stopraw
{\scrn_menu_action_start
@@ -710,7 +713,7 @@
{\c_scrn_menu_page_mode\plustwo}%
\xtoksapp\t_scrn_menu_meta_data{\scrn_menu_button_meta_template}%
\hpos
- {\askedinteractionmenulocation:\number\c_scrn_menu_position}%
+ {\currentinteractionmenulocation:\number\c_scrn_menu_position}%
{\scrn_button_make
#currentparameter%
#inheritedframed%
@@ -1033,7 +1036,7 @@
\removeunwantedspaces
\endgroup}
-\def\doregistermenubutton#1#2#3% used at lua end
+\permanent\protected\def\doregistermenubutton#1#2#3% used at lua end
{\ifcstok{\interactionmenuparameter\c!state}\v!start
\scrn_menu_menu_button_c{#1}{}{#2}{#3}%
\fi
diff --git a/tex/context/base/mkxl/scrn-fld.mklx b/tex/context/base/mkxl/scrn-fld.mklx
index d01ecfaca..d4f07d5e9 100644
--- a/tex/context/base/mkxl/scrn-fld.mklx
+++ b/tex/context/base/mkxl/scrn-fld.mklx
@@ -358,8 +358,9 @@
\permanent\tolerant\protected\def\fitfield[#tag]#spacer[#settings]%
{\iflocation
\begingroup
- \edef\currentdefaultfieldvalue{\clf_getdefaultfieldvalue{#tag}}%
- \setbox\b_scrn_field_fit_symbol\hbox{\symbol[\currentdefaultfieldvalue]}%
+ \setbox\b_scrn_field_fit_symbol\hbox\bgroup
+ \normalexpanded{\symbol[\clf_getdefaultfieldvalue{#tag}]}%
+ \egroup
\fitfieldframed
{\fieldbody[#tag]
[\c!width=\wd\b_scrn_field_fit_symbol,
@@ -379,6 +380,8 @@
\installparameterhandler \??fieldcontent {fieldcontentframed}
\installparameterhandler \??fieldtotal {fieldtotalframed}
+\installparametersethandler \??fieldcontent {fieldcontentframed}
+
\installsetuphandler \??fieldlabel {fieldlabelframed}
\installsetuphandler \??fieldcontent {fieldcontentframed}
\installsetuphandler \??fieldtotal {fieldtotalframed}
@@ -667,6 +670,8 @@
\tolerant\def\scrn_tooltip_ignore[#settings]#:#anchortext#tiptext%
{#anchortext}
+\mutable\let\currenttooltipname\empty
+
\tolerant\def\scrn_tooltip_indeed[#settings]#:#anchortext#tiptext% a more modern aproach (push buttons)
{\dontleavehmode \hbox \bgroup
\dontcomplain
@@ -695,10 +700,10 @@
{\fieldbody[\currenttooltipname:txt]}%
\setbox\b_scrn_tooltip_text\hbox
{\strut\lower\dimexpr.25ex+\ht\b_scrn_tooltip_text\relax\box\b_scrn_tooltip_text}%
- \edef\currenttooltiplocation{\tooltipparameter\c!location}%
- \ifx\currenttooltiplocation\v!left
+ \edef\p_location{\tooltipparameter\c!location}%
+ \ifx\p_location\v!left
\hsmashed{\hskip\wd\b_scrn_tooltip_anchor\llap{\box\b_scrn_tooltip_text}}%
- \orelse\ifx\currenttooltiplocation\v!middle
+ \orelse\ifx\p_location\v!middle
\hsmashed to \wd\b_scrn_tooltip_anchor{\hss\box\b_scrn_tooltip_text\hss}%
\else
\hsmashed{\box\b_scrn_tooltip_text}%
@@ -906,7 +911,9 @@
\permanent\permanent\protected\def\scrn_menu_psh_direct[#reference]#text\\
{\scrn_menu_psh_start[#reference]\stoprob}
-\aliased\let\stoppsh\relax
+\aliased\let\startpsh\relax % maybe mutable
+\aliased\let\stoppsh \relax % maybe mutable
+\aliased\let\psh \relax % maybe mutable
\appendtoks
\enforced\let\startpsh\scrn_menu_psh_start
@@ -1018,7 +1025,9 @@
\permanent\protected\def\scrn_menu_rob_direct[#reference]#text\\
{\scrn_menu_rob_start[#reference]#text\stoprob}
-\aliased\let\stoprob\relax
+\aliased\let\startrob\relax % maybe mutable
+\aliased\let\stoprob \relax % maybe mutable
+\aliased\let\rob \relax % maybe mutable
\appendtoks
\enforced\let\startrob\scrn_menu_rob_start
diff --git a/tex/context/base/mkxl/scrn-hlp.mklx b/tex/context/base/mkxl/scrn-hlp.mklx
index ad50486a3..da2afd0d0 100644
--- a/tex/context/base/mkxl/scrn-hlp.mklx
+++ b/tex/context/base/mkxl/scrn-hlp.mklx
@@ -69,20 +69,21 @@
\c!backgroundcolor=gray]
\appendtoks
- \frozen\instance\setuevalue \currenthelp {\scrn_help_argument{\currenthelp}}%
- \frozen\instance\setuevalue{\e!start\currenthelp}{\scrn_help_start {\currenthelp}}%
- \frozen\instance\setuevalue{\e!stop \currenthelp}{\scrn_help_stop }%
+ \frozen\instance\protected\edefcsname \currenthelp\endcsname{\scrn_help_argument{\currenthelp}}%
+ \frozen\instance\protected\edefcsname\e!start\currenthelp\endcsname{\scrn_help_start {\currenthelp}}%
+ \frozen\instance\protected\edefcsname\e!stop \currenthelp\endcsname{\scrn_help_stop }%
\to \everydefinehelp
+\mutable\let\currenthelpreference\empty
+\mutable\let\currenthelpname \empty
+
\protected\def\scrn_help_argument#category%
{\def\currenthelp{#category}%
\global\advance\c_scrn_help_n\plusone
\edef\currenthelpname{help:\number\c_scrn_help_n}%
- \doifelselocation
- {\dosingleempty\scrn_help_argument_indeed}
- {\dosingleempty\scrn_help_argument_ignore}}
+ \doifelselocation\scrn_help_argument_indeed\scrn_help_argument_ignore}
-\def\scrn_help_argument_indeed[#reference]#text#target%
+\tolerant\def\scrn_help_argument_indeed[#reference]#:#text#target%
{\edef\currenthelpreference{#reference}%
\dontleavehmode \hbox \bgroup
\dontcomplain
@@ -93,17 +94,14 @@
{\helpsignal{\number\c_scrn_help_n}#target}%
[\helpaction{\number\c_scrn_help_n}]}
-\def\scrn_help_argument_ignore[#reference]#text#target%
+\tolerant\def\scrn_help_argument_ignore[#reference]#:#text#target%
{#target}
-\protected\def\scrn_help_start#category%
- {\def\currenthelp{#category}%
- \global\advance\c_scrn_help_n\plusone
+\tolerant\protected\def\scrn_help_start#category#spacer[#reference]%
+ {\global\advance\c_scrn_help_n\plusone
+ \edef\currenthelp{#category}%
+ \edef\currenthelpreference{#reference}%
\edef\currenthelpname{help:\number\c_scrn_help_n}%
- \dosingleempty\scrn_help_start_indeed}
-
-\def\scrn_help_start_indeed[#reference]%
- {\edef\currenthelpreference{#reference}%
\grabbufferdatadirect\currenthelp{\e!start\currenthelp}{\e!stop\currenthelp}}
\protected\def\scrn_help_stop
diff --git a/tex/context/base/mkxl/scrn-ini.mklx b/tex/context/base/mkxl/scrn-ini.mklx
index 2bf52edf1..bc32073b9 100644
--- a/tex/context/base/mkxl/scrn-ini.mklx
+++ b/tex/context/base/mkxl/scrn-ini.mklx
@@ -129,8 +129,8 @@
\permanent\protected\def\setlocationcolorspecified#1% not grouped !
{\ifnum#1=\plusone
- \edef\askedcontrastcolor{\interactionparameter\c!contrastcolor}%
- \ifempty\askedcontrastcolor
+ \edef\p_contrastcolor{\interactionparameter\c!contrastcolor}%
+ \ifempty\p_contrastcolor
\useinteractioncolorparameter\c!color
\else
\useinteractioncolorparameter\c!contrastcolor
@@ -141,8 +141,8 @@
\permanent\protected\def\setlocationattributesspecified#1% not grouped !
{\ifnum#1=\plusone
- \edef\askedcontrastcolor{\interactionparameter\c!contrastcolor}%
- \ifempty\askedcontrastcolor
+ \edef\p_contrastcolor{\interactionparameter\c!contrastcolor}%
+ \ifempty\p_contrastcolor
\useinteractionstyleandcolor\c!style\c!color
\else
\useinteractionstyleandcolor\c!style\c!contrastcolor
@@ -153,11 +153,11 @@
\permanent\protected\def\setlocationcolorspecspecified#1#2% \resolver
{\ifnum#1=\plusone
- \edef\askedcontrastcolor{#2\c!contrastcolor}%
- \ifempty\askedcontrastcolor
+ \edef\p_contrastcolor{#2\c!contrastcolor}%
+ \ifempty\p_contrastcolor
\colo_helpers_activate{#2\c!color}%
\else
- \colo_helpers_activate\askedcontrastcolor
+ \colo_helpers_activate\p_contrastcolor
\fi
\else
\colo_helpers_activate{#2\c!color}%
diff --git a/tex/context/base/mkxl/scrn-pag.mklx b/tex/context/base/mkxl/scrn-pag.mklx
index 67e24178e..09c542678 100644
--- a/tex/context/base/mkxl/scrn-pag.mklx
+++ b/tex/context/base/mkxl/scrn-pag.mklx
@@ -201,10 +201,23 @@
\glet\scrn_canvas_synchronize_complex\scrn_canvas_synchronize_complex_indeed
\to \everysetuplayouttarget
+\def\scrn_canvas_synchronize_common {
+ mode {\interactionscreenparameter\c!option}%
+ singlesided \ifsinglesided true\else false\fi\space
+ doublesided \ifdoublesided true\else false\fi\space
+ copies \numexpr\interactionscreenparameter\c!copies\relax
+ print {\interactionscreenparameter\c!print}%
+}
+
+\appendtoks
+ \let\scrn_canvas_synchronize_common\empty
+\to \everyaftershipout
+
\def\scrn_canvas_synchronize_only
{\clf_setupcanvas
paperwidth \printpaperwidth
paperheight \printpaperheight
+ \scrn_canvas_synchronize_common
\relax}
\def\scrn_canvas_synchronize_set#width#height%
@@ -223,9 +236,6 @@
\def\scrn_canvas_synchronize_complex_indeed
{\scrn_canvas_calculate % otherwise we need to hook it into setuppage etc
\clf_setupcanvas
- mode {\interactionscreenparameter\c!option}%
- singlesided \ifsinglesided true\else false\fi\space
- doublesided \ifdoublesided true\else false\fi\space
leftoffset \canvasbackoffset
topoffset \canvastopoffset
width \canvaswidth
@@ -236,10 +246,10 @@
trimoffset \canvastrimoffset
bleedoffset \canvasbleedoffset
artoffset \canvasartoffset
- copies \numexpr\interactionscreenparameter\c!copies\relax
- print {\interactionscreenparameter\c!print}%
+ \scrn_canvas_synchronize_common
\relax
%\glet\scrn_canvas_synchronize_simple \relax
+ % one shot only
\glet\scrn_canvas_synchronize_complex\relax}
\appendtoks
diff --git a/tex/context/base/mkxl/scrp-ini.mkxl b/tex/context/base/mkxl/scrp-ini.mkxl
index 2c3ae2bb6..77412738b 100644
--- a/tex/context/base/mkxl/scrp-ini.mkxl
+++ b/tex/context/base/mkxl/scrp-ini.mkxl
@@ -42,6 +42,8 @@
\registerctxluafile{scrp-tha}{}
\registerctxluafile{scrp-tib}{}
+\definesystemattribute[script][public,pickup]
+
%D Since scripts need specific \LUA\ code we use hard coded attribute values, but we
%D might have more tricks at some time, so we use a proper define macro too.
@@ -65,7 +67,7 @@
\permanent\protected\def\setglobalscript[#1]%
{\setlocalscript[#1]%
- \pickupscriptattribute}
+ \pickupscriptattribute} % pagebuilder
\aliased\let\setscript\setlocalscript
diff --git a/tex/context/base/mkxl/spac-ali.mkxl b/tex/context/base/mkxl/spac-ali.mkxl
index 67265c1a4..b8c1d6dc8 100644
--- a/tex/context/base/mkxl/spac-ali.mkxl
+++ b/tex/context/base/mkxl/spac-ali.mkxl
@@ -502,7 +502,7 @@
\newconstant\c_spac_align_state_page
-\def\bottomalignlimit{\plusthree\lineheight}
+\mutable\def\bottomalignlimit{\plusthree\lineheight}
\newconstant\bottomraggednessmode % 0=ragged 1=normal/align 2=baseline
@@ -892,23 +892,18 @@
\fi}
\permanent\protected\def\showpardata
- {\edef\thepardata
- {\hbox{font: \fontname\font}\endgraf
- \spac_show_par_data
- \interwordspace \interwordstretch \interwordshrink \emwidth \exheight \extraspace
- \hsize \vsize
- \leftskip \rightskip
- \spaceskip \xspaceskip
- \parindent \parfillskip
- \hyphenpenalty \exhyphenpenalty \automatichyphenpenalty \explicithyphenpenalty
- \displaywidowpenalty \widowpenalty \clubpenalty \brokenpenalty
- \doublehyphendemerits \finalhyphendemerits \adjdemerits
- \relax}%
- \dontleavehmode
- \begingroup
- \inleftmargin{\vsmash{\infofont\framed[\c!align=\v!right]{\thepardata}}}%
- \endgroup
- \let\showpardata\relax}
+ {\normalexpanded{\dontleavehmode\inleftmargin{\vsmash{\infofont\framed[\c!align=\v!right]{%
+ \hbox{font: \fontname\font}\endgraf
+ \spac_show_par_data
+ \interwordspace \interwordstretch \interwordshrink \emwidth \exheight \extraspace
+ \hsize \vsize
+ \leftskip \rightskip
+ \spaceskip \xspaceskip
+ \parindent \parfillskip
+ \hyphenpenalty \exhyphenpenalty \automatichyphenpenalty \explicithyphenpenalty
+ \displaywidowpenalty \widowpenalty \clubpenalty \brokenpenalty
+ \doublehyphendemerits \finalhyphendemerits \adjdemerits
+ \relax}}}}}
\permanent\protected\def\startshowpardata
{\begingroup
diff --git a/tex/context/base/mkxl/spac-flr.mkxl b/tex/context/base/mkxl/spac-flr.mkxl
index 8264f5e5e..3ea90bc2c 100644
--- a/tex/context/base/mkxl/spac-flr.mkxl
+++ b/tex/context/base/mkxl/spac-flr.mkxl
@@ -172,11 +172,13 @@
\c!leftmargin=.2\emwidth,
\c!rightmargin=.2\emwidth]
-\aliased\let\mathdotfill\dotfill
-
-\permanent\protected\def\textdotfill{\filler[dotfill]}
+% If users really want it:
+%
+% \permanent\protected\def\mathdotfill{\cleaders\hbox{$\mathsurround\zeropoint\mkern1.5mu.\mkern1.5mu$}\hfill} % plain
+% \permanent\protected\def\textdotfill{\filler[dotfill]}
+% \permanent\protected\def\dotfill {\mathortext\mathdotfill\textdotfill}
-\permanent\protected\def\dotfill{\mathortext\mathdotfill\textdotfill}
+\permanent\protected\def\dotfill{\filler[dotfill]}
% maybe box -> symbol
diff --git a/tex/context/base/mkxl/spac-grd.mkxl b/tex/context/base/mkxl/spac-grd.mkxl
index cc293532b..0f21db726 100644
--- a/tex/context/base/mkxl/spac-grd.mkxl
+++ b/tex/context/base/mkxl/spac-grd.mkxl
@@ -275,6 +275,8 @@
\egroup
\fi}
+\aliased\let\forcedbotbaselinecorrection\botbaselinecorrection
+
\permanent\protected\def\dobaselinecorrection
{\ifdim\prevdepth>\zeropoint
\vspacing[\the\dimexpr-\prevdepth+\strutdp\relax]%
diff --git a/tex/context/base/mkxl/spac-hor.mkxl b/tex/context/base/mkxl/spac-hor.mkxl
index cf67e8093..f64207a2c 100644
--- a/tex/context/base/mkxl/spac-hor.mkxl
+++ b/tex/context/base/mkxl/spac-hor.mkxl
@@ -21,6 +21,7 @@
\bitwiseflip \normalizelinemode \parindentskipcode
\bitwiseflip \normalizelinemode \normalizelinecode
+\bitwiseflip \normalizelinemode \clipwidthcode
\let\v_spac_indentation_current\empty % amount/keyword
@@ -602,9 +603,9 @@
\zwj\dorecurse\scratchcounter{\hskip\emwidth\zwj}%
\endgroup}
-% Suggested by GB (not the name -):
+% Suggested by GB (not the name) so we keep it for sentimental reasons:
-\def\rapfillskip{.5\hsize plus .092\hsize minus .5\hsize} % D.A.'s value
+\permanent\protected\def\rapfillskip{.5\hsize plus .092\hsize minus .5\hsize} % D.A.'s value
% Bovendien definieren we enkele extra \fill's:
@@ -689,36 +690,13 @@
\newskip \s_spac_narrower_right_last
\newconditional\s_spac_narrower_last_swap
-% \def\spac_narrower_start_apply#1%
-% {\narrowerparameter\c!before
-% \global\s_spac_narrower_left \zeropoint
-% \global\s_spac_narrower_right \zeropoint
-% \global\s_spac_narrower_middle\zeropoint
-% \edef\askednarrower{#1}%
-% \ifx\askednarrower\v!reverse
-% \ifconditional\s_spac_narrower_last_swap
-% \leftskip \s_spac_narrower_right_last
-% \rightskip\s_spac_narrower_left_last
-% \setfalse\s_spac_narrower_last_swap
-% \else
-% \leftskip \s_spac_narrower_left_last
-% \rightskip\s_spac_narrower_right_last
-% \settrue\s_spac_narrower_last_swap
-% \fi
-% \else
-% \normalexpanded{\processcommalistwithparameters[\askednarrower]}\spac_narrower_initialize
-% \advance\leftskip \dimexpr\s_spac_narrower_left +\s_spac_narrower_middle\relax
-% \advance\rightskip\dimexpr\s_spac_narrower_right+\s_spac_narrower_middle\relax
-% \fi
-% \seteffectivehsize}
-
\def\spac_narrower_start_apply#1%
{\narrowerparameter\c!before
\global\s_spac_narrower_left \zeropoint
\global\s_spac_narrower_right \zeropoint
\global\s_spac_narrower_middle\zeropoint
- \edef\askednarrower{#1}%
- \ifx\askednarrower\v!reverse
+ \edef\scratchstringone{#1}%
+ \ifx\scratchstringone\v!reverse
\ifconditional\s_spac_narrower_last_swap
\frozen\leftskip \s_spac_narrower_right_last
\frozen\rightskip\s_spac_narrower_left_last
@@ -729,7 +707,7 @@
\settrue\s_spac_narrower_last_swap
\fi
\else
- \normalexpanded{\processcommalistwithparameters[\askednarrower]}\spac_narrower_initialize
+ \normalexpanded{\processcommalistwithparameters[\scratchstringone]}\spac_narrower_initialize
\frozen\advance\leftskip \dimexpr\s_spac_narrower_left +\s_spac_narrower_middle\relax
\frozen\advance\rightskip\dimexpr\s_spac_narrower_right+\s_spac_narrower_middle\relax
\fi
@@ -858,15 +836,17 @@
\installcorenamespace{tolerancemethods}
+\mutable\let\bottomtolerance\empty % why not zero (not used annyway, but for now we keep it)
+
\permanent\protected\def\installtolerancemethod#1#2#3%
{\defcsname\??tolerancemethods#1:#2\endcsname{#3}}
-\installtolerancemethod \v!vertical \v!verystrict {\let\bottomtolerance\empty}
+\installtolerancemethod \v!vertical \v!verystrict {\let\bottomtolerance\empty} % why not zero
\installtolerancemethod \v!vertical \v!strict {\def\bottomtolerance{.050}}
\installtolerancemethod \v!vertical \v!tolerant {\def\bottomtolerance{.075}}
\installtolerancemethod \v!vertical \v!verytolerant {\def\bottomtolerance{.100}}
-\installtolerancemethod \v!horizontal \v!stretch {\emergencystretch\bodyfontsize}
+\installtolerancemethod \v!horizontal \v!stretch {\emergencystretch\bodyfontsize\relax}
\installtolerancemethod \v!horizontal \v!space {\spaceskip.5em\s!plus.25em\s!minus.25em\relax}
\installtolerancemethod \v!horizontal \v!verystrict {\tolerance\plustwohundred}
\installtolerancemethod \v!horizontal \v!strict {\tolerance1500 }
@@ -881,14 +861,6 @@
\def\spac_tolerances_step_vertical #1{\csname\??tolerancemethods\v!vertical :#1\endcsname}
\def\spac_tolerances_step_horizontal#1{\csname\??tolerancemethods\v!horizontal:#1\endcsname}
-%% \protected\def\setuptolerance
-%% {\dosingleargument\spac_tolerances_setup}
-%%
-%% \def\spac_tolerances_setup[#1]%
-%% {\doifelseinset\v!vertical{#1}%
-%% {\processcommacommand[#1]\spac_tolerances_step_vertical }
-%% {\processcommacommand[#1]\spac_tolerances_step_horizontal}}
-
\permanent\tolerant\protected\def\setuptolerance[#1]%
{\ifarguments\or
\doifelseinset\v!vertical{#1}%
@@ -1047,30 +1019,30 @@
% needed for unicode:
-%protected\def\breakablethinspace {\breakabletextormathspace+\thinmuskip1}
-%protected\def\twoperemspace {\hskip\dimexpr\emwidth/2\relax} % == \enspace
-%protected\def\threeperemspace {\hskip\dimexpr\emwidth/3\relax}
-%protected\def\fourperemspace {\hskip\dimexpr\emwidth/4\relax}
-%protected\def\fiveperemspace {\hskip\dimexpr\emwidth/5\relax} % goodie
-%protected\def\sixperemspace {\hskip\dimexpr\emwidth/6\relax}
-%protected\def\figurespace {\begingroup\setbox\scratchbox\hbox{0}\hskip\wd\scratchbox\endgroup} % there is a command for this
-%protected\def\punctuationspace {\begingroup\setbox\scratchbox\hbox{.}\hskip\wd\scratchbox\endgroup}
-%protected\def\ideographicspace {\hskip\dimexpr\emwidth/1\relax}
-%protected\def\ideographichalffillspace{\hskip\dimexpr\emwidth/2\relax}
-%protected\def\nobreakspace {\penalty\plustenthousand\kern\interwordspace}
-%protected\def\narrownobreakspace {\penalty\plustenthousand\thinspace}
-%protected\def\zerowidthnobreakspace {\penalty\plustenthousand\kern\zeropoint}
-%protected\def\zerowidthspace {\hskip\zeropoint}
+% \protected\def\breakablethinspace {\breakabletextormathspace+\thinmuskip1}
+% \protected\def\twoperemspace {\hskip\dimexpr\emwidth/2\relax} % == \enspace
+% \protected\def\threeperemspace {\hskip\dimexpr\emwidth/3\relax}
+% \protected\def\fourperemspace {\hskip\dimexpr\emwidth/4\relax}
+% \protected\def\fiveperemspace {\hskip\dimexpr\emwidth/5\relax} % goodie
+% \protected\def\sixperemspace {\hskip\dimexpr\emwidth/6\relax}
+% \protected\def\figurespace {\begingroup\setbox\scratchbox\hbox{0}\hskip\wd\scratchbox\endgroup} % there is a command for this
+% \protected\def\punctuationspace {\begingroup\setbox\scratchbox\hbox{.}\hskip\wd\scratchbox\endgroup}
+% \protected\def\ideographicspace {\hskip\dimexpr\emwidth/1\relax}
+% \protected\def\ideographichalffillspace{\hskip\dimexpr\emwidth/2\relax}
+% \protected\def\nobreakspace {\penalty\plustenthousand\kern\interwordspace}
+% \protected\def\narrownobreakspace {\penalty\plustenthousand\thinspace}
+% \protected\def\zerowidthnobreakspace {\penalty\plustenthousand\kern\zeropoint}
+% \protected\def\zerowidthspace {\hskip\zeropoint}
\definehspace[.5][.1250\emwidth] % hair
\definehspace[1] [.1667\emwidth] % thin
\definehspace[2] [.2222\emwidth] % med
\definehspace[3] [.2777\emwidth] % thick
-\aliased\let \, \thinspace
-\aliased\let \: \medspace
-\aliased\let \; \thickspace
-\aliased\let \! \negthinspace
+\suggestedalias \, \thinspace
+\suggestedalias \: \medspace
+\suggestedalias \; \thickspace
+\suggestedalias \! \negthinspace
% plain ...
%
@@ -1182,7 +1154,7 @@
%D For the moment here (used in page-txt):
-\protected\def\ignoredlinebreak{\unskip\space\ignorespaces}
+\permanent\protected\def\ignoredlinebreak{\unskip\space\ignorespaces}
%D \macros
%D {startignorespaces}
diff --git a/tex/context/base/mkxl/spac-par.mkxl b/tex/context/base/mkxl/spac-par.mkxl
index 524e31bc5..03b81b25d 100644
--- a/tex/context/base/mkxl/spac-par.mkxl
+++ b/tex/context/base/mkxl/spac-par.mkxl
@@ -207,6 +207,8 @@
%D indentation as set (by the output routine) inside the group are forgotten
%D afterwards. (I must not forget its existence).
+\mutable\let\currentparagraphproperties\empty % visible for tracing
+
\permanent\def\carryoverpar#1% #1 can be \endgroup or \egroup or ... expandable !
{\normalexpanded
{\noexpand#1%
@@ -233,7 +235,7 @@
\installcorenamespace{paragraphintro}
-\let\insertparagraphintro\relax % hook into everypar
+\let\spac_paragraphs_flush_intro\relax % hook into everypar
\newtoks\t_spac_paragraphs_intro_first
\newtoks\t_spac_paragraphs_intro_next
@@ -257,22 +259,22 @@
\global\t_spac_paragraphs_intro_first\emptytoks
\global\t_spac_paragraphs_intro_next \emptytoks
\global\t_spac_paragraphs_intro_each \emptytoks
- \glet\insertparagraphintro\relax}
+ \glet\spac_paragraphs_flush_intro\relax}
\setvalue{\??paragraphintro\v!first}#1%
{\global\settrue\c_spac_paragraphs_intro_first
\gtoksapp\t_spac_paragraphs_intro_first{#1}%
- \glet\insertparagraphintro\spac_paragraphs_flush_intro}
+ \glet\spac_paragraphs_flush_intro\spac_paragraphs_flush_intro_indeed}
\setvalue{\??paragraphintro\v!next}#1%
{\global\settrue\c_spac_paragraphs_intro_next
\gtoksapp\t_spac_paragraphs_intro_next{#1}%
- \glet\insertparagraphintro\spac_paragraphs_flush_intro}
+ \glet\spac_paragraphs_flush_intro\spac_paragraphs_flush_intro_indeed}
\setvalue{\??paragraphintro\v!each}#1%
{\global\settrue\c_spac_paragraphs_intro_each
\gtoksapp\t_spac_paragraphs_intro_each{#1}%
- \glet\insertparagraphintro\spac_paragraphs_flush_intro}
+ \glet\spac_paragraphs_flush_intro\spac_paragraphs_flush_intro_indeed}
%D We can say:
%D
@@ -313,18 +315,18 @@
\permanent\protected\def\flushatparagraph#1%
{\global\c_spac_paragraphs_intro_first\plusone
\gtoksapp\t_spac_paragraphs_intro_first{#1}%
- \glet\insertparagraphintro\spac_paragraphs_flush_intro}
+ \glet\spac_paragraphs_flush_intro\spac_paragraphs_flush_intro_indeed}
%D Here comes the flusher (we misuse the one level expansion of token registers to
%D feed a nice stream into the paragraph.)
-\protected\def\spac_paragraphs_flush_intro % we make sure that the token lists expand directly
- {\normalexpanded{% % after another so the first code is there twice
+\protected\def\spac_paragraphs_flush_intro_indeed % we make sure that the token lists expand directly
+ {\normalexpanded{% % after another so the first code is there twice
\ifconditional\c_spac_paragraphs_intro_each
\ifconditional\c_spac_paragraphs_intro_next
- \glet\insertparagraphintro\spac_paragraphs_flush_intro_next
+ \glet\spac_paragraphs_flush_intro\spac_paragraphs_flush_intro_next
\else
- \glet\insertparagraphintro\spac_paragraphs_flush_intro_each
+ \glet\spac_paragraphs_flush_intro\spac_paragraphs_flush_intro_each
\fi
\ifconditional\c_spac_paragraphs_intro_first
\global\setfalse\c_spac_paragraphs_intro_first
@@ -334,7 +336,7 @@
\the\t_spac_paragraphs_intro_each
\else
\ifconditional\c_spac_paragraphs_intro_next
- \glet\insertparagraphintro\spac_paragraphs_flush_intro_next
+ \glet\spac_paragraphs_flush_intro\spac_paragraphs_flush_intro_next
\fi
\ifconditional\c_spac_paragraphs_intro_first
\global\setfalse\c_spac_paragraphs_intro_first
@@ -348,11 +350,11 @@
\global\setfalse\c_spac_paragraphs_intro_next
\global\t_spac_paragraphs_intro_next\emptytoks
\ifconditional\c_spac_paragraphs_intro_each
- \glet\insertparagraphintro\spac_paragraphs_flush_intro_each
+ \glet\spac_paragraphs_flush_intro\spac_paragraphs_flush_intro_each
\the\t_spac_paragraphs_intro_next
\the\t_spac_paragraphs_intro_each
\else
- \glet\insertparagraphintro\relax
+ \glet\spac_paragraphs_flush_intro\relax
\the\t_spac_paragraphs_intro_next
\fi}}
@@ -365,7 +367,7 @@
%D This macro collects data that will be flushed at the next paragraph. By using
%D this macro you can avoid interfering nodes (writes, etc).
-\let\flushpostponednodedata\relax % hook into everypar
+\aliased\let\flushpostponednodedata\relax % hook into everypar
\newbox \b_spac_postponed_data
%newcount\c_spac_postponed_data
@@ -382,7 +384,7 @@
% {\global\setbox\b_spac_postponed_data\hbox{\foundbox\??postponednodesstack{\the\c_spac_postponed_data}}%
% \global\advance\c_spac_postponed_data\minusone
% \ifvoid\b_spac_postponed_data\else
-% \glet\flushpostponednodedata\spac_postponed_data_flush
+% \enforced\glet\flushpostponednodedata\spac_postponed_data_flush
% \fi}
\newtoks\everyflushatnextpar
@@ -393,13 +395,13 @@
\permanent\protected\def\poppostponednodedata
{\globalpopbox\b_spac_postponed_data
\ifvoid\b_spac_postponed_data\else
- \glet\flushpostponednodedata\spac_postponed_data_flush
+ \enforced\glet\flushpostponednodedata\spac_postponed_data_flush
\fi}
\permanent\protected\def\flushatnextpar
{\begingroup
\the\everyflushatnextpar
- \glet\flushpostponednodedata\spac_postponed_data_flush
+ \enforced\glet\flushpostponednodedata\spac_postponed_data_flush
\dowithnextboxcs\spac_postponed_data_finish\hpack}
% \def\spac_postponed_data_finish
@@ -433,7 +435,7 @@
\ifvoid\b_spac_postponed_data\else
\hpack{\smashedbox\b_spac_postponed_data}% \box\b_spac_postponed_data
\fi
- \glet\flushpostponednodedata\relax
+ \enforced\glet\flushpostponednodedata\relax
}%\fi}
\permanent\protected\def\doflushatpar % might be renamed
diff --git a/tex/context/base/mkxl/spac-ver.mkxl b/tex/context/base/mkxl/spac-ver.mkxl
index 6764213e3..4bbf723bd 100644
--- a/tex/context/base/mkxl/spac-ver.mkxl
+++ b/tex/context/base/mkxl/spac-ver.mkxl
@@ -61,8 +61,8 @@
\newskip \s_spac_vspacing_temp \s_spac_vspacing_temp\bigskipamount
-\def\skipfactor {.75}
-\def\skipgluefactor{.25}
+\mutable\def\skipfactor {.75}
+\mutable\def\skipgluefactor{.25}
\permanent\def\normalskipamount
{\openlineheight
@@ -109,15 +109,15 @@
\installcorenamespace{interlinespacerelative}
-\let\setrelativeinterlinespace \relax % used elsewhere
-\let\currentrelativeinterlinespace\empty
+\aliased\let\setrelativeinterlinespace \relax % used elsewhere
+\mutable\let\currentrelativeinterlinespace\empty
\setvalue{\??interlinespacerelative\v!on }{\oninterlineskip}
\setvalue{\??interlinespacerelative\v!off }{\offinterlineskip}
-\setvalue{\??interlinespacerelative\v!reset}{\let\currentrelativeinterlinespace\empty
- \let\setrelativeinterlinespace\relax
+\setvalue{\??interlinespacerelative\v!reset}{\enforced\let\currentrelativeinterlinespace\empty
+ \enforced\let\setrelativeinterlinespace\relax
\setfontparameters}
-\setvalue{\??interlinespacerelative\v!auto }{\let\setrelativeinterlinespace\spac_linespacing_set_relative_interlinespace}
+\setvalue{\??interlinespacerelative\v!auto }{\enforced\let\setrelativeinterlinespace\spac_linespacing_set_relative_interlinespace}
\def\spac_linespacing_set_specified_relative_interlinespace#1% fragile?
{\doifelsedimenstring{#1}%
@@ -135,7 +135,7 @@
\spac_linespacing_set_specified_relative_interlinespace{#1}%
\fi}
-\def\spac_linespacing_set_relative_interlinespace
+\permanent\protected\def\spac_linespacing_set_relative_interlinespace
{\ifempty\currentrelativeinterlinespace\else
\spacing\currentrelativeinterlinespace
\fi}
@@ -250,7 +250,7 @@
\expandafter\firstofoneargument
\fi}
-\protected\def\dosomebreak#1%
+\permanent\protected\def\dosomebreak#1% should be replaced by something \blank
{\doifoutervmode
{\s_spac_lastskip\lastskip
\removelastskip
@@ -825,13 +825,13 @@
\setbox\strutbox\hpack{\vrule\s!height8.5pt\s!depth3.5pt\s!width\zeropoint} % just a start
-\def\strut{\relax\ifmmode\copy\else\unhcopy\fi\strutbox}
-
+% \permanent\protected\def\strut{\relax\ifmmode\copy\else\unhcopy\fi\strutbox}
+%
% \protected\def\strut
% {\relax
% \ifmmode\copy\else\dontleavehmode\unhcopy\fi\strutbox}
-
-\let\normalstrut\strut
+%
+% \aliased\let\normalstrut\strut
%D The double \type {\hbox} construction enables us to backtrack boxes.
@@ -1004,7 +1004,7 @@
% {\relax
% \ifmmode\copy\else\dontleavehmode\unhcopy\fi\strutbox}
-\let\normalstrut\strut
+\aliased\let\normalstrut\strut
\permanent\protected\def\halfstrut
{\relax
@@ -1691,15 +1691,15 @@
\def\spac_grids_check_yes
{\gridsnappingtrue
\setsystemmode\v!grid
- \spac_grids_snap_value_set\askedgridmode}
+ \spac_grids_snap_value_set\p_grid}
-\protected\def\synchronizegridsnapping
- {\edef\askedgridmode{\layoutparameter\c!grid}%
- \ifx\askedgridmode\v!no % official
+\permanent\protected\def\synchronizegridsnapping
+ {\edef\p_grid{\layoutparameter\c!grid}%
+ \ifx\p_grid\v!no % official
\spac_grids_check_nop
- \orelse\ifx\askedgridmode\v!off % for taco and luigi
+ \orelse\ifx\p_grid\v!off % for taco and luigi
\spac_grids_check_nop
- \orelse\ifempty\askedgridmode % to be sure
+ \orelse\ifempty\p_grid % to be sure
\spac_grids_check_nop
\else
\spac_grids_check_yes
diff --git a/tex/context/base/mkxl/strc-con.mklx b/tex/context/base/mkxl/strc-con.mklx
index db1b84654..5e0ceb833 100644
--- a/tex/context/base/mkxl/strc-con.mklx
+++ b/tex/context/base/mkxl/strc-con.mklx
@@ -289,8 +289,10 @@
\newconstant\c_strc_constructions_nested_state % to be redone
-\def\resetconstructions % to be used in e.g. footnotes
- {\c_strc_constructions_nested_state\zerocount}
+% not used any more
+%
+% \def\resetconstructions % to be used in e.g. footnotes
+% {\c_strc_constructions_nested_state\zerocount}
\protected\setvalue{\??constructioncommandhandler\v!construction}%
{\endgroup}
@@ -606,7 +608,7 @@
\relax
\hangindent\ifx#1\v!right-\fi\constructionsheadwidth}
-\protected\def\flushconstructionheadbox
+\permanent\protected\def\flushconstructionheadbox
{\ifhbox\constructionheadbox\unhbox\else\box\fi\constructionheadbox}
% The setups. These only deal with placement of the descriptor and initializing the
@@ -1000,7 +1002,7 @@
%D The storage macros:
-\let\currentconstructionlistentry\!!zerocount
+\mutable\let\currentconstructionlistentry\!!zerocount
\protected\def\strc_constructions_register
{\clf_doifelselisthasentry\numexpr\currentconstructionlistentry\relax
@@ -1082,7 +1084,7 @@
\fi
%
\ifx\currentconstructiontitle\v!none % will become obsolete
- \global\noconstructioncaptiontrue\global\noconstructionnumbertrue
+ \global\noconstructioncaptiontrue
\fi
%
\ifnoconstructioncaption % then why analyze anyway?
diff --git a/tex/context/base/mkxl/strc-des.mklx b/tex/context/base/mkxl/strc-des.mklx
index d3fa6bb4e..b44593a32 100644
--- a/tex/context/base/mkxl/strc-des.mklx
+++ b/tex/context/base/mkxl/strc-des.mklx
@@ -192,8 +192,7 @@
\c!before=,
\c!after=]
-\protected\def\setuptab
- {\setupdescription[tab]}
+\permanent\protected\def\setuptab{\setupdescription[tab]} % for old times
%D Maybe we should remove this definition.
diff --git a/tex/context/base/mkxl/strc-enu.mklx b/tex/context/base/mkxl/strc-enu.mklx
index d568247eb..4bcdb6c4f 100644
--- a/tex/context/base/mkxl/strc-enu.mklx
+++ b/tex/context/base/mkxl/strc-enu.mklx
@@ -141,31 +141,32 @@
\frozen\instance\setuevalue{\e!start#tag}{\strc_enumerations_start [#tag]}% we could pass level here as well (faster)
\frozen\instance\setuevalue{\e!stop #tag}{\strc_enumerations_stop }}
+\let\m_strc_enumeration_sub\empty
+
\appendtoks
+ \let\m_strc_enumeration_sub\empty
\ifempty\currentenumerationparent
% clone => parent | subclone => clone | subsubclone => subclone
- \let\currentenumerationsub\empty
\strc_define_commands_enumeration
- {\currentenumerationsub\currentenumeration}%
+ {\m_strc_enumeration_sub\currentenumeration}%
\plusone
\empty
\edef\p_levels{\enumerationparameter\c!levels}%
\dostepwiserecurse\plustwo\p_levels\plusone
{\strc_define_commands_enumeration
- {\v!sub\currentenumerationsub\currentenumeration}%
+ {\v!sub\m_strc_enumeration_sub\currentenumeration}%
\recurselevel
- {\currentenumerationsub\currentenumeration}%
- \edef\currentenumerationsub{\v!sub\currentenumerationsub}}%
+ {\m_strc_enumeration_sub\currentenumeration}%
+ \edef\m_strc_enumeration_sub{\v!sub\m_strc_enumeration_sub}}%
\else
% clone => parent | subclone => subparent | subsubclone => subsubparent
- \let\currentenumerationsub\empty
\edef\p_levels{\enumerationparameter\c!levels}%
\dorecurse\p_levels
{\strc_define_commands_enumeration
- {\currentenumerationsub\currentenumeration}%
+ {\m_strc_enumeration_sub\currentenumeration}%
\recurselevel
- {\currentenumerationsub\currentenumerationparent}%
- \edef\currentenumerationsub{\v!sub\currentenumerationsub}}%
+ {\m_strc_enumeration_sub\currentenumerationparent}%
+ \edef\m_strc_enumeration_sub{\v!sub\m_strc_enumeration_sub}}%
\fi
\edef\p_counter{\enumerationparameter\s!counter}% can inherit from parent
\ifempty\p_counter %
diff --git a/tex/context/base/mkxl/strc-flt.mklx b/tex/context/base/mkxl/strc-flt.mklx
index 6086f09b6..846d55d60 100644
--- a/tex/context/base/mkxl/strc-flt.mklx
+++ b/tex/context/base/mkxl/strc-flt.mklx
@@ -194,6 +194,8 @@
\mutable\let\currentfloatnumber \empty
\mutable\let\currentfloatsynchronize\empty
+\let\m_strc_floats_previous_number \empty % we can also just push/pop
+
%D We need to do it again here:
\setupfloat
@@ -393,10 +395,10 @@
\s!hasnumber=\v!yes,%
\s!hastitle=\v!yes]%
[#userdata]%
- \glet\previousfloatnumber \m_strc_counters_last_registered_index
- \glet\currentfloatnumber \m_strc_counters_last_registered_index
- \glet\currentfloatattribute \m_strc_counters_last_registered_attribute
- \glet\currentfloatsynchronize\m_strc_counters_last_registered_synchronize
+ \glet\m_strc_floats_previous_number\m_strc_counters_last_registered_index
+ \glet\currentfloatnumber \m_strc_counters_last_registered_index
+ \glet\currentfloatattribute \m_strc_counters_last_registered_attribute
+ \glet\currentfloatsynchronize \m_strc_counters_last_registered_synchronize
%
% \iflocation
% \c_attr_destination\currentfloatattribute\relax
@@ -413,12 +415,14 @@
\newdimen\d_strc_floats_caption_height
\newdimen\d_strc_floats_caption_depth
+\let\m_strc_floats_last_caption_tag\empty
+
\def\strc_floats_make_complete_caption
{\doifsomething{\floatcaptionparameter\c!spacebefore}{\blank[\floatcaptionparameter\c!spacebefore]}%
\strc_floats_make_complete_caption_before
\synchronizedisplaydirection % temp hack, till we have a proper model
\noindent
- \gdef\lastcaptiontag{\strut\thecurrentfloatnumber}% was xdef ... needs checking
+ \gdef\m_strc_floats_last_caption_tag{\strut\thecurrentfloatnumber}% was xdef ... needs checking
\begingroup
\ifnofloatcaption
\global\d_strc_floats_caption_height\zeropoint
@@ -580,7 +584,7 @@
% before we're really dealing with the float. Some day I'll root out the global
% settings.
-\let\lastplacedfloat\empty
+\aliased\let\lastplacedfloat\empty
\def\strc_floats_set_current_tag#tag%
{\edef\currentfloat{#tag}%
@@ -591,7 +595,7 @@
\donothing
{\writestatus\m!floatblocks{unknown float type '\currentfloat'}%
\let\currentfloat\v!figure}% also a hack
- \glet\lastplacedfloat\currentfloat
+ \enforced\glet\lastplacedfloat\currentfloat
\let\m_strc_floats_saved_userdata\empty
\let\currentfloatcaption\currentfloat}
@@ -1091,7 +1095,7 @@
\def\strc_floats_place_packaged_boxes_indeed#userdata%
{\bgroup
\ifconditional\usesamefloatnumber
- \glet\currentfloatnumber \previousfloatnumber
+ \glet\currentfloatnumber \m_strc_floats_previous_number
\glet\currentfloatattribute \empty
\glet\currentfloatsynchronize\relax
\else
@@ -1125,10 +1129,10 @@
\s!hasnumber=\ifnofloatnumber \v!no\else\v!yes\fi,%
\s!hastitle=\ifemptyfloatcaption\v!no\else\v!yes\fi]%
[#userdata]%
- \glet\previousfloatnumber \m_strc_counters_last_registered_index
- \glet\currentfloatnumber \m_strc_counters_last_registered_index
- \glet\currentfloatattribute \m_strc_counters_last_registered_attribute
- \glet\currentfloatsynchronize\m_strc_counters_last_registered_synchronize
+ \glet\m_strc_floats_previous_number\m_strc_counters_last_registered_index
+ \glet\currentfloatnumber \m_strc_counters_last_registered_index
+ \glet\currentfloatattribute \m_strc_counters_last_registered_attribute
+ \glet\currentfloatsynchronize \m_strc_counters_last_registered_synchronize
\fi
%
\iftrialtypesetting\else\global\setfalse\usesamefloatnumber\fi % one shot
@@ -1567,8 +1571,19 @@
\newconditional\c_floats_adapt_to_caption_width
\newconditional\c_floats_store_minimal_package
-\def\captionminwidth {15\bodyfontsize} % can become parameter (but what name)
-\def\captionovershoot{2\emwidth} % can become parameter (but what name)
+\newdimen\d_strc_floats_caption_hsize
+\newdimen\d_strc_floats_caption_min_width
+\newdimen\d_strc_floats_caption_overshoot
+
+% These are expandable, for diagnostic purposes only, but might eventually go away:
+
+\permanent\def\captionhsize {\the\d_strc_floats_caption_hsize}
+\permanent\def\captionminwidth {\the\d_strc_floats_caption_min_width}
+\permanent\def\captionovershoot{\the\d_strc_floats_caption_overshoot}
+
+\def\strc_floats_set_caption_criteria % can become parameter (but what name)
+ {\d_strc_floats_caption_min_width15\bodyfontsize
+ \d_strc_floats_caption_overshoot 2\emwidth}
\let\strc_floats_mark_pag_as_free\relax
@@ -1730,15 +1745,15 @@
\def\strc_floats_prepare_stack_caption_auto
{\ifempty\p_strc_floats_caption_align \else
- \doifnotinset\v!middle\p_strc_floats_caption_align{\let\captionovershoot\!!zeropoint}%
+ \doifnotinset\v!middle\p_strc_floats_caption_align{\d_strc_floats_caption_overshoot\zeropoint}%
\fi
- \edef\captionhsize{\the\wd\b_strc_floats_content}%
+ \d_strc_floats_caption_hsize\wd\b_strc_floats_content
\scratchwidth\floatcaptionparameter\c!maxwidth\relax
\ifconditional\c_floats_adapt_to_caption_width
- \let\captionminwidth \!!zeropoint
- \let\captionovershoot\!!zeropoint
+ \d_strc_floats_caption_min_width\zeropoint
+ \d_strc_floats_caption_overshoot\zeropoint
\fi
- \ifdim\captionhsize>\scratchwidth
+ \ifdim\d_strc_floats_caption_hsize>\scratchwidth
% float is wider than \hsize
\setbox\b_strc_floats_caption\vbox
{\settrialtypesetting
@@ -1749,8 +1764,8 @@
\ifdim\ht\scratchbox>\lineheight % more lines
\setbox\b_strc_floats_caption\vbox
{\strc_floats_caption_set_align
- \hsize\dimexpr\captionhsize-\captionovershoot\relax
- \ifdim\hsize<\captionminwidth\relax
+ \hsize\dimexpr\d_strc_floats_caption_hsize-\d_strc_floats_caption_overshoot\relax
+ \ifdim\hsize<\d_strc_floats_caption_min_width\relax
\hsize\scratchwidth
\fi
\strc_floats_make_complete_caption}%
@@ -1762,16 +1777,15 @@
\fi
\else
% float is smaller of equal to \hsize
- \ifdim\captionhsize<\captionminwidth\relax
- \scratchdimen\captionminwidth % float smaller than min width
- \edef\captionhsize{\the\scratchdimen}%
-% \ifconditional\c_floats_adapt_to_caption_width
-% \setbox\b_strc_floats_content\hpack to \captionhsize{\hss\box\b_strc_floats_content\hss}%
-% \fi
+ \ifdim\d_strc_floats_caption_hsize<\d_strc_floats_caption_min_width\relax
+ \d_strc_floats_caption_hsize\d_strc_floats_caption_min_width % float smaller than min width
+ % \ifconditional\c_floats_adapt_to_caption_width
+ % \setbox\b_strc_floats_content\hpack to \d_strc_floats_caption_hsize{\hss\box\b_strc_floats_content\hss}%
+ % \fi
\fi
\setbox\scratchbox\vbox % test with overshoot
{\settrialtypesetting
- \scratchdimen\dimexpr\captionhsize+\captionovershoot+3\emwidth\relax % 3em is an average word length
+ \scratchdimen\dimexpr\d_strc_floats_caption_hsize+\d_strc_floats_caption_overshoot+3\emwidth\relax % 3em is an average word length
\ifdim\scratchdimen<\hsize
\hsize\scratchdimen
\fi
@@ -1781,7 +1795,7 @@
% at least an average word longer than a line
\setbox\b_strc_floats_caption\vbox
{\strc_floats_caption_set_align
- \scratchdimen\dimexpr\captionhsize+\captionovershoot\relax
+ \scratchdimen\dimexpr\d_strc_floats_caption_hsize+\d_strc_floats_caption_overshoot\relax
\ifdim\scratchdimen<\hsize
\hsize\scratchdimen
\fi
@@ -1789,13 +1803,13 @@
\orelse\ifempty\p_strc_floats_caption_align
\setbox\b_strc_floats_caption\vbox
{\strc_floats_caption_set_align
- \hsize\captionhsize
+ \hsize\d_strc_floats_caption_hsize
\raggedcenter % overloads
\strc_floats_make_complete_caption}%
\else
\setbox\b_strc_floats_caption\vbox
{\strc_floats_caption_set_align
- \hsize\captionhsize
+ \hsize\d_strc_floats_caption_hsize
\strc_floats_make_complete_caption}%
\fi
\fi}
@@ -2379,6 +2393,7 @@
{\ifvisible
\par
\edef\floatcaptiondirectives{\floatparameter\c!location,\floatcaptionparameter\c!location}%
+ \strc_floats_set_caption_criteria
\ifconditional\c_strc_floats_par_float
\strc_floats_set_paragraph_variant
\else
diff --git a/tex/context/base/mkxl/strc-itm.mklx b/tex/context/base/mkxl/strc-itm.mklx
index 16bed0d6c..9f0ba35db 100644
--- a/tex/context/base/mkxl/strc-itm.mklx
+++ b/tex/context/base/mkxl/strc-itm.mklx
@@ -397,9 +397,9 @@
\mutable\let\itemgroupsecond\empty
\def\strc_itemgroups_process_option#option%
- {\edef\itemgroupconstantvalue{#option}%
- \ifempty\itemgroupconstantvalue\else
- \splitatasterisk\itemgroupconstantvalue\itemgroupfirst\itemgroupsecond
+ {\edef\scratchstringone{#option}%
+ \ifempty\scratchstringone\else
+ \splitatasterisk\scratchstringone\itemgroupfirst\itemgroupsecond
\ifempty\itemgroupsecond
\let\itemgroupsecond\itemgroupfirst
\let\itemgroupfirst\!!plusone
@@ -407,7 +407,7 @@
\ifcsname\??itemgroupkeyword\itemgroupsecond\endcsname
\lastnamedcs
\else
- \strc_itemgroups_set_symbol\itemgroupconstantvalue
+ \strc_itemgroups_set_symbol\scratchstringone
\fi
\fi}
@@ -781,7 +781,7 @@
\fi}
\def\strc_itemgroups_calculate_list_width#level%
- {\let\savedcurrentitemgroup\currentitemgroup
+ {\let\m_strc_itemgroups_saved\currentitemgroup
\edef\currentitemgroup{\currentparentitemgroup:\number#level}%
\ifdim\d_strc_itemgroups_max_width>\zeropoint
\d_strc_itemgroups_list_width\d_strc_itemgroups_max_width
@@ -794,7 +794,7 @@
\d_strc_itemgroups_list_width\itemgroupparameter\c!width\relax
\fi
\advance\d_strc_itemgroups_list_width\itemgroupparameter\c!distance\relax
- \let\currentitemgroup\savedcurrentitemgroup}
+ \let\currentitemgroup\m_strc_itemgroups_saved}
\let\p_itemgroups_options \empty
\let\p_itemgroups_extra_options\empty
@@ -1097,17 +1097,22 @@
\ifconditional\c_strc_itemgroups_intro\strc_itemgroups_insert_breakno\fi
\fi}
+\newcount\c_strc_itemgroups_prev_level
+
+\def\strc_itemgroups_inbetween_command
+ {\nameditemgroupparameter{\currentparentitemgroup:\number\c_strc_itemgroups_prev_level}\c!inbetween}
+
\def\strc_itemgroups_start_item_first_two
{\ifconditional\c_strc_itemgroups_paragraph\else
- \edef\previtemlevel{\the\numexpr\c_strc_itemgroups_nesting-\plusone}%
+ \c_strc_itemgroups_prev_level\numexpr\c_strc_itemgroups_nesting-\plusone\relax
\ifcase\c_strc_itemgroups_spacing_mode
\strc_itemgroups_before_command
\or
\doifelsenothing\strc_itemgroups_before_command % should possibly expand to empty
- {\nameditemgroupparameter{\currentparentitemgroup:\previtemlevel}\c!inbetween}%
+ \strc_itemgroups_inbetween_command
\strc_itemgroups_before_command
\else
- \nameditemgroupparameter{\currentparentitemgroup:\previtemlevel}\c!inbetween
+ \strc_itemgroups_inbetween_command
\fi
\strc_itemgroups_tag_start_group
\fi}
@@ -1597,7 +1602,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 \let\nop \relax \fi % used often by myself
+%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
@@ -1694,12 +1699,14 @@
\let\strc_itemgroups_collected_store\relax
+\let\m_strc_itemgroups_collected\empty
+
\normalexpanded{\def\strc_itemgroups_collected_store#1\csname\e!stop\v!item\endcsname}%
{\advance\c_strc_itemgroups_collected_stored\plusone
\setvalue{\??itemgroupstack\number\c_strc_itemgroups_collected_stored}{\startitemgroupitem#1\stopitemgroupitem}}
\def\strc_itemgroups_collected_flush_randomize
- {\collecteditemgroupitem}
+ {\m_strc_itemgroups_collected}
\def\strc_itemgroups_collected_flush_horizontal
{\begingroup
@@ -1712,18 +1719,12 @@
\fi
\fi
\noindent % no \dontleavehmode
- \hbox to \dimexpr\availablehsize/\scratchcounter\relax{\collecteditemgroupitem\hss}%
+ \hbox to \dimexpr\availablehsize/\scratchcounter\relax{\m_strc_itemgroups_collected\hss}%
\endgroup}
-% \def\strc_itemgroups_collected_flush_indeed
-% {\collecteditemgroupitem
-% \iftrialtypesetting
-% \undefinevalue{\??itemgroupstack\number\c_strc_itemgroups_collected_current}%
-% \fi}
-
\def\strc_itemgroups_collected_flush_indeed
- {\collecteditemgroupitem
- \undefinevalue{\??itemgroupstack\number\c_strc_itemgroups_collected_current}}
+ {\m_strc_itemgroups_collected
+ \letcsname\??itemgroupstack\number\c_strc_itemgroups_collected_current\endcsname\undefined}
\def\strc_itemgroups_collected_flush
{\ifconditional\c_strc_itemgroups_randomize
@@ -1732,7 +1733,7 @@
\advance\c_strc_itemgroups_collected_current\plusone
\fi
\ifcsname\??itemgroupstack\number\c_strc_itemgroups_collected_current\endcsname
- \edef\collecteditemgroupitem{\lastnamedcs}%
+ \edef\m_strc_itemgroups_collected{\lastnamedcs}%
\ifconditional\c_strc_itemgroups_horizontal
\strc_itemgroups_collected_flush_horizontal
\else
@@ -1768,15 +1769,15 @@
%D Left-overs:
-\protected\def\item % todo: frozen
+\permanent\protected\def\item % todo: frozen
{\strc_itemgroups_item_alone}
-\def\strc_itemgroups_item_alone[#category]#text\par
+\tolerant\def\strc_itemgroups_item_alone[#category]#:#text\par
{\doifelsesomething{#category}{\startitemgroup[#category]}{\startitemgroup[\v!itemize]}%
\startitem#text\stopitem
\stopitemgroup}
-\protected\def\head % todo: frozen
+\permanent\protected\def\head % todo: frozen
{\strc_itemgroups_head_alone}
\def\strc_itemgroups_head_alone[#category]#head\par#body\par
diff --git a/tex/context/base/mkxl/strc-lab.mkxl b/tex/context/base/mkxl/strc-lab.mkxl
index 389f868a8..3794fdca9 100644
--- a/tex/context/base/mkxl/strc-lab.mkxl
+++ b/tex/context/base/mkxl/strc-lab.mkxl
@@ -71,31 +71,32 @@
% todo: \strc_labels_command for user
+\let\m_strc_labels_sub\empty
+
\appendtoks
+ \let\m_strc_labels_sub\empty
\ifempty\currentlabelparent
% clone => parent | subclone => clone | subsubclone => subclone
- \let\currentlabelsub\empty
\strc_define_commands_label
- {\currentlabelsub\currentlabel}%
+ {\m_strc_labels_sub\currentlabel}%
\plusone
\empty
\edef\p_levels{\labelparameter\c!levels}%
\dostepwiserecurse\plustwo\p_levels\plusone
{\strc_define_commands_label
- {\v!sub\currentlabelsub\currentlabel}%
+ {\v!sub\m_strc_labels_sub\currentlabel}%
\recurselevel
- {\currentlabelsub\currentlabel}%
- \edef\currentlabelsub{\v!sub\currentlabelsub}}%
+ {\m_strc_labels_sub\currentlabel}%
+ \edef\m_strc_labels_sub{\v!sub\m_strc_labels_sub}}%
\else
% clone => parent | subclone => subparent | subsubclone => subsubparent
- \let\currentlabelsub\empty
\edef\p_levels{\labelparameter\c!levels}%
\dorecurse\p_levels
{\strc_define_commands_label
- {\currentlabelsub\currentlabel}%
+ {\m_strc_labels_sub\currentlabel}%
\recurselevel
- {\currentlabelsub\currentlabelparent}%
- \edef\currentlabelsub{\v!sub\currentlabelsub}}%
+ {\m_strc_labels_sub\currentlabelparent}%
+ \edef\m_strc_labels_sub{\v!sub\m_strc_labels_sub}}%
\fi
\edef\p_counter{\labelparameter\s!counter}% can inherit from parent
\ifempty\p_counter %
diff --git a/tex/context/base/mkxl/strc-lnt.mklx b/tex/context/base/mkxl/strc-lnt.mklx
index 2a06d3c79..f389442d8 100644
--- a/tex/context/base/mkxl/strc-lnt.mklx
+++ b/tex/context/base/mkxl/strc-lnt.mklx
@@ -87,6 +87,8 @@
% maybe do this in lua
+\mutable\let\currentlinenotereference\empty
+
\def\page_lines_in_from{\in[lr:b:\currentlinenotereference]}
\def\page_lines_in_to {\in[lr:e:\currentlinenotereference]}
@@ -136,6 +138,8 @@
\let\currentlinenotereference\empty
+\mutable\let\linenotelinenumber\relax
+
\protected\def\strc_linenotes_indeed#1#2#3%
{\begingroup
% we keep things local so we can use it as regular note too
@@ -145,8 +149,8 @@
\xdef\m_page_lines_previous_to {\begincsname\??linenotespreviousto \currentnotation\endcsname}%
\strc_linenotes_check_compression
\let\currentnote\currentnotation
- \letnotationparameter\c!numbercommand\linenotelinenumber% todo: deep hook
- \letnoteparameter \c!textcommand \gobbleoneargument % todo: deep hook
+ \letnotationparameter\c!numbercommand\linenotelinenumber % todo: deep hook, beware: should be mutable
+ \letnoteparameter \c!textcommand \gobbleoneargument % todo: deep hook
\csname\??linenote\currentnotation\endcsname{#3}%
\gletcsname\??linenotespreviousfrom\currentnotation\endcsname\m_page_lines_current_from
\gletcsname\??linenotespreviousto \currentnotation\endcsname\m_page_lines_current_to
@@ -231,17 +235,15 @@
\let\strc_linenotes_traced\gobbleoneargument
\def\strc_linenotes_traced_indeed#1%
- {\iftracelinenotes
- \hpack to \zeropoint
- {\forgetall
- \hsize\zeropoint
- \hss
- \vpack to \strutheight{\llap{\red\infofont\setstrut\the\c_strc_linenotes}\vss}%
- {\color[blue]{\vl}}%
- \vpack to \strutheight{\rlap{\red\infofont\setstrut#1}\vss}%
- \hss}%
- \prewordbreak
- \fi}
+ {\hpack to \zeropoint
+ {\forgetall
+ \hsize\zeropoint
+ \hss
+ \vpack to \strutheight{\llap{\red\infofont\setstrut\the\c_strc_linenotes}\vss}%
+ {\color[blue]{\vl}}%
+ \vpack to \strutheight{\rlap{\red\infofont\setstrut#1}\vss}%
+ \hss}%
+ \prewordbreak}
\permanent\protected\def\tracelinenotes
{\let\strc_linenotes_traced\strc_linenotes_traced_indeed}
diff --git a/tex/context/base/mkxl/strc-lst.mklx b/tex/context/base/mkxl/strc-lst.mklx
index c39b3d488..049a0370e 100644
--- a/tex/context/base/mkxl/strc-lst.mklx
+++ b/tex/context/base/mkxl/strc-lst.mklx
@@ -1548,9 +1548,9 @@
\aliased\let\stopcurrentlistentrywrapper\egroup
-\aliased\let\currentlistentryreferenceattribute \strc_lists_get_reference_attribute
-\aliased\let\currentlistentrydestinationattribute\strc_lists_get_destination_attribute
-\aliased\let\currentlistentrylimitedtext \strc_lists_limitated_text
+\permanent\def\currentlistentryreferenceattribute {\strc_lists_get_reference_attribute} % this definition can change
+\permanent\def\currentlistentrydestinationattribute{\strc_lists_get_destination_attribute} % this definition can change
+\permanent\def\currentlistentrylimitedtext {\strc_lists_limitated_text} % this definition can change
% todo:
diff --git a/tex/context/base/mkxl/strc-mat.mkxl b/tex/context/base/mkxl/strc-mat.mkxl
index 3e425b9b1..0b90eecba 100644
--- a/tex/context/base/mkxl/strc-mat.mkxl
+++ b/tex/context/base/mkxl/strc-mat.mkxl
@@ -328,7 +328,9 @@
\mutable\let\currentformulasreference \empty
\mutable\let\currentformulareference \empty
\mutable\let\currentsubformulareference \empty
+\mutable\let\currentnestedformulanumber \empty
\mutable\let\currentnestedformulareference\empty
+\mutable\let\currentnestedformulaattribute\empty
\appendtoks
\glet\currentformulasreference \empty
@@ -349,10 +351,10 @@
\glet\currentnestedformulasuffix\empty
\to \everyresetformulas
-\mutable\let\currentplaceformulasynchronize\relax
-\mutable\let\currentformulasynchronize \relax
-\mutable\let\currentsubformulasynchronize \relax
-\mutable\let\currentformulassynchronize \relax
+\mutable\let\currentplaceformulasynchronize \relax
+\mutable\let\currentformulassynchronize \relax
+\mutable\let\currentsubformulasynchronize \relax
+\mutable\let\currentnestedformulasynchronize\relax
\appendtoks
\glet\currentplaceformulasynchronize \relax
@@ -503,19 +505,19 @@
\pushoverloadmode
-\let\reqno\eqno % no longer valid as we just nil it
+\aliased\let\reqno\eqno % no longer valid as we just nil it
-\let\math_native_leqno\leqno
-\let\math_native_reqno\reqno
+\aliased\let\math_native_leqno\leqno
+\aliased\let\math_native_reqno\reqno
-\protected\def\normaleqno#1{\writestatus\m!system{no native (l)eqno equation number support}}
+\permanent\protected\def\normaleqno#1{\writestatus\m!system{no native (l)eqno equation number support}}
-\let\normalleqno\normaleqno
-\let\normalreqno\normaleqno
+\aliased\let\normalleqno\normaleqno
+\aliased\let\normalreqno\normaleqno
-\let\leqno\normaleqno
-\let\reqno\normaleqno
-\let\eqno \normaleqno
+\aliased\let\leqno\normaleqno
+\aliased\let\reqno\normaleqno
+\aliased\let\eqno \normaleqno
\popoverloadmode
diff --git a/tex/context/base/mkxl/strc-not.mklx b/tex/context/base/mkxl/strc-not.mklx
index 9de9181d0..b8a44e287 100644
--- a/tex/context/base/mkxl/strc-not.mklx
+++ b/tex/context/base/mkxl/strc-not.mklx
@@ -149,32 +149,33 @@
\instance\setuevalue{\e!start#tag}{\strc_notations_start [#tag]}%
\instance\setuevalue{\e!stop #tag}{\strc_notations_stop }}
+\let\m_strc_notation_sub\empty
+
\appendtoks
+ \let\m_strc_notation_sub\empty
\ifempty\currentnotationparent
% clone => parent | subclone => clone | subsubclone => subclone
- \let\currentnotationsub\empty
\strc_define_commands_notation
- {\currentnotationsub\currentnotation}%
+ {\m_strc_notation_sub\currentnotation}%
\plusone
\empty
\edef\p_levels{\notationparameter\c!levels}%
\dostepwiserecurse\plustwo\p_levels\plusone
{\strc_define_commands_notation
- {\v!sub\currentnotationsub\currentnotation}%
+ {\v!sub\m_strc_notation_sub\currentnotation}%
\recurselevel
- {\currentnotationsub\currentnotation}%
- \edef\currentnotationsub{\v!sub\currentnotationsub}}%
+ {\m_strc_notation_sub\currentnotation}%
+ \edef\m_strc_notation_sub{\v!sub\m_strc_notation_sub}}%
\definelist[\currentnotation]% goodie
\else
% clone => parent | subclone => subparent | subsubclone => subsubparent
- \let\currentnotationsub\empty
\edef\p_levels{\notationparameter\c!levels}%
\dorecurse\p_levels
{\strc_define_commands_notation
- {\currentnotationsub\currentnotation}%
+ {\m_strc_notation_sub\currentnotation}%
\recurselevel
- {\currentnotationsub\currentnotationparent}%
- \edef\currentnotationsub{\v!sub\currentnotationsub}}%
+ {\m_strc_notation_sub\currentnotationparent}%
+ \edef\m_strc_notation_sub{\v!sub\m_strc_notation_sub}}%
\definelist[\currentnotation][\currentnotationparent]% goodie
\fi
\edef\p_counter{\notationparameter\s!counter}% can inherit from parent
@@ -540,7 +541,7 @@
\ifcsname\??noteinteractiondisplay\p_interaction\endcsname\p_interaction\else\v!no\fi
\endcsname}
-\def\currentnotenumber{0}
+\mutable\let\currentnotenumber\!!zerocount
\let\strc_notes_get_reference_attribute_symbol \empty
\let\strc_notes_get_destination_attribute_symbol\empty
@@ -551,81 +552,76 @@
% inline
-\def\strc_references_prepare_inline_references_nop
+\let\m_strc_notes_internal\relax
+
+\def\strc_notes_prepare_inline_references_nop
{\let\strc_notes_get_reference_attribute_symbol\empty
\let\strc_notes_get_destination_attribute_symbol\empty
\let\strc_notes_set_style_color_inline\strc_notes_set_style_color_inline_nop}
-% \def\strc_references_prepare_inline_references_yes
-% {\strc_references_set_simple_reference{symb:\currentnote:\currentnotenumber}% destination
-% \strc_references_get_simple_reference{internal(\clf_noteinternal{\currentnote}\currentnotenumber)}% reference
-% \edef\strc_notes_get_destination_attribute_symbol{attr\destinationattribute\currentdestinationattribute}%
-% \edef\strc_notes_get_reference_attribute_symbol{attr\referenceattribute\currentreferenceattribute}%
-% \let\strc_notes_set_style_color_inline\strc_notes_set_style_color_inline_yes}
-
-\def\strc_references_prepare_inline_references_yes
- {\edef\currentnoteinternal{\clf_noteinternal{\currentnote}\currentnotenumber}%
- \strc_references_set_simple_reference{*\currentnoteinternal}% destination
- \strc_references_get_simple_reference{internal(\currentnoteinternal)}% reference
+\def\strc_notes_prepare_inline_references_yes
+ {\edef\m_strc_notes_internal{\clf_noteinternal{\currentnote}\currentnotenumber}%
+ \strc_references_set_simple_reference{*\m_strc_notes_internal}% destination
+ \strc_references_get_simple_reference{internal(\m_strc_notes_internal)}% reference
\edef\strc_notes_get_destination_attribute_symbol{attr\destinationattribute\currentdestinationattribute}%
\edef\strc_notes_get_reference_attribute_symbol{attr\referenceattribute\currentreferenceattribute}%
\let\strc_notes_set_style_color_inline\strc_notes_set_style_color_inline_yes}
-\letvalue{\??noteinteractioninline\v!no }\strc_references_prepare_inline_references_nop
-\letvalue{\??noteinteractioninline\v!all }\strc_references_prepare_inline_references_yes
-\letvalue{\??noteinteractioninline\v!number}\strc_references_prepare_inline_references_yes
-\letvalue{\??noteinteractioninline\v!text }\strc_references_prepare_inline_references_yes
-\letvalue{\??noteinteractioninline\v!yes }\strc_references_prepare_inline_references_yes
+\letvalue{\??noteinteractioninline\v!no }\strc_notes_prepare_inline_references_nop
+\letvalue{\??noteinteractioninline\v!all }\strc_notes_prepare_inline_references_yes
+\letvalue{\??noteinteractioninline\v!number}\strc_notes_prepare_inline_references_yes
+\letvalue{\??noteinteractioninline\v!text }\strc_notes_prepare_inline_references_yes
+\letvalue{\??noteinteractioninline\v!yes }\strc_notes_prepare_inline_references_yes
% display (for 'all' we need unique text and number attributes so we resolve twice
% as we otherwise don't get the number one which is lapped in the margin so we need
% to explicitly visit it)
-\def\strc_references_prepare_display_references_nop
+\def\strc_notes_prepare_display_references_nop
{\let\strc_notes_set_reference_attribute_number\donothing
\let\strc_notes_set_reference_attribute_text\donothing
\let\strc_notes_set_destination_attribute_text\donothing
\let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_nop}
-\def\strc_references_prepare_display_references_yes_number
- {\edef\currentnoteinternal{\clf_noteinternal{\currentnote}\currentnotenumber}%
- \ifcase\currentnoteinternal\relax
- \strc_references_prepare_display_references_nop
+\def\strc_notes_prepare_display_references_yes_number
+ {\edef\m_strc_notes_internal{\clf_noteinternal{\currentnote}\currentnotenumber}%
+ \ifcase\m_strc_notes_internal\relax
+ \strc_notes_prepare_display_references_nop
\else
\let\strc_notes_set_reference_attribute_text\donothing
- \strc_references_get_simple_reference{*\currentnoteinternal}% reference
+ \strc_references_get_simple_reference{*\m_strc_notes_internal}% reference
\edef\strc_notes_set_reference_attribute_number{\c_attr_reference\currentreferenceattribute}%
\let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_yes
\fi}
-\def\strc_references_prepare_display_references_yes_text
- {\edef\currentnoteinternal{\clf_noteinternal{\currentnote}\currentnotenumber}%
- \ifcase\currentnoteinternal\relax
- \strc_references_prepare_display_references_nop
+\def\strc_notes_prepare_display_references_yes_text
+ {\edef\m_strc_notes_internal{\clf_noteinternal{\currentnote}\currentnotenumber}%
+ \ifcase\m_strc_notes_internal\relax
+ \strc_notes_prepare_display_references_nop
\else
- \strc_references_get_simple_reference{*\currentnoteinternal}% reference
+ \strc_references_get_simple_reference{*\m_strc_notes_internal}% reference
\edef\strc_notes_set_reference_attribute_text{\c_attr_reference\currentreferenceattribute}%
\let\strc_notes_set_reference_attribute_number\donothing
\let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_yes
\fi}
-\def\strc_references_prepare_display_references_yes_all
- {\edef\currentnoteinternal{\clf_noteinternal{\currentnote}\currentnotenumber}%
- \ifcase\currentnoteinternal\relax
- \strc_references_prepare_display_references_nop
+\def\strc_notes_prepare_display_references_yes_all
+ {\edef\m_strc_notes_internal{\clf_noteinternal{\currentnote}\currentnotenumber}%
+ \ifcase\m_strc_notes_internal\relax
+ \strc_notes_prepare_display_references_nop
\else
- \strc_references_get_simple_reference{*\currentnoteinternal}% reference
+ \strc_references_get_simple_reference{*\m_strc_notes_internal}% reference
\edef\strc_notes_set_reference_attribute_text{\c_attr_reference\currentreferenceattribute}%
- \strc_references_get_simple_reference{*\currentnoteinternal}% reference
+ \strc_references_get_simple_reference{*\m_strc_notes_internal}% reference
\edef\strc_notes_set_reference_attribute_number{\c_attr_reference\currentreferenceattribute}%
\let\strc_notes_set_style_color_display\strc_notes_set_style_color_display_yes
\fi}
-\letvalue{\??noteinteractiondisplay\v!no }\strc_references_prepare_display_references_nop
-\letvalue{\??noteinteractiondisplay\v!all }\strc_references_prepare_display_references_yes_all
-\letvalue{\??noteinteractiondisplay\v!number}\strc_references_prepare_display_references_yes_number
-\letvalue{\??noteinteractiondisplay\v!text }\strc_references_prepare_display_references_yes_text
-\letvalue{\??noteinteractiondisplay\v!yes }\strc_references_prepare_display_references_yes_number
+\letvalue{\??noteinteractiondisplay\v!no }\strc_notes_prepare_display_references_nop
+\letvalue{\??noteinteractiondisplay\v!all }\strc_notes_prepare_display_references_yes_all
+\letvalue{\??noteinteractiondisplay\v!number}\strc_notes_prepare_display_references_yes_number
+\letvalue{\??noteinteractiondisplay\v!text }\strc_notes_prepare_display_references_yes_text
+\letvalue{\??noteinteractiondisplay\v!yes }\strc_notes_prepare_display_references_yes_number
\mutable\let\strc_notes_set_style_color_inline_nop \usenotestyleandcolor
\mutable\let\strc_notes_set_style_color_display_nop\usenotationstyleandcolor
@@ -710,7 +706,7 @@
\dostoptagged
\egroup
\endgroup
- \glet\lastnotesymbol\relax}
+ \glet\lastnotesymbol\empty}
\protected\def\strc_notes_inject_dummy % temp hack
{\removeunwantedspaces
@@ -721,7 +717,7 @@
\fi
\nobreak
\hpack to .5\emwidth{}%
- \glet\lastnotesymbol\relax}
+ \glet\lastnotesymbol\empty}
\protected\def\strc_notes_inject_separator % patch by WS due to request on list
{\edef\p_textseparator{\noteparameter\c!textseparator}%
@@ -757,18 +753,18 @@
% eraseinsertionbackup
% restoreinsertionbackup
-\def\savenotedata {} % \writestatus{todo}{save note data}}
-\def\restorenotedata {} % \writestatus{todo}{restore note data}}
-\def\savenotecontent {} % \writestatus{todo}{save note content}}
-\def\restorenotecontent{} % \writestatus{todo}{restore note content}}
-\def\erasenotebackup {} % \writestatus{todo}{erase note backup}}
+% \def\savenotedata {} % \writestatus{todo}{save note data}}
+% \def\restorenotedata {} % \writestatus{todo}{restore note data}}
+% \def\savenotecontent {} % \writestatus{todo}{save note content}}
+% \def\restorenotecontent{} % \writestatus{todo}{restore note content}}
+% \def\erasenotebackup {} % \writestatus{todo}{erase note backup}}
% page-set:
-\def\enablenotes {\writestatus{todo}{enable notes}}
-\def\disablenotes {\writestatus{todo}{disable notes}}
-\def\savenotes {\writestatus{todo}{save notes}}
-\def\flushsavednotes{\writestatus{todo}{flush notes}}
+% \def\enablenotes {\writestatus{todo}{enable notes}}
+% \def\disablenotes {\writestatus{todo}{disable notes}}
+% \def\savenotes {\writestatus{todo}{save notes}}
+% \def\flushsavednotes{\writestatus{todo}{flush notes}}
% experiment: (compare scope=text and scope=page)
%
@@ -1063,7 +1059,8 @@
{\setfalse\c_strc_notes_delayed
\strc_notes_set_distance
\strc_notes_set_columns
- \ifnum\currentnofcolumns=\zerocount
+ % \ifnum\currentnofcolumns=\zerocount
+ \ifnum\nofcolumns=\zerocount
\c_strc_notes_columns\plusone
\fi
\page_inserts_set_location\currentnoteinsertion\v!columns % \setupinsertion[\currentnote][\c!location=\v!columns]%
@@ -1268,9 +1265,6 @@
\protected\def\strc_notes_inject_text % hm main?
{\clf_savedlisttitle{\currentconstructionmain}\currentconstructionlistentry\relax}
-\let\startpushnote\relax
-\let\stoppushnote \relax
-
\newsignal\d_strc_notes_signal
\newconditional\processingnote
@@ -1558,9 +1552,11 @@
\newconditional\inlocalnotes
+\mutable\let\localnoteslist\empty
+
\permanent\tolerant\protected\def\startlocalnotes[#list]% grouping ? (we used to have a second argument ... settings)
- {\def\localnoteslist{#list}%
- \settrue\inlocalnotes
+ {\settrue\inlocalnotes
+ \def\localnoteslist{#list}%
\processcommacommand[\localnoteslist]\strc_notes_local_start_step}
\permanent\protected\def\stoplocalnotes
@@ -1712,10 +1708,8 @@
{\begingroup
\setupcurrentnote[\c!location=]%
\inheritednoteframed
- {\edef\currentnotewidth{\noteparameter\c!width}%
- \doifelsedimension\currentnotewidth\donothing
- {\edef\currentnotewidth{\the\hsize}}%
- \startsimplecolumns[\c!distance=\noteparameter\c!columndistance,\c!n=\noteparameter\c!n,\c!width=\currentnotewidth]%
+ {\doifelsedimension{\noteparameter\c!width}\donothing{\setexpandednoteparameter\c!width{\the\hsize}}%
+ \startsimplecolumns[\c!distance=\noteparameter\c!columndistance,\c!n=\noteparameter\c!n,\c!width=\noteparameter\c!width]%
\flushlocalnotes\currentnote
\stopsimplecolumns}%
\endgroup}
@@ -1753,7 +1747,7 @@
% used in page-mul
- \ifdefined\currentnofcolumns\else \def\currentnofcolumns{\nofcolumns} \fi
+ % \ifdefined\currentnofcolumns\else \def\currentnofcolumns{\nofcolumns} \fi
\permanent\protected\def\fakenotes
{\ifhmode\endgraf\fi\ifvmode
@@ -1820,7 +1814,7 @@
%D \appendtoks \synchronizenotes \to \everypar
%D \stoptyping
-\let\synchronizenotes\relax
+% \let\synchronizenotes\relax
%D When typesetting footnotes, we have to return to the footnote specific bodyfont
%D size, which is in most cases derived from the global document bodyfont size. In
@@ -1902,7 +1896,7 @@
\installcorenamespace{notesymbol}
-\let\lastnotesymbol\relax % todo: per class
+\mutable\let\lastnotesymbol\empty % todo: per class
\permanent\tolerant\protected\def\notesymbol[#tag]#spacer[#reference]%
{\ifnotesenabled
diff --git a/tex/context/base/mkxl/strc-pag.mkxl b/tex/context/base/mkxl/strc-pag.mkxl
index 8d404f163..c27fd9429 100644
--- a/tex/context/base/mkxl/strc-pag.mkxl
+++ b/tex/context/base/mkxl/strc-pag.mkxl
@@ -37,7 +37,7 @@
\newtoks\everyinitializepagecounters
-\protected\def\initializepagecounters
+\permanent\protected\def\initializepagecounters
{\the\everyinitializepagecounters}
\appendtoks
@@ -243,7 +243,7 @@
\fi
\to \everybeforepagebody
-\def\therealsubpageno#1% new helper
+\permanent\def\therealsubpageno#1% new helper
{\the\numexpr\c_strc_subpage_first_real+#1+\minusone\relax}
% Equivalents (compatibility):
@@ -441,17 +441,17 @@
% just for downward compatbility
\appendtoks
- \edef\askeduserpagenumber{\namedcounterparameter\s!userpage\c!number}%
- \ifempty\askeduserpagenumber \else
- \normalexpanded{\setuppagenumber[\c!start=\askeduserpagenumber,\c!number=]}%
+ \edef\scratchstringone{\namedcounterparameter\s!userpage\c!number}%
+ \ifempty\scratchstringone \else
+ \normalexpanded{\setuppagenumber[\c!start=\scratchstringone,\c!number=]}%
\userpageno\strc_counters_raw\s!userpage
\fi
\to \everysetupuserpagenumber % todo: set state: none, start, stop, reset
\appendtoks
- \edef\askedsubpagenumber{\namedcounterparameter\s!subpage\c!number}%
- \ifempty\askedsubpagenumber \else
- \normalexpanded{\setupsubpagenumber[\c!start=\askedsubpagenumber,\c!number=]}%
+ \edef\scratchstringone{\namedcounterparameter\s!subpage\c!number}%
+ \ifempty\scratchstringone \else
+ \normalexpanded{\setupsubpagenumber[\c!start=\scratchstringone,\c!number=]}%
\subpageno\strc_counters_raw\s!subpage\relax
\fi
\to \everysetupsubpagenumber % todo: set state: none, start, stop, reset
diff --git a/tex/context/base/mkxl/strc-ref.mklx b/tex/context/base/mkxl/strc-ref.mklx
index 09378e6b6..f3a90ed67 100644
--- a/tex/context/base/mkxl/strc-ref.mklx
+++ b/tex/context/base/mkxl/strc-ref.mklx
@@ -64,6 +64,8 @@
\mutable\let\referenceprefix \empty
+\mutable\let\currentdestinationattribute \empty
+
\mutable\let\currentreferenceattribute \empty
\mutable\let\currentreferencecoding \empty
\mutable\let\currentreferencecontent \empty
@@ -384,8 +386,8 @@
\permanent\protected\def\hboxreference[#1]{\boxreference[#1]\hbox}
\permanent\protected\def\vboxreference[#1]{\boxreference[#1]\vbox}
-\def\defaultreferencepage#text{[[[#text]]]}
-\def\defaultreferencetext#text{[[[#text]]]}
+\mutable\def\defaultreferencepage#text{[[[#text]]]}
+\mutable\def\defaultreferencetext#text{[[[#text]]]}
%D For internal usage:
@@ -1244,7 +1246,7 @@
\setvalue{\??referencinginteraction\v!symbol}%
{\referencesymbol}
-\def\referencesequence
+\permanent\def\referencesequence
{\ifcsname\??referencinginteraction\referencingparameter\c!interaction\endcsname
\expandafter\lastnamedcs
\else
@@ -1378,7 +1380,7 @@
\resetinteractionparameter\c!contrastcolor
\resetinteractionparameter\c!color
\fi
- \ifx\currentreferenceformatlabel\autoreferencelabeltextflag
+ \ifx\currentreferenceformatlabel\wildcardsymbol
\edef\currentreferenceformatlabel{\autoreferencelabeltext}%
\fi
\ifx\currentreferenceformatautocase\v!yes
@@ -1405,8 +1407,6 @@
\enforced\let\rightofreferencecontent\empty
\strc_references_pickup_goto}
-\def\autoreferencelabeltextflag{*} % a proper key like 'auto' or 'name' can clash with a label key
-
\permanent\protected\def\autoreferencelabeltext
{\clf_getcurrentreferencemetadata{name}}
@@ -1588,8 +1588,10 @@
\expandafter\strc_references_start_goto_nop
\fi}
+\aliased\let\stopgoto\relax
+
\permanent\protected\def\strc_references_start_goto_nop
- {\let\stopgoto\strc_references_stop_goto_nop}
+ {\enforced\let\stopgoto\strc_references_stop_goto_nop}
\permanent\protected\def\strc_references_stop_goto_nop
{\endgroup}
diff --git a/tex/context/base/mkxl/strc-reg.mkxl b/tex/context/base/mkxl/strc-reg.mkxl
index dacd3e5e8..841b1e8be 100644
--- a/tex/context/base/mkxl/strc-reg.mkxl
+++ b/tex/context/base/mkxl/strc-reg.mkxl
@@ -877,7 +877,8 @@
\begingroup
\scratchcounter\ifnum#1>\c_strc_registers_maxlevel\c_strc_registers_maxlevel\else#1\fi\relax
\dostarttagged\t!registerentries\empty
- \let\savedcurrentregister\currentregister
+% \let\savedcurrentregister\currentregister
+ \pushmacro\currentregister
\edef\currentregister{\currentregister:\number\scratchcounter}%
\usenestedregisterstyleandcolor\c!textstyle\c!textcolor
\ifnum\scratchcounter>\plusone
@@ -886,7 +887,8 @@
\d_strc_registers_hangindent\registerparameter\c!distance\relax
\c_strc_registers_hangafter \plusone
\blank[\v!samepage]%
- \let\currentregister\savedcurrentregister}
+% \let\currentregister\savedcurrentregister}
+ \popmacro\currentregister}
\permanent\protected\def\stopregisterentries
{\endgraf
@@ -1198,7 +1200,7 @@
\enforced\frozen\def\registeronepage{\registerpagebuttonsymbol\gobblefivearguments}%
\enforced\frozen\def\registerpagerange{\registerpagebuttonsymbol\gobbleeightarguments}}
-\protected\def\setregisterpagerendering
+\protected\def\strc_registers_set_page_rendering
{\doifelse{\registerparameter\c!pagenumber}\v!no
{\enforced\frozen\let \currentregisterpagesymbol\v!none}
{\enforced\frozen\edef\currentregisterpagesymbol{\registerparameter\c!symbol}}%
@@ -1213,7 +1215,7 @@
\fi}
\appendtoks
- \setregisterpagerendering
+ \strc_registers_set_page_rendering
\to \everyplaceregister
%D The linked register code will be reimplemented (not that hard) when it's needed
diff --git a/tex/context/base/mkxl/strc-ren.mkxl b/tex/context/base/mkxl/strc-ren.mkxl
index d0baacb04..774f6f640 100644
--- a/tex/context/base/mkxl/strc-ren.mkxl
+++ b/tex/context/base/mkxl/strc-ren.mkxl
@@ -118,14 +118,14 @@
\protected\def\strc_rendering_place_head_text
{\strc_rendering_start_placement
\setheadmarking
- \doresetstructureheadnumbercontent
+ \strc_sectioning_reset_head_number_content
\ifconditional\c_strc_sectioning_empty
\setbox\b_strc_rendering_head\hpack \headreferenceattributes to \zeropoint{\strut}%
\else
\docheckheadreference
\setbox\b_strc_rendering_head\hbox \headreferenceattributes
{\spac_grids_set_local_snapping{\headparameter\c!internalgrid}%
- \doresetstructureheadnumbercontent
+ \strc_sectioning_reset_head_number_content
\useheadstyleparameter\c!style
\setinlineheadreferenceattributes
\strc_rendering_inject_text}%
@@ -136,8 +136,8 @@
{\strc_rendering_start_placement
\setheadmarking
\doifelsetext\getheadnumber
- \dosetstructureheadnumbercontent
- \doresetstructureheadnumbercontent
+ \strc_sectioning_set_head_number_content
+ \strc_sectioning_reset_head_number_content
\ifconditional\c_strc_sectioning_empty
\setbox\b_strc_rendering_head\hpack \headreferenceattributes to \zeropoint{\strut}%
\else % = needed
@@ -173,7 +173,10 @@
\permanent\protected\def\startlocalheadsetup{\bgroup\strc_rendering_initialize_spacing}
\permanent\protected\def\stoplocalheadsetup {\egroup}
-\protected\def\strc_rendering_initialize_spacing
+\aliased\let\headsetupspacing\relax
+\aliased\let\localheadsetup \relax
+
+\permanent\protected\def\strc_rendering_initialize_spacing
{\forgetall % local !
\edef\p_align{\headparameter\c!align}%
\ifempty\p_align \else
@@ -216,9 +219,9 @@
\dontcomplain
\postponenotes
\strc_rendering_initialize_interaction
- % delayed
- \let\localheadsetup \strc_rendering_initialize_spacing % historic name
- \let\headsetupspacing\strc_rendering_initialize_spacing}
+ % delayed:
+ \enforced\let\localheadsetup \strc_rendering_initialize_spacing % historic name, kept around because some styles use it
+ \enforced\let\headsetupspacing\strc_rendering_initialize_spacing} % official name
\def\strc_rendering_initialize_interaction
{\resetinteractionparameter\c!style
diff --git a/tex/context/base/mkxl/strc-sec.mkxl b/tex/context/base/mkxl/strc-sec.mkxl
index 50a81610e..1175aed45 100644
--- a/tex/context/base/mkxl/strc-sec.mkxl
+++ b/tex/context/base/mkxl/strc-sec.mkxl
@@ -55,7 +55,8 @@
\def\m_strc_references_prefix_yes{+}
\def\m_strc_references_prefix_nop{-}
-\let\currentstructurereferenceprefix\empty
+\mutable\let\currentstructurereferenceprefix\empty
+\mutable\let\currentstructurereferencetext \empty
\installglobalmacrostack\currentstructurereferenceprefix
@@ -526,8 +527,8 @@
% structure sections (the parents of chapter etc)
-\permanent\let\firstsectionname\empty
-\permanent\let\lastsectionname \empty
+\aliased\let\firstsectionname\empty
+\aliased\let\lastsectionname \empty
%aliased\let\resetallstructuremarks \relax
%aliased\let\resetcurrentstructuremarks \relax
@@ -588,7 +589,7 @@
\ifnum\maxstructuredepth>\plusone
\normalexpanded{\relatemarking[#1][\lastsectionname]}% so, the parent will reset the child
\fi
- \enforced\xdef\lastsectionname{#1}%
+ \enforced\permanent\xdef\lastsectionname{#1}%
\ifempty\firstsectionname
\enforced\glet\firstsectionname\lastsectionname
\fi
@@ -765,11 +766,11 @@
\newmode\v!sectionnumber
-\def\dosetstructureheadnumbercontent
+\def\strc_sectioning_set_head_number_content % was: \dosetstructureheadnumbercontent
{\setsystemmode\v!sectionnumber
\settrue\headshownumber} % why ?
-\def\doresetstructureheadnumbercontent
+\def\strc_sectioning_reset_head_number_content % was: \doresetstructureheadnumbercontent
{\resetsystemmode\v!sectionnumber
\setfalse\headshownumber} % why ?
@@ -802,7 +803,7 @@
\enforced\glet\currentstructuresynchronize\donothing
\to \everyheadsynchronization
-\protected\def\theheadsynchonization
+\permanent\protected\def\theheadsynchronization % public
{% no, interferes: \signalcharacter
\the\everyheadsynchronization}
@@ -932,7 +933,7 @@
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
\dostarttagged\t!sectioncaption\empty
- \let\getheadsyncs\theheadsynchonization
+ \let\getheadsyncs\theheadsynchronization
\let\getheadtitle\fullheadtitle
\ifconditional\headshownumber
\let\getheadnumber\fullheadnumber
@@ -946,7 +947,7 @@
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
\dostarttagged\t!sectioncaption\empty
- \let\getheadsyncs\theheadsynchonization
+ \let\getheadsyncs\theheadsynchronization
\ifconditional\c_strc_sectioning_section
\strc_rendering_place_head_section
\else
@@ -958,7 +959,7 @@
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
\dostarttagged\t!sectioncaption\empty
- \let\getheadsyncs\theheadsynchonization
+ \let\getheadsyncs\theheadsynchronization
\strc_rendering_place_head_empty % just flush 'm
\dostoptagged
\strc_sectioning_after_nop
@@ -969,7 +970,7 @@
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
\dostarttagged\t!sectioncaption\empty
- \let\getheadsyncs\theheadsynchonization
+ \let\getheadsyncs\theheadsynchronization
\let\getheadtitle\fullheadtitle
\strc_rendering_place_head_text
\dostoptagged
@@ -977,7 +978,7 @@
\orelse\ifconditional\c_strc_sectioning_hidden
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
- \let\getheadsyncs\theheadsynchonization
+ \let\getheadsyncs\theheadsynchronization
\dostarttagged\t!sectioncaption\empty
\ifconditional\c_strc_sectioning_section
\strc_rendering_place_head_section
@@ -991,7 +992,7 @@
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
\dostarttagged\t!sectioncaption\empty
- \let\getheadsyncs\theheadsynchonization
+ \let\getheadsyncs\theheadsynchronization
\strc_rendering_place_head_empty % just flush 'm
\dostoptagged
\strc_sectioning_after_nop
@@ -1056,7 +1057,7 @@
{\global\setbox\b_sectioning_delayed\hpack\bgroup
\setmarking[\currentheadcoupling]{li::\currentstructurelistnumber}%
\hpack\headreferenceattributes{}% also does the mark
- \theheadsynchonization
+ \theheadsynchronization
\egroup}
\protected\def\strc_rendering_place_head_hidden % maybe trialtypesetting check
@@ -1066,7 +1067,7 @@
{\noexpand\letgvalue{\??hiddenheadsync\currenthead}\relax
\noexpand\setmarking[\currentheadcoupling]{li::\currentstructurelistnumber}%
\hpack\headreferenceattributes{}% otherwise no destination ... maybe tag ref as hidden and fall back on page reference
- \theheadsynchonization}} % and it's a node anyway
+ \theheadsynchronization}} % and it's a node anyway
\permanent\def\synchronizehead #1{\begincsname\??hiddenheadsync#1\endcsname}
\permanent\def\theheadreferenceattributes#1{\begincsname\??hiddenheadattr#1\endcsname}
diff --git a/tex/context/base/mkxl/strc-syn.mkxl b/tex/context/base/mkxl/strc-syn.mkxl
index d6d1fab9b..bcf5895c2 100644
--- a/tex/context/base/mkxl/strc-syn.mkxl
+++ b/tex/context/base/mkxl/strc-syn.mkxl
@@ -130,7 +130,7 @@
\installcommandhandler \??simplelist {simplelist} \??simplelist
-\let\setupsimplelists\setupsimplelist
+\aliased\let\setupsimplelists\setupsimplelist
\setupsimplelists[%
%c!title=,
@@ -447,12 +447,14 @@
\edef\currentsimplelist{#1}%
\doifelsecommandhandler\??simplelist\currentsimplelist
{\normalexpanded{\startnamedsection[\v!chapter][\c!title={\headtext{\simplelistparameter\s!multi}},\c!reference=#1]}%
- \strc_synonyms_place_list[#1][#2]%
+ \placelistofsynonyms[#1][#2]%
\page
\stopnamedsection}%
{}% todo: message that invalid
\endgroup}
+\mutable\let\currentsimplelistentry\empty
+
\protected\def\strc_synonym_normal#1#2#3#4%
{\begingroup
\def\currentsimplelistentry{#3}%
diff --git a/tex/context/base/mkxl/supp-box.mkxl b/tex/context/base/mkxl/supp-box.mkxl
index 8bfb6a451..b8d6e86e4 100644
--- a/tex/context/base/mkxl/supp-box.mkxl
+++ b/tex/context/base/mkxl/supp-box.mkxl
@@ -680,6 +680,8 @@
\permanent\protected\def\tlap{\begingroup\dowithnextboxcs\syst_boxes_do_tlap\vbox}
\permanent\protected\def\blap{\begingroup\dowithnextboxcs\syst_boxes_do_blap\vbox}
+%D in \LMTX\ this mechanism is obsolete! Use boxlines instead!
+
%D \macros
%D {beginofshapebox,
%D reshapebox, doreshapebox,
@@ -823,7 +825,7 @@
{\kern \shapekern }%
{\vskip \shapeskip }}
-\def\doreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip
+\permanent\protected\def\doreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip
{\global\reshapingfailedfalse
\ifzeropt\ht\oldshapebox
\setbox\newshapebox\emptyvbox
@@ -836,8 +838,6 @@
\setbox\newshapebox\box\tmpshapebox
\fi}
-\ifdefined\originalshapebox \else \let\originalshapebox\oldshapebox \fi
-
% We will turn this into a \MKIV\ variant (we can use \type {\vpack} too).
\permanent\protected\def\insertshapesignal
@@ -969,12 +969,14 @@
%D use \type {\shapedhbox} instead of \type {\hbox}, since it manages the height and
%D depth of the line.
-\permanent\protected\def\shapedhbox % lines with non strutted dimensions have
- {\expanded{\dowithnextbox % interlineskip so if we want the original
- {\ht\nextbox\the\ht\shapebox % spacing, we need to preserve the original
- \dp\nextbox\the\dp\shapebox % height and depth which is definitely
- \box\nextbox}} % needed if we apply struts to the 'new'
- \hbox} % box or do something that changed ist size
+\permanent\protected\def\shapedhbox % lines with non strutted dimensions have
+ {\expanded{\dowithnextbox % interlineskip so if we want the original
+ {\ht\nextbox\the\ht\shapebox % spacing, we need to preserve the original
+ \dp\nextbox\the\dp\shapebox % height and depth which is definitely
+ \box\nextbox}} % needed if we apply struts to the 'new'
+ \hbox} % box or do something that changed ist size
+
+%D Till here obsolete.
%D \macros
%D {hyphenatedword,
@@ -1049,15 +1051,14 @@
\permanent\protected\def\processtokens#1#2#3#4#5%
{\begingroup
- \def\lastcharacter{\lastcharacter}% hm, recursive ?
\enforced\permanent\def\space{ }%
\enforced\let\\\space
\enforced\def\before {#1}%
\enforced\def\between{#2}%
\enforced\def\after {#3}%
\enforced\def\white {#4}%
- \enforced\let\savedbefore\before
- \syst_boxes_processtokens#5\lastcharacter
+ \enforced\let\m_syst_boxes_before\before
+ \syst_boxes_processtokens#5\s!e_o_t_token
\endgroup}
\def\syst_boxes_processtokens% the space after = is essential
@@ -1071,14 +1072,14 @@
\hbox\bgroup}
\def\syst_boxes_do_processtokens
- {\ifx\nextprocessedtoken\lastcharacter
+ {\ifx\nextprocessedtoken\s!e_o_t_token
\after
\orelse\ifx\nextprocessedtoken\bgroup
\expandafter\syst_boxes_redo_processedtoken
\else
\expandafter\if\space\nextprocessedtoken
\after\white
- \enforced\let\before\savedbefore
+ \enforced\let\before\m_syst_boxes_before
\else
\before\nextprocessedtoken
\enforced\let\before\between
@@ -1140,12 +1141,16 @@
%D See \MKIV\ file for the older implementation.
+\let\m_syst_boxes_left \empty
+\let\m_syst_boxes_right\empty
+
\permanent\protected\def\limitatetext#1#2#3%
- {\splitatcomma{#2}\leftlimit\rightlimit
+ {% we could also split in \LUA
+ \splitatcomma{#2}\m_syst_boxes_left\m_syst_boxes_right
\limitated
- left \leftlimit
- \ifempty\rightlimit\else
- right \rightlimit
+ left \m_syst_boxes_left
+ \ifempty\m_syst_boxes_right\else
+ right \m_syst_boxes_right
\fi
strip true
sentinel {#3}
@@ -1254,7 +1259,7 @@
\permanent\protected\def\processwords#1%
{\processisolatedwords{#1}\processword}
-\let\processword\relax
+\mutable\let\processword\relax
\permanent\protected\def\applytosplitstringchar#1#2%
{\dontleavehmode\clf_processsplit
@@ -1515,10 +1520,16 @@
\newif\ifstretchrigidcolumns
\newif\iftightrigidcolumns % if true: just a vbox, no depth/noflines/gridsnap corrrections
+\mutable\let\rigidcolumnlines\!!zerocount
+
+\newbox \rigidcolumnbox
+\newdimen\rigidhsize
+\newcount\rigidcolumns
+
\permanent\protected\def\setrigidcolumnhsize#1#2#3% todo: \dimexpr
- {\xdef\savedrigidhsize{\the\hsize}%
+ {\global\rigidhsize\hsize
+ \global\rigidcolumns#3\relax
\hsize#1\relax
- \global\chardef\rigidcolumns#3\relax
\scratchdimen -#2\relax
\multiply\scratchdimen #3\relax
\advance\scratchdimen #2\relax
@@ -1528,13 +1539,9 @@
% ==
%
% \def\setrigidcolumnhsize#1#2#3%
-% {\xdef\savedrigidhsize{\the\hsize}%
-% \global\chardef\rigidcolumns#3\relax
-% \hsize=\dimexpr(#1-\numexpr#3-1\relax\dimexpr#2\relax)/#3\relax}
-
-\newbox\rigidcolumnbox
-
-\mutable\let\rigidcolumnlines\!!zerocount
+% {\global\rigidhsize\hsize
+% \rigidcolumns#3\relax
+% \hsize\dimexpr(#1-\numexpr#3-1\relax\dimexpr#2\relax)/#3\relax}
\permanent\protected\def\rigidcolumnbalance#1%
{\ifnum\rigidcolumns=1 % tzt ook h/d correctie
@@ -1573,7 +1580,7 @@
\setbox0=\box\rigidcolumnbox
\doloop
{\setbox\rigidcolumnbox=\copy0
- \setbox\scratchbox\hpack to \savedrigidhsize
+ \setbox\scratchbox\hpack to \rigidhsize
{\dorecurse\rigidcolumns
{\setbox\scratchbox\vsplit\rigidcolumnbox to \scratchdimen
\dp\scratchbox\openstrutdepth
@@ -2704,29 +2711,29 @@
\permanent\protected\def\startvboxregister#1{\setbox#1\vbox\bgroup} \aliased\let\stopvboxregister\egroup
\permanent\protected\def\startvtopregister#1{\setbox#1\vtop\bgroup} \aliased\let\stopvtopregister\egroup
-%D For whatever third party package needs it:
-%D
-%D \starttyping
-%D \newlocalbox\BoxOne
-%D \newlocalbox\BoxTwo
-%D
-%D \setbox\BoxOne\hbox{Box One}
-%D \setbox\BoxTwo\hbox{Box Two}
-%D
-%D [\box\BoxTwo] [\box\BoxOne]
-%D \stoptyping
-
-\installcorenamespace{localbox}
-
-\permanent\protected\def\newlocalbox#1%
- {\expandafter\let\expandafter#1\csname\??localbox\string#1\endcsname
- \ifrelax#1%
- \syst_aux_new_localbox#1%
- \fi}
-
-\def\syst_aux_new_localbox#1%
- {\expandafter\newbox\csname\??localbox\string#1\endcsname
- \newlocalbox#1}
+% %D For whatever third party package needs it:
+% %D
+% %D \starttyping
+% %D \newlocalbox\BoxOne
+% %D \newlocalbox\BoxTwo
+% %D
+% %D \setbox\BoxOne\hbox{Box One}
+% %D \setbox\BoxTwo\hbox{Box Two}
+% %D
+% %D [\box\BoxTwo] [\box\BoxOne]
+% %D \stoptyping
+%
+% \installcorenamespace{localbox}
+%
+% \permanent\protected\def\newlocalbox#1%
+% {\expandafter\let\expandafter#1\csname\??localbox\string#1\endcsname
+% \ifrelax#1%
+% \syst_aux_new_localbox#1%
+% \fi}
+%
+% \def\syst_aux_new_localbox#1%
+% {\expandafter\newbox\csname\??localbox\string#1\endcsname
+% \newlocalbox#1}
%D Who knows when this comes in handy:
diff --git a/tex/context/base/mkxl/supp-mat.mkxl b/tex/context/base/mkxl/supp-mat.mkxl
index 99f184f76..5822e959d 100644
--- a/tex/context/base/mkxl/supp-mat.mkxl
+++ b/tex/context/base/mkxl/supp-mat.mkxl
@@ -60,8 +60,6 @@
\aliased\let\Ucheckedstopdisplaymath\relax
-\def\normalmathaligntab{&} % \let\normalmathaligntab\aligntab does to work well in a let to & (a def works ok)
-
% \let\normalsuper\Usuperscript % obsolete
% \let\normalsuber\Usubscript % obsolete
diff --git a/tex/context/base/mkxl/supp-ran.mkxl b/tex/context/base/mkxl/supp-ran.mkxl
index e70c3d437..4762153f7 100644
--- a/tex/context/base/mkxl/supp-ran.mkxl
+++ b/tex/context/base/mkxl/supp-ran.mkxl
@@ -36,6 +36,7 @@
\permanent\protected\def\getrandomfloat #1#2#3{\edef#1{\clf_getrandomfloat\dimexpr#2\relax\dimexpr#3\relax}}
\permanent\protected\def\setrandomseed #1{\clf_setrandomseed\numexpr#1\relax}
\permanent\protected\def\getrandomseed #1{\edef#1{\clf_getrandomseed}}
+\permanent\protected\def\newrandomseed {\clf_getrandomseed}
%permanent\protected\def\pushrandomseed {\clf_pushrandomseed}
%permanent\protected\def\poprandomseed {\clf_poprandomseed}
%permanent\protected\def\reuserandomseed {\clf_reuserandomseed} % within push/pop
diff --git a/tex/context/base/mkxl/syst-aux.mkxl b/tex/context/base/mkxl/syst-aux.mkxl
index c70ff0170..d2e5ce581 100644
--- a/tex/context/base/mkxl/syst-aux.mkxl
+++ b/tex/context/base/mkxl/syst-aux.mkxl
@@ -122,8 +122,6 @@
\setnewconstant \downrotationangle 180
\setnewconstant \leftrotationangle 270
-\ifdefined\data \else \let\data \relax \fi % dep checker
-
%D \macros
%D {s!,c!,e!,p!,v!,@@,??}
%D
@@ -1322,7 +1320,10 @@
\aliased\let\rawprocesscommalist \processcommalist % can go
\aliased\let\rawprocesscommacommand\processcommacommand % can go
-%D Here is one without nesting .. still needed?
+%D Here is one without nesting .. still needed? Only used for modes (no nesting
+%D there).
+
+\mutable\let\fastcommalistcommand\relax
\protected\def\syst_helpers_process_fast_comma_item#1,%
{\ifarguments
@@ -2901,19 +2902,19 @@
\protected\expandafter\def
\fi#1}
-\permanent\protected\def\redefine#1%
+\protected\def\redefine#1%
{\ifdefined#1%
\message{[\noexpand#1is redefined]}%
\fi
\protected\def#1}
-\permanent\protected\def\definemacro#1%
- {\ifdefined#1%
- \message{[\noexpand#1is already defined]}%
- \protected\expandafter\def\expandafter\gobbleddefinition
- \else
- \protected\expandafter\def
- \fi#1}
+% \permanent\protected\def\definemacro#1%
+% {\ifdefined#1%
+% \message{[\noexpand#1is already defined]}%
+% \protected\expandafter\def\expandafter\gobbleddefinition
+% \else
+% \protected\expandafter\def
+% \fi#1}
% \define\hans{hans}
% \redefine\hans{hans}
@@ -6060,23 +6061,21 @@
\newdimen \roundingeps \roundingeps=10sp
\newconstant\compresult
-\permanent\def\comparedimension#1#2%
+\permanent\protected\def\comparedimension#1#2%
{\compresult
- \ifdim#1<#2%
+ \ifcmpdim#1#2 % space wil be skipped
\zerocount
- \orelse\ifdim#1<#2%
+ \or
\plusone
\else
\plustwo
\fi}
-\permanent\def\comparedimensioneps#1#2% todo: use eps feature
+\permanent\protected\def\comparedimensioneps#1#2% todo: use eps feature
{\compresult
- \ifdim\dimexpr#1-#2\relax<\roudingeps
+ \ifabsdim\dimexpr#1-#2\relax<\roundingeps
\zerocount
- \orelse\ifdim\dimexpr#2-#1\relax<\roudingeps
- \zerocount
- \orelse\ifdim#1<#2%
+ \orelse\ifdim#1<#2 % space wil be skipped
\plusone
\else
\plustwo
@@ -6301,10 +6300,10 @@
\permanent\def\negated#1{\if-#1\else-#1\fi} % does only work in macros or text
-\def\gobbleassigndimen#1\\{}
-
-\permanent\def\assigndimen#1#2%
- {\afterassignment\gobbleassigndimen#1=#2\zeropoint\\}
+% \def\gobbleassigndimen#1\\{}
+%
+% \permanent\def\assigndimen#1#2%
+% {\afterassignment\gobbleassigndimen#1=#2\zeropoint\\}
%D Maybe ... toksapp should deal with this ...
diff --git a/tex/context/base/mkxl/syst-ini.mkxl b/tex/context/base/mkxl/syst-ini.mkxl
index b630cfeda..ec55c49d1 100644
--- a/tex/context/base/mkxl/syst-ini.mkxl
+++ b/tex/context/base/mkxl/syst-ini.mkxl
@@ -250,13 +250,6 @@
\immutable\integerdef\statuswrite \minusone
-% A few traditional allocations (these might go):
-
-\countdef \count@ 255 % hm, used in \newif .. todo: replace it there
-\dimendef \dimen@ 0
-\dimendef \dimen@i 1 % global only
-\dimendef \dimen@ii 2
-
%D So, effectively we start allocating from 256 and upwards. The inserts sit in the
%D range 128 upto 254. Page numbers use the counters 0 upto 9 and the pagebox is
%D 255. Users can use the scratch registers upto 31 without problem but all others
@@ -398,9 +391,12 @@
\mutable\let\scratchmacrotwo\relax
%D \macros
-%D {tempstring}
+%D {tempstring, scratchstring*}
+
+\mutable\let\tempstring \empty
-\mutable\let\tempstring\empty
+\mutable\let\scratchstringone\empty
+\mutable\let\scratchstringtwo\empty
%D \macros
%D {scratchwidth, scratchheight, scratchdepth, scratchoffset, scratchdistance}
@@ -1137,4 +1133,38 @@
\listcallbackmode\plusone
+%D Often used as cs key:
+
+\mutable\let\on \empty
+\mutable\let\of \empty
+\mutable\let\and \empty
+\mutable\let\with\empty
+\mutable\let\nop \empty % used often
+\mutable\let\yes \empty % used often
+
+%D Another experiment:
+
+\def\syst_suggested_alias#1#2% expandable
+ {\beginlocalcontrol
+ \writestatus{suggestion}{use \string#2 instead of \string#1}%
+ \enforced\glet#1#2%
+ \endlocalcontrol
+ #2}
+
+\permanent\protected\def\suggestedalias#1#2%
+ {\ifflags#2\permanent\permanent\fi % the rest is taken with the copy
+ \def#1{\syst_suggested_alias#1#2}}
+
+% A few traditional allocations (these might go):
+
+% \countdef \count@ 255 % hm, used in \newif .. todo: replace it there
+% \dimendef \dimen@ 0
+% \dimendef \dimen@i 1 % global only
+% \dimendef \dimen@ii 2
+
+\suggestedalias \count@ \scratchcounter
+\suggestedalias \dimen@ \scratchdimen
+\suggestedalias \dimen@i \scratchdimenone
+\suggestedalias \dimen@ii \scratchdimentwo
+
\protect \endinput
diff --git a/tex/context/base/mkxl/tabl-com.mkxl b/tex/context/base/mkxl/tabl-com.mkxl
index 791db656b..bdae8711b 100644
--- a/tex/context/base/mkxl/tabl-com.mkxl
+++ b/tex/context/base/mkxl/tabl-com.mkxl
@@ -80,6 +80,10 @@
\permanent\let\VT\relax
\permanent\let\XC\relax
+\permanent\let\FC\relax
+\permanent\let\RB\relax
+\permanent\let\RT\relax
+
\popoverloadmode
\installmacrostack\BC
diff --git a/tex/context/base/mkxl/tabl-frm.mkxl b/tex/context/base/mkxl/tabl-frm.mkxl
index 9bbc510c5..ec530e7a4 100644
--- a/tex/context/base/mkxl/tabl-frm.mkxl
+++ b/tex/context/base/mkxl/tabl-frm.mkxl
@@ -102,6 +102,8 @@
\setupframed[\??framedtablecolumn#1:#2][#3]%
\fi}
+\mutable\let\currentframedtable\empty
+
\permanent\tolerant\protected\def\startframedtable[#1]#*[#2]%
{\begingroup
\forgetall
diff --git a/tex/context/base/mkxl/tabl-mis.mkxl b/tex/context/base/mkxl/tabl-mis.mkxl
index 14bd08b46..8f83a65a7 100644
--- a/tex/context/base/mkxl/tabl-mis.mkxl
+++ b/tex/context/base/mkxl/tabl-mis.mkxl
@@ -31,7 +31,7 @@
%D
%D (This rather old but updated code used to be in \type {core-mis.mkiv}.)
-\let\kindoftabposition\!!zerocount
+\mutable\let\kindoftabposition\!!zerocount
\permanent\tolerant\protected\def\somekindoftab[#1]%
{\bgroup
diff --git a/tex/context/base/mkxl/tabl-ntb.mkxl b/tex/context/base/mkxl/tabl-ntb.mkxl
index f5e84f13f..57538e460 100644
--- a/tex/context/base/mkxl/tabl-ntb.mkxl
+++ b/tex/context/base/mkxl/tabl-ntb.mkxl
@@ -1534,6 +1534,8 @@
\scratchdimen\wd\scratchbox\relax
\fi}
+\newdimen\d_tabl_ntb_saved_hsize
+
\def\tabl_ntb_table_stop
{\forgetall % new, here see narrower-004.tex
%\setbox\scratchbox\hbox
@@ -1593,12 +1595,12 @@
% added jun 2014 because someone had less columns than nx .. sigh / see *nx*
\writestatus\m!TABLE{missing\space\number\numexpr\c_tabl_ntb_maximum_col-\c_tabl_ntb_encountered_max\relax\space column(s), guessing widths}%
\fi
- \edef\savedhsize{\the\hsize}%
+ \d_tabl_ntb_saved_hsize\hsize
% \hsize\wd\scratchbox\relax % new per 17/04/2006
\hsize\scratchdimen\relax % new per 17/04/2006
\tabl_ntb_check_widths_one % trial run
\tabl_ntb_check_widths_two % real run
- \hsize\savedhsize
+ \hsize\d_tabl_ntb_saved_hsize
\let\tabl_ntb_cell_process\tabl_ntb_cell_process_c
\setbox\scratchbox\vbox{\settrialtypesetting \tabl_ntb_flush_content}%
\fi
diff --git a/tex/context/base/mkxl/tabl-tab.mkxl b/tex/context/base/mkxl/tabl-tab.mkxl
index 8aeb1644b..045560b2c 100644
--- a/tex/context/base/mkxl/tabl-tab.mkxl
+++ b/tex/context/base/mkxl/tabl-tab.mkxl
@@ -1496,9 +1496,11 @@
\global\setfalse\hassometabletail
\expanded{\doifelseinstring{|}{#1}}
{\xdef\tabl_table_restart{\noexpand\tabl_table_restart_indeed{\noexpand\tabl_table_third_stage{#1}}}}
- {\doifelsedefined{\??tabletemplate#1}
- {\gdef\tabl_table_restart{\getvalue{\??tabletemplate#1}}}
- {\gdef\tabl_table_restart{\tabl_table_restart_indeed{\getvalue{#1}}}}}%
+ {\ifcsname\??tabletemplate#1\endcsname
+ \gdef\tabl_table_restart{\csname\??tabletemplate#1\endcsname}%
+ \else
+ \gdef\tabl_table_restart{\tabl_table_restart_indeed{\begincsname#1\endcsname}}%
+ \fi}%
\egroup
\tabl_table_restart}
@@ -1515,6 +1517,8 @@
\newtoks\localtabledefinitions
+\mutable\let\currenttableformat\empty
+
\def\tabl_table_third_stage#1%
{\global\settrue\tableactionstatepermitted
\tabl_table_set_action\tableunknownstate
@@ -1526,7 +1530,7 @@
\forgetall % added
\edef\currenttableformat{#1}%
\doifsomething\currenttableformat
- {\dogettablenofcolumns\currenttableformat
+ {\tabl_tables_get_nofcolumns\currenttableformat
% more modern is to use catcode tables
\expandafter\tabl_table_begin_format\currenttableformat\doendtableformat}}
@@ -1657,11 +1661,11 @@
\def\tabl_table_set_head[#1][#2]#3\end
{\gdef\tabl_table_head{\begincsname\??tablehead#1\endcsname}% new
- \setvalue{\??tablehead#1}{\noalign{\global\settrue\hassometablehead}#3}}
+ \defcsname\??tablehead#1\endcsname{\noalign{\global\settrue\hassometablehead}#3}}
\def\tabl_table_set_tail[#1][#2]#3\end
{\gdef\tabl_table_tail{\begincsname\??tabletail#1\endcsname}% new
- \setvalue{\??tabletail#1}{\noalign{\global\settrue\hassometabletail}#3}}
+ \defcsname\??tabletail#1\endcsname{\noalign{\global\settrue\hassometabletail}#3}}
\normalexpanded {
\aliased\letcsname\e!stop\v!tablehead\endcsname\relax
@@ -1862,7 +1866,7 @@
\bgroup \catcode\barasciicode\othercatcode
-\gdef\dogettablenofcolumns#1% todo: also divert this to lua as with tabulate
+\gdef\tabl_tables_get_nofcolumns#1% todo: also divert this to lua as with tabulate
{\bgroup
\cleanupfeatures % needed !
\tabl_table_use_bar
@@ -2116,6 +2120,7 @@
\permanent\def\tabl_table_FIVE {\use\plusfive}
\permanent\def\tabl_table_SIX {\use\plussix}
+\aliased\let\LOW \relax
\aliased\let\TWO \relax
\aliased\let\THREE\relax
\aliased\let\FOUR \relax
@@ -2140,19 +2145,19 @@
\installsetuponlycommandhandler \??tables {tables} % some day we can have named tables
-\setvalue{\??tabledistance\v!none }{\tabl_table_OpenUp00\def\LOW{\Lower6 }}
-\setvalue{\??tabledistance\v!small }{\tabl_table_OpenUp00\def\LOW{\Lower6 }} % == baseline
-\setvalue{\??tabledistance\v!medium}{\tabl_table_OpenUp11\def\LOW{\Lower7 }}
-\setvalue{\??tabledistance\v!big }{\tabl_table_OpenUp22\def\LOW{\Lower8 }}
+\defcsname\??tabledistance\v!none \endcsname{\tabl_table_OpenUp00\enforced\def\LOW{\Lower6 }}
+\defcsname\??tabledistance\v!small \endcsname{\tabl_table_OpenUp00\enforced\def\LOW{\Lower6 }} % == baseline
+\defcsname\??tabledistance\v!medium\endcsname{\tabl_table_OpenUp11\enforced\def\LOW{\Lower7 }}
+\defcsname\??tabledistance\v!big \endcsname{\tabl_table_OpenUp22\enforced\def\LOW{\Lower8 }}
\appendtoks
\expandnamespaceparameter\??tabledistance\directtablesparameter\c!distance\v!medium
\to \localtabledefinitions
-\setvalue{\??tablealign\v!right }{\def\tabl_table_paralignment{\raggedright}}
-\setvalue{\??tablealign\v!left }{\def\tabl_table_paralignment{\raggedleft}}
-\setvalue{\??tablealign\v!middle }{\def\tabl_table_paralignment{\raggedcenter}}
-\setvalue{\??tablealign\s!unknown}{\def\tabl_table_paralignment{\notragged}}
+\defcsname\??tablealign\v!right \endcsname{\def\tabl_table_paralignment{\raggedright}}
+\defcsname\??tablealign\v!left \endcsname{\def\tabl_table_paralignment{\raggedleft}}
+\defcsname\??tablealign\v!middle \endcsname{\def\tabl_table_paralignment{\raggedcenter}}
+\defcsname\??tablealign\s!unknown\endcsname{\def\tabl_table_paralignment{\notragged}}
\appendtoks
\doifelse{\directtablesparameter\c!distance}\v!none
diff --git a/tex/context/base/mkxl/tabl-tbl.mkxl b/tex/context/base/mkxl/tabl-tbl.mkxl
index 1195c3473..9eede7720 100644
--- a/tex/context/base/mkxl/tabl-tbl.mkxl
+++ b/tex/context/base/mkxl/tabl-tbl.mkxl
@@ -796,8 +796,7 @@
\global\setfalse\c_tabl_auto_align_mode
\global\advance\c_tabl_tabulate_columns\plusone
\letcsname\??tabulatesetup\the\c_tabl_tabulate_columns\endcsname\donothing % here ?
- \edef\currenttabulationtrulespec{#1}%
- \ifempty\currenttabulationtrulespec
+ \iftok{#1}\emptytoks
\global\d_tabl_tabulate_vrulethickness\zeropoint
\else
\global\d_tabl_tabulate_vrulethickness\d_tabl_tabulate_vrulethickness_default
@@ -818,8 +817,7 @@
\permanent\protected\def\tabl_tabulate_set_last_entry#1% rulespec
{\glet\m_tabl_tabulate_color\empty
\glet\m_tabl_tabulate_vrule_color\empty
- \edef\currenttabulationtrulespec{#1}%
- \ifempty\currenttabulationtrulespec
+ \iftok{#1}\emptytoks
\global\d_tabl_tabulate_vrulethickness\zeropoint
\else
\global\d_tabl_tabulate_vrulethickness\d_tabl_tabulate_vrulethickness_default
@@ -1580,13 +1578,15 @@
\directvskip\s_tabl_tabulate_separator
\egroup}
+\let\m_tabl_tabulate_hrule_color\empty
+
\def\tabl_tabulate_hrule_preset_step#1%
{\doifelsenumber{#1}%
{\global\d_tabl_tabulate_hrulethickness_local#1\d_tabl_tabulate_hrulethickness_default}
- {\xdef\currenttabulationlocalhrulecolor{#1}}}
+ {\xdef\m_tabl_tabulate_hrule_color{#1}}}
\def\tabl_tabulate_hrule_preset[#1]%
- {\glet\currenttabulationlocalhrulecolor\m_tabl_tabulate_hrule_color_default
+ {\glet\m_tabl_tabulate_hrule_color\m_tabl_tabulate_hrule_color_default
\global\d_tabl_tabulate_hrulethickness_local\d_tabl_tabulate_hrulethickness_default
\iftok{#1}\emptytoks\else\rawprocesscommalist[#1]\tabl_tabulate_hrule_preset_step\fi}
@@ -1598,7 +1598,7 @@
\relax}
\def\tabl_tabulate_hrule_inject_colored
- {\dousecolorparameter\currenttabulationlocalhrulecolor
+ {\dousecolorparameter\m_tabl_tabulate_hrule_color
\tabl_tabulate_hrule_inject_normal}
\protected\def\tabl_tabulate_hrule_inject_first
@@ -1608,7 +1608,7 @@
\protected\def\tabl_tabulate_hrule_inject_second
{\ifcase\d_tabl_tabulate_hrulethickness_local\else
- \ifempty\currenttabulationlocalhrulecolor
+ \ifempty\m_tabl_tabulate_hrule_color
\tabl_tabulate_hrule_inject_normal
\else
\tabl_tabulate_hrule_inject_colored
@@ -2524,6 +2524,9 @@
%D Predefined categories (moved from core-mis):
+\mutable\let\leg \relax % column separators
+\mutable\let\fact\relax % column separators
+
\definetabulate
[\v!legend]
[|emj1|i1|mR|]
diff --git a/tex/context/base/mkxl/tabl-tsp.mkxl b/tex/context/base/mkxl/tabl-tsp.mkxl
index 83ad0350a..5f01e7eb4 100644
--- a/tex/context/base/mkxl/tabl-tsp.mkxl
+++ b/tex/context/base/mkxl/tabl-tsp.mkxl
@@ -76,6 +76,7 @@
\mutable\let \extrasplitfloatlines \!!zerocount
\mutable\let \splitfloatfinalizer \relax
+\mutable\let \splitfloatcommand \empty
\mutable\let \floatcaptionsuffix \empty
@@ -397,6 +398,8 @@
\aliased\let\resetdirecttsplit\resettsplit
+\mutable\let\tsplitdirectsplitter\relax
+
\permanent\protected\def\handledirecttsplit
{\page_split_float_check_caption{\tsplitdirectwidth}%
\global\setfalse\splitfloatfirstdone
diff --git a/tex/context/base/mkxl/type-ini.mklx b/tex/context/base/mkxl/type-ini.mklx
index 167ea3d33..39b3224a5 100644
--- a/tex/context/base/mkxl/type-ini.mklx
+++ b/tex/context/base/mkxl/type-ini.mklx
@@ -491,7 +491,7 @@
\gdefcsname\??typescriptdefaultstyles#name\endcsname{#style}%
\fi
\ifcsname#name\endcsname \else
- \protected\gdefcsname#name\endcsname{\switchtotypeface[#name][#style]}%
+ \protected\frozen\instance\gdefcsname#name\endcsname{\switchtotypeface[#name][#style]}%
\fi}}
\def\font_typefaces_defining_start#name#style#settings%
@@ -520,7 +520,7 @@
\pop_macro_fontclassstyle
\pop_macro_fontclass}
-\def\dofastdefinetypeface#name#style#fontshape#fontsize#settings% called from the lua end (via case d)
+\permanent\protected\def\dofastdefinetypeface#name#style#fontshape#fontsize#settings% called from the lua end (via case d)
{\font_typefaces_define_indeed[#name][#style]%
\font_typefaces_defining_start{#name}{#style}{#settings}%
\font_typescripts_use_one[#fontshape][#fontsize][\s!size]%
diff --git a/tex/context/base/mkxl/typo-del.mkxl b/tex/context/base/mkxl/typo-del.mkxl
index 7df5ac0de..8e17ea82b 100644
--- a/tex/context/base/mkxl/typo-del.mkxl
+++ b/tex/context/base/mkxl/typo-del.mkxl
@@ -288,7 +288,8 @@
\newsignal\d_typo_delimited_signal
-\mutable\let\currentdelimitedtext\s!unknown
+\mutable\let\currentdelimitedtext \s!unknown
+\mutable\let\currentparentdelimitedtext\currentdelimitedtext
\installglobalmacrostack\currentdelimitedtext
@@ -315,6 +316,8 @@
%D \stoptabulate
\mutable\let\currentdelimitedlanguage\empty
+\mutable\let\innerdelimitedlanguage \empty
+\mutable\let\outerdelimitedlanguage \empty
\installglobalmacrostack\currentdelimitedlanguage
diff --git a/tex/context/base/mkxl/typo-dir.mkxl b/tex/context/base/mkxl/typo-dir.mkxl
index 78c0b8e44..8439ed342 100644
--- a/tex/context/base/mkxl/typo-dir.mkxl
+++ b/tex/context/base/mkxl/typo-dir.mkxl
@@ -79,7 +79,7 @@
\setdirection[\number\directionsbidimode]%
\fi
\ifx\p_bidi\v!global
- \pickupdirectionsattribute
+ \pickupdirectionsattribute % pagebuilder
\else
\forgetdirectionsattribute
\fi
diff --git a/tex/context/base/mkxl/typo-txt.mklx b/tex/context/base/mkxl/typo-txt.mklx
index bb92c8cd3..270cc94e0 100644
--- a/tex/context/base/mkxl/typo-txt.mklx
+++ b/tex/context/base/mkxl/typo-txt.mklx
@@ -209,32 +209,23 @@
\hsize\dummyparameter\c!width\relax
\emergencystretch10\scratchoffset
\parfillskip\zeropoint
- \baselineskip\zeropoint plus \onepoint minus \onepoint
- \beginofshapebox
\leftskip \scratchoffset
\rightskip\scratchoffset}
\permanent\protected\def\stopnicelyfilledbox
- {\doifelse{\dummyparameter\c!strut}\v!yes
- {\xdef\doflushnicelyfilledbox
- {\ht\shapebox\the\strutht
- \dp\shapebox\the\strutdp
- \box\shapebox}}%
- {\gdef\doflushnicelyfilledbox
- {\box\shapebox}}%
- \endofshapebox
- \doreshapebox
- {\doflushnicelyfilledbox}
- {\penalty\shapepenalty}
- {\kern\shapekern}
- {\vfil}%
- \kern\scratchoffset
- \vfilneg
- \flushshapebox
- \vfilneg
- \kern\scratchoffset
+ {\egroup
+ \vbox to \dummyparameter\c!height \bgroup
+ \doifelse{\dummyparameter\c!strut}\v!yes
+ {\dorecurse{\boxlines\scratchbox}%
+ {\boxlineht\scratchbox\recurselevel\strutht
+ \boxlinedp\scratchbox\recurselevel\strutdp
+ \boxline\scratchbox\recurselevel
+ \vss}}%
+ {\dorecurse{\boxlines\scratchbox}%
+ {\boxline\scratchbox\recurselevel
+ \vss}}%
+ \unskip
\egroup
- \box\scratchbox
\egroup}
\protect \endinput
diff --git a/tex/context/fonts/mkiv/type-imp-stix.mkiv b/tex/context/fonts/mkiv/type-imp-stix.mkiv
index 697037b43..ee11d8389 100644
--- a/tex/context/fonts/mkiv/type-imp-stix.mkiv
+++ b/tex/context/fonts/mkiv/type-imp-stix.mkiv
@@ -14,6 +14,18 @@
%D We provide typescripts for version one and two of the stix fonts. There is a
%D xits variant based on the first (not opentype) release that also provides
%D bidirectional math.
+%D
+%D Users should be aware of the fact that the stix filenames keep changing so if
+%D something fails, make sure you have the files and that the names below match
+%D those on your system. (In \TEX\ distributions there's 2 and Two and math can have
+%D -Regular appended or not.
+%D
+%D There's now also:
+%D
+%D stixtwotext-medium.otf
+%D stixtwotext-mediumitalic.otf
+%D stixtwotext-semibold.otf
+%D stixtwotext-semibolditalic.otf
\definefontfeature
[stixtwomath]
@@ -43,15 +55,15 @@
% version two
\starttypescript [\s!math] [stixtwo] [\s!name]
- \definefontsynonym[MathRoman][\s!file:stix2math.otf] [\s!features={\s!math\mathsizesuffix,stixtwomath,mathextra},\s!goodies=stix-two-math]
+ \definefontsynonym[MathRoman][\s!file:stixtwomath-regular.otf] [\s!features={\s!math\mathsizesuffix,stixtwomath,mathextra},\s!goodies=stix-two-math]
\stoptypescript
\starttypescript [\s!serif] [stixtwo] [\s!name]
\setups[\s!font:\s!fallback:\s!serif]
- \definefontsynonym[\s!Serif] [\s!file:stix2text-regular.otf] [\s!features=\s!default]
- \definefontsynonym[\s!SerifBold] [\s!file:stix2text-bold.otf] [\s!features=\s!default]
- \definefontsynonym[\s!SerifItalic] [\s!file:stix2text-italic.otf] [\s!features=\s!default]
- \definefontsynonym[\s!SerifBoldItalic][\s!file:stix2text-bolditalic.otf][\s!features=\s!default]
+ \definefontsynonym[\s!Serif] [\s!file:stixtwotext-regular.otf] [\s!features=\s!default]
+ \definefontsynonym[\s!SerifBold] [\s!file:stixtwotext-bold.otf] [\s!features=\s!default]
+ \definefontsynonym[\s!SerifItalic] [\s!file:stixtwotext-italic.otf] [\s!features=\s!default]
+ \definefontsynonym[\s!SerifBoldItalic][\s!file:stixtwotext-bolditalic.otf][\s!features=\s!default]
\stoptypescript
\starttypescript[stixtwo]
diff --git a/tex/context/modules/mkiv/s-fonts-coverage.mkiv b/tex/context/modules/mkiv/s-fonts-coverage.mkiv
index 98a5c00a4..2d1870842 100644
--- a/tex/context/modules/mkiv/s-fonts-coverage.mkiv
+++ b/tex/context/modules/mkiv/s-fonts-coverage.mkiv
@@ -100,7 +100,7 @@
% list = {
% "cambria.ttc(Cambria Math)",
% "xits-math.otf",
- % -- "stixmath-regular.otf",
+ % -- "stixtwomath-regular.otf", -- watch out: the name changes
% "latinmodern-math.otf",
% -- "lucidabrightmathot.otf",
% -- "lucidabrightmathot-demi.otf",
diff --git a/tex/context/modules/mkiv/s-fonts-shapes.mkiv b/tex/context/modules/mkiv/s-fonts-shapes.mkiv
index 90b9c1f64..7dd39c07d 100644
--- a/tex/context/modules/mkiv/s-fonts-shapes.mkiv
+++ b/tex/context/modules/mkiv/s-fonts-shapes.mkiv
@@ -106,8 +106,8 @@
% \startTEXpage \ShowGlyphShape{simplenaskhi}{100bp}{0xF0299} \stopTEXpage
% \startTEXpage \ShowGlyphShape{simplenaskhi}{100bp}{NameMe.1190} \stopTEXpage
- \startTEXpage[offset=0pt]\ShowGlyphShape{file:stix2math.otf}{20bp}{0x1D44A}\stopTEXpage
- \startTEXpage[offset=0pt]\ShowGlyphShape{file:stix2math.otf}{20bp}{0x1D44C}\stopTEXpage
+ \startTEXpage[offset=0pt]\ShowGlyphShape{file:stixtwomath-regular.otf}{20bp}{0x1D44A}\stopTEXpage
+ \startTEXpage[offset=0pt]\ShowGlyphShape{file:stixtwomath-regular.otf}{20bp}{0x1D44C}\stopTEXpage
% \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{20bp}{0x00066}\stopTEXpage
% \startTEXpage[offset=0pt]\ShowGlyphShape{name:cambria-math}{20bp}{0x1D453}\stopTEXpage
diff --git a/tex/context/modules/mkiv/s-system-macros.mkxl b/tex/context/modules/mkiv/s-system-macros.mkxl
index 2bee53bc8..c779157fc 100644
--- a/tex/context/modules/mkiv/s-system-macros.mkxl
+++ b/tex/context/modules/mkiv/s-system-macros.mkxl
@@ -26,11 +26,14 @@
%
% todo: and how about metapost ... i need a mp.hashtokens in order to do that and I also
% need to think about protection there (tricky as we use an avl hash there)
+%
+% public undefined : SmallCaps scitebuffer sciteinlinebuffer
+% single todos : \ \- \\ \_
\enablemode[texmacros]
-% \enablemode[metapostmacros]
-\enablemode[notmarked]
-% \enablemode[everything]
+\enablemode[metapostmacros]
+% \enablemode[notmarked]
+\enablemode[everything]
\startmodule[system-macros]
@@ -55,6 +58,7 @@
local ctx_NC = context.NC
local ctx_NR = context.NR
local ctx_bold = context.bold
+ local ctx_verb = context.verbatim
local find = string.find
local gsub = string.gsub
@@ -140,7 +144,7 @@
end
ctx_NC() if marked then context(marked) end
ctx_NC() if primitive then ctx_bold(csname) else
- context(csname) end
+ ctx_verb(csname) end
ctx_NC() if parameters then context(parameters > 0 and parameters or "-") end
ctx_NC() context(cscommand)
ctx_NC() if primitive then context(primitive) end
diff --git a/tex/context/modules/mkxl/s-characters-combinations.lmt b/tex/context/modules/mkxl/s-characters-combinations.lmt
new file mode 100644
index 000000000..be318eb38
--- /dev/null
+++ b/tex/context/modules/mkxl/s-characters-combinations.lmt
@@ -0,0 +1,30 @@
+if not modules then modules = { } end modules ['s-characters-properties'] = {
+ version = 1.001,
+ comment = "companion to s-characters-properties.mkiv",
+ author = "Hans Hagen, PRAGMA-ADE, Hasselt NL",
+ copyright = "PRAGMA ADE / ConTeXt Development Team",
+ license = "see context related readme files"
+}
+
+moduledata.characters = moduledata.characters or { }
+moduledata.characters.combinations = moduledata.characters.combinations or { }
+
+local context = context
+local ctx_NC = context.NC
+local ctx_NR = context.NR
+local ctx_MR = context.MR
+local ctx_ML = context.ML
+
+function moduledata.characters.combinations.showcombinations(settings)
+ context.starttabulate { "|l|T|cTw(1em)|T|" }
+ for k, v in table.sortedhash(characters.verbosemarks) do
+ local m = "with" .. string.gsub(k," ","")
+ ctx_NC() context(k)
+ ctx_NC() context("%U",v)
+ ctx_NC() context("%s",v)
+ ctx_NC() if token.is_defined(m) then context("\\string\\%s",m) end
+ ctx_NC() ctx_NR()
+ end
+ context.stoptabulate()
+end
+
diff --git a/tex/context/modules/mkxl/s-characters-combinations.mkxl b/tex/context/modules/mkxl/s-characters-combinations.mkxl
new file mode 100644
index 000000000..aef466f84
--- /dev/null
+++ b/tex/context/modules/mkxl/s-characters-combinations.mkxl
@@ -0,0 +1,61 @@
+%D \module
+%D [ file=s-characters-combinations,
+%D version=2021.02.08
+%D title=\CONTEXT\ Style File,
+%D subtitle=Character combinations,
+%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.
+
+\startmodule[characters-combinations]
+
+\registerctxluafile{s-characters-combinations}{autosuffix}
+
+\installmodulecommandluasingle \showcharactercombinations {moduledata.characters.combinations.showcombinations}
+
+\stopmodule
+
+\continueifinputfile{s-characters-combinations.mkxl}
+
+\usemodule[art-01]
+
+\setupbodyfont[dejavu]
+
+\starttext
+
+ \showcharactercombinations
+
+ \page
+
+ \startlines
+ \chr {a acute } á \withacute a
+ \chr {o double acute } ő \withdoubleacute o
+ \chr {a grave } à \withgrave a
+ \chr {o double grave } ȍ \withdoublegrave o
+ \chr {a circumflex } â \withcircumflex a
+ \chr {e circumflex below} ḙ \withcircumflexbelow e
+ \chr {a diaeresis } ä \withdiaeresis a
+ \chr {a tilde } ã \withtilde a
+ \chr {i tilde below } ḭ \withtildebelow i
+ \chr {a macron } ā \withmacron a
+ \chr {k line below } ḵ \withlinebelow k
+ \chr {c cedilla } ç \withcedilla c
+ \chr {s comma below } ş \withcommabelow s
+ \chr {z hook below } ȥ \withhookbelow z
+ \chr {a hook } ả \withhook a
+ \chr {a ring } å \withring a
+ \chr {a ring below } ḁ \withringbelow a
+ \chr {m dot } ṁ \withdot m
+ \chr {l middle dot } ŀ \withmiddledot l
+ \chr {m dot below } ṃ \withdotbelow m
+ \chr {a breve } ă \withbreve a
+ \chr {a inverted breve } ȃ \withinvertedbreve a
+ \chr {k caron } ǩ \withcaron k
+ \chr {o stroke } ø \withstroke o
+ \stoplines
+
+\stoptext
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index c97e8fad5..2b731fbd1 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 : 2021-02-08 16:58
+-- merge date : 2021-02-12 18:45
do -- begin closure to overcome local limits and interference