summaryrefslogtreecommitdiff
path: root/tex/context/base
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2022-01-15 12:52:31 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2022-01-15 12:52:31 +0100
commit4054d633b48d2d0d737a705259eff5a2c315f958 (patch)
treeec171a10b0e97d32fd4256bf303b35211976d78a /tex/context/base
parent8e857efd2c61e8ffa4c991b5f1ddacfb4ebedc3c (diff)
downloadcontext-4054d633b48d2d0d737a705259eff5a2c315f958.tar.gz
2022-01-15 11:04:00
Diffstat (limited to 'tex/context/base')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkii/mult-nl.mkii5
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/font-osd.lua18
-rw-r--r--tex/context/base/mkiv/math-noa.lua8
-rw-r--r--tex/context/base/mkiv/mult-def.lua4
-rw-r--r--tex/context/base/mkiv/mult-low.lua16
-rw-r--r--tex/context/base/mkiv/mult-prm.lua56
-rw-r--r--tex/context/base/mkiv/spac-hor.mkiv3
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin24781 -> 24749 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin257575 -> 257569 bytes
-rw-r--r--tex/context/base/mkiv/strc-enu.mkvi14
-rw-r--r--tex/context/base/mkxl/cont-new.mkxl2
-rw-r--r--tex/context/base/mkxl/context.mkxl2
-rw-r--r--tex/context/base/mkxl/font-lib.mklx6
-rw-r--r--tex/context/base/mkxl/font-ots.lmt31
-rw-r--r--tex/context/base/mkxl/font-txt.lmt1
-rw-r--r--tex/context/base/mkxl/lang-def.mkxl43
-rw-r--r--tex/context/base/mkxl/math-dim.lmt2
-rw-r--r--tex/context/base/mkxl/math-frc.lmt75
-rw-r--r--tex/context/base/mkxl/math-frc.mkxl269
-rw-r--r--tex/context/base/mkxl/math-ini.mkxl200
-rw-r--r--tex/context/base/mkxl/math-noa.lmt70
-rw-r--r--tex/context/base/mkxl/mult-sys.mkxl7
-rw-r--r--tex/context/base/mkxl/node-ini.lmt20
-rw-r--r--tex/context/base/mkxl/norm-ctx.mkxl173
-rw-r--r--tex/context/base/mkxl/page-mix.mkxl2
-rw-r--r--tex/context/base/mkxl/spac-hor.mkxl4
-rw-r--r--tex/context/base/mkxl/strc-con.mklx18
-rw-r--r--tex/context/base/mkxl/strc-enu.mklx14
-rw-r--r--tex/context/base/mkxl/strc-itm.mklx11
-rw-r--r--tex/context/base/mkxl/typo-syn.lmt3
34 files changed, 655 insertions, 430 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index b138a8254..4f48115f7 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2022.01.10 08:33}
+\newcontextversion{2022.01.15 11:02}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index 38091b490..10c0bc693 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2022.01.10 08:33}
+\edef\contextversion{2022.01.15 11:02}
%D For those who want to use this:
diff --git a/tex/context/base/mkii/mult-nl.mkii b/tex/context/base/mkii/mult-nl.mkii
index 8e7baf1dd..b600868be 100644
--- a/tex/context/base/mkii/mult-nl.mkii
+++ b/tex/context/base/mkii/mult-nl.mkii
@@ -300,6 +300,7 @@
\setinterfacevariable{july}{juli}
\setinterfacevariable{june}{juni}
\setinterfacevariable{keep}{handhaaf}
+\setinterfacevariable{keeptogether}{keeptogether}
\setinterfacevariable{kerncharacters}{kerncharacters}
\setinterfacevariable{knockout}{knockout}
\setinterfacevariable{label}{label}
@@ -886,6 +887,7 @@
\setinterfaceconstant{header}{hoofd}
\setinterfaceconstant{headerdistance}{hoofdafstand}
\setinterfaceconstant{headerstate}{hoofdstatus}
+\setinterfaceconstant{headindenting}{kopinspringen}
\setinterfaceconstant{headlabel}{koplabel}
\setinterfaceconstant{headnumber}{kopnummer}
\setinterfaceconstant{headseparator}{kopscheider}
@@ -1229,7 +1231,7 @@
\setinterfaceconstant{solution}{oplossing}
\setinterfaceconstant{sort}{sort}
\setinterfaceconstant{sorttype}{sortering}
-\setinterfaceconstant{source}{bron}
+\setinterfaceconstant{source}{source}
\setinterfaceconstant{space}{spatie}
\setinterfaceconstant{spaceafter}{nawit}
\setinterfaceconstant{spaceafterside}{witnazij}
@@ -1280,6 +1282,7 @@
\setinterfaceconstant{synonymcommand}{synoniemcommando}
\setinterfaceconstant{synonymstyle}{synoniemletter}
\setinterfaceconstant{tab}{tab}
+\setinterfaceconstant{target}{target}
\setinterfaceconstant{text}{tekst}
\setinterfaceconstant{textalign}{textalign}
\setinterfaceconstant{textalternative}{tekstvariant}
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 9180cc403..3dad09b1d 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2022.01.10 08:33}
+\newcontextversion{2022.01.15 11:02}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 0037516fe..23d886b1e 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -49,7 +49,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2022.01.10 08:33}
+\edef\contextversion{2022.01.15 11:02}
%D Kind of special:
diff --git a/tex/context/base/mkiv/font-osd.lua b/tex/context/base/mkiv/font-osd.lua
index 16228b88b..34c047290 100644
--- a/tex/context/base/mkiv/font-osd.lua
+++ b/tex/context/base/mkiv/font-osd.lua
@@ -55,6 +55,11 @@ if not modules then modules = { } end modules ['font-osd'] = { -- script devanag
-- By now we have yet another incremental improved version. In the end I might
-- rewrite the code.
--
+-- At the start of 2022 Kauśika spent a lot of time testing combinations of fonts
+-- and scripts and in the process some more tracing was added as well as a mixed
+-- conjuncts options that can deal with fuzzy fonts. The machinery does what it has
+-- to do but some fonts expect more magic to be applied.
+--
-- Hans Hagen, PRAGMA-ADE, Hasselt NL
-- Todo:
@@ -2551,11 +2556,12 @@ local function analyze_next_chars_one(c,font,variant) -- skip one dependent vowe
end
local function analyze_next_chars_two(c,font)
- local n = getnext(c)
+ local n, v
+ n = getnext(c)
if not n then
return c
end
- local v = ischar(n,font)
+ v = ischar(n,font)
if v and nukta[v] then
c = n
end
@@ -2617,11 +2623,11 @@ local function analyze_next_chars_two(c,font)
-- This shouldn't happen I guess.
return
end
- local n = getnext(c)
+ n = getnext(c)
if not n then
return c
end
- local v = ischar(n,font)
+ v = ischar(n,font)
if not v then
return c
end
@@ -3099,6 +3105,10 @@ local function method_two(head,font,attr)
current = getnext(current)
end
+ -- if languages.indic then
+ -- head = languages.indic.handler(head)
+ -- end
+
return head, done
end
diff --git a/tex/context/base/mkiv/math-noa.lua b/tex/context/base/mkiv/math-noa.lua
index 613530464..fd4b82215 100644
--- a/tex/context/base/mkiv/math-noa.lua
+++ b/tex/context/base/mkiv/math-noa.lua
@@ -185,7 +185,7 @@ local opdisplaylimitsnoad_code = noadcodes.opdisplaylimits
local oplimitsnoad_code = noadcodes.oplimits
local opnolimitsnoad_code = noadcodes.opnolimits
local binnoad_code = noadcodes.bin
-local relnode_code = noadcodes.rel
+local relnoad_code = noadcodes.rel
local opennoad_code = noadcodes.open
local closenoad_code = noadcodes.close
local punctnoad_code = noadcodes.punct
@@ -1795,7 +1795,7 @@ do
[oplimitsnoad_code] = true,
[opnolimitsnoad_code] = true,
[binnoad_code] = true, -- new
- [relnode_code] = true,
+ [relnoad_code] = true,
[opennoad_code] = true, -- new
[closenoad_code] = true, -- new
[punctnoad_code] = true, -- new
@@ -2112,7 +2112,7 @@ do
local classes = { }
local colors = {
- [relnode_code] = "trace:dr",
+ [relnoad_code] = "trace:dr",
[ordnoad_code] = "trace:db",
[binnoad_code] = "trace:dg",
[opennoad_code] = "trace:dm",
@@ -2171,7 +2171,7 @@ do
local permitted = {
ordinary = ordnoad_code,
binary = binnoad_code,
- relation = relnode_code,
+ relation = relnoad_code,
punctuation = punctnoad_code,
inner = innernoad_code,
}
diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua
index 9992de8f6..d42132689 100644
--- a/tex/context/base/mkiv/mult-def.lua
+++ b/tex/context/base/mkiv/mult-def.lua
@@ -9223,6 +9223,10 @@ return {
["fr"]="separateurtete",
["nl"]="kopscheider",
},
+ ["headindenting"]={
+ ["en"]="headindenting",
+ ["nl"]="kopinspringen",
+ },
["headstyle"]={
["cs"]="stylhlavicky",
["de"]="kopfstil",
diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua
index 979fef710..2be5115e0 100644
--- a/tex/context/base/mkiv/mult-low.lua
+++ b/tex/context/base/mkiv/mult-low.lua
@@ -467,27 +467,43 @@ return {
--
"ordordspacing", "ordopspacing", "ordbinspacing", "ordrelspacing",
"ordopenspacing", "ordclosespacing", "ordpunctspacing", "ordinnerspacing",
+ "ordfracspacing", "ordradspacing",
--
"opordspacing", "opopspacing", "opbinspacing", "oprelspacing",
"opopenspacing", "opclosespacing", "oppunctspacing", "opinnerspacing",
+ "opfracspacing", "opradspacing",
--
"binordspacing", "binopspacing", "binbinspacing", "binrelspacing",
"binopenspacing", "binclosespacing", "binpunctspacing", "bininnerspacing",
+ "binfracspacing", "binradspacing",
--
"relordspacing", "relopspacing", "relbinspacing", "relrelspacing",
"relopenspacing", "relclosespacing", "relpunctspacing", "relinnerspacing",
+ "relfracspacing", "relradspacing",
--
"openordspacing", "openopspacing", "openbinspacing", "openrelspacing",
"openopenspacing", "openclosespacing", "openpunctspacing", "openinnerspacing",
+ "openfracspacing", "openradspacing",
--
"closeordspacing", "closeopspacing", "closebinspacing", "closerelspacing",
"closeopenspacing", "closeclosespacing", "closepunctspacing", "closeinnerspacing",
+ "closefracspacing", "closeradspacing",
--
"punctordspacing", "punctopspacing", "punctbinspacing", "punctrelspacing",
"punctopenspacing", "punctclosespacing", "punctpunctspacing", "punctinnerspacing",
+ "punctfracspacing", "punctradspacing",
--
"innerordspacing", "inneropspacing", "innerbinspacing", "innerrelspacing",
"inneropenspacing", "innerclosespacing", "innerpunctspacing", "innerinnerspacing",
+ "innerfracspacing", "innerradspacing",
+ --
+ "fracordspacing", "fracopspacing", "fracbinspacing", "fracrelspacing",
+ "fracopenspacing", "fracclosespacing", "fracpunctspacing", "fracinnerspacing",
+ "fracfracspacing", "fracradspacing",
+ --
+ "radordspacing", "radopspacing", "radbinspacing", "radrelspacing",
+ "radopenspacing", "radclosespacing", "radpunctspacing", "radinnerspacing",
+ "radfracspacing", "radradspacing",
--
"normalreqno",
--
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index 2803448d9..d53e76b10 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -86,11 +86,13 @@ return {
"Umathaxis",
"Umathbinbinspacing",
"Umathbinclosespacing",
+ "Umathbinfracspacing",
"Umathbininnerspacing",
"Umathbinopenspacing",
"Umathbinopspacing",
"Umathbinordspacing",
"Umathbinpunctspacing",
+ "Umathbinradspacing",
"Umathbinrelspacing",
"Umathbotaccentvariant",
"Umathchar",
@@ -103,11 +105,13 @@ return {
"Umathclass",
"Umathclosebinspacing",
"Umathcloseclosespacing",
+ "Umathclosefracspacing",
"Umathcloseinnerspacing",
"Umathcloseopenspacing",
"Umathcloseopspacing",
"Umathcloseordspacing",
"Umathclosepunctspacing",
+ "Umathcloseradspacing",
"Umathcloserelspacing",
"Umathcode",
"Umathcodenum",
@@ -117,9 +121,23 @@ return {
"Umathdelimiterundervariant",
"Umathdenominatorvariant",
"Umathextrasubpreshift",
+ "Umathextrasubprespace",
"Umathextrasubshift",
+ "Umathextrasubspace",
"Umathextrasuppreshift",
+ "Umathextrasupprespace",
"Umathextrasupshift",
+ "Umathextrasupspace",
+ "Umathfracbinspacing",
+ "Umathfracclosespacing",
+ "Umathfracfracspacing",
+ "Umathfracinnerspacing",
+ "Umathfracopenspacing",
+ "Umathfracopspacing",
+ "Umathfracordspacing",
+ "Umathfracpunctspacing",
+ "Umathfracradspacing",
+ "Umathfracrelspacing",
"Umathfractiondelsize",
"Umathfractiondenomdown",
"Umathfractiondenomvgap",
@@ -130,11 +148,13 @@ return {
"Umathhextensiblevariant",
"Umathinnerbinspacing",
"Umathinnerclosespacing",
+ "Umathinnerfracspacing",
"Umathinnerinnerspacing",
"Umathinneropenspacing",
"Umathinneropspacing",
"Umathinnerordspacing",
"Umathinnerpunctspacing",
+ "Umathinnerradspacing",
"Umathinnerrelspacing",
"Umathlimitabovebgap",
"Umathlimitabovekern",
@@ -152,28 +172,34 @@ return {
"Umathopclosespacing",
"Umathopenbinspacing",
"Umathopenclosespacing",
+ "Umathopenfracspacing",
"Umathopeninnerspacing",
"Umathopenopenspacing",
"Umathopenopspacing",
"Umathopenordspacing",
"Umathopenpunctspacing",
+ "Umathopenradspacing",
"Umathopenrelspacing",
"Umathopenupdepth",
"Umathopenupheight",
"Umathoperatorsize",
+ "Umathopfracspacing",
"Umathopinnerspacing",
"Umathopopenspacing",
"Umathopopspacing",
"Umathopordspacing",
"Umathoppunctspacing",
+ "Umathopradspacing",
"Umathoprelspacing",
"Umathordbinspacing",
"Umathordclosespacing",
+ "Umathordfracspacing",
"Umathordinnerspacing",
"Umathordopenspacing",
"Umathordopspacing",
"Umathordordspacing",
"Umathordpunctspacing",
+ "Umathordradspacing",
"Umathordrelspacing",
"Umathoverbarkern",
"Umathoverbarrule",
@@ -186,13 +212,18 @@ return {
"Umathphantom",
"Umathpunctbinspacing",
"Umathpunctclosespacing",
+ "Umathpunctfracspacing",
"Umathpunctinnerspacing",
"Umathpunctopenspacing",
"Umathpunctopspacing",
"Umathpunctordspacing",
"Umathpunctpunctspacing",
+ "Umathpunctradspacing",
"Umathpunctrelspacing",
"Umathquad",
+ "Umathradbinspacing",
+ "Umathradclosespacing",
+ "Umathradfracspacing",
"Umathradicaldegreeafter",
"Umathradicaldegreebefore",
"Umathradicaldegreeraise",
@@ -200,13 +231,22 @@ return {
"Umathradicalrule",
"Umathradicalvariant",
"Umathradicalvgap",
+ "Umathradinnerspacing",
+ "Umathradopenspacing",
+ "Umathradopspacing",
+ "Umathradordspacing",
+ "Umathradpunctspacing",
+ "Umathradradspacing",
+ "Umathradrelspacing",
"Umathrelbinspacing",
"Umathrelclosespacing",
+ "Umathrelfracspacing",
"Umathrelinnerspacing",
"Umathrelopenspacing",
"Umathrelopspacing",
"Umathrelordspacing",
"Umathrelpunctspacing",
+ "Umathrelradspacing",
"Umathrelrelspacing",
"Umathskewedfractionhgap",
"Umathskewedfractionvgap",
@@ -284,6 +324,8 @@ return {
"autoparagraphmode",
"begincsname",
"beginlocalcontrol",
+ "beginmathgroup",
+ "beginsimplegroup",
"boundary",
"boxanchor",
"boxanchors",
@@ -316,6 +358,8 @@ return {
"edefcsname",
"efcode",
"endlocalcontrol",
+ "endmathgroup",
+ "endsimplegroup",
"enforced",
"etoks",
"etoksapp",
@@ -328,6 +372,7 @@ return {
"expandafterspaces",
"expandcstoken",
"expanded",
+ "expandedafter",
"expandedloop",
"expandtoken",
"explicitdiscretionary",
@@ -469,9 +514,11 @@ return {
"matheqnogapstep",
"mathflattenmode",
"mathfontcontrol",
+ "mathfrac",
"mathlimitsmode",
"mathnolimitsmode",
"mathpenaltiesmode",
+ "mathrad",
"mathrulesfam",
"mathrulesmode",
"mathrulethicknessmode",
@@ -536,10 +583,14 @@ return {
"tabsize",
"textdirection",
"thewithoutunit",
+ "todimension",
+ "tointeger",
"tokenized",
"toksapp",
"tokspre",
"tolerant",
+ "tomathstyle",
+ "toscaled",
"tpack",
"tracingadjusts",
"tracingalignments",
@@ -703,7 +754,6 @@ return {
"baselineskip",
"batchmode",
"begingroup",
- "beginsimplegroup",
"belowdisplayshortskip",
"belowdisplayskip",
"binoppenalty",
@@ -751,7 +801,6 @@ return {
"endgroup",
"endinput",
"endlinechar",
- "endsimplegroup",
"eqno",
"errhelp",
"errmessage",
@@ -964,14 +1013,11 @@ return {
"thickmuskip",
"thinmuskip",
"time",
- "todimension",
- "tointeger",
"toks",
"toksdef",
"tolerance",
"topmark",
"topskip",
- "toscaled",
"tracingcommands",
"tracinglostchars",
"tracingmacros",
diff --git a/tex/context/base/mkiv/spac-hor.mkiv b/tex/context/base/mkiv/spac-hor.mkiv
index 16a1a0d4e..5d9cef079 100644
--- a/tex/context/base/mkiv/spac-hor.mkiv
+++ b/tex/context/base/mkiv/spac-hor.mkiv
@@ -621,6 +621,7 @@
\unexpanded\def\thinspace {\kern .16667\emwidth}
\unexpanded\def\negthinspace{\kern-.16667\emwidth}
\unexpanded\def\enspace {\kern .5\emwidth}
+ \unexpanded\def\emspace {\kern \emwidth}
\fi
@@ -635,8 +636,6 @@
\unexpanded\def\negenspace{\kern-.5\emwidth}
\unexpanded\def\negemspace{\kern- \emwidth}
-\let\emspace\quad
-
\unexpanded\def\charspace{ } % the unexpandable \space (as space can also be delimiter for numbers)
\unexpanded\def\quads
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index c0645fa90..05f7158b9 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 2b7f03fa1..8ab0cb237 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-enu.mkvi b/tex/context/base/mkiv/strc-enu.mkvi
index 4680a3981..a7c48d88e 100644
--- a/tex/context/base/mkiv/strc-enu.mkvi
+++ b/tex/context/base/mkiv/strc-enu.mkvi
@@ -305,16 +305,22 @@
\endgroup}
\unexpanded\def\strc_enumerations_inject_symbol % todo check
- {\constructionparameter\c!left
+ {\begingroup
+ \useconstructionstyleandcolor\c!numberstyle\c!symbolcolor
+ \constructionparameter\c!left
\constructionparameter\c!symbol
- \constructionparameter\c!right}
+ \constructionparameter\c!right
+ \endgroup}
\unexpanded\def\strc_enumerations_inject_number
- {\constructionparameter\c!left
+ {\begingroup
+ \useconstructionstyleandcolor\c!numberstyle\c!symbolcolor
+ \constructionparameter\c!left
\constructionparameter\c!starter
\clf_savedlistprefixednumber{\currentconstructionmain}\currentconstructionlistentry\relax
\constructionparameter\c!stopper
- \constructionparameter\c!right}
+ \constructionparameter\c!right
+ \endgroup}
\unexpanded\def\strc_enumerations_inject_text_and_number
{\constructionparameter\c!numbercommand
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index e73df27b9..6e8f45f6d 100644
--- a/tex/context/base/mkxl/cont-new.mkxl
+++ b/tex/context/base/mkxl/cont-new.mkxl
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2022.01.10 08:33}
+\newcontextversion{2022.01.15 11:02}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkxl/context.mkxl b/tex/context/base/mkxl/context.mkxl
index dc5d14244..9cd838a16 100644
--- a/tex/context/base/mkxl/context.mkxl
+++ b/tex/context/base/mkxl/context.mkxl
@@ -29,7 +29,7 @@
%D {YYYY.MM.DD HH:MM} format.
\immutable\edef\contextformat {\jobname}
-\immutable\edef\contextversion{2022.01.10 08:33}
+\immutable\edef\contextversion{2022.01.15 11:02}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
diff --git a/tex/context/base/mkxl/font-lib.mklx b/tex/context/base/mkxl/font-lib.mklx
index 2f20214e7..c5543a107 100644
--- a/tex/context/base/mkxl/font-lib.mklx
+++ b/tex/context/base/mkxl/font-lib.mklx
@@ -49,7 +49,11 @@
\registerctxluafile{font-otd}{autosuffix,optimize}
\registerctxluafile{font-otc}{}
\registerctxluafile{font-oth}{}
-\registerctxluafile{font-osd}{}
+% \doifelsefileexists{font-osd-new.lmt}{
+% \registerctxluafile{font-osd-new}{autosuffix}
+% } {
+ \registerctxluafile{font-osd}{}
+% }
%registerctxluafile{font-osm}{}
\registerctxluafile{font-ogr}{autosuffix}
diff --git a/tex/context/base/mkxl/font-ots.lmt b/tex/context/base/mkxl/font-ots.lmt
index eda63cee5..c668c86d1 100644
--- a/tex/context/base/mkxl/font-ots.lmt
+++ b/tex/context/base/mkxl/font-ots.lmt
@@ -3236,7 +3236,8 @@ local function kernrun(disc,k_run,...)
if done and trace_testruns then
report_disc("done",disc)
end
- return nextstart, done
+-- return nextstart, done
+ return nextstart
end
-- fonts like ebgaramond do ligatures this way (less efficient than e.g. dejavu which
@@ -3289,7 +3290,8 @@ local function comprun(disc,c_run,...) -- vararg faster than the whole list
setdisc(disc,pre,post,replace)
end
--
- return getnext(disc), renewed
+-- return getnext(disc), renewed
+ return getnext(disc)
end
-- if we can hyphenate in a lig then unlikely a lig so we
@@ -3417,7 +3419,8 @@ local function testrun(disc,t_run,c_run,...)
end
end
-- next can have changed (copied list)
- return getnext(disc), renewed
+-- return getnext(disc), renewed
+ return getnext(disc)
end
-- 1{2{\oldstyle\discretionary{3}{4}{5}}6}7\par
@@ -3960,13 +3963,16 @@ do
start = nxt
elseif id == disc_code then
if not discs or discs[start] == true then
- local ok
+-- local ok
if gpossing then
- start, ok = kernrun(start,k_run_single, lookupcache,step,dataset,sequence,rlmode,skiphash,handler)
+-- start, ok = kernrun(start,k_run_single, lookupcache,step,dataset,sequence,rlmode,skiphash,handler)
+ start = kernrun(start,k_run_single, lookupcache,step,dataset,sequence,rlmode,skiphash,handler)
elseif forcetestrun then
- start, ok = testrun(start,t_run_single,c_run_single,lookupcache,step,dataset,sequence,rlmode,skiphash,handler)
+-- start, ok = testrun(start,t_run_single,c_run_single,lookupcache,step,dataset,sequence,rlmode,skiphash,handler)
+ start = testrun(start,t_run_single,c_run_single,lookupcache,step,dataset,sequence,rlmode,skiphash,handler)
else
- start, ok = comprun(start,c_run_single, lookupcache,step,dataset,sequence,rlmode,skiphash,handler)
+-- start, ok = comprun(start,c_run_single, lookupcache,step,dataset,sequence,rlmode,skiphash,handler)
+ start = comprun(start,c_run_single, lookupcache,step,dataset,sequence,rlmode,skiphash,handler)
end
-- if ok then
-- done = true
@@ -4030,13 +4036,16 @@ do
start = nxt
elseif id == disc_code then
if not discs or discs[start] == true then
- local ok
+-- local ok
if gpossing then
- start, ok = kernrun(start,k_run_multiple, steps,nofsteps,dataset,sequence,rlmode,skiphash,handler)
+-- start, ok = kernrun(start,k_run_multiple, steps,nofsteps,dataset,sequence,rlmode,skiphash,handler)
+ start = kernrun(start,k_run_multiple, steps,nofsteps,dataset,sequence,rlmode,skiphash,handler)
elseif forcetestrun then
- start, ok = testrun(start,t_run_multiple,c_run_multiple,steps,nofsteps,dataset,sequence,rlmode,skiphash,handler)
+-- start, ok = testrun(start,t_run_multiple,c_run_multiple,steps,nofsteps,dataset,sequence,rlmode,skiphash,handler)
+ start = testrun(start,t_run_multiple,c_run_multiple,steps,nofsteps,dataset,sequence,rlmode,skiphash,handler)
else
- start, ok = comprun(start,c_run_multiple, steps,nofsteps,dataset,sequence,rlmode,skiphash,handler)
+-- start, ok = comprun(start,c_run_multiple, steps,nofsteps,dataset,sequence,rlmode,skiphash,handler)
+ start = comprun(start,c_run_multiple, steps,nofsteps,dataset,sequence,rlmode,skiphash,handler)
end
else
start = nxt
diff --git a/tex/context/base/mkxl/font-txt.lmt b/tex/context/base/mkxl/font-txt.lmt
index 29d3ca240..aae69ddd3 100644
--- a/tex/context/base/mkxl/font-txt.lmt
+++ b/tex/context/base/mkxl/font-txt.lmt
@@ -101,7 +101,6 @@ local getkern = nuts.getkern
local getwidth = nuts.getwidth
local ischar = nuts.ischar
-local isnextchar = nuts.isnextchar
local isglyph = nuts.isglyph
local usesfont = nuts.usesfont
diff --git a/tex/context/base/mkxl/lang-def.mkxl b/tex/context/base/mkxl/lang-def.mkxl
index 441d328c8..e50be9afc 100644
--- a/tex/context/base/mkxl/lang-def.mkxl
+++ b/tex/context/base/mkxl/lang-def.mkxl
@@ -826,7 +826,31 @@
\installlanguage [\s!thai] [\s!th]
-%D Malayalam (needs to be checked)
+%D Indic languages (Kauśika)
+%
+%
+%D Sanskit (someone needs to define the parameters):
+%D
+%D The file \type {lang-sa.lua} contains sanskrit hyphenation patterns for devanagari,
+%D bengali, telugu, kannada, malayalam and roman(iast.
+
+\installlanguage
+ [\s!sa]
+ [\c!spacing=\v!broad,
+ \c!leftsentence=\endash,
+ \c!rightsentence=\endash,
+ \c!leftsubsentence=\emdash,
+ \c!rightsubsentence=\emdash,
+ \c!leftquote=\upperleftsinglesixquote,
+ \c!rightquote=\upperrightsingleninequote,
+ \c!leftquotation=\upperleftdoublesixquote,
+ \c!rightquotation=\upperrightdoubleninequote,
+ \c!date={\v!month,\space,\v!day,{,\space},\v!year},
+ \s!patterns=\s!sa,
+ \s!lefthyphenmin=1,
+ \s!righthyphenmin=1]
+
+%D Malayalam needs some fine-tuning
\installlanguage
[\s!ml]
@@ -844,7 +868,22 @@
\s!lefthyphenmin=2,
\s!righthyphenmin=3]
-\installlanguage [\s!malayalam] [\s!ml]
+\installlanguage [\s!ml][\c!default=\s!sa,\s!patterns=\s!ml]
+\installlanguage [\s!ta][\c!default=\s!sa,\s!patterns=ta]
+\installlanguage [\s!kn][\c!default=\s!sa,\s!patterns=kn]
+\installlanguage [\s!te][\c!default=\s!sa,\s!patterns=te]
+\installlanguage [\s!gu][\c!default=\s!sa,\s!patterns=gu]
+\installlanguage [\s!bn][\c!default=\s!sa,\s!patterns=bn]
+\installlanguage [\s!hi][\c!default=\s!sa,\s!patterns=hi]
+
+\installlanguage [\s!tamil] [\s!ta]
+\installlanguage [\s!kannada] [\s!kn]
+\installlanguage [\s!telugu] [\s!te]
+\installlanguage [\s!gujarati] [\s!gu]
+\installlanguage [\s!hindi] [\s!hi]
+\installlanguage [\s!bengali] [\s!bn]
+\installlanguage [\s!sanskrit] [\s!sa]
+\installlanguage [\s!malayalam][\s!ml]
%D Todo: generate this one from languages.data
diff --git a/tex/context/base/mkxl/math-dim.lmt b/tex/context/base/mkxl/math-dim.lmt
index 1bf2420bf..3b88b0b0b 100644
--- a/tex/context/base/mkxl/math-dim.lmt
+++ b/tex/context/base/mkxl/math-dim.lmt
@@ -154,7 +154,7 @@ function mathematics.dimensions(dimens) -- beware, dimens get spoiled
dimens["abs(mathxheight)/4"] = abs(mathxheight) / 4
dimens["abs(mathxheight*4)/5"] = abs(mathxheight * 4) / 5
dimens["<not set>"] = false
- dimens["script_space"] = false -- at macro level
+ dimens["scriptspace"] = false -- at macro level
for variable, styles in next, defaults do
local tt = { }
for style, default in next, styles do
diff --git a/tex/context/base/mkxl/math-frc.lmt b/tex/context/base/mkxl/math-frc.lmt
index 488c95056..0bc0e3895 100644
--- a/tex/context/base/mkxl/math-frc.lmt
+++ b/tex/context/base/mkxl/math-frc.lmt
@@ -26,60 +26,53 @@ table.setmetatableindex(resolved, function(t,k)
return v
end)
-local ctx_normalatop = context.normalatop
-local ctx_normalover = context.normalover
-
-local function mathfraction(how,left,right,width)
- if how == v_no then
- if left == 0x002E and right == 0x002E then
- ctx_normalatop()
- else
- context("\\atopwithdelims%s%s",resolved[left],resolved[right])
- end
- elseif how == v_yes or how == v_hidden then
- local norule = how == v_hidden and " norule " or ""
- if left == 0x002E and right == 0x002E then
- context("\\normalabove%s%s%ssp",norule,width)
- else
- context("\\abovewithdelims%s%s%s%s%ssp",norule,resolved[left],resolved[right],width)
- end
- else -- v_auto
- if left == 0x002E and right == 0x002E then
- ctx_normalover()
- else
- context("\\overwithdelims%s%s",resolved[left],resolved[right])
- end
- end
-end
-
-interfaces.implement {
- name = "mathfraction",
- actions = mathfraction,
- arguments = { "string", "number", "number", "dimen" }
-}
-
local ctx_Uatop = context.Uatop
local ctx_Uover = context.Uover
-local function umathfraction(how,left,right,width)
+local function umathfraction(how,style,left,right,width)
+ style = tonumber(style) -- or nil
if how == v_no then
if left == 0x002E and right == 0x002E then
- ctx_Uatop()
+ if style then
+ context("\\Uatop style %i",style)
+ else
+ ctx_Uatop()
+ end
else
- context("\\Uatopwithdelims%s%s",resolved[left],resolved[right])
+ if style then
+ context("\\Uatopwithdelims style %i %s%s",style,resolved[left],resolved[right])
+ else
+ context("\\Uatopwithdelims%s%s",resolved[left],resolved[right])
+ end
end
elseif how == v_yes or how == v_hidden then
local norule = how == v_hidden and " norule " or ""
- if left == 0x002E and right == 0x002E then
- context("\\Uabove%s%ssp",norule,width)
+ if style then
+ if left == 0x002E and right == 0x002E then
+ context("\\Uabove style %i %s%ssp",style,norule,width)
+ else
+ context("\\Uabovewithdelims style %i %s%s%s%ssp",style,norule,resolved[left],resolved[right],width)
+ end
else
- context("\\Uabovewithdelims%s%s%s%ssp",norule,resolved[left],resolved[right],width)
+ if left == 0x002E and right == 0x002E then
+ context("\\Uabove%s%ssp",norule,width)
+ else
+ context("\\Uabovewithdelims%s%s%s%ssp",norule,resolved[left],resolved[right],width)
+ end
end
else -- v_auto
if left == 0x002E and right == 0x002E then
- ctx_Uover()
+ if style then
+ context("\\Uover style %i",style)
+ else
+ ctx_Uover()
+ end
else
- context("\\Uoverwithdelims%s%s",resolved[left],resolved[right])
+ if style then
+ context("\\Uoverwithdelims style %i %s%s",style,resolved[left],resolved[right])
+ else
+ context("\\Uoverwithdelims%s%s",resolved[left],resolved[right])
+ end
end
end
end
@@ -87,5 +80,5 @@ end
interfaces.implement {
name = "umathfraction",
actions = umathfraction,
- arguments = { "string", "number", "number", "dimen" }
+ arguments = { "string", "string", "number", "number", "dimen" }
}
diff --git a/tex/context/base/mkxl/math-frc.mkxl b/tex/context/base/mkxl/math-frc.mkxl
index 8d47e2883..c7165187c 100644
--- a/tex/context/base/mkxl/math-frc.mkxl
+++ b/tex/context/base/mkxl/math-frc.mkxl
@@ -21,8 +21,8 @@
\permanent\protected\def\topstrut{\vrule\s!width\zeropoint\s!height\strutht\s!depth\zeropoint\relax}
\permanent\protected\def\botstrut{\vrule\s!width\zeropoint\s!height\zeropoint\s!depth\strutdp\relax}
-\permanent\protected\def\mathtopstrut{\setbox\scratchbox\mathstylehbox{(}\vrule\s!width\zeropoint\s!height\ht\scratchbox\s!depth\zeropoint\relax}
-\permanent\protected\def\mathbotstrut{\setbox\scratchbox\mathstylehbox{(}\vrule\s!width\zeropoint\s!height\zeropoint\s!depth\dp\scratchbox\relax}
+% \permanent\protected\def\mathtopstrut{\setbox\scratchbox\mathstylehbox{(}\vrule\s!width\zeropoint\s!height\ht\scratchbox\s!depth\zeropoint\relax}
+% \permanent\protected\def\mathbotstrut{\setbox\scratchbox\mathstylehbox{(}\vrule\s!width\zeropoint\s!height\zeropoint\s!depth\dp\scratchbox\relax}
%D This module is reimplemented in \MKIV\ style.
@@ -184,15 +184,30 @@
\letcsname\??mathfractionstrut\v!no\endcsname\math_frac_no_strut
\defcsname\??mathfractionstrut\v!tight\endcsname
- {\enforced\let\m_fractions_strut_top\mathbotstrut % indeed swapped name
- \enforced\let\m_fractions_strut_bot\mathtopstrut} % indeed swapped name
+ {\enforced\let\m_fractions_strut_top\mathdepthstrut
+ \enforced\let\m_fractions_strut_bot\mathheightstrut}
\math_frac_no_strut
\newdimen\d_math_fraction_margin
+\def\math_fraction_margin_kern_indeed{\kern\d_math_fraction_margin}
+
+\let\math_fraction_margin_kern\relax
+
+%D Because the fraction nodes uses the superscript and subscript for numerator and
+%D denomerator so we wrap in a \type {\mathfrac}. Because with \type {\over} one
+%D normally wraps the lot it goes unnoticed there.
+%D
+%D \starttyping
+%D $\Uover{2}{3} ^4$ % double script error but no longer because we use the prescripts
+%D ${\over{2}{3}}^4$ % no issue anyway because we wrap in {} (goes unnoticed)
+%D $\frac {2}{3} ^4$ % we wrap in \mathfrac so we can also use prescripts
+%D \stoptyping
+
\protected\def\math_frac#1%
- {\begingroup
+ %{\begingroup
+ {\mathfrac\bgroup
\edef\currentmathfraction{#1}%
%
\edef\p_math_fraction_fences{\mathfractionparameter\c!fences}%
@@ -200,7 +215,12 @@
\math_fenced_fenced_start\p_math_fraction_fences
\fi
%
- \d_math_fraction_margin\mathfractionparameter\c!margin
+ \d_math_fraction_margin\mathfractionparameter\c!margin\relax
+ \ifcase\d_math_fraction_margin
+ \let\math_fraction_margin_kern\relax
+ \else
+ \let\math_fraction_margin_kern\math_fraction_margin_kern_indeed
+ \fi
%
\edef\p_math_fractions_color{\mathfractionparameter\c!color}%
%
@@ -221,7 +241,8 @@
{\ifempty\p_math_fraction_fences \else
\math_fenced_fenced_stop\p_math_fraction_fences
\fi
- \endgroup}
+ % \endgroup}
+ \egroup}
\protected\def\math_frac_colored#1#2%
{\savecolor
@@ -235,128 +256,20 @@
\def\math_frac_no_delim{0x2E}
-\def\math_frac_command
- {\clf_mathfraction
- {\mathfractionparameter\c!rule}%
- \ifempty\p_math_fraction_fences
- \mathfractionparameter\c!left \space
- \mathfractionparameter\c!right\space
- \else
- \math_frac_no_delim\space
- \math_frac_no_delim\space
- \fi
- \dimexpr\mathfractionparameter\c!rulethickness\relax
- \relax}
-
% Having a \withmarginornot{#1}{#2} makes not much sense nor do 4 tests or 4 redundant
% kerns (longer node lists plus possible interference). A split in normal and margin
% also makes testing easier. When left and right margins are needed we might merge the
% variants again. After all, these are not real installers.
-
-% the denominator is in cramped!
-
-\defcsname\??mathfractionalternative\v!inner\endcsname
- {\ifcase\d_math_fraction_margin
- \expandafter\math_fraction_inner_normal
- \else
- \expandafter\math_fraction_inner_margin
- \fi}
-
-\defcsname\??mathfractionalternative\v!outer\endcsname
- {\ifcase\d_math_fraction_margin
- \expandafter\math_fraction_outer_normal
- \else
- \expandafter\math_fraction_outer_margin
- \fi}
-
-\defcsname\??mathfractionalternative\v!both\endcsname
- {\ifcase\d_math_fraction_margin
- \expandafter\math_fraction_both_normal
- \else
- \expandafter\math_fraction_both_margin
- \fi}
-
-% todo: store first state and reuse second time
-
-% \def\math_fraction_inner_normal#1#2%
-% {\Ustack{%
-% {%
-% {\usemathstyleparameter\mathfractionparameter{\m_fractions_strut_top#1}}%
-% \math_frac_command
-% {\usemathstyleparameter\mathfractionparameter{\m_fractions_strut_bot#2}}%
-% }%
-% }%
-% \math_frac_wrapup}
-%
-% \def\math_fraction_outer_normal#1#2%
-% {\Ustack{%
-% \usemathstyleparameter\mathfractionparameter
-% {%
-% {\m_fractions_strut_top#1}%
-% \math_frac_command
-% {\m_fractions_strut_bot#2}%
-% }%
-% }%
-% \math_frac_wrapup}
-%
-% \def\math_fraction_both_normal#1#2%
-% {\Ustack{%
-% \usemathstyleparameter\mathfractionparameter
-% {%
-% {\usemathstyleparameter\mathfractionparameter\m_fractions_strut_top#1}%
-% \math_frac_command
-% {\usemathstyleparameter\mathfractionparameter\m_fractions_strut_bot#2}%
-% }%
-% }%
-% \math_frac_wrapup}
%
-% \def n_inner_margin#1#2%
-% {\Ustack{%
-% {%
-% {\kern\d_math_fraction_margin
-% \usemathstyleparameter\mathfractionparameter{\m_fractions_strut_top#1}%
-% \kern\d_math_fraction_margin}%
-% \math_frac_command
-% {\kern\d_math_fraction_margin
-% \usemathstyleparameter\mathfractionparameter{\m_fractions_strut_bot#2}%
-% \kern\d_math_fraction_margin}%
-% }%
-% }%
-% \math_frac_wrapup}
+% The denominator is normally in cramped mode!
%
-% \def\math_fraction_outer_margin#1#2%
-% {\Ustack{%
-% \usemathstyleparameter\mathfractionparameter
-% {%
-% {\kern\d_math_fraction_margin
-% \m_fractions_strut_top#1%
-% \kern\d_math_fraction_margin}%
-% \math_frac_command
-% {\kern\d_math_fraction_margin
-% \m_fractions_strut_bot#2%
-% \kern\d_math_fraction_margin}%
-% }%
-% }%
-% \math_frac_wrapup}
-%
-% \def\math_fraction_both_margin#1#2%
-% {\Ustack{%
-% \usemathstyleparameter\mathfractionparameter
-% {%
-% {\kern\d_math_fraction_margin
-% \usemathstyleparameter\mathfractionparameter\m_fractions_strut_top#1%
-% \kern\d_math_fraction_margin}%
-% \math_frac_command
-% {\kern\d_math_fraction_margin
-% \usemathstyleparameter\mathfractionparameter\m_fractions_strut_bot#2%
-% \kern\d_math_fraction_margin}%
-% }%
-% }%
-% \math_frac_wrapup}
-
-\def\math_frac_command_u
+% See \MKIV\ for the old (more messy) implementation where we have to fight the over
+% related syntax (we now use a lmtx primitive).
+
+\def\math_frac_command_u#1%
{\clf_umathfraction
{\mathfractionparameter\c!rule}%
+ {\ifcstok{#1}\emptytoks\else\tomathstyle#1\fi}%
\ifempty\p_math_fraction_fences
\mathfractionparameter\c!left \space
\mathfractionparameter\c!right\space
@@ -367,75 +280,51 @@
\dimexpr\mathfractionparameter\c!rulethickness\relax
\relax}
-\def\math_fraction_inner_normal#1#2%
- {\Ustack{% forces num style
- \math_frac_command_u
- {\usemathstyleparameter\mathfractionparameter{\m_fractions_strut_top#1}}%
- {\usemathstyleparameter\mathfractionparameter{\m_fractions_strut_bot#2}}%
- }%
+\protected\defcsname\??mathfractionalternative\v!inner\endcsname#1#2%
+ {\math_frac_command_u
+{}% {\expandedmathstyleparameter\mathfractionparameter}%
+ {\math_fraction_margin_kern
+\usemathstyleparameter\mathfractionparameter
+ \m_fractions_strut_top#1%
+ \math_fraction_margin_kern}%
+ {\math_fraction_margin_kern
+\usemathstyleparameter\mathfractionparameter
+ \m_fractions_strut_bot#2%
+ \math_fraction_margin_kern}%
\math_frac_wrapup}
-\def\math_fraction_outer_normal#1#2%
- {\Ustack{% forces num style
- \usemathstyleparameter\mathfractionparameter
- \math_frac_command_u
- {\m_fractions_strut_top#1}%
- {\m_fractions_strut_bot#2}%
- }%
+\protected\defcsname\??mathfractionalternative\v!outer\endcsname#1#2%
+ {\beginmathgroup
+ \usemathstyleparameter\mathfractionparameter
+ \math_frac_command_u
+ {}%
+ {\math_fraction_margin_kern
+ \m_fractions_strut_top#1%
+ \math_fraction_margin_kern}%
+ {\math_fraction_margin_kern
+ \m_fractions_strut_bot#2%
+ \math_fraction_margin_kern}%
+ \endmathgroup
\math_frac_wrapup}
-\def\math_fraction_both_normal#1#2%
- {\Ustack{% forces num style
- \usemathstyleparameter\mathfractionparameter
- \math_frac_command_u
- {\usemathstyleparameter\mathfractionparameter\m_fractions_strut_top#1}%
- {\usemathstyleparameter\mathfractionparameter\m_fractions_strut_bot#2}%
- }%
+\protected\defcsname\??mathfractionalternative\v!both\endcsname#1#2%
+ {\beginmathgroup
+ \usemathstyleparameter\mathfractionparameter
+ \math_frac_command_u
+{}% {\expandedmathstyleparameter\mathfractionparameter}%
+ {\math_fraction_margin_kern
+\usemathstyleparameter\mathfractionparameter
+ \m_fractions_strut_top#1%
+ \math_fraction_margin_kern}%
+ {\math_fraction_margin_kern
+\usemathstyleparameter\mathfractionparameter
+ \m_fractions_strut_bot#2%
+ \math_fraction_margin_kern}%
+ \endmathgroup
\math_frac_wrapup}
-\def\math_fraction_inner_margin#1#2%
- {\Ustack{%
- {%
- \math_frac_command_u
- {\kern\d_math_fraction_margin
- \usemathstyleparameter\mathfractionparameter{\m_fractions_strut_top#1}%
- \kern\d_math_fraction_margin}%
- {\kern\d_math_fraction_margin
- \usemathstyleparameter\mathfractionparameter{\m_fractions_strut_bot#2}%
- \kern\d_math_fraction_margin}%
- }%
- }%
- \math_frac_wrapup}
-
-\def\math_fraction_outer_margin#1#2%
- {\Ustack{%
- \usemathstyleparameter\mathfractionparameter
- {%
- \math_frac_command_u
- {\kern\d_math_fraction_margin
- \m_fractions_strut_top#1%
- \kern\d_math_fraction_margin}%
- {\kern\d_math_fraction_margin
- \m_fractions_strut_bot#2%
- \kern\d_math_fraction_margin}%
- }%
- }%
- \math_frac_wrapup}
-\def\math_fraction_both_margin#1#2%
- {\Ustack{%
- \usemathstyleparameter\mathfractionparameter
- {%
- \math_frac_command_u
- {\kern\d_math_fraction_margin
- \usemathstyleparameter\mathfractionparameter\m_fractions_strut_top#1%
- \kern\d_math_fraction_margin}%
- {\kern\d_math_fraction_margin
- \usemathstyleparameter\mathfractionparameter\m_fractions_strut_bot#2%
- \kern\d_math_fraction_margin}%
- }%
- }%
- \math_frac_wrapup}
+\nulldelimiterspace\zeropoint % was 1.2pt
\definemathfraction[xfrac] [\c!alternative=\v!inner,\c!mathstyle=\s!script]
\definemathfraction[xxfrac][\c!alternative=\v!inner,\c!mathstyle=\s!scriptscript]
@@ -557,15 +446,15 @@
% $$ {{a}\abovewithdelims()#1pt{b}} $$
% }
-\definemathfraction[i:frac] [\c!alternative=\v!inner,\c!mathstyle=] % was script and then small but nothing needed
-\definemathfraction[i:tfrac][\c!alternative=\v!inner,\c!mathstyle=\s!text] % was script (before luatex fix)
+\definemathfraction[i:frac] [\c!alternative=\v!inner,\c!mathstyle=\s!script]
+\definemathfraction[i:tfrac][i:frac]
\definemathfraction[i:sfrac][\c!alternative=\v!inner,\c!mathstyle=\s!scriptscript]
\definemathfraction[i:dfrac][\c!alternative=\v!inner,\c!mathstyle=\s!display]
\definemathfraction[d:frac] [\c!alternative=\v!inner,\c!mathstyle=\s!cramped] % was cramped,text
-\definemathfraction[d:tfrac][\c!alternative=\v!both ,\c!mathstyle={\s!cramped,\s!text}] % was cramped,script (before luatex fix)
-\definemathfraction[d:sfrac][\c!alternative=\v!both ,\c!mathstyle={\s!cramped,\s!scriptscript}]
-\definemathfraction[d:dfrac][\c!alternative=\v!inner,\c!mathstyle=\s!display]
+\definemathfraction[d:tfrac][\c!alternative=\v!both, \c!mathstyle={\s!cramped,\s!text}]
+\definemathfraction[d:sfrac][\c!alternative=\v!both, \c!mathstyle={\s!cramped,\s!script}]
+\definemathfraction[d:dfrac][d:frac]
%D \protected\def\ShowMathFractions#1#2%
%D {\dontleavehmode
@@ -670,7 +559,9 @@
{\strut
\ifx r#1\hfill\fi#4\ifx l#1\hfill\fi}%
{\ifx r#2\hfill\fi#5\ifx l#2\hfill\fi}%
- \kern-\nulldelimiterspace}}
+ \ifzeropt\nulldelimiterspace\else
+ \kern-\nulldelimiterspace
+ \fi}}
%D \macros
%D {splitfrac, splitdfrac}
diff --git a/tex/context/base/mkxl/math-ini.mkxl b/tex/context/base/mkxl/math-ini.mkxl
index 8ff839107..f0db89cf2 100644
--- a/tex/context/base/mkxl/math-ini.mkxl
+++ b/tex/context/base/mkxl/math-ini.mkxl
@@ -722,34 +722,96 @@
%
% this overflows so we use this instead:
+% \protected\def\math_strut_htdp#1% nasty!
+% {\s!height\dimexpr(\fontcharht#1\c_math_strut/\glyphscale)*\mathscale#1\relax
+% \s!depth \dimexpr(\fontchardp#1\c_math_strut/\glyphscale)*\mathscale#1\relax}
+%
+% \protected\def\math_strut_normal
+% {\vrule
+% \s!width \zeropoint
+% \normalexpanded{\math_strut_htdp{\mathstylefont\normalmathstyle}}%
+% \relax}
+%
+% \protected\def\math_strut_visual
+% {\hskip-.01\emwidth
+% \vrule
+% \s!width .02\emwidth
+% \normalexpanded{\math_strut_htdp{\mathstylefont\normalmathstyle}}%
+% \relax
+% \hskip-.01\emwidth}
+
+\protected\def\math_strut_ht#1% nasty!
+ {\s!height\dimexpr(\fontcharht#1\c_math_strut/\glyphscale)*\mathscale#1\relax}
+
+\protected\def\math_strut_dp#1% nasty!
+ {\s!depth \dimexpr(\fontchardp#1\c_math_strut/\glyphscale)*\mathscale#1\relax}
+
\protected\def\math_strut_htdp#1% nasty!
- {\s!height\dimexpr(\fontcharht#1\c_math_strut/\glyphscale)*\mathscale#1\relax
- \s!depth \dimexpr(\fontchardp#1\c_math_strut/\glyphscale)*\mathscale#1\relax}
+ {\math_strut_ht{#1}%
+ \math_strut_dp{#1}}
\protected\def\math_strut_normal
{\vrule
- \s!width \zeropoint
- \normalexpanded{\math_strut_htdp{\mathstylefont\normalmathstyle}}%
+ \s!width \zeropoint
+ \normalexpanded{\math_strut_htdp{\mathstylefont\normalmathstyle}}%
\relax}
\protected\def\math_strut_visual
{\hskip-.01\emwidth
\vrule
- \s!width .02\emwidth
- \normalexpanded{\math_strut_htdp{\mathstylefont\normalmathstyle}}%
+ \s!width .02\emwidth
+ \normalexpanded{\math_strut_htdp{\mathstylefont\normalmathstyle}}%
+ \relax
+ \hskip-.01\emwidth}
+
+\permanent\protected\def\math_strut_height_normal
+ {\vrule
+ \s!width \zeropoint
+ \normalexpanded{\math_strut_ht{\mathstylefont\normalmathstyle}}%
+ \s!depth \zeropoint
+ \relax}
+
+\permanent\protected\def\math_strut_height_visual
+ {\hskip-.01\emwidth
+ \vrule
+ \s!width .02\emwidth
+ \normalexpanded{\math_strut_ht{\mathstylefont\normalmathstyle}}%
+ \s!depth \zeropoint
+ \relax
+ \hskip-.01\emwidth}
+
+\permanent\protected\def\math_strut_depth_normal
+ {\vrule
+ \s!width \zeropoint
+ \s!height\zeropoint
+ \normalexpanded{\math_strut_dp{\mathstylefont\normalmathstyle}}%
+ \relax}
+
+\permanent\protected\def\math_strut_depth_visual
+ {\hskip-.01\emwidth
+ \vrule
+ \s!width .02\emwidth
+ \s!height\zeropoint
+ \normalexpanded{\math_strut_dp{\mathstylefont\normalmathstyle}}%
\relax
\hskip-.01\emwidth}
\permanent\protected\def\showmathstruts % let's not overload \math_strut_normal
- {\enforced\let\math_strut\math_strut_visual}
+ {\enforced\let\math_strut \math_strut_visual
+ \enforced\let\math_strut_height\math_strut_height_visual
+ \enforced\let\math_strut_depth \math_strut_depth_visual}
-\let\math_strut\math_strut_normal
+\let\math_strut \math_strut_normal
+\let\math_strut_height\math_strut_height_normal
+\let\math_strut_depth \math_strut_depth_normal
% \protected\def\mathstrut{\mathcodecommand{nothing}{\math_strut}}
\pushoverloadmode
- \definemathcommand [mathstrut] {\math_strut}
+ \definemathcommand [mathstrut] {\math_strut}
+ \definemathcommand [mathheightstrut] {\math_strut_height}
+ \definemathcommand [mathdepthstrut] {\math_strut_depth}
\popoverloadmode
@@ -2315,15 +2377,9 @@
\fi
}
-\permanent\tolerant\protected\def\setmathstyle[#1]#;#=% so we accept [] and {}
- {\edef\m_math_style_asked{#1#2}%
- \ifempty\m_math_style_asked \else
- \math_style_set_indeed
- \fi}
-
\permanent\def\installmathstyle#1#2%
{\ifcsname\??mathstylecommand#1\endcsname \else
- \setvalue{\??mathstylecommand#1}{#2}%
+ \defcsname\??mathstylecommand#1\endcsname{#2}%
\fi}
\def\math_style_collect#1%
@@ -2342,17 +2398,17 @@
\defcsname\??mathstylecommand\v!small \endcsname{\c_math_styles_state_size \plusone}
\defcsname\??mathstylecommand\v!big \endcsname{\c_math_styles_state_size \plustwo}
-\permanent\protected\def\setupmathstyle[#1]%
- {\edef\m_math_style_asked{#1}%
- \ifempty\m_math_style_asked \else
- \math_style_set_indeed
- \fi}
-
-\permanent\protected\def\usemathstyleparameter#1% faster local variant
- {\edef\m_math_style_asked{#1\c!mathstyle}%
- \ifempty\m_math_style_asked \else
- \math_style_set_indeed
- \fi}
+% \permanent\protected\def\setupmathstyle[#1]%
+% {\edef\m_math_style_asked{#1}%
+% \ifempty\m_math_style_asked \else
+% \math_style_set_indeed
+% \fi}
+%
+% \permanent\protected\def\usemathstyleparameter#1% faster local variant
+% {\edef\m_math_style_asked{#1\c!mathstyle}%
+% \ifempty\m_math_style_asked \else
+% \math_style_set_indeed
+% \fi}
%D \startbuffer
%D \definemathstyle[mystyle][scriptscript]
@@ -2362,39 +2418,91 @@
%D
%D \typebuffer \blank \start \getbuffer \stop \blank
+% maybe move this to the lua end ...
+
\installcorenamespace {mathstyle}
-\permanent\tolerant\protected\def\definemathstyle[#1]#*[#2]%
- {\c_math_styles_state_style \zerocount
- \c_math_styles_state_cramped\zerocount
- \c_math_styles_state_size \zerocount
- \rawprocesscommacommand[#2]\math_style_collect
- \letcsname\??mathstyle#1\normalexpanded{\endcsname\math_style_add_to_cache_choice}}
+% \permanent\tolerant\protected\def\definemathstyle[#1]#*[#2]%
+% {\c_math_styles_state_style \zerocount
+% \c_math_styles_state_cramped\zerocount
+% \c_math_styles_state_size \zerocount
+% \rawprocesscommacommand[#2]\math_style_collect
+% \letcsname\??mathstyle#1\normalexpanded{\endcsname\math_style_add_to_cache_choice}}
+%
+% \def\math_style_set_indeed
+% {\ifcsname\??mathstyle\m_math_style_asked\endcsname
+% \lastnamedcs
+% \else
+% \math_style_set_mathstyle_mathstyle
+% \fi}
+%
+% \def\math_style_set_mathstyle_mathstyle
+% {\ifcsname\??mathstylecache\m_math_style_asked\endcsname
+% \lastnamedcs
+% \else
+% \math_style_set_mathstyle_mathstylecache
+% \fi}
+%
+% \def\math_style_set_mathstyle_mathstylecache
+% {\c_math_styles_state_style \zerocount
+% \c_math_styles_state_cramped\zerocount
+% \c_math_styles_state_size \zerocount
+% \rawprocesscommacommand[\m_math_style_asked]\math_style_collect
+% \gletcsname\??mathstylecache\m_math_style_asked\normalexpanded{\endcsname\math_style_add_to_cache_choice}%
+% \csname\??mathstylecache\m_math_style_asked\endcsname}
+
+\letcsname\??mathstyle \endcsname\empty
+\letcsname\??mathstylecache\endcsname\empty
\def\math_style_set_indeed
{\ifcsname\??mathstyle\m_math_style_asked\endcsname
\lastnamedcs
+ \orelse\ifcsname\??mathstylecache\m_math_style_asked\endcsname
+ \lastnamedcs
\else
- \math_style_set_mathstyle_mathstyle
+ \math_style_set_mathstyle_mathstylecache\m_math_style_asked
\fi}
-\def\math_style_set_mathstyle_mathstyle
- {\ifcsname\??mathstylecache\m_math_style_asked\endcsname
+\permanent\def\expandedmathstyleparameter#1%
+ {\ifcsname\??mathstyle#1\c!mathstyle\endcsname
+ \lastnamedcs
+ \orelse\ifcsname\??mathstylecache#1\c!mathstyle\endcsname
\lastnamedcs
\else
- \math_style_set_mathstyle_mathstylecache
+ \math_style_set_mathstyle_mathstylecache#1%
+ \fi}
+
+\permanent\protected\def\usemathstyleparameter#1%
+ {\edef\m_math_style_asked{#1\c!mathstyle}%
+ \ifempty\m_math_style_asked \else
+ \math_style_set_indeed
+ \fi}
+
+\permanent\tolerant\protected\def\setmathstyle[#1]#;#=% so we accept [] and {}
+ {\edef\m_math_style_asked{#1#2}%
+ \ifempty\m_math_style_asked \else
+ \math_style_set_indeed
+ \fi}
+
+\permanent\protected\def\setupmathstyle[#1]%
+ {\edef\m_math_style_asked{#1}%
+ \ifempty\m_math_style_asked \else
+ \math_style_set_indeed
\fi}
-\def\math_style_set_mathstyle_mathstylecache
- {\c_math_styles_state_style \zerocount
+\def\math_style_set_mathstyle_mathstylecache#1%
+ {\beginlocalcontrol % so we can expand
+ \edef\m_math_style_asked{#1\c!mathstyle}%
+ \c_math_styles_state_style \zerocount
\c_math_styles_state_cramped\zerocount
\c_math_styles_state_size \zerocount
\rawprocesscommacommand[\m_math_style_asked]\math_style_collect
\gletcsname\??mathstylecache\m_math_style_asked\normalexpanded{\endcsname\math_style_add_to_cache_choice}%
- \csname\??mathstylecache\m_math_style_asked\endcsname}
+ \endlocalcontrol
+ \csname\??mathstylecache#1\c!mathstyle\endcsname}
-\letcsname\??mathstyle \??mathstyle \endcsname\math_style_set_mathstyle_mathstyle % still needed?
-\letcsname\??mathstylecache\??mathstylecache\endcsname\math_style_set_mathstyle_mathstylecache % still needed?
+% \letcsname\??mathstyle \??mathstyle \endcsname\math_style_set_mathstyle_mathstyle % still needed?
+% \letcsname\??mathstylecache\??mathstylecache\endcsname\math_style_set_mathstyle_mathstylecache % still needed?
%D \startbuffer
%D $x\begingroup\setupmathstyle[script]x\endgroup x$
@@ -2409,9 +2517,9 @@
\ifempty\m_math_style_asked
\enforced\aliased\let\stopmathstyle\relax
\else
- \bgroup
+ \beginmathgroup % \bgroup
\math_style_set_indeed
- \enforced\aliased\let\stopmathstyle\egroup
+ \enforced\aliased\let\stopmathstyle\endmathgroup % \egroup
\fi}
\aliased\let\stopmathstyle\relax
@@ -2421,9 +2529,9 @@
\ifempty\m_math_style_asked
\enforced\let\stopusemathstyleparameter\relax
\else
- \bgroup
+ \beginmathgroup % \bgroup
\math_style_set_indeed
- \enforced\let\stopusemathstyleparameter\egroup
+ \enforced\let\stopusemathstyleparameter\endmathgroup % \egroup
\fi}
\aliased\let\stopusemathstyleparameter\relax
diff --git a/tex/context/base/mkxl/math-noa.lmt b/tex/context/base/mkxl/math-noa.lmt
index 66e8caade..3699ae03c 100644
--- a/tex/context/base/mkxl/math-noa.lmt
+++ b/tex/context/base/mkxl/math-noa.lmt
@@ -185,17 +185,19 @@ local nodecodes = nodes.nodecodes
local noadcodes = nodes.noadcodes
local fencecodes = nodes.fencecodes
-local ordnoad_code = noadcodes.ord
-local opnoad_code = noadcodes.op
-local binnoad_code = noadcodes.bin
-local relnode_code = noadcodes.rel
+local ordinarynoad_code = noadcodes.ordinary
+local operatornoad_code = noadcodes.operator
+local binarynoad_code = noadcodes.binary
+local relationnoad_code = noadcodes.relation
local opennoad_code = noadcodes.open
local closenoad_code = noadcodes.close
-local punctnoad_code = noadcodes.punct
+local punctuationnoad_code = noadcodes.punctuation
local innernoad_code = noadcodes.inner
local undernoad_code = noadcodes.under
local overnoad_code = noadcodes.over
local vcenternoad_code = noadcodes.vcenter
+local fractionnoad_code = noadcodes.fraction
+local radicalnoad_code = noadcodes.radical
local noad_code = nodecodes.noad
local accent_code = nodecodes.accent
@@ -1804,17 +1806,19 @@ do
local collapse = { }
local mathlists = characters.mathlists
local validpair = {
- [ordnoad_code] = true,
- [opnoad_code] = true,
- [binnoad_code] = true, -- new
- [relnode_code] = true,
- [opennoad_code] = true, -- new
- [closenoad_code] = true, -- new
- [punctnoad_code] = true, -- new
- [innernoad_code] = false,
- [undernoad_code] = false,
- [overnoad_code] = false,
- [vcenternoad_code] = false,
+ [ordinarynoad_code] = true,
+ [operatornoad_code] = true,
+ [binarynoad_code] = true, -- new
+ [relationnoad_code] = true,
+ [opennoad_code] = true, -- new
+ [closenoad_code] = true, -- new
+ [punctuationnoad_code] = true, -- new
+ [innernoad_code] = false,
+ [undernoad_code] = false,
+ [overnoad_code] = false,
+ [vcenternoad_code] = false,
+ [fractionnoad_code] = false,
+ [radicalnoad_code] = false,
}
local reported = setmetatableindex("table")
@@ -2111,17 +2115,19 @@ do
local classes = { }
local colors = {
- [relnode_code] = "trace:dr",
- [ordnoad_code] = "trace:db",
- [binnoad_code] = "trace:dg",
- [opennoad_code] = "trace:dm",
- [closenoad_code] = "trace:dm",
- [punctnoad_code] = "trace:dc",
- -- [opnoad_code] = "",
- -- [innernoad_code = "",
- -- [undernoad_code] = "",
- -- [overnoad_code] = "",
- -- [vcenternoad_code] = "",
+ [relationnoad_code] = "trace:dr",
+ [ordinarynoad_code] = "trace:db",
+ [binarynoad_code] = "trace:dg",
+ [opennoad_code] = "trace:dm",
+ [closenoad_code] = "trace:dm",
+ [punctuationnoad_code] = "trace:dc",
+ -- [operatornoad_code] = "",
+ -- [innernoad_code = "",
+ -- [undernoad_code] = "",
+ -- [overnoad_code] = "",
+ -- [vcenternoad_code] = "",
+ -- [fractionnoad_code] = "",
+ -- [radicalnoad_code] = "",
}
local setcolor = colortracers.set
@@ -2165,11 +2171,13 @@ do
local a_mathdomain = privateattribute("mathdomain")
mathematics.domains = categories
local permitted = {
- ordinary = ordnoad_code,
- binary = binnoad_code,
- relation = relnode_code,
- punctuation = punctnoad_code,
+ ordinary = ordinarynoad_code,
+ binary = binarynoad_code,
+ relation = relationnoad_code,
+ punctuation = punctuationnoad_code,
inner = innernoad_code,
+ -- fraction = fractionnoad_code,
+ -- radical = radicalnoad_code,
}
function mathematics.registerdomain(data)
diff --git a/tex/context/base/mkxl/mult-sys.mkxl b/tex/context/base/mkxl/mult-sys.mkxl
index 48a35e0b2..1eae000e4 100644
--- a/tex/context/base/mkxl/mult-sys.mkxl
+++ b/tex/context/base/mkxl/mult-sys.mkxl
@@ -48,6 +48,7 @@
\definesystemconstant {ancientlatin} \definesystemconstant {ala}
\definesystemconstant {arabic} \definesystemconstant {ar}
\definesystemconstant {belarussian} \definesystemconstant {be}
+\definesystemconstant {bengali} \definesystemconstant {bn}
\definesystemconstant {bulgarian} \definesystemconstant {bg}
\definesystemconstant {bokmal} \definesystemconstant {nb}
\definesystemconstant {catalan} \definesystemconstant {ca}
@@ -65,11 +66,14 @@
\definesystemconstant {gbenglish} \definesystemconstant {gb}
\definesystemconstant {german} \definesystemconstant {de}
\definesystemconstant {greek} \definesystemconstant {gr}
+\definesystemconstant {gujarati} \definesystemconstant {gu}
\definesystemconstant {hebrew} \definesystemconstant {he}
+\definesystemconstant {hindi} \definesystemconstant {hi}
\definesystemconstant {yiddish} \definesystemconstant {yi}
\definesystemconstant {hungarian} \definesystemconstant {hu}
\definesystemconstant {italian} \definesystemconstant {it}
\definesystemconstant {japanese} \definesystemconstant {ja}
+\definesystemconstant {kannada} \definesystemconstant {kn}
\definesystemconstant {korean} \definesystemconstant {kr}
\definesystemconstant {latin} \definesystemconstant {la}
\definesystemconstant {lithuanian} \definesystemconstant {lt}
@@ -82,11 +86,14 @@
\definesystemconstant {portuguese} \definesystemconstant {pt}
\definesystemconstant {romanian} \definesystemconstant {ro}
\definesystemconstant {russian} \definesystemconstant {ru}
+\definesystemconstant {sanskrit} \definesystemconstant {sa}
\definesystemconstant {slovak} \definesystemconstant {sk}
\definesystemconstant {slovenian} \definesystemconstant {sl}
\definesystemconstant {serbian} \definesystemconstant {sr}
\definesystemconstant {spanish} \definesystemconstant {es}
\definesystemconstant {swedish} \definesystemconstant {sv}
+\definesystemconstant {tamil} \definesystemconstant {ta}
+\definesystemconstant {telugu} \definesystemconstant {te}
\definesystemconstant {thai} \definesystemconstant {th} % mojca mentioned it at BT2013 but we need more info
\definesystemconstant {turkish} \definesystemconstant {tr}
\definesystemconstant {turkmen} \definesystemconstant {tk}
diff --git a/tex/context/base/mkxl/node-ini.lmt b/tex/context/base/mkxl/node-ini.lmt
index 1ec0932ab..2b09485db 100644
--- a/tex/context/base/mkxl/node-ini.lmt
+++ b/tex/context/base/mkxl/node-ini.lmt
@@ -142,6 +142,26 @@ nodes.mathvalues = mathvalues
nodes.nodecodes = nodecodes
+-- we will transition to more verbose subtypes (after other math is done)
+
+noadcodes.ord = noadcodes.ord or noadcodes.ordinary
+noadcodes.operator = noadcodes.op or noadcodes.operator
+noadcodes.bin = noadcodes.bin or noadcodes.binary
+noadcodes.rel = noadcodes.rel or noadcodes.relation
+noadcodes.punct = noadcodes.punct or noadcodes.punctuation
+noadcodes.rad = noadcodes.rad or noadcodes.radical
+noadcodes.frac = noadcodes.frac or noadcodes.fraction
+
+-- so for now:
+
+noadcodes.ordinary = noadcodes.ordinary or noadcodes.ord
+noadcodes.operator = noadcodes.operator or noadcodes.op
+noadcodes.binary = noadcodes.binary or noadcodes.bin
+noadcodes.relation = noadcodes.relation or noadcodes.rel
+noadcodes.punctuation = noadcodes.punctuation or noadcodes.punct
+noadcodes.radical = noadcodes.radical or noadcodes.rad
+noadcodes.fraction = noadcodes.fraction or noadcodes.frac
+
local subtypes = allocate {
glue = gluecodes,
dir = dircodes,
diff --git a/tex/context/base/mkxl/norm-ctx.mkxl b/tex/context/base/mkxl/norm-ctx.mkxl
index 5cee04935..fb67c5f24 100644
--- a/tex/context/base/mkxl/norm-ctx.mkxl
+++ b/tex/context/base/mkxl/norm-ctx.mkxl
@@ -19,69 +19,114 @@
% more friendly in setups:
-\aliased\let\ordordspacing \Umathordordspacing
-\aliased\let\ordopspacing \Umathordopspacing
-\aliased\let\ordbinspacing \Umathordbinspacing
-\aliased\let\ordrelspacing \Umathordrelspacing
-\aliased\let\ordopenspacing \Umathordopenspacing
-\aliased\let\ordclosespacing \Umathordclosespacing
-\aliased\let\ordpunctspacing \Umathordpunctspacing
-\aliased\let\ordinnerspacing \Umathordinnerspacing
-\aliased\let\opordspacing \Umathopordspacing
-\aliased\let\opopspacing \Umathopopspacing
-\aliased\let\opbinspacing \Umathopbinspacing
-\aliased\let\oprelspacing \Umathoprelspacing
-\aliased\let\opopenspacing \Umathopopenspacing
-\aliased\let\opclosespacing \Umathopclosespacing
-\aliased\let\oppunctspacing \Umathoppunctspacing
-\aliased\let\opinnerspacing \Umathopinnerspacing
-\aliased\let\binordspacing \Umathbinordspacing
-\aliased\let\binopspacing \Umathbinopspacing
-\aliased\let\binbinspacing \Umathbinbinspacing
-\aliased\let\binrelspacing \Umathbinrelspacing
-\aliased\let\binopenspacing \Umathbinopenspacing
-\aliased\let\binclosespacing \Umathbinclosespacing
-\aliased\let\binpunctspacing \Umathbinpunctspacing
-\aliased\let\bininnerspacing \Umathbininnerspacing
-\aliased\let\relordspacing \Umathrelordspacing
-\aliased\let\relopspacing \Umathrelopspacing
-\aliased\let\relbinspacing \Umathrelbinspacing
-\aliased\let\relrelspacing \Umathrelrelspacing
-\aliased\let\relopenspacing \Umathrelopenspacing
-\aliased\let\relclosespacing \Umathrelclosespacing
-\aliased\let\relpunctspacing \Umathrelpunctspacing
-\aliased\let\relinnerspacing \Umathrelinnerspacing
-\aliased\let\openordspacing \Umathopenordspacing
-\aliased\let\openopspacing \Umathopenopspacing
-\aliased\let\openbinspacing \Umathopenbinspacing
-\aliased\let\openrelspacing \Umathopenrelspacing
-\aliased\let\openopenspacing \Umathopenopenspacing
-\aliased\let\openclosespacing \Umathopenclosespacing
-\aliased\let\openpunctspacing \Umathopenpunctspacing
-\aliased\let\openinnerspacing \Umathopeninnerspacing
-\aliased\let\closeordspacing \Umathcloseordspacing
-\aliased\let\closeopspacing \Umathcloseopspacing
-\aliased\let\closebinspacing \Umathclosebinspacing
-\aliased\let\closerelspacing \Umathcloserelspacing
-\aliased\let\closeopenspacing \Umathcloseopenspacing
-\aliased\let\closeclosespacing\Umathcloseclosespacing
-\aliased\let\closepunctspacing\Umathclosepunctspacing
-\aliased\let\closeinnerspacing\Umathcloseinnerspacing
-\aliased\let\punctordspacing \Umathpunctordspacing
-\aliased\let\punctopspacing \Umathpunctopspacing
-\aliased\let\punctbinspacing \Umathpunctbinspacing
-\aliased\let\punctrelspacing \Umathpunctrelspacing
-\aliased\let\punctopenspacing \Umathpunctopenspacing
-\aliased\let\punctclosespacing\Umathpunctclosespacing
-\aliased\let\punctpunctspacing\Umathpunctpunctspacing
-\aliased\let\punctinnerspacing\Umathpunctinnerspacing
-\aliased\let\innerordspacing \Umathinnerordspacing
-\aliased\let\inneropspacing \Umathinneropspacing
-\aliased\let\innerbinspacing \Umathinnerbinspacing
-\aliased\let\innerrelspacing \Umathinnerrelspacing
-\aliased\let\inneropenspacing \Umathinneropenspacing
-\aliased\let\innerclosespacing\Umathinnerclosespacing
-\aliased\let\innerpunctspacing\Umathinnerpunctspacing
-\aliased\let\innerinnerspacing\Umathinnerinnerspacing
+\aliased\let\ordordspacing \Umathordordspacing
+\aliased\let\ordopspacing \Umathordopspacing
+\aliased\let\ordbinspacing \Umathordbinspacing
+\aliased\let\ordrelspacing \Umathordrelspacing
+\aliased\let\ordopenspacing \Umathordopenspacing
+\aliased\let\ordclosespacing \Umathordclosespacing
+\aliased\let\ordpunctspacing \Umathordpunctspacing
+\aliased\let\ordinnerspacing \Umathordinnerspacing
+\aliased\let\ordfracspacing \Umathordfracspacing
+\aliased\let\ordradspacing \Umathordradspacing
+
+\aliased\let\opordspacing \Umathopordspacing
+\aliased\let\opopspacing \Umathopopspacing
+\aliased\let\opbinspacing \Umathopbinspacing
+\aliased\let\oprelspacing \Umathoprelspacing
+\aliased\let\opopenspacing \Umathopopenspacing
+\aliased\let\opclosespacing \Umathopclosespacing
+\aliased\let\oppunctspacing \Umathoppunctspacing
+\aliased\let\opinnerspacing \Umathopinnerspacing
+\aliased\let\opfracspacing \Umathopfracspacing
+\aliased\let\opradspacing \Umathopradspacing
+
+\aliased\let\binordspacing \Umathbinordspacing
+\aliased\let\binopspacing \Umathbinopspacing
+\aliased\let\binbinspacing \Umathbinbinspacing
+\aliased\let\binrelspacing \Umathbinrelspacing
+\aliased\let\binopenspacing \Umathbinopenspacing
+\aliased\let\binclosespacing \Umathbinclosespacing
+\aliased\let\binpunctspacing \Umathbinpunctspacing
+\aliased\let\bininnerspacing \Umathbininnerspacing
+\aliased\let\binfracspacing \Umathbinfracspacing
+\aliased\let\binradspacing \Umathbinradspacing
+
+\aliased\let\relordspacing \Umathrelordspacing
+\aliased\let\relopspacing \Umathrelopspacing
+\aliased\let\relbinspacing \Umathrelbinspacing
+\aliased\let\relrelspacing \Umathrelrelspacing
+\aliased\let\relopenspacing \Umathrelopenspacing
+\aliased\let\relclosespacing \Umathrelclosespacing
+\aliased\let\relpunctspacing \Umathrelpunctspacing
+\aliased\let\relinnerspacing \Umathrelinnerspacing
+\aliased\let\relfracspacing \Umathrelfracspacing
+\aliased\let\relradspacing \Umathrelradspacing
+
+\aliased\let\openordspacing \Umathopenordspacing
+\aliased\let\openopspacing \Umathopenopspacing
+\aliased\let\openbinspacing \Umathopenbinspacing
+\aliased\let\openrelspacing \Umathopenrelspacing
+\aliased\let\openopenspacing \Umathopenopenspacing
+\aliased\let\openclosespacing \Umathopenclosespacing
+\aliased\let\openpunctspacing \Umathopenpunctspacing
+\aliased\let\openinnerspacing \Umathopeninnerspacing
+\aliased\let\openfracspacing \Umathopenfracspacing
+\aliased\let\openradspacing \Umathopenradspacing
+
+\aliased\let\closeordspacing \Umathcloseordspacing
+\aliased\let\closeopspacing \Umathcloseopspacing
+\aliased\let\closebinspacing \Umathclosebinspacing
+\aliased\let\closerelspacing \Umathcloserelspacing
+\aliased\let\closeopenspacing \Umathcloseopenspacing
+\aliased\let\closeclosespacing \Umathcloseclosespacing
+\aliased\let\closepunctspacing \Umathclosepunctspacing
+\aliased\let\closeinnerspacing \Umathcloseinnerspacing
+\aliased\let\closefracspacing \Umathclosefracspacing
+\aliased\let\closeradspacing \Umathcloseradspacing
+
+\aliased\let\punctordspacing \Umathpunctordspacing
+\aliased\let\punctopspacing \Umathpunctopspacing
+\aliased\let\punctbinspacing \Umathpunctbinspacing
+\aliased\let\punctrelspacing \Umathpunctrelspacing
+\aliased\let\punctopenspacing \Umathpunctopenspacing
+\aliased\let\punctclosespacing \Umathpunctclosespacing
+\aliased\let\punctpunctspacing \Umathpunctpunctspacing
+\aliased\let\punctinnerspacing \Umathpunctinnerspacing
+\aliased\let\punctfracspacing \Umathpunctfracspacing
+\aliased\let\punctradspacing \Umathpunctradspacing
+
+\aliased\let\innerordspacing \Umathinnerordspacing
+\aliased\let\inneropspacing \Umathinneropspacing
+\aliased\let\innerbinspacing \Umathinnerbinspacing
+\aliased\let\innerrelspacing \Umathinnerrelspacing
+\aliased\let\inneropenspacing \Umathinneropenspacing
+\aliased\let\innerclosespacing \Umathinnerclosespacing
+\aliased\let\innerpunctspacing \Umathinnerpunctspacing
+\aliased\let\innerinnerspacing \Umathinnerinnerspacing
+\aliased\let\innerfracspacing \Umathinnerfracspacing
+\aliased\let\innerradspacing \Umathinnerradspacing
+
+\aliased\let\fracordspacing \Umathfracordspacing
+\aliased\let\fracopspacing \Umathfracopspacing
+\aliased\let\fracbinspacing \Umathfracbinspacing
+\aliased\let\fracrelspacing \Umathfracrelspacing
+\aliased\let\fracopenspacing \Umathfracopenspacing
+\aliased\let\fracclosespacing \Umathfracclosespacing
+\aliased\let\fracpunctspacing \Umathfracpunctspacing
+\aliased\let\fracinnerspacing \Umathfracinnerspacing
+\aliased\let\fracfracspacing \Umathfracfracspacing
+\aliased\let\fracradspacing \Umathfracradspacing
+
+\aliased\let\radordspacing \Umathradordspacing
+\aliased\let\radopspacing \Umathradopspacing
+\aliased\let\radbinspacing \Umathradbinspacing
+\aliased\let\radrelspacing \Umathradrelspacing
+\aliased\let\radopenspacing \Umathradopenspacing
+\aliased\let\radclosespacing \Umathradclosespacing
+\aliased\let\radpunctspacing \Umathradpunctspacing
+\aliased\let\radinnerspacing \Umathradinnerspacing
+\aliased\let\radfracspacing \Umathradfracspacing
+\aliased\let\radradspacing \Umathradradspacing
\protect \endinput
diff --git a/tex/context/base/mkxl/page-mix.mkxl b/tex/context/base/mkxl/page-mix.mkxl
index 32af22114..21e923864 100644
--- a/tex/context/base/mkxl/page-mix.mkxl
+++ b/tex/context/base/mkxl/page-mix.mkxl
@@ -635,7 +635,7 @@
\global\advance\c_page_mix_otr_nesting\plusone
\ifcase\c_page_mix_otr_nesting\or
\ifdim\pagetotal=\zeropoint \else
- % make sure that whitespace an dblanks are done
+ % make sure that whitespace and blanks are done
\strut
\vskip-\lineheight
% no, bad spacing: \obeydepth % we could handle this in pre material
diff --git a/tex/context/base/mkxl/spac-hor.mkxl b/tex/context/base/mkxl/spac-hor.mkxl
index 06a8f74f4..245195011 100644
--- a/tex/context/base/mkxl/spac-hor.mkxl
+++ b/tex/context/base/mkxl/spac-hor.mkxl
@@ -586,6 +586,8 @@
%D A couple of plain macros:
\ifdefined\enspace \else \permanent\protected\def\enspace{\kern .5\emwidth} \fi
+\ifdefined\emspace \else \permanent\protected\def\emspace{\kern \emwidth} \fi
+
\ifdefined\quad \else \permanent\protected\def\quad {\hskip \emwidth\relax} \fi
\ifdefined\enskip \else \permanent\protected\def\enskip {\hskip.5\emwidth\relax} \fi
\ifdefined\qquad \else \permanent\protected\def\qquad {\hskip 2\emwidth\relax} \fi
@@ -593,7 +595,7 @@
\permanent\protected\def\negenspace{\kern-.5\emwidth}
\permanent\protected\def\negemspace{\kern- \emwidth}
-\aliased\let\emspace\quad
+% \aliased\let\emspace\quad
\permanent\protected\def\charspace{ } % the unexpandable \space (as space can also be delimiter for numbers)
diff --git a/tex/context/base/mkxl/strc-con.mklx b/tex/context/base/mkxl/strc-con.mklx
index ba9c62d48..55ddb8edf 100644
--- a/tex/context/base/mkxl/strc-con.mklx
+++ b/tex/context/base/mkxl/strc-con.mklx
@@ -399,8 +399,12 @@
%
\dostarttagged\t!constructiontag\empty % todo
\setbox\constructionheadbox\hbox
- {\forgetall
+ {\scratchskip\parindent
+ \forgetall
\dontcomplain
+ % new and under testing
+ \doif{\constructionparameter\c!headindenting}\v!yes{\hskip\scratchskip}%
+ %
\ifx\currentconstructionalternative\v!serried % brrr, hack, will change
\csname\??constructionmainhandler\currentconstructionhandler\endcsname\currentconstructiontext
\else
@@ -410,11 +414,9 @@
\ifx\p_strc_constructions_aligntitle\v!no
\leftconstructionskip \leftskip
\rightconstructionskip\rightskip
- \else
- \ifcase\c_strc_constructions_nested_state
- \leftconstructionskip \leftskip
- \rightconstructionskip\rightskip
- \fi
+ \orelse\ifcase\c_strc_constructions_nested_state
+ \leftconstructionskip \leftskip
+ \rightconstructionskip\rightskip
\fi
\edef\p_strc_constructions_align{\constructionparameter\c!align}%
\ifempty\p_strc_constructions_align \else
@@ -938,10 +940,6 @@
\endgroup
\stopsetups
-\ifcase\contextlmtxmode \else
- % just an empty check so that we can grep for contextlmtxmode in mkiv files
-\fi
-
% \definedescription[whatever][alternative=right:bottom]
%
% \startwhatever{just a small\\example}
diff --git a/tex/context/base/mkxl/strc-enu.mklx b/tex/context/base/mkxl/strc-enu.mklx
index fd98b11f3..89e1b307a 100644
--- a/tex/context/base/mkxl/strc-enu.mklx
+++ b/tex/context/base/mkxl/strc-enu.mklx
@@ -307,16 +307,22 @@
\endgroup}
\protected\def\strc_enumerations_inject_symbol % todo check
- {\constructionparameter\c!left
+ {\begingroup
+ \useconstructionstyleandcolor\c!numberstyle\c!numbercolor
+ \constructionparameter\c!left
\constructionparameter\c!symbol
- \constructionparameter\c!right}
+ \constructionparameter\c!right
+ \endgroup}
\protected\def\strc_enumerations_inject_number
- {\constructionparameter\c!left
+ {\begingroup
+ \useconstructionstyleandcolor\c!numberstyle\c!numbercolor
+ \constructionparameter\c!left
\constructionparameter\c!starter
\clf_savedlistprefixednumber{\currentconstructionmain}\currentconstructionlistentry\relax
\constructionparameter\c!stopper
- \constructionparameter\c!right}
+ \constructionparameter\c!right
+ \endgroup}
\protected\def\strc_enumerations_inject_text_and_number
{\constructionparameter\c!numbercommand
diff --git a/tex/context/base/mkxl/strc-itm.mklx b/tex/context/base/mkxl/strc-itm.mklx
index 3ccc5358e..13b750ce3 100644
--- a/tex/context/base/mkxl/strc-itm.mklx
+++ b/tex/context/base/mkxl/strc-itm.mklx
@@ -203,7 +203,7 @@
% 0 = before/after
% 1 = between unless before
-% 2 = between
+% 2 = between (auto)
\newconstant \c_strc_itemgroups_spacing_mode \c_strc_itemgroups_spacing_mode\plustwo
\newconditional\c_strc_itemgroups_optimize \settrue\c_strc_itemgroups_optimize
@@ -909,6 +909,15 @@
\doadaptleftskip {\itemgroupparameter\c!leftmargindistance}%
\doadaptrightskip{\itemgroupparameter\c!rightmargindistance}%
%
+ \edef\m_strc_itemgroups_spacing{\itemgroupparameter\c!spacing}%
+ \ifx\m_strc_itemgroups_spacing\v!before
+ \c_strc_itemgroups_spacing_mode\zerocount
+ \orelse\ifx\m_strc_itemgroups_spacing\v!inbetween
+ \c_strc_itemgroups_spacing_mode\plusone
+ \orelse\ifx\m_strc_itemgroups_spacing\v!auto
+ \c_strc_itemgroups_spacing_mode\plustwo
+ \fi
+ %
\usealignparameter\itemgroupparameter
\edef\m_strc_itemgroups_indenting{\itemgroupparameter\c!indenting}%
\ifnum\c_strc_itemgroups_nesting>\zerocount
diff --git a/tex/context/base/mkxl/typo-syn.lmt b/tex/context/base/mkxl/typo-syn.lmt
index fc03ccb3b..4a5b6ae85 100644
--- a/tex/context/base/mkxl/typo-syn.lmt
+++ b/tex/context/base/mkxl/typo-syn.lmt
@@ -7,6 +7,9 @@ if not modules then modules = { } end modules ['typo-syn'] = {
license = "see context related readme files"
}
+-- For the moment we have the splitter here but it actually belongs
+-- in the builders namespace.
+
local nodes = nodes
local tasks = nodes.tasks