summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2022-07-24 12:35:49 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2022-07-24 12:35:49 +0200
commit352517495e32813d30d0080f2a0c8dd1afea794a (patch)
tree346f33901602d6bd6db1c5913ff092fcf821fa10 /tex
parent82c674fdcf5bcff4ad0dc0936d638fc729145616 (diff)
downloadcontext-352517495e32813d30d0080f2a0c8dd1afea794a.tar.gz
2022-07-24 12:18:00
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkii/mult-cs.mkii5
-rw-r--r--tex/context/base/mkii/mult-it.mkii8
-rw-r--r--tex/context/base/mkii/mult-ro.mkii5
-rw-r--r--tex/context/base/mkiv/char-def.lua4
-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/mlib-pps.lua1
-rw-r--r--tex/context/base/mkiv/mult-fun.lua2
-rw-r--r--tex/context/base/mkiv/mult-low.lua11
-rw-r--r--tex/context/base/mkiv/mult-prm.lua8
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin24614 -> 24590 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin258249 -> 258691 bytes
-rw-r--r--tex/context/base/mkiv/util-prs.lua27
-rw-r--r--tex/context/base/mkiv/util-tab.lua18
-rw-r--r--tex/context/base/mkxl/anch-box.mkxl3
-rw-r--r--tex/context/base/mkxl/anch-pgr.lmt38
-rw-r--r--tex/context/base/mkxl/buff-ini.lmt237
-rw-r--r--tex/context/base/mkxl/buff-ini.mkxl16
-rw-r--r--tex/context/base/mkxl/buff-ver.mkxl6
-rw-r--r--tex/context/base/mkxl/cont-new.mkxl2
-rw-r--r--tex/context/base/mkxl/context.mkxl3
-rw-r--r--tex/context/base/mkxl/font-con.lmt4
-rw-r--r--tex/context/base/mkxl/font-ctx.lmt17
-rw-r--r--tex/context/base/mkxl/grph-fig.mkxl12
-rw-r--r--tex/context/base/mkxl/grph-trf.mkxl2
-rw-r--r--tex/context/base/mkxl/lpdf-emb.lmt1
-rw-r--r--tex/context/base/mkxl/lpdf-lmt.lmt3
-rw-r--r--tex/context/base/mkxl/math-act.lmt312
-rw-r--r--tex/context/base/mkxl/math-ali.mkxl437
-rw-r--r--tex/context/base/mkxl/math-dim.lmt279
-rw-r--r--tex/context/base/mkxl/math-fen.mkxl81
-rw-r--r--tex/context/base/mkxl/math-frc.mkxl45
-rw-r--r--tex/context/base/mkxl/math-ini.lmt1
-rw-r--r--tex/context/base/mkxl/math-ini.mkxl79
-rw-r--r--tex/context/base/mkxl/math-noa.lmt8
-rw-r--r--tex/context/base/mkxl/math-spa.lmt56
-rw-r--r--tex/context/base/mkxl/math-twk.mkxl60
-rw-r--r--tex/context/base/mkxl/math-vfu.lmt3
-rw-r--r--tex/context/base/mkxl/meta-ini.mkxl4
-rw-r--r--tex/context/base/mkxl/mlib-fio.lmt34
-rw-r--r--tex/context/base/mkxl/mlib-int.lmt6
-rw-r--r--tex/context/base/mkxl/mlib-pps.lmt1
-rw-r--r--tex/context/base/mkxl/mlib-scn.lmt24
-rw-r--r--tex/context/base/mkxl/node-ali.lmt238
-rw-r--r--tex/context/base/mkxl/strc-blk.mkxl32
-rw-r--r--tex/context/base/mkxl/strc-mat.mkxl214
-rw-r--r--tex/context/base/mkxl/supp-box.mkxl2
-rw-r--r--tex/context/base/mkxl/syst-aux.mkxl15
-rw-r--r--tex/context/base/mkxl/syst-ini.mkxl5
-rw-r--r--tex/context/base/mkxl/syst-mac.lmt2
-rw-r--r--tex/context/base/mkxl/tabl-tab.mkxl8
-rw-r--r--tex/context/base/mkxl/task-ini.lmt4
-rw-r--r--tex/context/base/mkxl/type-set.mkxl3
-rw-r--r--tex/context/base/mkxl/typo-bld.mkxl22
-rw-r--r--tex/context/base/mkxl/typo-lbx.lmt3
-rw-r--r--tex/context/base/mkxl/typo-lbx.mkxl4
-rw-r--r--tex/context/fonts/mkiv/bonum-math.lfg71
-rw-r--r--tex/context/fonts/mkiv/cambria-math.lfg2
-rw-r--r--tex/context/fonts/mkiv/dejavu-math.lfg2
-rw-r--r--tex/context/fonts/mkiv/garamond-math.lfg2
-rw-r--r--tex/context/fonts/mkiv/kpfonts-math.lfg2
-rw-r--r--tex/context/fonts/mkiv/libertinus-math.lfg2
-rw-r--r--tex/context/fonts/mkiv/lm.lfg483
-rw-r--r--tex/context/fonts/mkiv/lucida-opentype-math.lfg4
-rw-r--r--tex/context/fonts/mkiv/pagella-math.lfg17
-rw-r--r--tex/context/fonts/mkiv/schola-math.lfg2
-rw-r--r--tex/context/fonts/mkiv/stix-two-math.lfg2
-rw-r--r--tex/context/fonts/mkiv/termes-math.lfg2
-rw-r--r--tex/context/fonts/mkiv/type-imp-euler.mkiv9
-rw-r--r--tex/context/fonts/mkiv/type-imp-lucida-opentype.mkiv14
-rw-r--r--tex/context/interface/mkii/keys-cs.xml5
-rw-r--r--tex/context/interface/mkii/keys-it.xml8
-rw-r--r--tex/context/interface/mkii/keys-ro.xml5
-rw-r--r--tex/context/modules/mkiv/m-scite.mkiv2
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
77 files changed, 2115 insertions, 944 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index a02511e2c..377684c2c 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.07.06 21:34}
+\newcontextversion{2022.07.24 12:17}
%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 385df8685..2310671e9 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.07.06 21:34}
+\edef\contextversion{2022.07.24 12:17}
%D For those who want to use this:
diff --git a/tex/context/base/mkii/mult-cs.mkii b/tex/context/base/mkii/mult-cs.mkii
index e7987a2d6..b5e93a66c 100644
--- a/tex/context/base/mkii/mult-cs.mkii
+++ b/tex/context/base/mkii/mult-cs.mkii
@@ -870,6 +870,7 @@
\setinterfaceconstant{frameradius}{polomerramecku}
\setinterfaceconstant{frames}{ramecky}
\setinterfaceconstant{freeregion}{freeregion}
+\setinterfaceconstant{freezespacing}{freezespacing}
\setinterfaceconstant{from}{z}
\setinterfaceconstant{functioncolor}{functioncolor}
\setinterfaceconstant{functionstyle}{functionstyle}
@@ -950,6 +951,7 @@
\setinterfaceconstant{lastpubsep}{lastpubsep}
\setinterfaceconstant{layout}{layout}
\setinterfaceconstant{left}{vlevo}
+\setinterfaceconstant{leftclass}{leftclass}
\setinterfaceconstant{leftcolor}{barvavlevo}
\setinterfaceconstant{leftcompoundhyphen}{leftcompoundhyphen}
\setinterfaceconstant{leftedge}{levahrana}
@@ -1008,6 +1010,7 @@
\setinterfaceconstant{menu}{menu}
\setinterfaceconstant{method}{metoda}
\setinterfaceconstant{middle}{stredni}
+\setinterfaceconstant{middleclass}{middleclass}
\setinterfaceconstant{middlecolor}{middlecolor}
\setinterfaceconstant{middlecommand}{middlecommand}
\setinterfaceconstant{middlesource}{middlesource}
@@ -1120,6 +1123,7 @@
\setinterfaceconstant{palet}{paleta}
\setinterfaceconstant{paper}{papir}
\setinterfaceconstant{paragraph}{odstavec}
+\setinterfaceconstant{penalties}{penalties}
\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{umistit}
\setinterfaceconstant{placehead}{umistihlavicku}
@@ -1173,6 +1177,7 @@
\setinterfaceconstant{reverse}{reverse}
\setinterfaceconstant{right}{vpravo}
\setinterfaceconstant{rightchars}{rightchars}
+\setinterfaceconstant{rightclass}{rightclass}
\setinterfaceconstant{rightcolor}{barvavpravo}
\setinterfaceconstant{rightcompoundhyphen}{rightcompoundhyphen}
\setinterfaceconstant{rightedge}{pravahrana}
diff --git a/tex/context/base/mkii/mult-it.mkii b/tex/context/base/mkii/mult-it.mkii
index 0e91646df..6541e8db4 100644
--- a/tex/context/base/mkii/mult-it.mkii
+++ b/tex/context/base/mkii/mult-it.mkii
@@ -870,6 +870,7 @@
\setinterfaceconstant{frameradius}{raggiocornice}
\setinterfaceconstant{frames}{cornici}
\setinterfaceconstant{freeregion}{freeregion}
+\setinterfaceconstant{freezespacing}{freezespacing}
\setinterfaceconstant{from}{da}
\setinterfaceconstant{functioncolor}{functioncolor}
\setinterfaceconstant{functionstyle}{functionstyle}
@@ -950,6 +951,7 @@
\setinterfaceconstant{lastpubsep}{lastpubsep}
\setinterfaceconstant{layout}{layout}
\setinterfaceconstant{left}{sinistra}
+\setinterfaceconstant{leftclass}{leftclass}
\setinterfaceconstant{leftcolor}{coloresinistra}
\setinterfaceconstant{leftcompoundhyphen}{leftcompoundhyphen}
\setinterfaceconstant{leftedge}{bordosinistro}
@@ -1008,6 +1010,7 @@
\setinterfaceconstant{menu}{menu}
\setinterfaceconstant{method}{metodo}
\setinterfaceconstant{middle}{centro}
+\setinterfaceconstant{middleclass}{middleclass}
\setinterfaceconstant{middlecolor}{middlecolor}
\setinterfaceconstant{middlecommand}{middlecommand}
\setinterfaceconstant{middlesource}{middlesource}
@@ -1054,6 +1057,8 @@
\setinterfaceconstant{numberconversionset}{numberconversionset}
\setinterfaceconstant{numberdistance}{numberdistance}
\setinterfaceconstant{numbering}{numerazione}
+\setinterfaceconstant{numberlocation}{numberlocation}
+\setinterfaceconstant{numbermethod}{numbermethod}
\setinterfaceconstant{numberorder}{numberorder}
\setinterfaceconstant{numberprefix}{numberprefix}
\setinterfaceconstant{numbersegments}{numbersegments}
@@ -1064,6 +1069,7 @@
\setinterfaceconstant{numberstopper}{numberstopper}
\setinterfaceconstant{numberstrut}{numberstrut}
\setinterfaceconstant{numberstyle}{stilenumero}
+\setinterfaceconstant{numberthreshold}{numberthreshold}
\setinterfaceconstant{numberwidth}{numberwidth}
\setinterfaceconstant{nx}{nx}
\setinterfaceconstant{ny}{ny}
@@ -1117,6 +1123,7 @@
\setinterfaceconstant{palet}{tavolozza}
\setinterfaceconstant{paper}{carta}
\setinterfaceconstant{paragraph}{capoverso}
+\setinterfaceconstant{penalties}{penalties}
\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{metti}
\setinterfaceconstant{placehead}{mettitesta}
@@ -1170,6 +1177,7 @@
\setinterfaceconstant{reverse}{invertito}
\setinterfaceconstant{right}{destra}
\setinterfaceconstant{rightchars}{rightchars}
+\setinterfaceconstant{rightclass}{rightclass}
\setinterfaceconstant{rightcolor}{coloredestra}
\setinterfaceconstant{rightcompoundhyphen}{rightcompoundhyphen}
\setinterfaceconstant{rightedge}{bordodestro}
diff --git a/tex/context/base/mkii/mult-ro.mkii b/tex/context/base/mkii/mult-ro.mkii
index e52732b6b..79c0349ea 100644
--- a/tex/context/base/mkii/mult-ro.mkii
+++ b/tex/context/base/mkii/mult-ro.mkii
@@ -870,6 +870,7 @@
\setinterfaceconstant{frameradius}{razaframe}
\setinterfaceconstant{frames}{frames}
\setinterfaceconstant{freeregion}{freeregion}
+\setinterfaceconstant{freezespacing}{freezespacing}
\setinterfaceconstant{from}{dela}
\setinterfaceconstant{functioncolor}{functioncolor}
\setinterfaceconstant{functionstyle}{functionstyle}
@@ -950,6 +951,7 @@
\setinterfaceconstant{lastpubsep}{lastpubsep}
\setinterfaceconstant{layout}{layout}
\setinterfaceconstant{left}{stanga}
+\setinterfaceconstant{leftclass}{leftclass}
\setinterfaceconstant{leftcolor}{culoarestanga}
\setinterfaceconstant{leftcompoundhyphen}{leftcompoundhyphen}
\setinterfaceconstant{leftedge}{bordurastanga}
@@ -1008,6 +1010,7 @@
\setinterfaceconstant{menu}{meniu}
\setinterfaceconstant{method}{metoda}
\setinterfaceconstant{middle}{mijloc}
+\setinterfaceconstant{middleclass}{middleclass}
\setinterfaceconstant{middlecolor}{middlecolor}
\setinterfaceconstant{middlecommand}{middlecommand}
\setinterfaceconstant{middlesource}{middlesource}
@@ -1120,6 +1123,7 @@
\setinterfaceconstant{palet}{paleta}
\setinterfaceconstant{paper}{hartie}
\setinterfaceconstant{paragraph}{paragraf}
+\setinterfaceconstant{penalties}{penalties}
\setinterfaceconstant{period}{period}
\setinterfaceconstant{place}{pune}
\setinterfaceconstant{placehead}{punetitlu}
@@ -1173,6 +1177,7 @@
\setinterfaceconstant{reverse}{reverse}
\setinterfaceconstant{right}{dreapta}
\setinterfaceconstant{rightchars}{rightchars}
+\setinterfaceconstant{rightclass}{rightclass}
\setinterfaceconstant{rightcolor}{culoaredreapta}
\setinterfaceconstant{rightcompoundhyphen}{rightcompoundhyphen}
\setinterfaceconstant{rightedge}{borduradreapta}
diff --git a/tex/context/base/mkiv/char-def.lua b/tex/context/base/mkiv/char-def.lua
index 3b057b674..967a11d07 100644
--- a/tex/context/base/mkiv/char-def.lua
+++ b/tex/context/base/mkiv/char-def.lua
@@ -27,8 +27,8 @@ Todo: get rid of specials = { "font", ... } in math ... we have already vectors.
]]--
local variants_emoji={
- [0xFE0E]="text style",
- [0xFE0F]="emoji style",
+ [0xFE0E]="text style",
+ [0xFE0F]="emoji style",
}
local variants_forms={
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 34002f06d..70c83cf67 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.07.06 21:34}
+\newcontextversion{2022.07.24 12:17}
%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 40b49d386..6a1e2c95e 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.07.06 21:34}
+\edef\contextversion{2022.07.24 12:17}
%D Kind of special:
diff --git a/tex/context/base/mkiv/mlib-pps.lua b/tex/context/base/mkiv/mlib-pps.lua
index 303c02fe6..c3635d517 100644
--- a/tex/context/base/mkiv/mlib-pps.lua
+++ b/tex/context/base/mkiv/mlib-pps.lua
@@ -13,7 +13,6 @@ local insert, remove, concat = table.insert, table.remove, table.concat
local Cs, Cf, C, Cg, Ct, P, S, V, Carg = lpeg.Cs, lpeg.Cf, lpeg.C, lpeg.Cg, lpeg.Ct, lpeg.P, lpeg.S, lpeg.V, lpeg.Carg
local lpegmatch, tsplitat, tsplitter = lpeg.match, lpeg.tsplitat, lpeg.tsplitter
local formatters = string.formatters
-local exists, savedata = io.exists, io.savedata
local mplib = mplib
local metapost = metapost
diff --git a/tex/context/base/mkiv/mult-fun.lua b/tex/context/base/mkiv/mult-fun.lua
index 5a3725b32..0926b5d12 100644
--- a/tex/context/base/mkiv/mult-fun.lua
+++ b/tex/context/base/mkiv/mult-fun.lua
@@ -34,6 +34,7 @@ return {
"getparametertext",
-- "getparameteroption",
"applyparameters",
+ "mergeparameters",
"pushparameters",
"popparameters",
"setluaparameter",
@@ -60,6 +61,7 @@ return {
"zmod",
"paired", "tripled",
"unitcircle", "fulldiamond", "unitdiamond", "fullsquare", "unittriangle", "fulltriangle",
+ "unitoctagon", "fulloctagon", "unithexagon", "fullhexagon",
-- "halfcircle", "quartercircle",
"llcircle", "lrcircle", "urcircle", "ulcircle",
"tcircle", "bcircle", "lcircle", "rcircle",
diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua
index ae31c547e..ace2b0e9b 100644
--- a/tex/context/base/mkiv/mult-low.lua
+++ b/tex/context/base/mkiv/mult-low.lua
@@ -105,11 +105,11 @@ return {
"mmodeifcode", "innerifcode", "voidifcode", "hboxifcode", "vboxifcode", "xifcode", "eofifcode",
"trueifcode", "falseifcode", "caseifcode", "definedifcode", "csnameifcode", "fontcharifcode",
--
- "overrulemathcontrolcode", "underrulemathcontrolcode", "radicalrulemathcontrolcode", "fractionrulemathcontrolcode",
- "accentskewhalfmathcontrolcode", "accentskewapplymathcontrolcode", "checkligatureandkernmathcontrolcode",
+ "overrulemathcontrolcode", "underrulemathcontrolcode", "radicalrulemathcontrolcode", "fractionrulemathcontrolcode",
+ "accentskewhalfmathcontrolcode", "accentskewapplymathcontrolcode", "applyordinarykernpairmathcontrolcode",
"applyverticalitalickernmathcontrolcode", "applyordinaryitalickernmathcontrolcode", "applycharitalickernmathcontrolcode",
"reboxcharitalickernmathcontrolcode", "applyboxeditalickernmathcontrolcode", "staircasekernmathcontrolcode",
- "applytextitalickernmathcontrolcode", "applyscriptitalickernmathcontrolcode", "italicshapekernmathcontrolcode",
+ "applytextitalickernmathcontrolcode", "applyscriptitalickernmathcontrolcode",
"checkspaceitalickernmathcontrolcode", "checktextitalickernmathcontrolcode",
--
"noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noexpansionglyphoptioncode", "noprotrusionglyphoptioncode",
@@ -171,7 +171,7 @@ return {
"mathimaginarycode", "mathdifferentialcode", "mathexponentialcode", "mathellipsiscode", "mathfunctioncode", "mathdigitcode",
-- "mathtopaccentcode", "mathbottomaccentcode", "mathdelimitercode", "mathrootcode", "mathprintcode", --
"mathalphacode", "mathboxcode", "mathchoicecode", "mathnothingcode", "mathlimopcode", "mathnolopcode",
- "mathunsetcode", "mathunspacedcode", "mathallcode", "mathfakecode",
+ "mathunsetcode", "mathunspacedcode", "mathallcode", "mathfakecode", "mathunarycode",
--
"constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument",
--
@@ -211,7 +211,8 @@ return {
"lefttopkernclassoptioncode", "righttopkernclassoptioncode", "leftbottomkernclassoptioncode", "rightbottomkernclassoptioncode",
"lookaheadforendclassoptioncode", "noitaliccorrectionclassoptioncode", "defaultmathclassoptions",
-- "openfenceclassoptioncode", "closefenceclassoptioncode", "middlefenceclassoptioncode",
- "checkligatureclassoptioncode", "flattenclassoptioncode", "omitpenaltyclassoptioncode",
+ "checkligatureclassoptioncode", "checkitaliccorrectionclassoptioncode", "checkkernpairclassoptioncode",
+ "flattenclassoptioncode", "omitpenaltyclassoptioncode", "unpackclassoptioncode", "raiseprimeclassoptioncode",
--
"noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noleftligatureglyphoptioncode",
"noleftkernglyphoptioncode", "norightligatureglyphoptioncode", "norightkernglyphoptioncode",
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index 43e9515db..ac7f7511e 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -276,6 +276,7 @@ return {
"boxfreeze",
"boxgeometry",
"boxorientation",
+ "boxrepack",
"boxshift",
"boxsource",
"boxtarget",
@@ -298,6 +299,7 @@ return {
"currentloopnesting",
"currentmarks",
"defcsname",
+ "detokenized",
"dimensiondef",
"dimexpression",
"directlua",
@@ -402,6 +404,8 @@ return {
"ignorepars",
"immediate",
"immutable",
+ "indexofcharacter",
+ "indexofregister",
"inherited",
"initcatcodetable",
"insertbox",
@@ -473,7 +477,7 @@ return {
"mathatomskip",
"mathbackwardpenalties",
"mathbeginclass",
- "mathdelimitersmode",
+ "mathcheckfencesmode",
"mathdirection",
"mathdisplaymode",
"mathdisplayskipmode",
@@ -481,7 +485,6 @@ return {
"mathendclass",
"matheqnogapstep",
"mathfenced",
- "mathfencesmode",
"mathfontcontrol",
"mathforwardpenalties",
"mathfrac",
@@ -566,6 +569,7 @@ return {
"scaledinterwordstretch",
"scaledslantperpoint",
"scantextokens",
+ "semiexpand",
"semiexpanded",
"semiprotected",
"setdefaultmathcodes",
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 42bb6d94a..543b25c19 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 983543d0f..78fefb060 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/util-prs.lua b/tex/context/base/mkiv/util-prs.lua
index 6c2a15adf..635b610e0 100644
--- a/tex/context/base/mkiv/util-prs.lua
+++ b/tex/context/base/mkiv/util-prs.lua
@@ -622,12 +622,6 @@ end
-- local list, names = mycsvsplitter(crap,true) inspect(list) inspect(names)
-- local list, names = mycsvsplitter(crap) inspect(list) inspect(names)
--- parsers.stepper("1,7-",9,function(i) print(">>>",i) end)
--- parsers.stepper("1-3,7,8,9")
--- parsers.stepper("1-3,6,7",function(i) print(">>>",i) end)
--- parsers.stepper(" 1 : 3, ,7 ")
--- parsers.stepper("1:4,9:13,24:*",30)
-
local function ranger(first,last,n,action)
if not first then
-- forget about it
@@ -655,14 +649,29 @@ local stepper = spacers * ( cardinal * ( spacers * S(":-") * spacers * ( cardin
* Carg(1) * Carg(2) / ranger * S(", ")^0 )^1 * endofstring -- we're sort of strict (could do without endofstring)
function parsers.stepper(str,n,action)
+ local ts = type(str)
if type(n) == "function" then
- lpegmatch(stepper,str,1,false,n or print)
- else
+ if ts == "number" then
+ n(str)
+ elseif ts == "table" then
+ for i=1,#str do
+ n(str[i])
+ end
+ else
+ lpegmatch(stepper,str,1,false,n or print)
+ end
+ elseif ts == "string" then
lpegmatch(stepper,str,1,n,action or print)
end
end
---
+-- parsers.stepper("1,7-",9,function(i) print(">>>",i) end)
+-- parsers.stepper("1-3,7,8,9")
+-- parsers.stepper("1-3,6,7",function(i) print(">>>",i) end)
+-- parsers.stepper(" 1 : 3, ,7 ")
+-- parsers.stepper("1:4,9:13,24:*",30)
+-- parsers.stepper(1,print)
+-- parsers.stepper({1,3,4},print)
local pattern_math = Cs((P("%")/"\\percent " + P("^") * Cc("{") * lpegpatterns.integer * Cc("}") + anything)^0)
local pattern_text = Cs((P("%")/"\\percent " + (P("^")/"\\high") * Cc("{") * lpegpatterns.integer * Cc("}") + anything)^0)
diff --git a/tex/context/base/mkiv/util-tab.lua b/tex/context/base/mkiv/util-tab.lua
index a92b47b3f..7f372b6b5 100644
--- a/tex/context/base/mkiv/util-tab.lua
+++ b/tex/context/base/mkiv/util-tab.lua
@@ -978,3 +978,21 @@ end
-- return remove(t,random(1,n))
-- end
-- end
+
+function combine(target,source)
+ -- no copy so if that is needed one needs to deepcopy source first
+ if target then
+ for k, v in next, source do
+ if type(v) == "table" then
+ target[k] = combine(target[k],source[k])
+ else
+ target[k] = v
+ end
+ end
+ return target
+ else
+ return source
+ end
+end
+
+table.combine = combine
diff --git a/tex/context/base/mkxl/anch-box.mkxl b/tex/context/base/mkxl/anch-box.mkxl
index 570f8862d..0dec78838 100644
--- a/tex/context/base/mkxl/anch-box.mkxl
+++ b/tex/context/base/mkxl/anch-box.mkxl
@@ -27,7 +27,8 @@
\defineboxanchor[#6]%
\setboxanchor[#6][#2][#4]\hpack{\xypos{\namespacedboxanchor{#6}}}%
\ifparameter#4\or\setupboxanchorcontent[#1][#4]\fi
- \startpositionoverlay{text-1}% will become configurable region
+% \startpositionoverlay{text-1}% will become configurable region
+ \startpositionoverlay{text+1}% will become configurable region
\setMPpositiongraphic
{\namespacedboxanchor{#5}}%
{\namedboxanchorcontentparameter{#1}\c!mp}%
diff --git a/tex/context/base/mkxl/anch-pgr.lmt b/tex/context/base/mkxl/anch-pgr.lmt
index 5261a2afa..5ef6ecacb 100644
--- a/tex/context/base/mkxl/anch-pgr.lmt
+++ b/tex/context/base/mkxl/anch-pgr.lmt
@@ -106,7 +106,9 @@ local jobpositions = job.positions
local getpos = jobpositions.getpos
local getfree = jobpositions.getfree
+----- data = { }
local realpage = 1
+----- recycle = 1000 -- only tables can overflow this
local enabled = false
-- Freeing the data is somewhat tricky as we can have backgrounds spanning many
@@ -164,7 +166,7 @@ local function check(specification)
wn[3] = dp
end
end
- -- inspect(w)
+-- inspect(w)
end
local index = 0
@@ -173,6 +175,7 @@ local registervalue = attributes.registervalue
local getvalue = attributes.getvalue
local function flush(head,f,l,a,parent,depth)
+ -- local d = data[a]
local d = getvalue(a_textbackground,a)
if d then
local ix = index
@@ -194,9 +197,40 @@ local function flush(head,f,l,a,parent,depth)
return head, true
end
+-- local function registerbackground(name)
+-- local n = #data + 1
+-- if n > recycle then
+-- -- we could also free all e: that are beyond a page but we don't always
+-- -- know the page so a recycle is nicer and the s lists are kept anyway
+-- -- so the amount of kept data is not that large
+-- n = 1
+-- end
+-- local b = jobpositions.tobesaved["b:"..name]
+-- if b then
+-- local s = setmetatableindex("table")
+-- b.s = s
+-- data[n] = {
+-- bpos = b,
+-- name = name,
+-- n = n,
+-- shapes = s,
+-- count = 0,
+-- sindex = 0,
+-- }
+-- texsetattribute(a_textbackground,n)
+-- if not enabled then
+-- enableaction("contributers", "nodes.handlers.textbackgrounds")
+-- enabled = true
+-- end
+-- else
+-- texsetattribute(a_textbackground,unsetvalue)
+-- end
+-- end
+
local function registerbackground(name)
local b = jobpositions.tobesaved["b:"..name]
if b then
+ local n = registervalue(a_textbackground,t)
local s = setmetatableindex("table")
b.s = s
local t = {
@@ -207,7 +241,7 @@ local function registerbackground(name)
count = 0,
sindex = 0,
}
- texsetattribute(a_textbackground,registervalue(a_textbackground,t))
+ texsetattribute(a_textbackground,n)
if not enabled then
enableaction("contributers", "nodes.handlers.textbackgrounds")
enabled = true
diff --git a/tex/context/base/mkxl/buff-ini.lmt b/tex/context/base/mkxl/buff-ini.lmt
index a14056f7d..985c834ff 100644
--- a/tex/context/base/mkxl/buff-ini.lmt
+++ b/tex/context/base/mkxl/buff-ini.lmt
@@ -25,7 +25,7 @@ local trace_visualize = false trackers.register("buffers.visualize", function
local report_buffers = logs.reporter("buffers","usage")
local report_typeset = logs.reporter("buffers","typeset")
------ report_grabbing = logs.reporter("buffers","grabbing")
+local report_grabbing = logs.reporter("buffers","grabbing")
local context = context
local commands = commands
@@ -43,6 +43,9 @@ local scantokencode = scanners.tokencode
local getters = tokens.getters
local gettoken = getters.token
+local createtoken = token.create
+local grabtokens = token.grab
+
local getcommand = tokens.accessors.command
local getnextchar = tokens.scanners.nextchar
@@ -350,50 +353,6 @@ 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
@@ -418,17 +377,17 @@ 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
+ 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
@@ -537,132 +496,17 @@ local function pickup(start,stop)
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
+local function showpickup(name,bufferdata,catcodes,undented)
+ undented = undented and ">" or "="
+ if #bufferdata > 50 then
+ report_grabbing("%s : %i =%s |%s..%s|",name,catcodes,undented,sub(bufferdata,1,20),sub(bufferdata,-20,#bufferdata))
+ else
+ report_grabbing("%s : %i =%s |%s|",name,catcodes,undented,bufferdata)
+ end
+end
+
implement {
name = "pickupbuffer",
actions = function()
@@ -672,12 +516,41 @@ implement {
local stop = scanstring()
local finish = scancsname()
local catcodes = scaninteger()
- local doundent = scanboolean()
+ local doundent = scaninteger() == 1 -- better than a keyword scan
-- could be a scanner:
local data = pickup(start,stop)
- if doundent or (autoundent and doundent == nil) then
+ local undented = doundent or (autoundent and doundent == nil)
+ if undented then
data = undent(data)
end
+ if trace_grab then
+ showpickup(name,data,catcodes,undented)
+ end
+ assign(name,data,catcodes)
+ context[finish]()
+ end
+}
+
+implement {
+ name = "grabbuffer",
+ 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 = scaninteger() == 1 -- better than a keyword scan
+ local starttok = createtoken(start,true)
+ local stoptok = createtoken(stop,true)
+ local data = grabtokens(starttok,stoptok,true,13) -- strip first and last \endoflineasciicode
+ local undented = doundent or (autoundent and doundent == nil)
+ if undented then
+ data = undent(data)
+ end
+ if trace_grab then
+ showpickup(name,data,catcodes,undented)
+ end
assign(name,data,catcodes)
context[finish]()
end
diff --git a/tex/context/base/mkxl/buff-ini.mkxl b/tex/context/base/mkxl/buff-ini.mkxl
index 530058f46..c6aa6de3f 100644
--- a/tex/context/base/mkxl/buff-ini.mkxl
+++ b/tex/context/base/mkxl/buff-ini.mkxl
@@ -74,7 +74,8 @@
{\begingroup % (1)
#4%
\begingroup % (2)
- \scratchcounter\catcodetable
+ \scratchcounterone\catcodetable
+ \scratchcountertwo#6\relax
\clf_erasebuffer{#1}%
\setcatcodetable\vrbcatcodes
\protected\def\buff_finish
@@ -84,17 +85,18 @@
% todo: we need to skip the first lineending which is an active character
% but sometimes we have something different ... this is a side effect of
% checking for optional arguments i.e. the next token is already tokenized
- % and for that reason we have the \relax as well as the \string
+ % and for that reason we had the \relax as well as the \string
\clf_pickupbuffer
{#1}%
{#2}%
{#3}%
-% {\string\dofinishpickupbuffer}%
+ % {\string\dofinishpickupbuffer}%
\buff_finish
- \scratchcounter
- \ifnum#6=\plusone\s!true\else\s!false\fi
- % \relax}
- \expandafter\relax\string} % maybe \normalexpanded{\relax\utfchar{7}}} signal
+ % \ifnum#6=\plusone\s!true\else\s!false\fi
+ % \expandafter\relax\string} % dirty trick
+ \scratchcounterone
+ % better than \string but still a dirty trick to avoid \par mess in blocks
+ \expandafter\scratchcountertwo\detokenized}
\protected\def\buff_stop#1%
{\endgroup % (3 & 4 & 5 & 6)
diff --git a/tex/context/base/mkxl/buff-ver.mkxl b/tex/context/base/mkxl/buff-ver.mkxl
index fd49bd421..ec7ef5fc3 100644
--- a/tex/context/base/mkxl/buff-ver.mkxl
+++ b/tex/context/base/mkxl/buff-ver.mkxl
@@ -774,11 +774,13 @@
{\buff_verbatim_type_defined_buffer[\v!buffer][\thedefinedbuffer{#1}]}%
\appendtoks
- \frozen\instance\setuevalue{\e!type\currentbuffer}{\buff_verbatim_type_defined_buffer[\v!buffer][\currentdefinedbuffer]}%
+ \frozen\instance\protected\edefcsname\e!type\currentbuffer\endcsname
+ {\buff_verbatim_type_defined_buffer[\v!buffer][\currentdefinedbuffer]}%
\to \everydefinebuffer
\appendtoks % \e!buffer
- \frozen\instance\setuevalue{\e!type\currenttyping\v!buffer}{\buff_verbatim_type_buffer_class{\currenttyping}}%
+ \frozen\instance\protected\edefcsname\e!type\currenttyping\v!buffer\endcsname
+ {\buff_verbatim_type_buffer_class{\currenttyping}}%
\to \everydefinetyping
\tolerant\protected\def\buff_verbatim_type_buffer[#1]#*[#2]%
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index 4af336828..9017ea449 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.07.06 21:34}
+\newcontextversion{2022.07.24 12:17}
%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 db7781ea3..f68cb838d 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.07.06 21:34}
+\immutable\edef\contextversion{2022.07.24 12:17}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
@@ -498,6 +498,7 @@
\loadmkxlfile{math-dis}
%loadmkxlfile{math-lan}
\loadmkxlfile{math-toy}
+\loadmkxlfile{math-twk}
\loadmkxlfile{strc-mat}
diff --git a/tex/context/base/mkxl/font-con.lmt b/tex/context/base/mkxl/font-con.lmt
index 5da757230..5763d1039 100644
--- a/tex/context/base/mkxl/font-con.lmt
+++ b/tex/context/base/mkxl/font-con.lmt
@@ -156,6 +156,10 @@ function constructors.aftercopyingcharacters(target,original)
-- can be used for additional tweaking
end
+function constructors.beforepassingfonttotex(tfmdata)
+ -- can be used for additional tweaking
+end
+
function constructors.trytosharefont(target,tfmdata)
-- implemented in font-def.lmt
end
diff --git a/tex/context/base/mkxl/font-ctx.lmt b/tex/context/base/mkxl/font-ctx.lmt
index 399de7421..585547cbf 100644
--- a/tex/context/base/mkxl/font-ctx.lmt
+++ b/tex/context/base/mkxl/font-ctx.lmt
@@ -504,6 +504,22 @@ do
end
end
+ local beforepassingfonttotex = sequencers.new {
+ name = "beforepassingfonttotex",
+ arguments = "tfmdata",
+ }
+
+ appendgroup(beforepassingfonttotex,"before") -- user
+ appendgroup(beforepassingfonttotex,"system") -- private
+ appendgroup(beforepassingfonttotex,"after" ) -- user
+
+ function constructors.beforepassingfonttotex(tfmdata)
+ local runner = beforepassingfonttotex.runner
+ if runner then
+ runner(tfmdata)
+ end
+ end
+
end
--[[ldx--
@@ -1381,6 +1397,7 @@ do -- else too many locals
busy = false
mathematics.finishfallbacks(tfmdata,specification,fallbacks)
tfmdata.original = specification.specification
+constructors.beforepassingfonttotex(tfmdata)
local id = definefont(tfmdata,properties.id)
csnames[id] = specification.cs
properties.id = id -- already set
diff --git a/tex/context/base/mkxl/grph-fig.mkxl b/tex/context/base/mkxl/grph-fig.mkxl
index 9f16747e3..dc709c477 100644
--- a/tex/context/base/mkxl/grph-fig.mkxl
+++ b/tex/context/base/mkxl/grph-fig.mkxl
@@ -141,8 +141,8 @@
\linewidth\onepoint
\setuppositioning
[\c!unit=pt,%
- \c!xscale=\withoutpt\the\d_grph_steps_x,%
- \c!yscale=\withoutpt\the\d_grph_steps_y,%
+ \c!xscale=\toscaled\d_grph_steps_x,%
+ \c!yscale=\toscaled\d_grph_steps_y,%
\c!factor=1]%
\ignorespaces#4%
\enforced\let\referring\grph_steps_two_referring
@@ -219,9 +219,9 @@
\position(0,0)
{\basegrid
[\c!nx=\externalfigureparameter\c!xmax,%
- \c!dx=\withoutpt\the\d_grph_steps_x,%
+ \c!dx=\toscaled\d_grph_steps_x,%
\c!ny=\externalfigureparameter\c!ymax,%
- \c!dy=\withoutpt\the\d_grph_steps_y,%
+ \c!dy=\toscaled\d_grph_steps_y,%
\c!xstep=1,%
\c!ystep=1,%
\c!scale=1,%
@@ -229,8 +229,8 @@
\c!unit=pt]}%
\setuppositioning
[\c!unit=pt,%
- \c!xscale=\withoutpt\the\d_grph_steps_x,%
- \c!yscale=\withoutpt\the\d_grph_steps_y,%
+ \c!xscale=\toscaled\d_grph_steps_x,%
+ \c!yscale=\toscaled\d_grph_steps_y,%
\c!factor=1]%
\linewidth\onepoint
\ignorespaces#4\removeunwantedspaces % or just grab #4 unspaced
diff --git a/tex/context/base/mkxl/grph-trf.mkxl b/tex/context/base/mkxl/grph-trf.mkxl
index c7e0f5e2f..a08cec904 100644
--- a/tex/context/base/mkxl/grph-trf.mkxl
+++ b/tex/context/base/mkxl/grph-trf.mkxl
@@ -558,7 +558,7 @@
{\hbox}
\def\grph_scale_fast_yes#1%
- {\edef\finalscaleboxxscale{\withoutpt\the\dimexpr#1\onepoint/1000\relax}% brrr
+ {\edef\finalscaleboxxscale{\toscaled\dimexpr#1\onepoint/1000\relax}% brrr
\let\finalscaleboxyscale\finalscaleboxxscale
\dowithnextboxcs\grph_scale_fast_finish\hbox} % container ?
diff --git a/tex/context/base/mkxl/lpdf-emb.lmt b/tex/context/base/mkxl/lpdf-emb.lmt
index d6252ae02..6932879e7 100644
--- a/tex/context/base/mkxl/lpdf-emb.lmt
+++ b/tex/context/base/mkxl/lpdf-emb.lmt
@@ -1656,6 +1656,7 @@ do
local xforms = pdfdictionary()
local nofglyphs = 0
local scale = 10 * details.parameters.size/details.parameters.designsize
+scale = scale * (7200/7227) -- test on extensibles
local units = details.parameters.units
local function boxtopdf(image,data) -- image == glyph
nofglyphs = nofglyphs + 1
diff --git a/tex/context/base/mkxl/lpdf-lmt.lmt b/tex/context/base/mkxl/lpdf-lmt.lmt
index cb1b5c7a9..cef18529c 100644
--- a/tex/context/base/mkxl/lpdf-lmt.lmt
+++ b/tex/context/base/mkxl/lpdf-lmt.lmt
@@ -554,7 +554,7 @@ do
tmry = effect.squeeze or fontparameters.squeezefactor or 1
tmrx = effect.extend or fontparameters.extendfactor or 1
need_mode = effect.mode or fontparameters.mode or 0
- need_width = effect.line or fontparameters.width or 0
+ need_width = effect.line or fontparameters.width or 0 -- scale sensitive!
c_effect = effect
else
-- we could check if effects have changed but effects use unique tables; for
@@ -566,6 +566,7 @@ do
tmrx = fontparameters.extendfactor or 1
need_mode = fontparameters.mode or 0
need_width = fontparameters.width or 0
+ c_effect = nil
end
tmrx = expand * tmrx
diff --git a/tex/context/base/mkxl/math-act.lmt b/tex/context/base/mkxl/math-act.lmt
index d1a6b80e1..4cfad32fe 100644
--- a/tex/context/base/mkxl/math-act.lmt
+++ b/tex/context/base/mkxl/math-act.lmt
@@ -64,35 +64,41 @@ function fonts.constructors.assignmathparameters(original,target) -- wrong way a
end
end
+local undefined <const> = 0x3FFFFFFF -- maxdimen or undefined_math_parameter
+
function mathematics.initializeparameters(target,original)
local mathparameters = original.mathparameters
if mathparameters and next(mathparameters) then
mathparameters = mathematics.dimensions(mathparameters)
- if not mathparameters.PrimeRaisePercent then mathparameters.PrimeRaisePercent = 25 end
- if not mathparameters.PrimeShiftUp then mathparameters.PrimeShiftUp = mathparameters.SuperscriptShiftUp end
- if not mathparameters.PrimeBaselineDropMax then mathparameters.PrimeBaselineDropMax = mathparameters.SuperscriptBaselineDropMax end
- if not mathparameters.PrimeShiftUpCramped then mathparameters.PrimeShiftUpCramped = mathparameters.SuperscriptShiftUpCramped end
- if not mathparameters.PrimeSpaceAfter then mathparameters.PrimeSpaceAfter = 0 end
- if not mathparameters.PrimeWidthPercent then mathparameters.PrimeWidthPercent = 50 end
- if not mathparameters.SpaceBeforeScript then mathparameters.SpaceBeforeScript = mathparameters.SpaceAfterScript end
- if not mathparameters.NoLimitSupFactor then mathparameters.NoLimitSupFactor = 0 end
- if not mathparameters.NoLimitSubFactor then mathparameters.NoLimitSubFactor = 0 end
- if not mathparameters.AccentTopShiftUp then mathparameters.AccentTopShiftUp = 0 end
- if not mathparameters.AccentBottomShiftDown then mathparameters.AccentBottomShiftDown = 0 end
- if not mathparameters.FlattenedAccentTopShiftUp then mathparameters.AccentTopShiftUp = 0 end
- if not mathparameters.FlattenedAccentBottomShiftDown then mathparameters.AccentBottomShiftDown = 0 end
- if not mathparameters.AccentBaseDepth then mathparameters.AccentBaseDepth = 0 end
- if not mathparameters.AccentFlattenedBaseDepth then mathparameters.AccentFlattenedBaseDepth = 0 end
- if not mathparameters.AccentTopOvershoot then mathparameters.AccentTopOvershoot = 0 end
- if not mathparameters.AccentBottomOvershoot then mathparameters.AccentBottomOvershoot = 0 end
- if not mathparameters.AccentSuperscriptDrop then mathparameters.AccentSuperscriptDrop = 0 end
- if not mathparameters.AccentSuperscriptPercent then mathparameters.AccentSuperscriptPercent = 0 end
- if not mathparameters.DelimiterPercent then mathparameters.DelimiterPercent = 100 end
- if not mathparameters.DelimiterShortfall then mathparameters.DelimiterShortfall = 0 end
- --
- -- we don't want to reset that each time .. but then we also can't show what the value was
--
- -- mathparameters.RadicalDegreeBefore = 0
+ if not mathparameters.MinConnectorOverlap then mathparameters.MinConnectorOverlap = undefined end
+ if not mathparameters.SubscriptShiftDownWithSuperscript then mathparameters.SubscriptShiftDownWithSuperscript = undefined end -- a tex one
+ if not mathparameters.FractionDelimiterSize then mathparameters.FractionDelimiterSize = undefined end
+ if not mathparameters.FractionDelimiterDisplayStyleSize then mathparameters.FractionDelimiterDisplayStyleSize = undefined end
+ if not mathparameters.SkewedDelimiterTolerance then mathparameters.SkewedDelimiterTolerance = undefined end
+ -- some more can be undefined:
+ if not mathparameters.PrimeRaisePercent then mathparameters.PrimeRaisePercent = 50 end
+ if not mathparameters.PrimeRaiseComposedPercent then mathparameters.PrimeRaiseComposedPercent = 25 end
+ if not mathparameters.PrimeShiftUp then mathparameters.PrimeShiftUp = mathparameters.SuperscriptShiftUp end
+ if not mathparameters.PrimeBaselineDropMax then mathparameters.PrimeBaselineDropMax = mathparameters.SuperscriptBaselineDropMax end
+ if not mathparameters.PrimeShiftUpCramped then mathparameters.PrimeShiftUpCramped = mathparameters.SuperscriptShiftUpCramped end
+ if not mathparameters.PrimeSpaceAfter then mathparameters.PrimeSpaceAfter = 0 end
+ if not mathparameters.PrimeWidthPercent then mathparameters.PrimeWidthPercent = 50 end
+ if not mathparameters.SpaceBeforeScript then mathparameters.SpaceBeforeScript = mathparameters.SpaceAfterScript end
+ if not mathparameters.NoLimitSupFactor then mathparameters.NoLimitSupFactor = 0 end
+ if not mathparameters.NoLimitSubFactor then mathparameters.NoLimitSubFactor = 0 end
+ if not mathparameters.AccentTopShiftUp then mathparameters.AccentTopShiftUp = 0 end
+ if not mathparameters.AccentBottomShiftDown then mathparameters.AccentBottomShiftDown = 0 end
+ if not mathparameters.FlattenedAccentTopShiftUp then mathparameters.AccentTopShiftUp = 0 end
+ if not mathparameters.FlattenedAccentBottomShiftDown then mathparameters.AccentBottomShiftDown = 0 end
+ if not mathparameters.AccentBaseDepth then mathparameters.AccentBaseDepth = 0 end
+ if not mathparameters.AccentFlattenedBaseDepth then mathparameters.AccentFlattenedBaseDepth = 0 end
+ if not mathparameters.AccentTopOvershoot then mathparameters.AccentTopOvershoot = 0 end
+ if not mathparameters.AccentBottomOvershoot then mathparameters.AccentBottomOvershoot = 0 end
+ if not mathparameters.AccentSuperscriptDrop then mathparameters.AccentSuperscriptDrop = 0 end
+ if not mathparameters.AccentSuperscriptPercent then mathparameters.AccentSuperscriptPercent = 0 end
+ if not mathparameters.DelimiterPercent then mathparameters.DelimiterPercent = 100 end
+ if not mathparameters.DelimiterShortfall then mathparameters.DelimiterShortfall = 0 end
--
target.mathparameters = mathparameters
end
@@ -109,6 +115,7 @@ local how = {
NoLimitSupFactor = "unscaled",
NoLimitSubFactor = "unscaled",
PrimeRaisePercent = "unscaled",
+ PrimeRaiseComposedPercent = "unscaled",
PrimeWidthPercent = "unscaled",
AccentTopOvershoot = "unscaled",
AccentBottomOvershoot = "unscaled",
@@ -246,7 +253,8 @@ mathematics.tweaks = mathtweaks
local function report_tweak(fmt,target,original,...)
if fmt then
- local metadata = original.shared.rawdata.metadata
+ local metadata = (original and original.shared.rawdata.metadata) or
+ (target and target .shared.rawdata.metadata)
local parameters = target.parameters
report_mathtweak(
"%a, size %p, math size %i, %s",
@@ -278,16 +286,17 @@ end
do
- local stepper = utilities.parsers.stepper
- local count = 0
- local splitter = lpeg.tsplitat(".")
- local toeffect = fonts.toeffect
+ local stepper = utilities.parsers.stepper
+ local count = 0
+ local splitter = lpeg.tsplitat(".")
+ local toeffect = fonts.toeffect
+ local privateslot = fonts.helpers.privateslot
local function adapt(list,target,original,targetcharacters,originalcharacters,k,v,compact,n)
k = mathgaps[k] or k
local character = targetcharacters[k]
if character then
- if not character.tweaked then
+ if not character.tweaked then -- todo: add a force
local t = type(v)
if t == "number" then
v = list[v]
@@ -337,6 +346,8 @@ do
if width and width ~= 0 then
if advancefactor then
character.advance = advancefactor * width
+ else
+ character.advance = width -- so advance is oldwidth
end
if widthfactor then
character.width = widthfactor * width
@@ -366,12 +377,23 @@ do
if anchorfactor then
character.topaccent = anchorfactor * (topaccent or width)
end
- -- todo: check once per tweak
- character.effect = toeffect(v)
+ -- begin experiment
+ local line = v.wline
+ if line then
+ local parameters = target.parameters
+ v.line = parameters.hfactor * line / parameters.units
+ end
+ -- end experiment
+ character.effect = toeffect(v) -- todo: move wline test inside here
+ -- begin experiment
+ v.line = line
+ -- end experiment
if trace_tweaking then
report_tweak("adapting dimensions of %U ",target,original,k)
end
- local smaller = originalcharacters[k].smaller
+ -- missing when private
+ local originaldata = originalcharacters[k] -- or targetcharacters[k]
+ local smaller = originaldata and originaldata.smaller
if compact and smaller and smaller ~= k then
adapt(list,target,original,targetcharacters,originalcharacters,smaller,v,compact,n+1)
end
@@ -474,7 +496,7 @@ do
if t == "number" then
adapt(list,target,original,targetcharacters,originalcharacters,k,v,compact,1)
elseif t == "string" then
- local d = detail(targetcharacters,k)
+ local d = privateslot(k) or detail(targetcharacters,k) -- watch the private here
local t = type(d)
if t == "table" then
for i=1,#d do
@@ -513,6 +535,14 @@ end
do
+ function mathtweaks.message(target,original,parameters)
+ report_mathtweak(parameters.text or "no message")
+ end
+
+end
+
+do
+
function mathtweaks.wipevariants(target,original,parameters)
local list = parameters.list
if list then
@@ -591,7 +621,7 @@ do
local originalcharacters = original.characters
local getsubstitution = fonts.handlers.otf.getsubstitution
local count = 0
- for k, v in sortedhash(list) do
+ for k, v in next, list do -- no need for sortedhash(list) unless we report
local sub = getsubstitution(original,k,v,true)
if sub then
targetcharacters[mathgaps[k] or k] = targetcharacters[mathgaps[sub] or sub]
@@ -611,6 +641,82 @@ end
do
+ -- maybe we'll have a different name
+
+ mathtweaks.subsets = {
+ acenorsuvxz = { 0x1D44E, 0x1D450, 0x1D452, 0x1D45B, 0x1D45C, 0x1D45F, 0x1D460, 0x1D462, 0x1D463, 0x1D465, 0x1D467 },
+ bhklt = { 0x1D44F, 0x1D455, 0x1D458, 0x1D459, 0x1D461 },
+ d = { 0x1D451 },
+ f = { 0x1D453 },
+ gjqy = { 0x1D454, 0x1D457, 0x1D45E, 0x1D466 },
+ i = { 0x1D456 },
+ mw = { 0x1D45A, 0x1D464},
+ p = { 0x1D45D },
+ }
+
+ function mathtweaks.kernpairs(target,original,parameters)
+ local list = parameters.list
+ if list then
+ local targetcharacters = target.characters
+ local originalcharacters = original.characters
+ local count = 0
+
+ local function add(v,n)
+ local chardata = targetcharacters[mathgaps[n] or n]
+ if chardata then
+ local width = chardata.width
+ if width then
+ local kerns = chardata.kerns or { }
+ for kk, vv in next, v do
+-- for kk, vv in sortedhash(v) do
+ stepper(kk,function(nn) -- todo: also make stepper accept a table
+ local t = mathgaps[nn] or nn
+ if t then
+ kerns[t] = vv * width
+ count = count + 1
+ end
+ end)
+ end
+ chardata.kerns = kerns
+ end
+ end
+ end
+
+ for k, v in next, list do -- no need for sortedhash(list) unless we report
+-- for k, v in sortedhash(list) do -- no need for sortedhash(list) unless we report
+ stepper(k,function(n) -- todo: also make stepper accept a table
+ add(v,n)
+ end)
+ end
+
+-- for k, v in next, list do -- no need for sortedhash(list) unless we report
+-- local chardata = targetcharacters[mathgaps[k] or k]
+-- if chardata then
+-- local width = chardata.width
+-- if width then
+-- local kerns = chardata.kerns or { }
+-- for kk, vv in next, v do
+-- local t = mathgaps[kk] or kk
+-- if t then
+-- kerns[t] = vv * width
+-- count = count + 1
+-- end
+-- end
+-- chardata.kerns = kerns
+-- end
+-- end
+-- end
+
+ if trace_tweaking and count > 0 then
+ report_mathtweak("%i kern pairs",count)
+ end
+ end
+ end
+
+end
+
+do
+
-- What a mess ... should be a different alphabet.
local function expand(target,original,list,selector,feature)
@@ -800,6 +906,118 @@ end
do
+ local copytable = table.copy
+ local nps = fonts.helpers.newprivateslot
+
+ local privates = {
+ [0x2212] = nps("unary minus"),
+ [0x002B] = nps("unary plus"),
+ [0x00B1] = nps("unary plus minus"),
+ [0x2213] = nps("unary minus plus"),
+ }
+
+ -- these are the values tested with texgyre-bonum
+
+ local predefined = {
+ ["unary minus"] = {
+ original = 0x2212,
+ extend = .5,
+ width = .5,
+ unicode = 0x002D, -- hyphen minus
+ },
+ ["unary plus"] = {
+ original = 0x002B,
+ extend = .5,
+ squeeze = .5,
+ width = .5,
+ height = .5,
+ yoffset = .2,
+ mode = 2,
+ wline = .5,
+ unicode = 0x002B,
+ },
+ ["unary plus minus"] = {
+ original = 0x00B1,
+ extend = .5,
+ squeeze = .5,
+ width = .5,
+ height = .5,
+ yoffset = .2,
+ mode = 2,
+ wline = .5,
+ },
+ ["unary minus plus"] = {
+ original = 0x2213,
+ extend = .5,
+ squeeze = .5,
+ width = .5,
+ height = .5,
+ yoffset = .2,
+ mode = 2,
+ wline = .5,
+ },
+ }
+
+ -- {
+ -- tweak = "addprivates",
+ -- list = {
+ -- -- for specific parameters see act file
+ -- ["unary minus"] = { preset = "unary minus" },
+ -- ["unary plus"] = { preset = "unary plus" },
+ -- ["unary plus minus"] = { preset = "unary plus minus" },
+ -- ["unary minus plus"] = { preset = "unary minus plus" },
+ -- },
+ -- },
+
+ function mathtweaks.addprivates(target,original,parameters)
+ local list = parameters.list or predefined
+ if list then
+ local targetcharacters = target.characters
+ local targetparameters = target.parameters
+ local originalcharacters = original.characters
+ local processedprivates = { }
+ for name, v in sortedhash(list) do
+ if type(v) == "table" then
+ local preset = v.preset
+ if preset then
+ local p = predefined[preset]
+ if p then
+ -- p = table.copy(p)
+ v = table.combine(p,v)
+ p.preset = nil
+ else
+ goto NEXT
+ end
+ end
+ local charslot = v.original
+ if charslot then
+ local chardata = targetcharacters[charslot]
+ if chardata then
+ local clonedata = copytable(chardata)
+ local cloneslot = nps(name)
+ local unicode = v.unicode or clonedata.unicode
+ clonedata.uncode = unicode
+ targetcharacters[cloneslot] = clonedata
+ if trace_tweaking then
+ report_tweak("cloning %a from %C into %U with tounicode %U",target,original,name,charslot,cloneslot,unicode)
+ end
+ end
+ processedprivates[name] = v
+ end
+ ::NEXT::
+ end
+ end
+ mathtweaks.dimensions(target,original,{
+ tweak = parameters.tweak,
+ list = processedprivates,
+ })
+ end
+ end
+
+end
+
+do
+
function mathtweaks.fixanchors(target,original,parameters)
local targetcharacters= target.characters
local factor = tonumber(parameters.factor) or 0
@@ -807,7 +1025,7 @@ do
for k, v in next, targetcharacters do
local a = v.topaccent
if a and a > 0 then
- v.topaccent = a * factor
+ v.topaccent = a * factor
end
end
end
@@ -1471,7 +1689,11 @@ local function applytweaks(when,target,original)
if type(tweak) == "table" then
local action = mathtweaks[tweak.tweak or ""]
if action then
- action(target,original,tweak)
+ if original then
+ action(target,original,tweak)
+ else
+ action(target,tweak)
+ end
end
end
end
@@ -1502,6 +1724,15 @@ function mathematics.tweakaftercopyingfont(target,original)
end
end
+function mathematics.beforepassingfonttotex(target)
+ if use_math_goodies then
+ local mathparameters = target.mathparameters -- why not hasmath
+ if mathparameters then
+ applytweaks("beforepassing",target,target)
+ end
+ end
+end
+
sequencers.appendaction("mathparameters","system","mathematics.overloadparameters")
sequencers.appendaction("mathparameters","system","mathematics.scaleparameters")
sequencers.appendaction("mathparameters","system","mathematics.checkaccentbaseheight") -- should go in lfg instead
@@ -1509,6 +1740,7 @@ sequencers.appendaction("mathparameters","system","mathematics.checkaccentbasehe
sequencers.appendaction("beforecopyingcharacters","system","mathematics.tweakbeforecopyingfont")
sequencers.appendaction("aftercopyingcharacters", "system","mathematics.tweakaftercopyingfont")
+sequencers.appendaction("beforepassingfonttotex", "system","mathematics.beforepassingfonttotex")
-- no, it's a feature now (see good-mth):
--
@@ -1661,6 +1893,8 @@ interfaces.implement { -- will be shared with text
actions = mathematics.registerfallbackid,
}
+-- todo: run this directly .. can be done in luametatex
+
function mathematics.resolvefallbacks(target,specification,fallbacks)
local definitions = fonts.collections.definitions[fallbacks]
if definitions then
@@ -1673,7 +1907,7 @@ function mathematics.resolvefallbacks(target,specification,fallbacks)
local name = definition.font
local features = definition.features or ""
local size = size * (definition.rscale or 1)
--- compact: size = 655360
+ -- compact: size = 655360
context.font_fallbacks_register_math(i,name,features,size)
if trace_collecting then
report_math("registering fallback font %i, name %a, size %a, features %a",i,name,size,features)
@@ -1696,7 +1930,7 @@ function mathematics.finishfallbacks(target,specification,fallbacks)
local fonts = target.fonts
local size = specification.size -- target.size
local characters = target.characters
--- compact: size = 655360
+ -- compact: size = 655360
if not fonts then
fonts = { }
target.fonts = fonts
diff --git a/tex/context/base/mkxl/math-ali.mkxl b/tex/context/base/mkxl/math-ali.mkxl
index e2d7d8d69..a9e9af722 100644
--- a/tex/context/base/mkxl/math-ali.mkxl
+++ b/tex/context/base/mkxl/math-ali.mkxl
@@ -81,18 +81,14 @@
\newdimen\d_math_eqalign_number_distance
\newcount\c_math_eqalign_repeat
+\mutable\def\displayopenupvalue{.25\bodyfontsize}
+
\protected\def\math_eqalign_distance
- {\relax
- \ifdim\d_math_eqalign_distance>\zeropoint
- \tabskip\d_math_eqalign_distance
- \fi
- %global\expandafter\integerdef\csname\??mathbeginclass\the\c_math_eqalign_column\endcsname\mathbegincode
+ {%global\expandafter\integerdef\csname\??mathbeginclass\the\c_math_eqalign_column\endcsname\mathbegincode
\global\expandafter\integerdef\csname\??mathendclass \the\c_math_eqalign_column\endcsname\mathendcode
\mathalignmentparameter\c!separator
\relax}
-\mutable\def\displayopenupvalue{.25\bodyfontsize}
-
\def\math_build_eqalign
{\scratchtoks\emptytoks
\d_math_eqalign_distance\mathalignmentparameter\c!distance\relax
@@ -110,7 +106,10 @@
\dorecurse{\numexpr\scratchcounterone*\scratchcountertwo-\plusone\relax}
{\ifnum\scratchcounter=\scratchcountertwo
\scratchcounter\plusone
- \toksapp\scratchtoks{\math_eqalign_distance}%
+ % preamble expansion hell ...
+ \toksapp\scratchtoks {\tabskip\d_math_eqalign_distance}%
+ % so ...
+ \toksapp\scratchtoks {\relax\math_eqalign_distance}%
\etoksapp\scratchtoks{\global\advance\c_math_eqalign_repeat\the\scratchcountertwo\relax}%
\else
\advance\scratchcounter\plusone
@@ -132,7 +131,7 @@
\global\expandafter\integerdef\csname\??mathendclass \the\zerocount\endcsname\mathendcode
\protected\def\math_math_in_eqalign#1%
- {\mathbeginclass\csname\??mathendclass\the\numexpr\c_math_eqalign_column-\plusone\relax\endcsname
+ {\mathbeginclass\ifcsname\??mathendclass\the\numexpr\c_math_eqalign_column-\plusone\relax\endcsname\lastnamedcs\else\mathunsetcode\fi
\startforceddisplaymath
\tabskip\zeropoint
\everycr\emptytoks
@@ -362,7 +361,8 @@
% \math_halign_checked_nop \fi}
\def\math_halign_checked
- {\halign
+ {\enablematrixalign
+ \halign
\ifconditional\c_math_align_overflow_mode
callback
attr
@@ -397,11 +397,12 @@
{\begingroup
\setbox\scratchbox\hbox{\letformulaparameter\c!location\empty#1}%
\ifzeropt\wd\scratchbox\else
+ %\enablematrixalign
\hpack
- \s!attr \mathnumberlocationattribute \numexpr\c_strc_math_ragged_status * \plussixteen + \plusone\relax
- \s!attr \mathnumberthresholdattribute \numexpr\d_math_eqalign_number_threshold\relax
- {\strc_formulas_add_distance \plustwo\v!left\mathalignmentparameter
- \box\scratchbox}%
+ \s!attr \mathnumberlocationattribute \numexpr\c_strc_math_ragged_status * \plussixteen + \plusone\relax
+ \s!attr \mathnumberthresholdattribute \numexpr\d_math_eqalign_number_threshold\relax
+ {\strc_formulas_add_distance \plustwo\v!left\mathalignmentparameter
+ \box\scratchbox}%
\fi
\global\d_math_eqalign_number_threshold\zeropoint % move to begin of row
\endgroup}
@@ -410,11 +411,12 @@
{\begingroup
\setbox\scratchbox\hbox{\letformulaparameter\c!location\empty#1}%
\ifzeropt\wd\scratchbox\else
+ %\enablematrixalign
\hpack
- \s!attr \mathnumberlocationattribute \numexpr\c_strc_math_ragged_status * \plussixteen + \plustwo\relax
- \s!attr \mathnumberthresholdattribute \numexpr\d_math_eqalign_number_threshold\relax
- {\box\scratchbox
- \strc_formulas_add_distance \plustwo\v!right\mathalignmentparameter}%
+ \s!attr \mathnumberlocationattribute \numexpr\c_strc_math_ragged_status * \plussixteen + \plustwo\relax
+ \s!attr \mathnumberthresholdattribute \numexpr\d_math_eqalign_number_threshold\relax
+ {\box\scratchbox
+ \strc_formulas_add_distance \plustwo\v!right\mathalignmentparameter}%
\fi
\global\d_math_eqalign_number_threshold\zeropoint % move to begin of row
\endgroup}
@@ -968,7 +970,8 @@
\global\c_math_eqalign_row\plusone
\global\c_math_cases_nc\zerocount
\strc_math_setup_spacing_aligned\mathcasesparameter
- \halign callback \s!attr \mathnumberlocationattribute \zerocount \bgroup
+ \enablematrixalign
+ \halign callback \s!attr \mathnumberlocationattribute \zerocount \bgroup % use \indexofregister here
\ifmmode\else\startimath\fi
\mathcasesparameter\c!style
\aligncontent
@@ -1064,6 +1067,9 @@
%D different which is a side effect of getting the tagging right. In
%D retrospect the main alignment could be done this way but \unknown
+%D In the end is is way easier to not use alignments and just paste boxes together
+%D but let's be a bit texie.
+
\installcorenamespace{mathmatrix}
\installcommandhandler \??mathmatrix {mathmatrix} \??mathmatrix
@@ -1085,9 +1091,12 @@
\frozen\instance \defcsname \e!stop \currentmathmatrix\endcsname{\math_matrix_stop}% no u else lookahead problem
\to \everydefinemathmatrix
+\newcount\c_math_matrix_columns
+
\def\math_matrix_start_table
{\global\c_math_eqalign_column\zerocount
\global\c_math_eqalign_row\zerocount
+ \global\c_math_matrix_columns\zerocount
\dostarttagged\t!math\empty
\dostarttagged\t!mtable\empty}
@@ -1097,6 +1106,7 @@
\def\math_matrix_start_row
{\beginlocalcontrol
+ \global\c_math_matrix_columns\c_math_eqalign_column
\global\c_math_eqalign_column\zerocount
\global\advance\c_math_eqalign_row\plusone
\dostarttagged\t!mtablerow\empty
@@ -1121,6 +1131,100 @@
\hss
\dostoptagged}
+% \dorecurse{10}{test }
+%
+% \startformula
+% \startmatrix[left=\left(,right=\right)]
+% \NC x \NC \NC yy \NC \NC zzz \NR
+% \NC x \NC \dots \NC yy \NC \dots \NC zzz \NR
+% \HF[2] \NR
+% \NC x \NC \dots \NC yy \NC \dots \NC zzz \NR
+% \HF \NR
+% \NC x \NC \dots \NC yy \NC \dots \NC zzz \NR
+% \NC \HF[2] \NR
+% \NC x \NC \dots \NC yy \NC \dots \NC zzz \NR
+% \NC \NC \HF[2][rule] \NR
+% \NC x \NC \dots \NC yy \NC \dots \NC zzz \NR
+% \HL
+% \NC x \VL \dots \VL yy \NC \dots \VL zzz \NR
+% \NC x \VL \dots \VL yy \NC \dots \VL zzz \NR
+% \HL
+% \stopmatrix
+% \stopformula
+%
+% \dorecurse{10}{test }
+%
+% \startformula
+% \startmatrix[left=\left(,right=\right)]
+% \NC \TT \ttx 1 \NC \TT \ttx 2 \NC \TT \ttx 3 \NC \NR
+% \LT \ttx 1 \NC a \NC \dots \NC aa \NC \dots \NC aaa \RT \ttx 1 \NR
+% \LT \ttx 2 \NC b \NC \dots \NC bb \NC \dots \NC bbb \RT \ttx 2 \NR
+% \LT \ttx 3 \NC c \NC \dots \NC cc \NC \dots \NC ccc \RT \ttx 3 \NR
+% \NC \BT \ttx 1 \NC \BT \ttx 2 \NC \BT \ttx 3 \NC \NR
+% \stopmatrix
+% \stopformula
+%
+% \dorecurse{10}{test }
+%
+% \startformula
+% \startmatrix[left=\left(,right=\right)]
+% \NC \TT \ttx 1 \NC \TT \ttx 2 \NC \TT \ttx 3 \NR
+% \LT \ttx 1 \NC a \NC \dots \NC aa \NC \dots \NC aaa \NR
+% \LT \ttx 2 \NC b \NC \dots \NC bb \NC \dots \NC bbb \NR
+% \LT \ttx 3 \NC c \NC \dots \NC cc \NC \dots \NC ccc \NR
+% \NC \BT \ttx 1 \NC \BT \ttx 2 \NC \BT \ttx 3 \NR
+% \stopmatrix
+% \stopformula
+%
+% \dorecurse{10}{test }
+
+\newtoks\everymathmatrix
+
+\tolerant\permanent\def\math_matrix_HF[#1]#*[#2]% [n] [name] | [name] | [n]
+ {\expandedloop
+ \plusone
+ \numexpr\ifchknum#1\or#1\else(\c_math_matrix_columns+\minusone)\fi*\plustwo\relax
+ \plusone
+ {\omit\span}%
+ \normalexpanded{\filler[%
+ \ifcsname\??filleralternative matrix:#1\endcsname matrix:#1\orelse
+ \ifcsname\??filleralternative matrix:#2\endcsname matrix:#2\orelse
+ \ifcsname\??filleralternative #1\endcsname #1\orelse
+ \ifcsname\??filleralternative #2\endcsname #2\else
+ matrix:\v!normal\fi
+ ]}}
+
+\appendtoks
+ \enforced\let\HF\math_matrix_HF
+\to \everymathmatrix
+
+\definefiller
+ [matrix:\v!normal]
+ [\c!symbol=\textperiod,
+ \c!style=\v!normal,
+ \c!method=\v!broad,
+ \c!width=\emwidth,
+ \c!leftmargin=-.1\emwidth,
+ \c!rightmargin=-.1\emwidth]
+
+\definefiller
+ [matrix:\v!middle]
+ [\c!symbol=\textperiod,
+ \c!style=\v!normal,
+ \c!method=\v!middle,
+ \c!width=\emwidth,
+ \c!leftmargin=.5\emwidth,
+ \c!rightmargin=.5\emwidth]
+
+\definefiller
+ [matrix:ldots]
+ [matrix:\v!normal]
+
+\definefiller
+ [matrix:cdots]
+ [matrix:\v!normal]
+ [\c!symbol=\cdot]
+
% We could construct a preamble with alignment and such embedded but the number
% of matrices with many rows is normally so low that it doesn't pay of at all.
@@ -1175,7 +1279,7 @@
\aligntab
\aligntab
\math_matrix_anchor
- \hskip.5\d_math_eqalign_distance
+ \hskip.5\d_math_eqalign_distance % kern
\aligncontent
\aligntab
\global\advance\c_math_eqalign_column\plusone
@@ -1201,11 +1305,14 @@
\permanent\protected\def\math_matrix_NC_yes{\global\setfalse\c_math_matrix_first}
\permanent\protected\def\math_matrix_NC_nop{\aligntab\aligntab} % avoids lookahead
-
\def\math_matrix_check_rule_step#1%
- {\doifelsenumber{#1}
- {\scratchdimen#1\d_math_eqalign_rulethickness}
- {\edef\p_rulecolor{#1}}}
+ {\ifchkdim#1\or
+ \scratchdimen#1\relax
+ \orelse\ifchknum#1\or
+ \scratchdimen#1\d_math_eqalign_rulethickness
+ \else
+ \edef\p_rulecolor{#1}
+ \fi}
\def\math_matrix_check_rule[#1]%
{\d_math_eqalign_rulethickness\mathmatrixparameter\c!rulethickness\relax
@@ -1218,33 +1325,157 @@
\dousecolorparameter\p_rulecolor
\fi}
+% \noaligned\permanent\tolerant\protected\def\math_matrix_HL[#1]#*%
+% {\noalign\bgroup
+% \math_matrix_check_rule[#1]%
+% \divide\scratchdimen\plustwo
+% \autorule\s!height\scratchdimen\s!depth\scratchdimen\relax
+% \egroup}
+%
+% \permanent\tolerant\protected\def\math_matrix_VL[#1]#*%
+% {\NC
+% \math_matrix_check_rule[#1]%
+% \divide\d_math_eqalign_distance\plustwo
+% \hskip-\d_math_eqalign_distance
+% \autorule\s!width\scratchdimen\relax
+% \hskip-\d_math_eqalign_distance
+% \NC}
+
+% These offset are an experiment so we abuse some existing keys or we have to
+% cook up new ones. Maybe we then should provide small medium big halfline etc.
+% but all depends on actual demand for this feature.
+
+\definesystemattribute[mathalignmentvrule][public]
+
+\setupmathmatrix
+ [%c!toffset=\zeropoint,
+ \c!toffset=.25\exheight,
+ \c!boffset=\mathmatrixparameter\c!toffset]
+
\noaligned\permanent\tolerant\protected\def\math_matrix_HL[#1]#*%
{\noalign\bgroup
\math_matrix_check_rule[#1]%
\divide\scratchdimen\plustwo
- \autorule\s!height\scratchdimen\s!depth\scratchdimen\relax
+ \ifdim\scratchdimen>\zeropoint
+ % \autorule\s!height\scratchdimen\s!depth\scratchdimen\relax
+ \scratchdistance\mathmatrixparameter\c!toffset\relax
+ \ifdim\scratchdistance>\zeropoint
+ \nohrule
+ \s!attr \mathalignmentvruleattribute\plustwo
+ \s!height\scratchdistance
+ \s!depth \zeropoint
+ \relax
+ \fi
+ \hrule
+ \s!attr \mathalignmentvruleattribute\plusthree
+ \s!height\scratchdimen
+ \s!depth \scratchdimen
+ \relax
+ \scratchdistance\mathmatrixparameter\c!boffset\relax
+ \ifdim\scratchdistance>\zeropoint
+ \nohrule
+ \s!attr \mathalignmentvruleattribute\plusfour
+ \s!height\zeropoint
+ \s!depth \scratchdistance
+ \relax
+ \fi
+ \else
+ % zero dimensions disable the rule
+ \fi
\egroup}
+\protected\def\math_matrix_vertical_rule#1%
+ {\math_matrix_check_rule[#1]%
+ \enablematrixrules
+ \vrule
+ \s!attr \mathalignmentvruleattribute\plusone
+ \s!width \scratchdimen
+ \s!top -\dimexpr\mathmatrixparameter\c!toffset\relax
+ \s!bottom-\dimexpr\mathmatrixparameter\c!boffset\relax
+ \relax}
+
+
\permanent\tolerant\protected\def\math_matrix_VL[#1]#*%
+ {\span\omit
+ \hskip.5\d_math_eqalign_distance
+ \math_matrix_vertical_rule{#1}%
+ \hskip.5\d_math_eqalign_distance
+ \aligntab}
+
+\permanent\tolerant\protected\def\math_matrix_VC[#1]#*%
{\NC
- \math_matrix_check_rule[#1]%
- \divide\d_math_eqalign_distance\plustwo
- \hskip-\d_math_eqalign_distance
- \autorule\s!width\scratchdimen\relax
- \hskip-\d_math_eqalign_distance
+ \math_matrix_vertical_rule{#1}%
\NC}
-\newtoks\everymathmatrix
+\permanent\tolerant\protected\def\math_matrix_VT[#1]#*%
+ {\span\omit
+ \math_matrix_vertical_rule{#1}%
+ \aligntab}
+
+\def\math_matrix_start_row
+ {\beginlocalcontrol
+ \global\c_math_matrix_columns\c_math_eqalign_column
+ \global\c_math_eqalign_column\zerocount
+ \global\advance\c_math_eqalign_row\plusone
+ \dostarttagged\t!mtablerow\empty
+ \endlocalcontrol}
\appendtoks
\enforced\let\NR\math_matrix_NR
\enforced\let\NC\math_matrix_NC
\enforced\let\MC\math_matrix_NC
- \enforced\let\HL\math_matrix_HL
- \enforced\let\VL\math_matrix_VL
+ \enforced\let\HL\math_matrix_HL % like the old ones
+ \enforced\let\VL\math_matrix_VL % like the old ones
+ \enforced\let\VC\math_matrix_VC % bonus, extra column
+ \enforced\let\VT\math_matrix_VT % bonus, idem but tight
\enforced\let\TB\math_common_TB
\to \everymathmatrix
+\definesystemattribute[mathmatrixornament][public]
+
+\newdimen\d_math_matrix_margin_l
+\newdimen\d_math_matrix_margin_r
+\newdimen\d_math_matrix_margin_t
+\newdimen\d_math_matrix_margin_b
+
+\newboundary\c_math_matrix_ornament_l
+\newboundary\c_math_matrix_ornament_r
+\newboundary\c_math_matrix_ornament_t
+\newboundary\c_math_matrix_ornament_b
+
+% anchors are wrong now
+
+\newconditional\c_math_matrix_text
+\newconditional\c_math_matrix_text_l
+\newconditional\c_math_matrix_text_r
+\newconditional\c_math_matrix_text_t
+\newconditional\c_math_matrix_text_b
+
+\def\math_matrix_ornaments#1#2%
+ {\NC
+ \enablematrixornaments
+ \global\settrue\c_math_matrix_text
+ \global\settrue#1
+ \boundary#2%
+ \ignorespaces}
+
+\permanent\protected\def\math_matrix_LT{\math_matrix_ornaments\c_math_matrix_text_l\c_math_matrix_ornament_l}
+\permanent\protected\def\math_matrix_RT{\math_matrix_ornaments\c_math_matrix_text_r\c_math_matrix_ornament_r}
+\permanent\protected\def\math_matrix_TT{\math_matrix_ornaments\c_math_matrix_text_t\c_math_matrix_ornament_t}
+\permanent\protected\def\math_matrix_BT{\math_matrix_ornaments\c_math_matrix_text_b\c_math_matrix_ornament_b}
+
+\appendtoks
+ \global\setfalse\c_math_matrix_text
+ \global\setfalse\c_math_matrix_text_l
+ \global\setfalse\c_math_matrix_text_r
+ \global\setfalse\c_math_matrix_text_t
+ \global\setfalse\c_math_matrix_text_b
+ \enforced\let\LT\math_matrix_LT
+ \enforced\let\RT\math_matrix_RT
+ \enforced\let\TT\math_matrix_TT
+ \enforced\let\BT\math_matrix_BT
+\to \everymathmatrix
+
\def\math_matrix_start_processing
{\ifmmode
\mathatom \s!class \mathwrappedcode
@@ -1252,6 +1483,10 @@
\dontleavehmode
\fi
\bgroup
+ \d_math_matrix_margin_l\mathmatrixparameter\c!leftmargin \relax
+ \d_math_matrix_margin_r\mathmatrixparameter\c!rightmargin\relax
+ \d_math_matrix_margin_t\strutdp
+ \d_math_matrix_margin_b\strutht
%\tabskip.5\d_math_eqalign_distance
\tabskip\zeropoint
\math_matrix_pickup
@@ -1259,7 +1494,11 @@
%
\setbox\nextbox\vbox\bgroup
\math_matrix_start_table
- \halign \bgroup
+ \halign
+ callback
+ \s!attr \mathmatrixornamentattribute "10
+ \s!attr \mathalignmentvruleattribute \plusone
+ \bgroup
% preamble
\span\math_matrix_preamble
% done
@@ -1343,20 +1582,34 @@
\def\math_matrix_finish_nextbox
{\scratchcounter\mathstyle\relax
- \begincsname\??mathmatrixalignlocation\mathmatrixparameter\c!location\endcsname\hbox\bgroup
+ \scratchwidth\wd\nextbox
+ \setbox\scratchbox\begincsname\??mathmatrixalignlocation\mathmatrixparameter\c!location\endcsname\hbox\bgroup
\normalstartimath
\Ustyle\scratchcounter
- \scratchdimen\mathmatrixparameter\c!leftmargin\relax
- \ifzeropt\scratchdimen\else\kern\scratchdimen\fi
+ \ifzeropt\d_math_matrix_margin_l\else\kern\d_math_matrix_margin_l\fi
\mathmatrixparameter\c!left\relax
\math_fenced_start_wrap{\mathmatrixparameter\c!fences}%
\mathatom \s!class \mathconstructcode {\vcenter{\box\nextbox}}% \was \vcenter
\math_fenced_stop_wrap
\mathmatrixparameter\c!right\relax
- \scratchdimen\mathmatrixparameter\c!rightmargin\relax
- \ifzeropt\scratchdimen\else\kern\scratchdimen\fi
+ \ifzeropt\d_math_matrix_margin_r\else\kern\d_math_matrix_margin_r\fi
\normalstopimath
- \egroup}
+ \egroup
+ \ifconditional\c_math_matrix_text
+ \ifcstok{\mathmatrixparameter\c!left\mathmatrixparameter\c!right}\emptytoks\else
+ \scratchdistance\dimexpr(\wd\scratchbox-\scratchwidth)/\plustwo\relax
+ \advance\d_math_matrix_margin_l\scratchdistance
+ \advance\d_math_matrix_margin_r\scratchdistance
+ \clf_shiftmatrixornaments\scratchbox
+ \fi
+ \fi
+ \ifconditional\c_math_matrix_text_b
+ \dp\scratchbox\dimexpr\dp\scratchbox+\lineheight\relax
+ \fi
+ \ifconditional\c_math_matrix_text_t
+ \ht\scratchbox\dimexpr\ht\scratchbox+\lineheight\relax
+ \fi
+ \box\scratchbox}
\definemathmatrix[matrix]
\definemathmatrix[\v!mathmatrix]
@@ -1760,7 +2013,30 @@
{\dontleavehmode
\box\b_strc_math_display}
-\protected\def\strc_math_flush_aligned_boxed
+\def\strc_math_flush_aligned_left_number_indeed
+ {\ifvoid\b_strc_formulas_number\else
+ \scratchwidth\wd\b_strc_formulas_number
+ \setbox\b_strc_formulas_number\hbox to \displaywidth{\hss\hbox{\box\b_strc_formulas_number}}%
+ \ifcase\c_strc_math_number_location\or
+ \boxxoffset\b_strc_formulas_number\dimexpr-\displaywidth+\scratchwidth\relax
+ \boxyoffset\b_strc_formulas_number-\d_strc_math_first_height
+ \htdp\b_strc_formulas_number\zeropoint
+ \box\b_strc_formulas_number % left
+ \fi
+ \fi}
+
+\def\strc_math_flush_aligned_right_number_indeed
+ {\ifvoid\b_strc_formulas_number\else
+ \scratchwidth\wd\b_strc_formulas_number
+ \setbox\b_strc_formulas_number\hbox to \displaywidth{\hss\hbox{\box\b_strc_formulas_number}}%
+ \ifcase\c_strc_math_number_location\or\else
+ \boxyoffset\b_strc_formulas_number\d_strc_math_last_depth
+ \htdp\b_strc_formulas_number\zeropoint
+ \box\b_strc_formulas_number % right
+ \fi
+ \fi}
+
+\protected\def\strc_math_flush_aligned_indeed
{\ifcase\c_strc_math_ragged_status
% align: error
\strc_math_flush_aligned_boxed_direct_yes
@@ -1769,42 +2045,33 @@
\strc_math_flush_aligned_boxed_direct_yes
\or
% align: middle
- \ifnum\c_strc_math_split_mode=\c_strc_math_line_mode
+ \ifnum\c_strc_math_split_mode=\c_strc_math_line_mode
\leftskip \zeropoint
\rightskip\zeropoint
\strc_math_flush_aligned_boxed_direct_yes
- \else
-% \dontleavehmode
-% \ifnum\c_strc_math_split_mode=\c_strc_math_wrap_mode
-% \vbox\bgroup % to be tested, maybe \vcenter
-% \fi
-% \ifvbox\b_strc_math_display\unvbox\else\box\fi\b_strc_math_display
-% \setbox\b_strc_formulas_number\hbox to \displaywidth{\hss\hbox{\box\b_strc_formulas_number}}%
-% \boxyoffset\b_strc_formulas_number\d_strc_math_last_depth % todo: use anchors instead
-% \htdp\b_strc_formulas_number\zeropoint
-% \box\b_strc_formulas_number
-% \ifnum\c_strc_math_split_mode=\c_strc_math_wrap_mode
-% \egroup
-% \fi
- \ifnum\c_strc_math_split_mode=\c_strc_math_wrap_mode
- \dontleavehmode
- \vbox\bgroup % to be tested, maybe \vcenter
- \orelse\ifhmode
- \dontleavehmode
- \box\b_strc_math_display
- \orelse\ifvbox\b_strc_math_display
- \unvbox\b_strc_math_display
- \else
- \dontleavehmode
- \box\b_strc_math_display
- \fi
- \setbox\b_strc_formulas_number\hbox to \displaywidth{\hss\hbox{\box\b_strc_formulas_number}}%
- \boxyoffset\b_strc_formulas_number\d_strc_math_last_depth % todo: use anchors instead
- \htdp\b_strc_formulas_number\zeropoint
- \box\b_strc_formulas_number
- \ifnum\c_strc_math_split_mode=\c_strc_math_wrap_mode
- \egroup
- \fi
+ \orelse\ifnum\c_strc_math_split_mode=\c_strc_math_wrap_mode
+ \dontleavehmode
+ \vbox\bgroup
+ \strc_math_flush_aligned_left_number_indeed
+ \unvbox\b_strc_math_display
+ \strc_math_flush_aligned_right_number_indeed
+ \egroup
+ \orelse\ifhmode
+ % untested
+ \dontleavehmode
+ \strc_math_flush_aligned_left_number_indeed
+ \box\b_strc_math_display
+ \strc_math_flush_aligned_right_number_indeed
+ \orelse\ifvbox\b_strc_math_display
+ \strc_math_flush_aligned_left_number_indeed
+ \unvbox\b_strc_math_display
+ \strc_math_flush_aligned_right_number_indeed
+ \else
+ % untested
+ \dontleavehmode
+ \strc_math_flush_aligned_left_number_indeed
+ \box\b_strc_math_display
+ \strc_math_flush_aligned_right_number_indeed
\fi
\or
% align: flushright
@@ -1841,14 +2108,6 @@
\nointerlineskip
\fi}
-% \protected\def\strc_math_flush_aligned_unboxed
-% {\begingroup
-% \ifvbox\b_strc_math_display\unvbox\else\box\fi\b_strc_math_display
-% \par
-% \endgroup}
-
-\let\strc_math_flush_aligned_unboxed\strc_math_flush_aligned_boxed
-
\protected\def\strc_math_flush_aligned_simple
{\ifcase\c_strc_math_ragged_status\or\or\hfill\or\hfill\fi
\box\b_strc_math_display
@@ -1857,11 +2116,10 @@
\protected\def\strc_math_flush_aligned
{\ifnum\c_strc_math_split_mode=\c_strc_math_line_mode
\strc_math_flush_aligned_simple
- % \strc_math_flush_aligned_boxed
\orelse\ifconditional\c_strc_math_indent
% in this case the already set text align is overloaded
\strc_math_setup_align_auto
- \strc_math_flush_aligned_unboxed
+ \strc_math_flush_aligned_indeed
\else
% normally we don't end up here
\strc_math_setup_spacing_aligned\mathalignmentparameter
@@ -2224,9 +2482,9 @@
\fi
\fi
\else
- \box\b_strc_formulas_number
- \hfill
- \strc_math_flush_aligned
+ % \box\b_strc_formulas_number
+ % \hfill
+ \strc_math_flush_aligned % we flush in here, otherwise wrong positioning of number (we need to unvbox)
\fi}
\def\strc_math_flush_number_right
@@ -2250,8 +2508,8 @@
\fi
\else
\strc_math_flush_aligned
- \hfill
- \box\b_strc_formulas_number
+ % \hfill
+ % \box\b_strc_formulas_number % we flush in here
\fi}
%D Some inline math tweak.
@@ -2379,6 +2637,7 @@
\global\c_math_eqalign_row\plusone
\edef\m_simplealign_distance{\mathsimplealignparameter\c!distance}%
\strc_math_setup_spacing_aligned\mathcasesparameter
+ \enablematrixalign
\halign callback \s!attr \mathnumberlocationattribute \zerocount \bgroup
\global\c_math_eqalign_column\zerocount
\global\advance\c_math_eqalign_row\zerocount
diff --git a/tex/context/base/mkxl/math-dim.lmt b/tex/context/base/mkxl/math-dim.lmt
index 0dd348184..e0730da95 100644
--- a/tex/context/base/mkxl/math-dim.lmt
+++ b/tex/context/base/mkxl/math-dim.lmt
@@ -21,86 +21,87 @@ if not modules then modules = { } end modules ['math-dim'] = {
local abs, next = math.abs, next
local defaults = {
- axis = { default = { "AxisHeight", "axisheight" }, },
- accent_base_height = { default = { "AccentBaseHeight", "xheight" }, },
- fraction_del_size = { default = { "FractionDelimiterSize", "delim2" },
- cramped_display_style = { "FractionDelimiterDisplayStyleSize", "delim1" },
- display_style = { "FractionDelimiterDisplayStyleSize", "delim1" }, },
- fraction_denom_down = { default = { "FractionDenominatorShiftDown", "denom2" },
- cramped_display_style = { "FractionDenominatorDisplayStyleShiftDown", "denom1" },
- display_style = { "FractionDenominatorDisplayStyleShiftDown", "denom1" }, },
- fraction_denom_vgap = { default = { "FractionDenominatorGapMin", "defaultrulethickness" },
- cramped_display_style = { "FractionDenominatorDisplayStyleGapMin", "3*defaultrulethickness" },
- display_style = { "FractionDenominatorDisplayStyleGapMin", "3*defaultrulethickness" }, },
- fraction_num_up = { default = { "FractionNumeratorShiftUp", "num2" },
- cramped_display_style = { "FractionNumeratorDisplayStyleShiftUp", "num1" },
- display_style = { "FractionNumeratorDisplayStyleShiftUp", "num1" }, },
- fraction_num_vgap = { default = { "FractionNumeratorGapMin", "defaultrulethickness" },
- cramped_display_style = { "FractionNumeratorDisplayStyleGapMin", "3*defaultrulethickness" },
- display_style = { "FractionNumeratorDisplayStyleGapMin", "3*defaultrulethickness" }, },
- skewed_fraction_hgap = { default = { "SkewedFractionHorizontalGap", "mathquad/2" },
- cramped_display_style = { "SkewedFractionHorizontalGap", "mathquad/2" },
- display_style = { "SkewedFractionHorizontalGap", "mathquad/2" }, },
- skewed_fraction_vgap = { default = { "SkewedFractionVerticalGap", "xheight" },
- cramped_display_style = { "SkewedFractionVerticalGap", "xheight" },
- display_style = { "SkewedFractionVerticalGap", "xheight" }, },
- fraction_rule = { default = { "FractionRuleThickness", "defaultrulethickness" }, },
- limit_above_bgap = { default = { "UpperLimitBaselineRiseMin", "bigopspacing3" }, },
- limit_above_vgap = { default = { "UpperLimitGapMin", "bigopspacing1" }, },
- limit_above_kern = { default = { "0", "bigopspacing5" }, },
- limit_below_bgap = { default = { "LowerLimitBaselineDropMin", "bigopspacing4" }, },
- limit_below_vgap = { default = { "LowerLimitGapMin", "bigopspacing2" }, },
- limit_below_kern = { default = { "0", "bigopspacing5" }, },
- math_operator_size = { default = { "DisplayOperatorMinHeight", "mathxheight*3" }, }, -- 2
- overbar_kern = { default = { "OverbarExtraAscender", "defaultrulethickness" }, },
- overbar_rule = { default = { "OverbarRuleThickness", "defaultrulethickness" }, },
- overbar_vgap = { default = { "OverbarVerticalGap", "3*defaultrulethickness" }, },
- quad = { default = { "fontsize(f)", "mathquad" }, },
- radical_kern = { default = { "RadicalExtraAscender", "defaultrulethickness" }, },
- radical_rule = { default = { "RadicalRuleThickness", "defaultrulethickness" }, },
- -- default = { "surdheight(f)", "defaultrulethickness" },
- radical_vgap = { default = { "RadicalVerticalGap", "defaultrulethickness+(abs(defaultrulethickness)/4)" },
- display_style = { "RadicalDisplayStyleVerticalGap", "defaultrulethickness+(abs(mathxheight)/4)" }, },
- space_after_script = { default = { "SpaceAfterScript", "scriptspace" }, },
- space_before_script = { default = { "SpaceAfterScript", "scriptspace" }, },
- stack_denom_down = { default = { "StackBottomShiftDown", "denom2" },
- cramped_display_style = { "StackBottomDisplayStyleShiftDown", "denom1" },
- display_style = { "StackBottomDisplayStyleShiftDown", "denom1" }, },
- stack_num_up = { default = { "StackTopShiftUp", "num3" },
- cramped_display_style = { "StackTopDisplayStyleShiftUp", "num1" },
- display_style = { "StackTopDisplayStyleShiftUp", "num1" }, },
- stack_vgap = { default = { "StackGapMin", "3*defaultrulethickness" },
- cramped_display_style = { "StackDisplayStyleGapMin", "7*defaultrulethickness" },
- display_style = { "StackDisplayStyleGapMin", "7*defaultrulethickness" }, },
- sub_shift_down = { default = { "SubscriptShiftDown", "sub1" }, },
- sub_shift_drop = { default = { "SubscriptBaselineDropMin", "subdrop" }, },
- sub_sup_shift_down = { default = { "SubscriptShiftDown", "sub2" }, },
- sub_top_max = { default = { "SubscriptTopMax", "abs(mathxheight*4)/5" }, },
- subsup_vgap = { default = { "SubSuperscriptGapMin", "4*defaultrulethickness" }, },
- sup_bottom_min = { default = { "SuperscriptBottomMin", "abs(mathxheight)/4" }, },
- sup_shift_drop = { default = { "SuperscriptBaselineDropMax", "supdrop" }, },
- sup_shift_up = { cramped_display_style = { "SuperscriptShiftUpCramped", "sup3" },
- cramped_script_script_style = { "SuperscriptShiftUpCramped", "sup3" },
- cramped_script_style = { "SuperscriptShiftUpCramped", "sup3" },
- cramped_text_style = { "SuperscriptShiftUpCramped", "sup3" },
- display_style = { "SuperscriptShiftUp", "sup1" },
- script_script_style = { "SuperscriptShiftUp", "sup2" },
- script_style = { "SuperscriptShiftUp", "sup2" },
- text_style = { "SuperscriptShiftUp", "sup2" }, },
- sup_sub_bottom_max = { default = { "SuperscriptBottomMaxWithSubscript", "abs(mathxheight*4)/5" }, },
- underbar_kern = { default = { "UnderbarExtraDescender", "0" }, },
- underbar_rule = { default = { "UnderbarRuleThickness", "defaultrulethickness" }, },
- underbar_vgap = { default = { "UnderbarVerticalGap", "3*defaultrulethickness" }, },
- connector_overlap_min = { default = { "MinConnectorOverlap", "0.25*defaultrulethickness" }, },
- over_delimiter_vgap = { default = { "StretchStackGapBelowMin", "bigopspacing1" }, },
- over_delimiter_bgap = { default = { "StretchStackTopShiftUp", "bigopspacing3" }, },
- under_delimiter_vgap = { default = { "StretchStackGapAboveMin", "bigopspacing2" }, },
- under_delimiter_bgap = { default = { "StretchStackBottomShiftDown", "bigopspacing4" }, },
- radical_degree_before = { default = { "RadicalKernBeforeDegree", "(5/18)*quad" }, },
- radical_degree_after = { default = { "RadicalKernAfterDegree", "(-10/18)*quad" }, },
- radical_degree_raise = { default = { "RadicalDegreeBottomRaisePercent", "60" }, },
- no_limit_sub_factor = { default = { "NoLimitSubFactor", "0" }, },
- no_limit_sup_factor = { default = { "NoLimitSupFactor", "0" }, },
+ axis = { default = { "AxisHeight", "axisheight" }, },
+ accent_base_height = { default = { "AccentBaseHeight", "xheight" }, },
+ flattened_accent_base_height = { default = { "FlattenedAccentBaseHeight", "xheight" }, },
+ fraction_del_size = { default = { "FractionDelimiterSize", "delim2" },
+ cramped_display_style = { "FractionDelimiterDisplayStyleSize", "delim1" },
+ display_style = { "FractionDelimiterDisplayStyleSize", "delim1" }, },
+ fraction_denom_down = { default = { "FractionDenominatorShiftDown", "denom2" },
+ cramped_display_style = { "FractionDenominatorDisplayStyleShiftDown", "denom1" },
+ display_style = { "FractionDenominatorDisplayStyleShiftDown", "denom1" }, },
+ fraction_denom_vgap = { default = { "FractionDenominatorGapMin", "defaultrulethickness" },
+ cramped_display_style = { "FractionDenominatorDisplayStyleGapMin", "3*defaultrulethickness" },
+ display_style = { "FractionDenominatorDisplayStyleGapMin", "3*defaultrulethickness" }, },
+ fraction_num_up = { default = { "FractionNumeratorShiftUp", "num2" },
+ cramped_display_style = { "FractionNumeratorDisplayStyleShiftUp", "num1" },
+ display_style = { "FractionNumeratorDisplayStyleShiftUp", "num1" }, },
+ fraction_num_vgap = { default = { "FractionNumeratorGapMin", "defaultrulethickness" },
+ cramped_display_style = { "FractionNumeratorDisplayStyleGapMin", "3*defaultrulethickness" },
+ display_style = { "FractionNumeratorDisplayStyleGapMin", "3*defaultrulethickness" }, },
+ skewed_fraction_hgap = { default = { "SkewedFractionHorizontalGap", "mathquad/2" },
+ cramped_display_style = { "SkewedFractionHorizontalGap", "mathquad/2" },
+ display_style = { "SkewedFractionHorizontalGap", "mathquad/2" }, },
+ skewed_fraction_vgap = { default = { "SkewedFractionVerticalGap", "xheight" },
+ cramped_display_style = { "SkewedFractionVerticalGap", "xheight" },
+ display_style = { "SkewedFractionVerticalGap", "xheight" }, },
+ fraction_rule = { default = { "FractionRuleThickness", "defaultrulethickness" }, },
+ limit_above_bgap = { default = { "UpperLimitBaselineRiseMin", "bigopspacing3" }, },
+ limit_above_vgap = { default = { "UpperLimitGapMin", "bigopspacing1" }, },
+ limit_above_kern = { default = { "0", "bigopspacing5" }, },
+ limit_below_bgap = { default = { "LowerLimitBaselineDropMin", "bigopspacing4" }, },
+ limit_below_vgap = { default = { "LowerLimitGapMin", "bigopspacing2" }, },
+ limit_below_kern = { default = { "0", "bigopspacing5" }, },
+ math_operator_size = { default = { "DisplayOperatorMinHeight", "mathxheight*3" }, }, -- 2
+ overbar_kern = { default = { "OverbarExtraAscender", "defaultrulethickness" }, },
+ overbar_rule = { default = { "OverbarRuleThickness", "defaultrulethickness" }, },
+ overbar_vgap = { default = { "OverbarVerticalGap", "3*defaultrulethickness" }, },
+ quad = { default = { "fontsize(f)", "mathquad" }, },
+ radical_kern = { default = { "RadicalExtraAscender", "defaultrulethickness" }, },
+ radical_rule = { default = { "RadicalRuleThickness", "defaultrulethickness" }, },
+ -- default = { "surdheight(f)", "defaultrulethickness" },
+ radical_vgap = { default = { "RadicalVerticalGap", "defaultrulethickness+(abs(defaultrulethickness)/4)" },
+ display_style = { "RadicalDisplayStyleVerticalGap", "defaultrulethickness+(abs(mathxheight)/4)" }, },
+ space_after_script = { default = { "SpaceAfterScript", "scriptspace" }, },
+ space_before_script = { default = { "SpaceAfterScript", "scriptspace" }, },
+ stack_denom_down = { default = { "StackBottomShiftDown", "denom2" },
+ cramped_display_style = { "StackBottomDisplayStyleShiftDown", "denom1" },
+ display_style = { "StackBottomDisplayStyleShiftDown", "denom1" }, },
+ stack_num_up = { default = { "StackTopShiftUp", "num3" },
+ cramped_display_style = { "StackTopDisplayStyleShiftUp", "num1" },
+ display_style = { "StackTopDisplayStyleShiftUp", "num1" }, },
+ stack_vgap = { default = { "StackGapMin", "3*defaultrulethickness" },
+ cramped_display_style = { "StackDisplayStyleGapMin", "7*defaultrulethickness" },
+ display_style = { "StackDisplayStyleGapMin", "7*defaultrulethickness" }, },
+ sub_shift_down = { default = { "SubscriptShiftDown", "sub1" }, },
+ sub_shift_drop = { default = { "SubscriptBaselineDropMin", "subdrop" }, },
+ sub_sup_shift_down = { default = { "SubscriptShiftDown", "sub2" }, },
+ sub_top_max = { default = { "SubscriptTopMax", "abs(mathxheight*4)/5" }, },
+ subsup_vgap = { default = { "SubSuperscriptGapMin", "4*defaultrulethickness" }, },
+ sup_bottom_min = { default = { "SuperscriptBottomMin", "abs(mathxheight)/4" }, },
+ sup_shift_drop = { default = { "SuperscriptBaselineDropMax", "supdrop" }, },
+ sup_shift_up = { cramped_display_style = { "SuperscriptShiftUpCramped", "sup3" },
+ cramped_script_script_style = { "SuperscriptShiftUpCramped", "sup3" },
+ cramped_script_style = { "SuperscriptShiftUpCramped", "sup3" },
+ cramped_text_style = { "SuperscriptShiftUpCramped", "sup3" },
+ display_style = { "SuperscriptShiftUp", "sup1" },
+ script_script_style = { "SuperscriptShiftUp", "sup2" },
+ script_style = { "SuperscriptShiftUp", "sup2" },
+ text_style = { "SuperscriptShiftUp", "sup2" }, },
+ sup_sub_bottom_max = { default = { "SuperscriptBottomMaxWithSubscript", "abs(mathxheight*4)/5" }, },
+ underbar_kern = { default = { "UnderbarExtraDescender", "0" }, },
+ underbar_rule = { default = { "UnderbarRuleThickness", "defaultrulethickness" }, },
+ underbar_vgap = { default = { "UnderbarVerticalGap", "3*defaultrulethickness" }, },
+ connector_overlap_min = { default = { "MinConnectorOverlap", "0.25*defaultrulethickness" }, },
+ over_delimiter_vgap = { default = { "StretchStackGapBelowMin", "bigopspacing1" }, },
+ over_delimiter_bgap = { default = { "StretchStackTopShiftUp", "bigopspacing3" }, },
+ under_delimiter_vgap = { default = { "StretchStackGapAboveMin", "bigopspacing2" }, },
+ under_delimiter_bgap = { default = { "StretchStackBottomShiftDown", "bigopspacing4" }, },
+ radical_degree_before = { default = { "RadicalKernBeforeDegree", "(5/18)*quad" }, },
+ radical_degree_after = { default = { "RadicalKernAfterDegree", "(-10/18)*quad" }, },
+ radical_degree_raise = { default = { "RadicalDegreeBottomRaisePercent", "60" }, },
+ no_limit_sub_factor = { default = { "NoLimitSubFactor", "0" }, },
+ no_limit_sup_factor = { default = { "NoLimitSupFactor", "0" }, },
}
local styles = {
@@ -129,6 +130,10 @@ end
-- mt.__index = function(t,s)
-- return t.default or t.text_style or 0
-- end
+--
+-- This will all go away in \LMTX\ becuase itv makes no sense to support old fonts any longer,
+-- even when we assemble them one really needs to think about proper values. Okay, there is
+-- some historic value in here.
function mathematics.dimensions(dimens) -- beware, dimens get spoiled
if dimens.SpaceAfterScript then
@@ -175,72 +180,70 @@ function mathematics.dimensions(dimens) -- beware, dimens get spoiled
t[variable] = tt
end
local d = {
- AccentBaseHeight = t . accent_base_height . text_style,
- AxisHeight = t . axis . text_style,
+ AccentBaseHeight = t . accent_base_height . text_style,
+ FlattenedAccentBaseHeight = t . flattened_accent_base_height . text_style,
+ AxisHeight = t . axis . text_style,
-- DelimitedSubFormulaMinHeight
- DisplayOperatorMinHeight = t . math_operator_size . text_style, -- no longer let tex decide (weird values)
- -- FlattenedAccentBaseHeight
- FractionDenominatorDisplayStyleGapMin = t . fraction_denom_vgap . display_style,
- FractionDenominatorDisplayStyleShiftDown = t . fraction_denom_down . display_style,
- FractionDenominatorGapMin = t . fraction_denom_vgap . text_style,
- FractionDenominatorShiftDown = t . fraction_denom_down . text_style,
- FractionNumeratorDisplayStyleGapMin = t . fraction_num_vgap . display_style,
- FractionNumeratorDisplayStyleShiftUp = t . fraction_num_up . display_style,
- FractionNumeratorGapMin = t . fraction_num_vgap . text_style,
- FractionNumeratorShiftUp = t . fraction_num_up . text_style,
- FractionRuleThickness = t . fraction_rule . text_style,
- FractionDelimiterSize = t . fraction_del_size . text_style,
- FractionDelimiterDisplayStyleSize = t . fraction_del_size . display_style,
- LowerLimitBaselineDropMin = t . limit_below_bgap . text_style,
- LowerLimitGapMin = t . limit_below_vgap . text_style,
+ DisplayOperatorMinHeight = t . math_operator_size . text_style, -- no longer let tex decide (weird values)
+ FractionDenominatorDisplayStyleGapMin = t . fraction_denom_vgap . display_style,
+ FractionDenominatorDisplayStyleShiftDown = t . fraction_denom_down . display_style,
+ FractionDenominatorGapMin = t . fraction_denom_vgap . text_style,
+ FractionDenominatorShiftDown = t . fraction_denom_down . text_style,
+ FractionNumeratorDisplayStyleGapMin = t . fraction_num_vgap . display_style,
+ FractionNumeratorDisplayStyleShiftUp = t . fraction_num_up . display_style,
+ FractionNumeratorGapMin = t . fraction_num_vgap . text_style,
+ FractionNumeratorShiftUp = t . fraction_num_up . text_style,
+ FractionRuleThickness = t . fraction_rule . text_style,
+ FractionDelimiterSize = t . fraction_del_size . text_style,
+ FractionDelimiterDisplayStyleSize = t . fraction_del_size . display_style,
+ LowerLimitBaselineDropMin = t . limit_below_bgap . text_style,
+ LowerLimitGapMin = t . limit_below_vgap . text_style,
-- MathLeading
- MinConnectorOverlap = t . connector_overlap_min . text_style,
- OverbarExtraAscender = t . overbar_kern . text_style,
- OverbarRuleThickness = t . overbar_rule . text_style,
- OverbarVerticalGap = t . overbar_vgap . text_style,
- RadicalDisplayStyleVerticalGap = t . radical_vgap . display_style,
- RadicalExtraAscender = t . radical_kern . text_style,
- RadicalRuleThickness = t . radical_rule . text_style,
- RadicalVerticalGap = t . radical_vgap . text_style,
- RadicalKernBeforeDegree = t . radical_degree_before . display_style,
- RadicalKernAfterDegree = t . radical_degree_after . display_style,
- RadicalDegreeBottomRaisePercent = t . radical_degree_raise . display_style,
+ MinConnectorOverlap = t . connector_overlap_min . text_style,
+ OverbarExtraAscender = t . overbar_kern . text_style,
+ OverbarRuleThickness = t . overbar_rule . text_style,
+ OverbarVerticalGap = t . overbar_vgap . text_style,
+ RadicalDisplayStyleVerticalGap = t . radical_vgap . display_style,
+ RadicalExtraAscender = t . radical_kern . text_style,
+ RadicalRuleThickness = t . radical_rule . text_style,
+ RadicalVerticalGap = t . radical_vgap . text_style,
+ RadicalKernBeforeDegree = t . radical_degree_before . display_style,
+ RadicalKernAfterDegree = t . radical_degree_after . display_style,
+ RadicalDegreeBottomRaisePercent = t . radical_degree_raise . display_style,
-- ScriptPercentScaleDown
-- ScriptScriptPercentScaleDown
-- SkewedFractionHorizontalGap
-- SkewedFractionVerticalGap
- SpaceAfterScript = t . space_after_script . text_style,
- StackBottomDisplayStyleShiftDown = t . stack_denom_down . display_style,
- StackBottomShiftDown = t . stack_denom_down . text_style,
- StackDisplayStyleGapMin = t . stack_vgap . display_style,
- StackGapMin = t . stack_vgap . text_style,
- StackTopDisplayStyleShiftUp = t . stack_num_up . display_style,
- StackTopShiftUp = t . stack_num_up . text_style,
- StretchStackGapBelowMin = t . over_delimiter_vgap . text_style,
- StretchStackTopShiftUp = t . over_delimiter_bgap . text_style,
- StretchStackGapAboveMin = t . under_delimiter_vgap . text_style,
- StretchStackBottomShiftDown = t . under_delimiter_bgap . text_style,
- SubSuperscriptGapMin = t . subsup_vgap . text_style,
- SubscriptBaselineDropMin = t . sub_shift_drop . text_style,
- SubscriptShiftDown = t . sub_shift_down . text_style,
- SubscriptShiftDownWithSuperscript = t . sub_sup_shift_down . text_style,
- SubscriptTopMax = t . sub_top_max . text_style,
- SuperscriptBaselineDropMax = t . sup_shift_drop . text_style,
- SuperscriptBottomMaxWithSubscript = t . sup_sub_bottom_max . text_style,
- SuperscriptBottomMin = t . sup_bottom_min . text_style,
- SuperscriptShiftUp = t . sup_shift_up . text_style,
- SuperscriptShiftUpCramped = t . sup_shift_up . cramped_text_style,
- UnderbarExtraDescender = t . underbar_kern . text_style,
- UnderbarRuleThickness = t . underbar_rule . text_style,
- UnderbarVerticalGap = t . underbar_vgap . text_style,
- UpperLimitBaselineRiseMin = t . limit_above_bgap . text_style,
- UpperLimitGapMin = t . limit_above_vgap . text_style,
+ SpaceAfterScript = t . space_after_script . text_style,
+ StackBottomDisplayStyleShiftDown = t . stack_denom_down . display_style,
+ StackBottomShiftDown = t . stack_denom_down . text_style,
+ StackDisplayStyleGapMin = t . stack_vgap . display_style,
+ StackGapMin = t . stack_vgap . text_style,
+ StackTopDisplayStyleShiftUp = t . stack_num_up . display_style,
+ StackTopShiftUp = t . stack_num_up . text_style,
+ StretchStackGapBelowMin = t . over_delimiter_vgap . text_style,
+ StretchStackTopShiftUp = t . over_delimiter_bgap . text_style,
+ StretchStackGapAboveMin = t . under_delimiter_vgap . text_style,
+ StretchStackBottomShiftDown = t . under_delimiter_bgap . text_style,
+ SubSuperscriptGapMin = t . subsup_vgap . text_style,
+ SubscriptBaselineDropMin = t . sub_shift_drop . text_style,
+ SubscriptShiftDown = t . sub_shift_down . text_style,
+ SubscriptShiftDownWithSuperscript = t . sub_sup_shift_down . text_style,
+ SubscriptTopMax = t . sub_top_max . text_style,
+ SuperscriptBaselineDropMax = t . sup_shift_drop . text_style,
+ SuperscriptBottomMaxWithSubscript = t . sup_sub_bottom_max . text_style,
+ SuperscriptBottomMin = t . sup_bottom_min . text_style,
+ SuperscriptShiftUp = t . sup_shift_up . text_style,
+ SuperscriptShiftUpCramped = t . sup_shift_up . cramped_text_style,
+ UnderbarExtraDescender = t . underbar_kern . text_style,
+ UnderbarRuleThickness = t . underbar_rule . text_style,
+ UnderbarVerticalGap = t . underbar_vgap . text_style,
+ UpperLimitBaselineRiseMin = t . limit_above_bgap . text_style,
+ UpperLimitGapMin = t . limit_above_vgap . text_style,
}
-
-- too fragile for tx/px ... even the same values give different results
- d.DisplayOperatorMinHeight = nil
- --
- d.AccentBaseHeight = 0 -- here? still?
+ -- d.DisplayOperatorMinHeight = nil
+ -- d.AccentBaseHeight = 0 -- here? still? or maybe undedined i.e. maxdimen
return d, t -- t only for diagnostics
else
return { }, { }
diff --git a/tex/context/base/mkxl/math-fen.mkxl b/tex/context/base/mkxl/math-fen.mkxl
index 5725c5ee1..85a28acca 100644
--- a/tex/context/base/mkxl/math-fen.mkxl
+++ b/tex/context/base/mkxl/math-fen.mkxl
@@ -15,20 +15,6 @@
\unprotect
-% ignore missign right message, so we can have left extensibles (int or so)
-%
-% \mathdelimitersmode"20 (todo: flipbit)
-
-% maybe always "method=auto" for:
-%
-% \switchtobodyfont[cambria]
-% \ruledhbox{$f(x)$}
-% \ruledhbox{\mathdelimitersmode6$f\left(x\right)$}
-% \ruledhbox{\mathdelimitersmode7$f\left(x\right)$}
-% \ruledhbox{$f\left(\frac{1}{x}\right)$}
-
-% todo: mathstyle
-
% \definemathfence [fancybracket] [bracket] [command=yes,color=blue]
%
% test $|x|$ test \par
@@ -185,6 +171,9 @@
\Uvextensible
\else
#1% \Uleft \Umiddle \Uleft
+ \ifx#1\Umiddle
+ nooverflow %
+ \fi
\fi
\orelse\ifx\p_factor\v!none
\math_fenced_common_factor_none
@@ -457,25 +446,6 @@
\fi
\math_fenced_force_size\bigmathdelimitervariant\c_math_fenced_level\relax}
-% integral experiment (but no scripts)
-%
-% \protected\def\math_fenced_fenced_simple#1%
-% {\pushmacro\currentmathfence
-% \edef\currentmathfence{#1}%
-% \math_fenced_fenced_common
-% \math_fenced_left
-% \popmacro\currentmathfence
-% \stopusemathstyleparameter}
-%
-% \immutable\protected\def\integral {\math_fenced_fenced_simple{integral}}
-%
-% let's keep this weird hack:
-%
-% \mathdelimitersmode"20
-% \startformula
-% x = \integral {\vrule height 20mm depth 18mm width 5mm}^^{2\,}__{2\,}
-% \stopformula
-
% todo: | in mathmode letter
%
% \appendtoks
@@ -814,7 +784,7 @@
\bigmathdelimitervariant\mathfenceparameter\c!alternative\relax % controls lua
\to \everysetupmathfence
-\setupmathfence[\c!alternative=1] % or 5
+\setupmathfence[\c!alternative=5] % the rest will probably go
\permanent\protected\def\choosemathbig
{\mathortext\math_choosemathbig_math\math_choosemathbig_text}
@@ -912,38 +882,45 @@
\permanent\protected\def\disableautofences
{\setfalse\c_math_fences_auto}
-\protected\def\math_fences_used_left
+\permanent\protected\def\math_fences_used_left
{\ifconditional\c_math_fences_auto
\expandafter\math_fences_auto_left
\else
\expandafter\math_fences_normal_left
\fi}
-\protected\def\math_fences_used_right
+\permanent\protected\def\math_fences_used_right
{\ifconditional\c_math_fences_auto
\expandafter\math_fences_auto_right
\else
\expandafter\math_fences_normal_right
\fi}
-\protected\def\math_fences_used_middle
+\permanent\protected\def\math_fences_used_middle
{\ifconditional\c_math_fences_auto
\expandafter\math_fences_auto_middle
\else
\expandafter\math_fences_normal_middle
\fi}
-\protected\def\math_fences_used_both
+\permanent\protected\def\math_fences_used_both
{\ifconditional\c_math_fences_auto
\expandafter\math_fences_auto_both
\else
\expandafter\math_fences_normal_both
\fi}
-\permanent\let\left \math_fences_used_left
-\permanent\let\right \math_fences_used_right
-\permanent\let\middle \math_fences_used_middle
-\permanent\let\leftorright\math_fences_used_both
+\aliased\let\left \math_fences_used_left
+\aliased\let\right \math_fences_used_right
+\aliased\let\middle \math_fences_used_middle
+\aliased\let\leftorright\math_fences_used_both
+
+% \appendtoks
+% \enforced\let\left \math_fences_used_left
+% \enforced\let\right \math_fences_used_right
+% \enforced\let\middle \math_fences_used_middle
+% \enforced\let\leftorright\math_fences_used_both
+% \to \everymathematics
% wrappers
@@ -954,30 +931,18 @@
\permanent\protected\def\stopcheckedfences
{\endgroup}
-% \appendtoks
- % maybe: safeguard against overloading
- %
- % \let\left \math_fences_used_left
- % \let\right \math_fences_used_right
- % \let\middle \math_fences_used_middle
- % \let\leftorright\math_fences_used_both
-% \to \everymathematics
-
\appendtoks
\ifempty\currentmathfence
- \doifelse{\mathfenceparameter\c!state}\v!auto\enableautofences\disableautofences
+ \ifcstok{\mathfenceparameter\c!state}\v!auto\enableautofences\else\disableautofences\fi
\fi
\to \everysetupmathfence
-\newconstant\c_math_fences_delimiters_mode \c_math_fences_delimiters_mode"16 % \numexpr"02+"04+"10\relax
-
-%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}
+\permanent\protected\def\enableautofencemode {\mathcheckfencesmode\plusone}
+\permanent\protected\def\disableautofencemode{\mathcheckfencesmode\zerocount}
\appendtoks
\ifempty\currentmathfence
- \doifelse{\mathfenceparameter\c!method}\v!auto\enableautofencemode\disableautofencemode
+ \ifcstok{\mathfenceparameter\c!method}\v!auto\enableautofencemode\else\disableautofencemode\fi
\fi
\to \everysetupmathfence
diff --git a/tex/context/base/mkxl/math-frc.mkxl b/tex/context/base/mkxl/math-frc.mkxl
index 2e16e061f..3577a6b2f 100644
--- a/tex/context/base/mkxl/math-frc.mkxl
+++ b/tex/context/base/mkxl/math-frc.mkxl
@@ -150,6 +150,12 @@
% So far for control.
+% no : \ruledhbox{\m{\frac[strut=no] {28}{8\times29}}} \par
+% tight : \ruledhbox{\m{\frac[strut=tight]{28}{8\times29}}} \par
+% yes : \ruledhbox{\m{\frac[strut=yes] {28}{8\times29}}} \par
+% math : \ruledhbox{\m{\frac[strut=math] {28}{8\times29}}} \par
+% text : \ruledhbox{\m{\frac[strut=text] {28}{8\times29}}} \par
+
\installcorenamespace{mathfractionstrut}
\def\math_frac_no_strut
@@ -170,6 +176,10 @@
{\enforced\let\m_fractions_strut_top\mathdepthstrut
\enforced\let\m_fractions_strut_bot\mathheightstrut}
+\defcsname\??mathfractionstrut\v!text\endcsname
+ {\enforced\let\m_fractions_strut_top\strut
+ \enforced\let\m_fractions_strut_bot\strut}
+
\math_frac_no_strut
\newdimen\d_math_fraction_margin
@@ -413,39 +423,46 @@
\ifempty\currentmathfraction
\edef\p_threshold{\mathfractionparameter\c!inlinethreshold}%
\ifempty\p_threshold
- \let\math_fraction_set_threshold_inline\relax
+ \let\math_fraction_set_threshold_inline\math_fraction_set_threshold_inline_auto
\orelse\ifx\p_threshold\v!auto
- \let\math_fraction_set_threshold_inline\relax
+ \let\math_fraction_set_threshold_inline\math_fraction_set_threshold_inline_auto
\else
- \let\math_fraction_set_threshold_inline\math_fraction_set_theshold_inline
+ \let\math_fraction_set_threshold_inline\math_fraction_set_threshold_inline_ratio
\fi
\edef\p_threshold{\mathfractionparameter\c!displaythreshold}%
\ifempty\p_threshold
- \let\math_fraction_set_threshold_display\relax
+ \let\math_fraction_set_threshold_display\math_fraction_set_threshold_display_auto
\orelse\ifx\p_threshold\v!auto
- \let\math_fraction_set_threshold_display\relax
+ \let\math_fraction_set_threshold_display\math_fraction_set_threshold_display_auto
\else
- \let\math_fraction_set_threshold_display\math_fraction_set_theshold_display
+ \let\math_fraction_set_threshold_display\math_fraction_set_threshold_display_ratio
\fi
\fi
\to \everysetupmathfraction
-\def\math_fraction_set_theshold_inline
+\def\math_fraction_set_threshold_inline_auto
+ {\Umathfractiondelsize\textstyle \maxdimen
+ \Umathfractiondelsize\scriptstyle \maxdimen
+ \Umathfractiondelsize\scriptscriptstyle\maxdimen}
+
+\def\math_fraction_set_threshold_display_auto
+ {\Umathfractiondelsize\displaystyle \maxdimen}
+
+\def\math_fraction_set_threshold_inline_ratio
{\edef\p_threshold{\mathfractionparameter\c!inlinethreshold}%
\Umathfractiondelsize\textstyle \p_threshold\dimexpr\textface\relax
\Umathfractiondelsize\scriptstyle \p_threshold\dimexpr\scriptface\relax
\Umathfractiondelsize\scriptscriptstyle\p_threshold\dimexpr\scriptscriptface\relax}
-\def\math_fraction_set_theshold_display
+\def\math_fraction_set_threshold_display_ratio
{\edef\p_threshold{\mathfractionparameter\c!displaythreshold}%
- \Umathfractiondelsize\displaystyle \p_threshold\dimexpr\textface\relax}
-
-%D This is a variant
+ \Umathfractiondelsize\displaystyle \p_threshold\dimexpr\textface\relax
+ \Umathfractiondelsize\displaystyle \maxdimen}
\setupmathfractions
- [%\c!inlinethreshold=.25, % no unit but fraction
- %\c!displaythreshold=.25, % no unit but fraction
- \c!threshold=.5\exheight] % wrong name, better is margin or offset or so
+ [\c!inlinethreshold=.25, % no unit but fraction
+ \c!displaythreshold=\v!auto, % no unit but fraction
+ \c!threshold=.25\exheight]
\appendtoks
\Umathskeweddelimitertolerance\allmathstyles\mathfractionparameter\c!threshold
diff --git a/tex/context/base/mkxl/math-ini.lmt b/tex/context/base/mkxl/math-ini.lmt
index 184e56672..654e29d2b 100644
--- a/tex/context/base/mkxl/math-ini.lmt
+++ b/tex/context/base/mkxl/math-ini.lmt
@@ -134,6 +134,7 @@ registerengineclass("factorial", "fac")
registerengineclass("wrapped", "wra")
registerengineclass("construct", "con")
registerengineclass("dimension", "dim")
+registerengineclass("unary", "una")
registerengineclass("textpunctuation", "tpu")
registerengineclass("unspaced")
registerengineclass("experimental")
diff --git a/tex/context/base/mkxl/math-ini.mkxl b/tex/context/base/mkxl/math-ini.mkxl
index 19123ab8a..f5c422612 100644
--- a/tex/context/base/mkxl/math-ini.mkxl
+++ b/tex/context/base/mkxl/math-ini.mkxl
@@ -1,9 +1,9 @@
-%D \module
+ %D \module
%D [ file=math-ini,
%D version=2008.01.02,
%D title=\CONTEXT\ Math Macros,
%D subtitle=Initializations,
-%D author=Hans Hagen,
+%D author={Hans Hagen \& Mikael Sundqvist},
%D date=\currentdate,
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
%C
@@ -72,7 +72,7 @@
%D Basic spacing:
-\mathfencesmode \plusone % unpack
+% \mathfencesmode \plusone % gone
\delimiterfactor \plusthousand
\delimitershortfall \zeropoint
@@ -92,7 +92,7 @@
+\fractionrulemathcontrolcode % idem
+\accentskewhalfmathcontrolcode % fall back to half width skewing when no topaccent is given
+\accentskewapplymathcontrolcode % use topaccent, otherwise use skew char
- % + checkligatureandkernmathcontrolcode % old fonts
+ +\applyordinarykernpairmathcontrolcode % old fonts
+\applyverticalitalickernmathcontrolcode % best do this indeed
+\applyordinaryitalickernmathcontrolcode % best do this indeed
% +\applycharitalickernmathcontrolcode % not done
@@ -103,7 +103,7 @@
+\checktextitalickernmathcontrolcode
% +\checkspaceitalickernmathcontrolcode % old code path
+\applyscriptitalickernmathcontrolcode
- +\italicshapekernmathcontrolcode % instead of adding pre italic to the shift, inject a kern
+ % +\italicshapekernmathcontrolcode % obsolete: instead of adding pre italic to the shift, inject a kern
\relax
% \mathpenaltiesmode\plusone
@@ -172,6 +172,7 @@
\setnewconstant\mathtextpunctuationcode \mathclassvalue textpunctuation % for punctuation in text font followed by interword spacing
\setnewconstant\mathunspacedcode \mathclassvalue unspaced % for cases where we don't want spacing at all
\setnewconstant\mathexperimentalcode \mathclassvalue experimental % for MS and HH testing purposed only
+\setnewconstant\mathunarycode \mathclassvalue unary % dedicated to Alan
\setnewconstant\mathbegincode \mathclassvalue begin
\setnewconstant\mathendcode \mathclassvalue end
@@ -197,6 +198,7 @@
\copymathspacing \mathdigitcode \mathordinarycode
\copymathspacing \mathfunctioncode \mathoperatorcode
\copymathspacing \mathwrappedcode \mathfractioncode
+\copymathspacing \mathunarycode \mathordinarycode
\setnewconstant\mathlimopcode \plusone
\setnewconstant\mathnolopcode \plusone
@@ -233,6 +235,7 @@
\untraced\protected\def\mathdimension {\mathatom \s!class \mathdimensioncode }
%untraced\protected\def\mathbegin {\mathatom \s!class \mathbegincode } % dangerous
%untraced\protected\def\mathend {\mathatom \s!class \mathendcode } % dangerous
+\untraced\protected\def\mathunary {\mathatom \s!class \mathunarycode }
% obsolete
@@ -422,6 +425,17 @@
\mathgroupingmode \plusone
%mathdoublescriptmode\zerocount % -1 will give an error (as usual) .. "LLRR (left class, right class)
+%D \starttyping
+%D \startTEXpage[offset=1dk]
+%D $ 1 {\red +} 2$\par
+%D $ 1 \color[red]{+} 2$\par
+%D \mathgroupingmode0
+%D $ 1 {\red +} 2$\par
+%D $ 1 \mathbin{\red +} 2$\par
+%D $ 1 \color[red]{+} 2$\par
+%D \stopTEXpage
+%D \stoptyping
+
% $x ^^1__2 ^3_4 ^5_6 ^7_8 $
\mathdoublescriptmode
@@ -442,6 +456,7 @@
% +\closefenceclassoptioncode % at some point we want to have to have access to it at
% +\middlefenceclassoptioncode % lua end ... so we keep it (also in the engine) commented
% +\checkligatureclassoptioncode % no font provides this so it is more a compatibility feature
+ % +\checkkernpairclassoptioncode
% +\flattenclassoptioncode
% +\omitpenaltyclassoptioncode % old school check, we do pairwise instead
\relax
@@ -449,12 +464,14 @@
\setmathoptions\mathordinarycode\numexpr
\noitaliccorrectionclassoptioncode
% +\checkligatureclassoptioncode
+ +\checkkernpairclassoptioncode
+\flattenclassoptioncode
\relax
\setmathoptions\mathoperatorcode\numexpr
\defaultmathclassoptions
% +\checkligatureclassoptioncode
+ +\checkkernpairclassoptioncode
\relax
\setmathoptions\mathbinarycode\numexpr
@@ -462,6 +479,7 @@
+\lookaheadforendclassoptioncode
+\noitaliccorrectionclassoptioncode
% +\checkligatureclassoptioncode
+ +\checkkernpairclassoptioncode
+\flattenclassoptioncode
\relax
@@ -469,6 +487,7 @@
\defaultmathclassoptions
+\noitaliccorrectionclassoptioncode
% +\checkligatureclassoptioncode
+ +\checkkernpairclassoptioncode
+\flattenclassoptioncode
% +\omitpenaltyclassoptioncode
\relax
@@ -478,6 +497,7 @@
+\noitaliccorrectionclassoptioncode
% +\openfenceclassoptioncode
% +\checkligatureclassoptioncode
+ +\checkkernpairclassoptioncode
\relax
\setmathoptions\mathclosecode\numexpr
@@ -485,6 +505,8 @@
+\noitaliccorrectionclassoptioncode
% +\closefenceclassoptioncode
% +\checkligatureclassoptioncode
+ +\checkkernpairclassoptioncode
+ +\raiseprimeclassoptioncode
\relax
\setmathoptions\mathpunctuationcode\numexpr
@@ -492,6 +514,7 @@
+\noitaliccorrectionclassoptioncode
% +\checkligatureclassoptioncode
+\flattenclassoptioncode
+ +\checkkernpairclassoptioncode
\relax
\setmathoptions\mathvariablecode\numexpr
@@ -510,10 +533,17 @@
\setmathoptions\mathmiddlecode\numexpr
\noitaliccorrectionclassoptioncode
% +\middlefenceclassoptioncode
+ +\raiseprimeclassoptioncode
\relax
\setmathoptions\mathfractioncode\numexpr
\defaultmathclassoptions
+ +\raiseprimeclassoptioncode
+\relax
+
+\setmathoptions\mathradicalcode\numexpr
+ \defaultmathclassoptions
+ +\raiseprimeclassoptioncode
\relax
\setmathoptions\mathaccentcode\numexpr
@@ -533,9 +563,19 @@
\setmathoptions\mathbegincode
\nopostslackclassoptioncode
+\relax
\setmathoptions\mathendcode
\nopreslackclassoptioncode
+\relax
+
+% Fenced is only used internally as these fences become open, middle and close
+% subtypes. If we don't set the following we should actually also define the
+% spacing rules.
+
+\setmathoptions\mathfencedcode
+ \unpackclassoptioncode
+\relax
%D For now \unknown (todo: make it adapt to style but we're in text anyway)
@@ -3922,6 +3962,35 @@
\clf_traverseblock{#1}\mathtraversecommand
\popmacro\mathtraversecommand}
+%D Just some features:
+%D
+%D \starttyping
+%D $ x + \mathatom class \mathordcode {xxx} \Umathphantom + x $\par
+%D $ x + \mathatom class \mathordcode {xxx} \Umathvoid + x $\par
+%D $ x + \mathatom phantom class \mathordcode {xxx} + x $\par
+%D $ x + \mathatom void class \mathordcode {xxx} + x $\par
+%D
+%D \def\rab{\Umathchar"1"00"007C }
+%D
+%D $
+%D \color[green]{\rab\Umathadapttoright^{\black 1}_{\black 2}^^3__4}
+%D \color[blue] {\mathinner{\vrule height 30mm depth 30mm width 5mm}}
+%D \color[red] {\rab\Umathadapttoleft ^5_6^^{\black 7}__{\black 8}}
+%D $
+%D
+%D $
+%D \rab\Umathadapttoright^1_2^^3__4
+%D \mathinner{\vrule height 30mm depth 30mm width 5mm}
+%D \rab\Umathadapttoleft^5_6^^7__8
+%D $
+%D \stoptyping
+
+%D Just in case someone uses it:
+
+\appendtoks
+ \scriptspace.05\Umathquad\textstyle % for Mikael
+\to \everymathematics
+
\protect \endinput
% % not used (yet)
diff --git a/tex/context/base/mkxl/math-noa.lmt b/tex/context/base/mkxl/math-noa.lmt
index f93201459..9ba92bbc7 100644
--- a/tex/context/base/mkxl/math-noa.lmt
+++ b/tex/context/base/mkxl/math-noa.lmt
@@ -116,7 +116,6 @@ local setattrlist = nuts.setattrlist
local setwidth = nuts.setwidth
local setheight = nuts.setheight
local setdepth = nuts.setdepth
-local setoptions = nuts.setoptions
local getfield = nuts.getfield
local getnext = nuts.getnext
@@ -1960,7 +1959,6 @@ do
end
do
- -- todo: make a primes class
local fixscripts = { }
@@ -1983,7 +1981,9 @@ do
[fraction_code] = true,
}
- fixscripts[mathchar_code] = function(pointer,what,n,parent,nested) -- todo: switch to turn in on and off
+ -- [prime|sub|sup]first
+
+ fixscripts[mathchar_code] = function(pointer,what,n,parent,nested) -- todo: switch to turn it on and off
if parent then
local char = getchar(pointer)
if char and primes[char] then
@@ -1995,7 +1995,7 @@ do
local prevsub = getsub(prev)
local primesup = getsup(parent)
local primesub = getsub(parent)
- setfield(prev,"scriptorder",prevsub and 2 or 1) -- sub first
+ setfield(prev,"scriptorder",prevsub and 2 or 1) -- sub first, then prime
if primesup and not prevsup then
setsup(prev,primesup)
primesup = nil
diff --git a/tex/context/base/mkxl/math-spa.lmt b/tex/context/base/mkxl/math-spa.lmt
index 487d9e4a4..698692a2c 100644
--- a/tex/context/base/mkxl/math-spa.lmt
+++ b/tex/context/base/mkxl/math-spa.lmt
@@ -15,6 +15,7 @@ local hlist_code = nodes.nodecodes.hlist
local glue_code = nodes.nodecodes.glue
local line_code = nodes.listcodes.line
local ghost_code = nodes.listcodes.ghost
+local middle_code = nodes.listcodes.middle
local nuts = nodes.nuts
local tonut = nodes.tonut
@@ -26,12 +27,14 @@ local getnext = nuts.getnext
local getwidth = nuts.getwidth
local getdata = nuts.getdata
local getdepth = nuts.getdepth
+local getheight = nuts.getheight
local getlist = nuts.getlist
local setglue = nuts.setglue
local getdimensions = nuts.dimensions
local getnormalizedline = node.direct.getnormalizedline
local getbox = nuts.getbox
local setoffsets = nuts.setoffsets
+local addxoffset = nuts.addxoffset
local nextglue = nuts.traversers.glue
local nextlist = nuts.traversers.list
@@ -73,43 +76,60 @@ stages[1] = function(specification,stage)
end
end
+local function reposition(n,offset)
+ -- We need to relocate the local boxes that we use to push something left or
+ -- right ... quite horrible and one needs a bit twisted mindset for this.
+ for n, id, subtype, list in nextlist, getlist(n) do
+ if subtype == middle_code then
+ addxoffset(n,-offset)
+ end
+ end
+ addxoffset(n,offset)
+end
+
stages[2] = function(specification,stage)
- local head = getlist(getbox(specification.box))
- local align = specification.alignstate
- local max = false
- local cnt = 0
- local width = 0
- local depth = 0
+ local head = getlist(getbox(specification.box))
+ local align = specification.alignstate
+ local maxwidth = false
+ local cnt = 0
+ local lastwidth = 0
+ local firstheight = 0
+ local lastdepth = 0
for n, id, subtype, list in nextlist, head do
if subtype == line_code then
local t = getnormalizedline(n)
local m = t.rightskip + t.parfillrightskip
- if not max then
- max = m
- elseif m < max then
- max = m
+ if not maxwidth then
+ maxwidth = m
+ firstheight = getheight(n)
+ firstwidth = m
+ elseif m < maxwidth then
+ maxwidth = m
end
- cnt = cnt + 1
- width = m
- depth = getdepth(n)
+ cnt = cnt + 1
+ lastwidth = m
+ lastdepth = getdepth(n)
end
end
if stage == 2 and (align == 2 or align == 3) then
for n, id, subtype, list in nextlist, head do
if subtype == line_code then
if align == 1 then -- flushleft
+ -- todo
elseif align == 2 then -- middle
- setoffsets(n,max/2,0)
+ reposition(n,maxwidth/2)
elseif align == 3 then -- flushright
- setoffsets(n,max,0)
+ reposition(n,maxwidth)
end
end
end
end
texsetcount("global","c_strc_math_n_of_lines",cnt)
- texsetdimen("global","d_strc_math_max_width",max)
- texsetdimen("global","d_strc_math_last_width",width)
- texsetdimen("global","d_strc_math_last_depth",depth)
+ texsetdimen("global","d_strc_math_max_width",maxwidth)
+ texsetdimen("global","d_strc_math_first_width",firstwidth)
+ texsetdimen("global","d_strc_math_last_width",lastwidth)
+ texsetdimen("global","d_strc_math_first_height",firstheight)
+ texsetdimen("global","d_strc_math_last_depth",lastdepth)
end
stages[3] = stages[2]
diff --git a/tex/context/base/mkxl/math-twk.mkxl b/tex/context/base/mkxl/math-twk.mkxl
new file mode 100644
index 000000000..1d48cb50e
--- /dev/null
+++ b/tex/context/base/mkxl/math-twk.mkxl
@@ -0,0 +1,60 @@
+ %D \module
+%D [ file=math-ini,
+%D version=2022.07.24,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Extensions aka Tweaks,
+%D author={Hans Hagen \& Mikael Sundqvist},
+%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.
+
+\writestatus{loading}{ConTeXt Math Macros / Tweaks}
+
+%D This file deals with some ommisions in \UNICODE\ (at least we flag them as such).
+%D Some of the definitione done elsewhere will be moved here.
+
+\unprotect
+
+% Mathematics - Hollie + Metropole Orkest (conducted by Jules Buckley) .. more than minusses
+
+% \startbuffer
+% \startTEXpage[offset=2dk]\showmakeup[mathglue]\mathspacingmode1 % \tracingmath3\tracingonline2
+% $ a + - 1 $ \quad
+% $ - 2 $ \quad
+% $ \um 3 $ \quad
+% $ a + \um 4 $ \par
+% $ \ump 3 $ \quad
+% $ a + \ump 4 $ \quad
+% $ \up 5 $ \par
+% $ a - \up 6 $ \quad
+% $ \upm 5 $ \quad
+% $ a - \upm 6 $ \quad
+% \par
+% $\textstyle - + \um \up \upm \ump $ \quad
+% $\scriptstyle - + \um \up \upm \ump $ \quad
+% $\scriptscriptstyle - + \um \up \upm \ump $ \quad
+% \stopTEXpage
+% \stopbuffer
+%
+% \setupbodyfont[bonum] \getbuffer
+% \setupbodyfont[pagella] \getbuffer
+
+\Umathchardef \unaryminus \mathunarycode \zerocount \privatecharactercode{unary minus}
+\Umathchardef \unaryplus \mathunarycode \zerocount \privatecharactercode{unary plus}
+\Umathchardef \unaryplusminus \mathunarycode \zerocount \privatecharactercode{unary plus minus}
+\Umathchardef \unaryminusplus \mathunarycode \zerocount \privatecharactercode{unary minus plus}
+
+\permanent\protected\def\um {\mathortext\unaryminus \textminus}
+\permanent\protected\def\up {\mathortext\unaryplus \textplus}
+\permanent\protected\def\upm{\mathortext\unaryplusminus\textpm}
+\permanent\protected\def\ump{\mathortext\unaryminusplus\textmp}
+
+\permanent\protected\def\una#1{\mathatom class \mathunarycode {#1}}
+\permanent\protected\def\bin#1{\mathatom class \mathbinarycode {#1}}
+\permanent\protected\def\rel#1{\mathatom class \mathrelationcode{#1}}
+\permanent\protected\def\ord#1{\mathatom class \mathordinarycode{#1}}
+
+\protect
diff --git a/tex/context/base/mkxl/math-vfu.lmt b/tex/context/base/mkxl/math-vfu.lmt
index 0540331ab..c58906a10 100644
--- a/tex/context/base/mkxl/math-vfu.lmt
+++ b/tex/context/base/mkxl/math-vfu.lmt
@@ -631,6 +631,7 @@ local function copy_glyph(main,target,original,unicode,slot)
height = olddata.height,
depth = olddata.depth,
italic = olddata.italic,
+ topaccent = olddata.topaccent,
kerns = olddata.kerns,
tounicode = olddata.tounicode,
commands = { { "slot", slot, unicode } },
@@ -644,6 +645,8 @@ local function copy_glyph(main,target,original,unicode,slot)
width = oldnextdata.width,
height = oldnextdata.height,
depth = oldnextdata.depth,
+ italic = oldnextdata.italic,
+ topaccent = oldnextdata.topaccent,
tounicode = olddata.tounicode,
commands = { { "slot", slot, nextglyph } },
}
diff --git a/tex/context/base/mkxl/meta-ini.mkxl b/tex/context/base/mkxl/meta-ini.mkxl
index 700191ef8..55a0d8043 100644
--- a/tex/context/base/mkxl/meta-ini.mkxl
+++ b/tex/context/base/mkxl/meta-ini.mkxl
@@ -1273,8 +1273,8 @@
%D Goody for preventing overflows:
-%frozen\def\MPdivten[#1]{\withoutpt\the\dimexpr#1pt/10\relax}
-\permanent\def\MPdivten[#1]{\thewithoutunit\dimexpr#1pt/10\relax}
+% frozen\def\MPdivten[#1]{\toscaled\dimexpr#1pt/10\relax}
+\permanent\def\MPdivten[#1]{\toscaled\dimexpr#1pt/10\relax}
%D There is no way to distinguish the black color that you get when you issue a
%D \type {draw} without color specification from a color that has an explicit black
diff --git a/tex/context/base/mkxl/mlib-fio.lmt b/tex/context/base/mkxl/mlib-fio.lmt
index 7bb6c0e9b..e4db28cea 100644
--- a/tex/context/base/mkxl/mlib-fio.lmt
+++ b/tex/context/base/mkxl/mlib-fio.lmt
@@ -85,13 +85,37 @@ local function findmpfile(name,ftype)
return nil
end
+-- variant 1
+
+-- finders.file = function(specification,name,mode,kind)
+-- if mode == "r" then
+-- return findmpfile(name,kind)
+-- elseif file.is_writable(name) then
+-- return name
+-- else
+-- return nil
+-- end
+-- end
+
+-- variant 2
+
+-- finders.file = function(specification,name,mode,kind)
+-- if not mode or mode == "r" then
+-- return findmpfile(name,kind)
+-- elseif file.is_writable(name) then
+-- return name
+-- else
+-- return nil
+-- end
+-- end
+
+-- variant 3
+
finders.file = function(specification,name,mode,kind)
- if mode == "r" then
- return findmpfile(name,kind)
- elseif file.is_writable(name) then
- return name
+ if mode == "w" then
+ return file.is_writable(name) and name or nil
else
- return nil
+ return findmpfile(name,kind) or nil
end
end
diff --git a/tex/context/base/mkxl/mlib-int.lmt b/tex/context/base/mkxl/mlib-int.lmt
index ace2fee17..7a094dbfd 100644
--- a/tex/context/base/mkxl/mlib-int.lmt
+++ b/tex/context/base/mkxl/mlib-int.lmt
@@ -111,7 +111,7 @@ registerdirect("PaperBleed", function() return getdimen("paperbleed")
registerdirect("RealPageNumber", function() return getcount("realpageno") end)
registerdirect("LastPageNumber", function() return getcount("lastpageno") end)
-registerdirect("PageNumber", function() return getcount("pageno") end)
+registerdirect("PageNumber", function() return getcount("userpageno") end)
registerdirect("NOfPages", function() return getcount("lastpageno") end)
registerdirect("SubPageNumber", function() return getcount("subpageno") end)
@@ -128,10 +128,6 @@ registerdirect("TopSkip", function() return get ("topskip",true
registerdirect("StrutHeight", function() return getdimen("strutht") * factor end)
registerdirect("StrutDepth", function() return getdimen("strutdp") * factor end)
-registerdirect("PageNumber", function() return getcount("pageno") end)
-registerdirect("RealPageNumber", function() return getcount("realpageno") end)
-registerdirect("NOfPages", function() return getcount("lastpageno") end)
-
registerdirect("CurrentWidth", function() return get ("hsize") * factor end)
registerdirect("CurrentHeight", function() return get ("vsize") * factor end)
diff --git a/tex/context/base/mkxl/mlib-pps.lmt b/tex/context/base/mkxl/mlib-pps.lmt
index 3cb26d044..fbb507a3f 100644
--- a/tex/context/base/mkxl/mlib-pps.lmt
+++ b/tex/context/base/mkxl/mlib-pps.lmt
@@ -14,7 +14,6 @@ local insert, remove, concat = table.insert, table.remove, table.concat
local Cs, Cf, C, Cg, Ct, P, S, V, Carg = lpeg.Cs, lpeg.Cf, lpeg.C, lpeg.Cg, lpeg.Ct, lpeg.P, lpeg.S, lpeg.V, lpeg.Carg
local lpegmatch, tsplitat, tsplitter = lpeg.match, lpeg.tsplitat, lpeg.tsplitter
local formatters, toboolean = string.formatters, string.toboolean
-local exists, savedata = io.exists, io.savedata
local stepper = utilities.parsers.stepper
local mplib = mplib
diff --git a/tex/context/base/mkxl/mlib-scn.lmt b/tex/context/base/mkxl/mlib-scn.lmt
index 0ed211dd3..ed56e113d 100644
--- a/tex/context/base/mkxl/mlib-scn.lmt
+++ b/tex/context/base/mkxl/mlib-scn.lmt
@@ -28,7 +28,7 @@ if not modules then modules = { } end modules ['mlib-scn'] = {
local type, next, rawget, getmetatable, tonumber = type, next, rawget, getmetatable, tonumber
local byte, gmatch = string.byte, string.gmatch
-local insert, remove = table.insert, table.remove
+local insert, remove, combine = table.insert, table.remove, table.combine
local mplib = mplib
local metapost = metapost
@@ -291,6 +291,27 @@ local function getparameters()
namespaces[namespace] = parameters
end
+local function mergeparameters()
+ local namespace = scanstring()
+ local parameters = get_parameters()
+ local target = namespaces[namespace]
+ if target then
+ combine(target,parameters)
+ else
+ -- same as below
+ local presets = presets[namespace]
+ local passed = passed[namespace]
+ if passed then
+ if presets then
+ setmetatableindex(passed,presets)
+ end
+ setmetatableindex(parameters,passed)
+ elseif presets then
+ setmetatableindex(parameters,presets)
+ end
+ end
+end
+
local function applyparameters()
local saved = namespaces
local namespace = scanstring()
@@ -755,6 +776,7 @@ local registertokens = metapost.registertokens
registerdirect("getparameters", getparameters) -- nothing
registertokens("applyparameters", applyparameters) -- action : todo "token"
+registerdirect("mergeparameters", mergeparameters) -- nothing
registerdirect("presetparameters", presetparameters) -- nothing
registerdirect("hasparameter", hasparameter) -- boolean
registerdirect("hasoption", hasoption) -- boolean
diff --git a/tex/context/base/mkxl/node-ali.lmt b/tex/context/base/mkxl/node-ali.lmt
index ca3c97536..9209a520b 100644
--- a/tex/context/base/mkxl/node-ali.lmt
+++ b/tex/context/base/mkxl/node-ali.lmt
@@ -20,6 +20,7 @@ local getattr = nuts.getattr
local setnext = nuts.setnext
local getnext = nuts.getnext
local getprev = nuts.getprev
+local getboth = nuts.getboth
local setglue = nuts.setglue
local getglue = nuts.getglue
local setglue = nuts.setglue
@@ -55,6 +56,7 @@ local nextglue = traversers.glue
local nextboundary = traversers.boundary
local nextnode = traversers.node
local nextlist = traversers.list
+local nextrule = traversers.rule
local nodecodes = nodes.nodecodes
local glyph_code = nodecodes.glyph
@@ -63,6 +65,7 @@ local kern_code = nodecodes.kern
local disc_code = nodecodes.disc
local unset_code = nodecodes.unset
local alignrecord_code = nodecodes.alignrecord
+local rule_code = nodecodes.rule
local spaceskip_code = nodes.gluecodes.spaceskip
local xspaceskip_code = nodes.gluecodes.xspaceskip
@@ -310,7 +313,7 @@ interfaces.implement {
end,
}
--- Let's put it here (for now):
+-- Let's put it here (for now) (some locals above) .. will be cleaned up!
do
@@ -331,6 +334,7 @@ do
local alignrecord_code = nodecodes.alignrecord
local hlist_code = nodecodes.hlist
local unset_code = nodecodes.unset
+ -- local rule_code = nodecodes.rule
local nextnode = nuts.traversers.node
@@ -596,6 +600,8 @@ deltas = { }
openup({ inbetween = inbetween }, head)
end
+ -- This will become a bit more pluggable so that we have less checking.
+
-- maybe zero pass: preamble pass
function nodes.handlers.fixmathalign(head,where,attr,preamble)
@@ -609,10 +615,236 @@ deltas = { }
if signal == 0x40 then
second_pass(head,attr,preamble)
end
- -- maybe also signal
- third_pass(head,attr,preamble)
+ if signal then
+ third_pass(head,attr,preamble)
+ end
+ end
+ end
+
+ --
+
+do
+
+ local a_mathalignmentvrule = attributes.private("mathalignmentvrule")
+
+ local function first_pass(head,attr,preamble)
+ for row, id, subtype, list in nextlist, head do
+ if id == hlist_code and subtype == row_code then
+ for cell, id, subtype, list in nextlist, list do
+ if list then
+ for n, id, subtype in nextrule, list do
+ local signal = getattr(n,a_mathalignmentvrule)
+ if signal then
+ local prv, nxt = getboth(row)
+ if prv then
+ if getid(prv) ~= rule_code or not getattr(prv,a_mathalignmentvrule) then
+ prv = nil
+ end
+ end
+ if nxt then
+ if getid(nxt) ~= rule_code or not getattr(nxt,a_mathalignmentvrule) then
+ nxt = nil
+ end
+ end
+ setoffsets(n,nil,nil,not prv and 0 or nil,not nxt and 0 or nil)
+ end
+ end
+ end
+ end
+ end
+ end
+ end
+
+ function nodes.handlers.mathmatrixrules(head,where,attr,preamble)
+ if where == "wrapup" then
+ local signal = getattr(attr,a_mathalignmentvrule)
+ if signal == 1 then -- matrix
+ first_pass(head,attr,preamble)
+ end
end
end
+
+ local enabled = false
+
+ interfaces.implement {
+ name = "enablematrixrules",
+ -- onlyonce = true,
+ public = true,
+ protected = true,
+ actions = function()
+ if not enabled then
+ nodes.tasks.enableaction("alignments", "nodes.handlers.mathmatrixrules")
+ enabled = true
+ end
+ end,
+ }
+
+end
+
+ --
+
+ local a_ornament = attributes.system("mathmatrixornament")
+
+ local leftornament = tex.boundaries.system("c_math_matrix_ornament_l")
+ local rightornament = tex.boundaries.system("c_math_matrix_ornament_r")
+ local topornament = tex.boundaries.system("c_math_matrix_ornament_t")
+ local bottomornament = tex.boundaries.system("c_math_matrix_ornament_b")
+
+ local left = 0
+ local right = 0
+ local nofcells = 0
+ local found = false
+
+ local lefts = false
+ local rights = false
+ local tops = false
+ local bottoms = false
+
+ local function first_pass(head,attr,preamble)
+ nofcells = 0
+ left = 0
+ right = 0
+ found = false
+ lefts = { }
+ rights = { }
+ tops = { }
+ bottoms = { }
+ for n in nextrecord, preamble do
+ nofcells = nofcells + 1
+ end
+ local cells = { }
+ for row in nextunset, head do
+ local c = 0
+ for cell in nextunset, getlist(row) do
+ local list = getlist(cell)
+ c = c + 1
+ for bound in nextboundary, list do
+ local ornament = getdata(bound)
+ if ornament == leftornament then
+ if c == 1 then
+ local w = getwidth(cell)
+ if w > left then
+ left = w
+ end
+ setwidth(cell,0)
+ cells[c+1] = true
+ cells[c] = true
+ found = true
+ lefts[#lefts+1] = cell
+ end
+ elseif ornament == rightornament then
+ if c == nofcells then
+ local w = getwidth(cell)
+ if w > right then
+ right = w
+ end
+ setwidth(cell,0)
+ cells[c-1] = true
+ cells[c] = true
+ found = true
+ rights[#rights+1] = cell
+ end
+ elseif ornament == topornament then
+ setheight(row,0)
+ setdepth(row,0)
+ found = true
+ tops[#tops+1] = cell
+ elseif ornament == bottomornament then
+ setheight(row,0)
+ setdepth(row,0)
+ found = true
+ bottoms[#bottoms+1] = cell
+ end
+ end
+ end
+ end
+ if next(cells) then
+ local c = 0
+ for n in nextrecord, preamble do
+ c = c + 1
+ if cells[c] then
+ setwidth(n)
+ end
+ end
+ end
+ end
+
+ local function second_pass(box)
+ if found then
+ local head = getlist(nuts.getbox(box))
+ local leftmargin = texgetdimen("d_math_matrix_margin_l")
+ local rightmargin = texgetdimen("d_math_matrix_margin_r")
+ local topmargin = texgetdimen("d_math_matrix_margin_t")
+ local bottommargin = texgetdimen("d_math_matrix_margin_b")
+ for i=1,#lefts do
+ setoffsets(lefts[i],-(left+leftmargin),0)
+ end
+ for i=1,#rights do
+ setoffsets(rights[i], (rightmargin),0)
+ end
+ for i=1,#tops do
+ setoffsets(tops[i],0,topmargin)
+ end
+ for i=1,#bottoms do
+ setoffsets(bottoms[i],0,-bottommargin)
+ end
+ lefts = false
+ rights = false
+ tops = false
+ bottoms = false
+ end
+ end
+
+ function nodes.handlers.mathmatrixornaments(head,where,attr,preamble)
+ if where == "preroll" then
+ local signal = getattr(attr,a_ornament)
+ if signal == 0x10 then
+ first_pass(head,attr,preamble)
+ end
+ -- elseif where == "wrapup" then
+ -- local signal = getattr(attr,a_ornament)
+ -- if signal == 0x10 then
+ -- second_pass(head,attr,preamble)
+ -- end
+ end
+ end
+
+ interfaces.implement {
+ name = "shiftmatrixornaments",
+ actions = second_pass,
+ arguments = "integer",
+ }
+
+ local enabled = false
+
+ interfaces.implement {
+ name = "enablematrixalign",
+ -- onlyonce = true,
+ public = true,
+ protected = true,
+ actions = function()
+ if not enabled then
+ nodes.tasks.enableaction("alignments", "nodes.handlers.fixmathalign")
+ enabled = true
+ end
+ end,
+ }
+
+ local enabled = false
+
+ interfaces.implement {
+ name = "enablematrixornaments",
+ -- onlyonce = true,
+ public = true,
+ protected = true,
+ actions = function()
+ if not enabled then
+ nodes.tasks.enableaction("alignments", "nodes.handlers.mathmatrixornaments")
+ enabled = true
+ end
+ end,
+ }
+
end
local report = logs.reporter("alignment","preamble")
diff --git a/tex/context/base/mkxl/strc-blk.mkxl b/tex/context/base/mkxl/strc-blk.mkxl
index 6b1daa0cc..97ae671f1 100644
--- a/tex/context/base/mkxl/strc-blk.mkxl
+++ b/tex/context/base/mkxl/strc-blk.mkxl
@@ -34,8 +34,8 @@
\appendtoks
\clf_definestructureblock{\currentblock}%
- \frozen\setuevalue{\e!begin\currentblock}{\strc_blocks_begin{\currentblock}}%
- \frozen\letvalue {\e!end \currentblock}\donothing
+ \frozen\protected\edefcsname\e!begin\currentblock\endcsname{\strc_blocks_begin{\currentblock}}%
+ \frozen \letcsname \e!end \currentblock\endcsname\donothing
\to \everydefineblock
% We need to prevent too much lookahead which will gobble newlines that are needed
@@ -73,6 +73,30 @@
{\clf_savestructureblock{\m_block}{\m_subblock}{#1}{\??block}}%
\plusone}
+% \tolerant\protected\def\strc_blocks_begin#1#*[#2]#*[#3]% #:#/% get rid of spaces and pars
+% {\edef\m_block{#1}%
+% \let\m_subblock\empty
+% \ifhastok={#2}%
+% \expandafter\strc_blocks_begin_a % [settings]
+% \orelse\ifparameter#2\or
+% \expandafter\strc_blocks_begin_b % [tag] [settings]
+% \else
+% \expandafter\strc_blocks_begin_c %
+% \fi{#2}{#3}}% #4}
+%
+% \protected\def\strc_blocks_begin_a#1#2% settings dummy
+% {\normalexpanded{\buff_pickup{\??block}{\e!begin\m_block}{\e!end\m_block}}%
+% {}%
+% {\clf_savestructureblock{\m_block}{\m_subblock}{#1}{\??block}}%
+% \plusone}
+%
+% \protected\def\strc_blocks_begin_b#1#2% tag settings
+% {\edef\m_subblock{#1}%
+% \strc_blocks_begin_a{#2}{}}
+%
+% \protected\def\strc_blocks_begin_c#1#2%
+% {\strc_blocks_begin_a{}{}}
+
\let\strc_blocks_setup\relax
\newconstant \c_strc_blocks_index
@@ -145,11 +169,11 @@
\ifhastok={#3}%
\getparameters[\??blocktemp][\c!criterium=\v!text,#3]%
\def\strc_blocks_setup{\setupcurrentblock[#3]}%
- \clf_selectstructureblock{#1}{#2}{}{\csname\??blocktemp\c!criterium\endcsname}%
+ \clf_selectstructureblock{#1}{#2}{}{\begincsname\??blocktemp\c!criterium\endcsname}%
\else
\getparameters[\??blocktemp][\c!criterium=\v!text,#4]%
\def\strc_blocks_setup{\setupcurrentblock[#4]}%
- \clf_selectstructureblock{#1}{#2}{#3}{\csname\??blocktemp\c!criterium\endcsname}%
+ \clf_selectstructureblock{#1}{#2}{#3}{\begincsname\??blocktemp\c!criterium\endcsname}%
\fi
\endgroup}
diff --git a/tex/context/base/mkxl/strc-mat.mkxl b/tex/context/base/mkxl/strc-mat.mkxl
index 7e03624dc..0aabc64a0 100644
--- a/tex/context/base/mkxl/strc-mat.mkxl
+++ b/tex/context/base/mkxl/strc-mat.mkxl
@@ -362,8 +362,10 @@
\protected\def\strc_formulas_place_current_number
{\ifempty\namedformulaentry
- \labeltexts\currentformula{\convertedcounter[\v!formula][]}%
+ \begingroup
\strc_formulas_handle_current_references
+ \labeltexts\currentformula{\convertedcounter[\v!formula][]}%
+ \endgroup
\else
\expandafter % hm, the next one reset \namedformulaentry
\strc_formulas_handle_current_references
@@ -1061,48 +1063,144 @@
%
% \blank[line] \ruledhbox{zzzz} \blank[line]
+% \tolerant\protected\def\strc_math_text_here[#1]#:#*#=%
+% {\ifparameter#2\or
+% \ifnum\lastboundary=\c_math_begin_boundary\else
+% \ifcstok{#1}\v!right\else
+% \strc_math_break_here
+% \fi
+% \fi
+% \vadjust
+% \ifcstok{#1}\v!before
+% pre
+% \orelse\ifcstok{#1}\v!left
+% pre
+% baseline
+% depth before -\thousandpoint
+% \orelse\ifcstok{#1}\v!right
+% post
+% baseline
+% \fi
+% \bgroup
+% \hbox to \displaywidth \bgroup
+% \strut
+% \ifcstok{#1}\v!right
+% \hfill#2%
+% \else
+% #2\hss
+% \fi
+% \strut
+% \egroup
+% \egroup
+% \ifcstok{#1}\v!right
+% \strc_math_break_here
+% \else
+% % \mathatom class \mathexplicitcode{}%
+% \strc_math_pickup_again
+% \fi
+% \orelse\ifcstok{#1}\v!page
+% \strc_math_page_here
+% \orelse\ifcstok{#1}\v!samepage
+% \strc_math_same_here
+% \else
+% \strc_math_break_here
+% \fi}
+
+\definelocalboxes
+ [\v!lefttext]
+ [\c!command=\localmarginlefttext\zeropoint,
+ \c!repeat=\v!no,
+ \c!distance=\zeropoint,
+ \c!location=\v!middle]
+
+\definelocalboxes
+ [\v!righttext]
+ [\c!command=\localmarginrighttext\zeropoint,
+ \c!repeat=\v!no,
+ \c!distance=\zeropoint,
+ \c!location=\v!middle]
+
+\installcorenamespace{mathtexthere}
+\installcorenamespace{mathbreakhere}
+
+\def\strc_math_text_here_right#1%
+ {\localbox[\v!righttext]{\llap{#1}}}
+
+\def\strc_math_text_here_left#1%
+ {\localbox[\v!lefttext]{\rlap{#1}}}
+
+\def\strc_math_text_here_before#1%
+ {\vadjust pre \bgroup
+ \hbox to \displaywidth \bgroup
+ \strut
+ #1\hss
+ \strut
+ \egroup
+ \egroup}
+
+\def\strc_math_text_here_after#1%
+ {\vadjust \bgroup
+ \hbox to \displaywidth \bgroup
+ \strut
+ #1\hss
+ \strut
+ \egroup
+ \egroup}
+
+\letcsname\??mathtexthere\v!left \endcsname\strc_math_text_here_left
+\letcsname\??mathtexthere\v!right \endcsname\strc_math_text_here_right
+\letcsname\??mathtexthere\v!before\endcsname\strc_math_text_here_before
+\letcsname\??mathtexthere\v!after \endcsname\strc_math_text_here_after
+
+\defcsname\??mathbreakhere\v!left\endcsname#1%
+ {\ifnum\lastboundary=\c_math_begin_boundary\else
+ \strc_math_line_here
+ \fi
+ \strc_math_text_here_left{#1}%
+ \strc_math_pickup_again}
+
+\defcsname\??mathbreakhere\v!right\endcsname#1%
+ {\strc_math_text_here_right{#1}%
+ \strc_math_line_here
+ \strc_math_pickup_again}
+
+\defcsname\??mathbreakhere\v!before\endcsname#1%
+ {\ifnum\lastboundary=\c_math_begin_boundary\else
+ \strc_math_line_here
+ \fi
+ \strc_math_text_here_before{#1}%
+ \strc_math_pickup_again}
+
+\defcsname\??mathbreakhere\v!after\endcsname#1%
+ {\ifnum\lastboundary=\c_math_begin_boundary\else
+ \strc_math_line_here
+ \fi
+ \strc_math_text_here_after{#1}%
+ \strc_math_pickup_again}
+
+\tolerant\protected\def\strc_math_break_here[#1]#:#*#=%
+ {\ifparameter#2\or
+ \ifcsname\??mathbreakhere#1\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \csname\??mathbreakhere\v!after\expandafter\endcsname
+ \fi{#2}%
+ \orelse\ifcstok{#1}\v!page
+ \strc_math_page_here
+ \orelse\ifcstok{#1}\v!samepage
+ \strc_math_same_here
+ \else
+ \strc_math_line_here
+ \fi}
+
\tolerant\protected\def\strc_math_text_here[#1]#:#*#=%
{\ifparameter#2\or
- \ifnum\lastboundary=\c_math_begin_boundary\else
- \ifcstok{#1}\v!right\else
- \strc_math_break_here
- \fi
- \fi
- \vadjust
- \ifcstok{#1}\v!before
- pre
- \orelse\ifcstok{#1}\v!left
- pre
- baseline
- depth before -\thousandpoint
- \orelse\ifcstok{#1}\v!right
- post
- baseline
- \fi
- \bgroup
- \hbox to \displaywidth \bgroup
- \strut
- \ifcstok{#1}\v!right
- \hfill#2%
- \else
- #2\hss
- \fi
- \strut
- \egroup
- \egroup
- \ifcstok{#1}\v!right
- \strc_math_break_here
- \else
- % \mathatom class \mathexplicitcode{}%
- \strc_math_pickup_again
- \fi
- \orelse\ifcstok{#1}\v!page
- \strc_math_page_here
- \orelse\ifcstok{#1}\v!samepage
- \strc_math_same_here
- \else
- \strc_math_break_here
- \fi}
+ \ifcsname\??mathtexthere#1\endcsname
+ \expandafter\lastnamedcs
+ \else
+ \csname\??mathtexthere\v!after\expandafter\endcsname
+ \fi{#2}%
+ \fi}
\protected\def\strc_math_page_here
{\ifmmode
@@ -1124,7 +1222,7 @@
\strc_math_pickup_again
\fi}
-\protected\def\strc_math_break_here
+\protected\def\strc_math_line_here
{\ifmmode
\ifconditional\c_strc_math_trace_hang
\strc_math_trace_okay{darkgreen}{B}%
@@ -1134,16 +1232,16 @@
\fi}
\ifdefined\alignhere \else \aliased\let\alignhere\relax \fi
-%ifdefined\texthere \else \aliased\let\texthere \relax \fi
+\ifdefined\texthere \else \aliased\let\texthere \relax \fi
\ifdefined\skiphere \else \aliased\let\skiphere \relax \fi
\ifdefined\breakhere \else \aliased\let\breakhere\relax \fi
\appendtoks % must move to alignment
\enforced\let\alignhere\strc_math_align_here
- \enforced\let\breakhere\strc_math_text_here
+ \enforced\let\breakhere\strc_math_break_here
\enforced\let\skiphere \strc_math_skip_here
- %enforced\let\texthere \strc_math_text_here
-% \global\setfalse\c_strc_math_aligned_here
+ \enforced\let\texthere \strc_math_text_here
+ % \global\setfalse\c_strc_math_aligned_here
\to \everymathematics
\installcorenamespace{mathtextalign}
@@ -1180,7 +1278,11 @@
{\raggedslanted
%\mathgluemode\plustwo
\c_strc_math_ragged_status\plustwo
- \parfillrightskip\wd\b_strc_formulas_number % should normally fit
+ \ifcase\c_strc_math_number_location\or
+ \parinitleftskip\wd\b_strc_formulas_number % should normally fit
+ \else
+ \parfillrightskip\wd\b_strc_formulas_number % should normally fit
+ \fi
\updateparagraphproperties} % not needed
\def\strc_math_setup_align
@@ -1245,15 +1347,19 @@
\newcount\c_strc_math_n_of_lines
\newdimen\d_strc_math_max_width
+\newdimen\d_strc_math_first_width
\newdimen\d_strc_math_last_width
+\newdimen\d_strc_math_first_height
\newdimen\d_strc_math_last_depth
\appendtoks
- \global\d_strc_math_indent \zeropoint
- \global\c_strc_math_n_of_lines\zerocount
- \global\d_strc_math_max_width \zeropoint
- \global\d_strc_math_last_width\zeropoint
- \global\d_strc_math_last_depth\zeropoint
+ \global\d_strc_math_indent \zeropoint
+ \global\c_strc_math_n_of_lines \zerocount
+ \global\d_strc_math_max_width \zeropoint
+ \global\d_strc_math_first_width \zeropoint
+ \global\d_strc_math_first_height\zeropoint
+ \global\d_strc_math_last_width \zeropoint
+ \global\d_strc_math_last_depth \zeropoint
\to \everyresetformulas
\newbox\b_strc_math_display % most code is in math-ali (for historical reasons)
@@ -1502,9 +1608,9 @@
\permanent\protected\def\stopdisplaymath
{\endgroup % less interference with upcoming a \over b
- \ifhmode
+% \ifrelax\strc_formulas_begstrut\else
\strc_formulas_endstrut
- \fi
+% \fi
\stopinnermath
\afterdisplayspace
\egroup}
diff --git a/tex/context/base/mkxl/supp-box.mkxl b/tex/context/base/mkxl/supp-box.mkxl
index 21d810671..5a45396d1 100644
--- a/tex/context/base/mkxl/supp-box.mkxl
+++ b/tex/context/base/mkxl/supp-box.mkxl
@@ -1688,7 +1688,7 @@
% \fi
% \divide\scratchdimen \hsize
% \multiply\scratchdimen 64
-% \xdef\vboxtohboxfactor{\withoutpt\the\scratchdimen}%
+% \xdef\vboxtohboxfactor{\toscaled\scratchdimen}%
% \egroup}
%
% \protected\def\startvboxtohbox
diff --git a/tex/context/base/mkxl/syst-aux.mkxl b/tex/context/base/mkxl/syst-aux.mkxl
index ced19dcd2..018a95eb2 100644
--- a/tex/context/base/mkxl/syst-aux.mkxl
+++ b/tex/context/base/mkxl/syst-aux.mkxl
@@ -4971,7 +4971,9 @@
% that \TEX\ was written, it made no sense to add a lot of that. After decades we know
% what extras we need.
-\permanent\def\withoutpt#1{\thewithoutunit\dimexpr#1} % best use the primitive directly
+% \permanent\def\withoutpt#1{\thewithoutunit\dimexpr#1}
+
+\aliased\let\withoutpt\toscaled
%D The capitals are needed because \type {p} and \type {t} have catcode~12, while
%D macronames only permit tokens with the catcode~11. As a result we cannot use the
@@ -4979,10 +4981,9 @@
%D manipulations, we advice to study the \TEX book in detail. Because this macro
%D does not do any assignment, we can use it in the following way too.
-% \def\PtToCm#1%
-% {\withoutpt\the\dimexpr0.0351459804\dimexpr#1\relax\relax cm}
+% \permanent\def\PtToCm#1{\thewithoutunit\dimexpr0.0351459804\dimexpr#1\relax\relax cm}
-\permanent\def\PtToCm#1{\thewithoutunit\dimexpr0.0351459804\dimexpr#1\relax\relax cm}
+\permanent\def\PtToCm#1{\toscaled\dimexpr0.0351459804\dimexpr#1\relax\relax cm}
%D We also support:
%D
@@ -5627,11 +5628,9 @@
%D \PointsToReal {dimension} \target
%D \stoptyping
-% \protected\def\PointsToReal#1#2%
-% {\edef#2{\withoutpt\the\dimexpr#1}}
+% \permanent\protected\def\PointsToReal#1#2{\edef#2{\thewithoutunit\dimexpr#1}}
-\permanent\protected\def\PointsToReal#1#2%
- {\edef#2{\thewithoutunit\dimexpr#1}}
+\permanent\protected\def\PointsToReal#1#2{\edef#2{\toscaled#1}}
%D \macros
%D {dontleavehmode}
diff --git a/tex/context/base/mkxl/syst-ini.mkxl b/tex/context/base/mkxl/syst-ini.mkxl
index d94579548..ce2f50942 100644
--- a/tex/context/base/mkxl/syst-ini.mkxl
+++ b/tex/context/base/mkxl/syst-ini.mkxl
@@ -1256,10 +1256,9 @@
\immutable\integerdef\eTeXversion 2
\immutable\def \eTeXrevision {2}
-%D Just in case users use this (or some styles still have it):
+% %D Just in case users use this (or some styles still have it):
-\aliased\let\immediateassignment\immediate
-\aliased\let\immediateassigned \localcontrolled
+\aliased\let\immediateassigned\localcontrolled
%D Needed (maybe no longer the multiple next ones):
diff --git a/tex/context/base/mkxl/syst-mac.lmt b/tex/context/base/mkxl/syst-mac.lmt
index 74502f4ee..bd1d8476f 100644
--- a/tex/context/base/mkxl/syst-mac.lmt
+++ b/tex/context/base/mkxl/syst-mac.lmt
@@ -110,7 +110,7 @@ implement {
arguments = "3 strings",
actions = function(start,stop,command)
gobbletoken(createtoken(start),createtoken(stop))
- if command then
+ if command and command ~= "" then
context[command]()
end
end
diff --git a/tex/context/base/mkxl/tabl-tab.mkxl b/tex/context/base/mkxl/tabl-tab.mkxl
index d8a71943c..ad9bfdd45 100644
--- a/tex/context/base/mkxl/tabl-tab.mkxl
+++ b/tex/context/base/mkxl/tabl-tab.mkxl
@@ -1027,8 +1027,8 @@
\def\tabl_table_Right #1{\hfill#1}
\def\tabl_table_OpenUp#1#2%
- {\edef\tablestrutheightfactor{\withoutpt\the\dimexpr\tablestrutheightfactor\points+#1\points}%
- \edef\tablestrutdepthfactor {\withoutpt\the\dimexpr\tablestrutdepthfactor \points+#2\points}}
+ {\edef\tablestrutheightfactor{\toscaled\dimexpr\tablestrutheightfactor\points+#1\points}%
+ \edef\tablestrutdepthfactor {\toscaled\dimexpr\tablestrutdepthfactor \points+#2\points}}
% SetTableToWidth -> textwidth=dimension [to dimension]
% Expand -> textwidth=max [to \hsize]
@@ -2192,8 +2192,8 @@
\else
\let\tablestrutdepthfactor\p_tabl_table_depth
\fi
- \edef\tablestrutheightfactor{\withoutpt\the\dimexpr10\dimexpr\tablestrutheightfactor\points}%
- \edef\tablestrutdepthfactor {\withoutpt\the\dimexpr10\dimexpr\tablestrutdepthfactor \points}%
+ \edef\tablestrutheightfactor{\toscaled\dimexpr10\dimexpr\tablestrutheightfactor\points}%
+ \edef\tablestrutdepthfactor {\toscaled\dimexpr10\dimexpr\tablestrutdepthfactor \points}%
\d_tabl_table_strut_unit \dimexpr\normalbaselineskip/12\relax % 12 is default bodyfont
\d_tabl_table_kern_unit .5em\relax
\s_tabl_table_inter_column_space_unit.5em plus 1fil minus .25em\relax
diff --git a/tex/context/base/mkxl/task-ini.lmt b/tex/context/base/mkxl/task-ini.lmt
index fcaad17e3..1f53a13b9 100644
--- a/tex/context/base/mkxl/task-ini.lmt
+++ b/tex/context/base/mkxl/task-ini.lmt
@@ -161,7 +161,9 @@ appendaction("everypar", "normalizers", "nodes.handlers.checkparcounter",
appendaction("alignments", "normalizers", "nodes.handlers.showpreamble", nil, "nut", "enabled" )
appendaction("alignments", "normalizers", "nodes.handlers.aligncharacter", nil, "nut", "disabled" )
-appendaction("alignments", "normalizers", "nodes.handlers.fixmathalign", nil, "nut", "enabled" ) -- maybe delay
+appendaction("alignments", "normalizers", "nodes.handlers.fixmathalign", nil, "nut", "disabled" )
+appendaction("alignments", "normalizers", "nodes.handlers.mathmatrixornaments", nil, "nut", "disabled" )
+appendaction("alignments", "normalizers", "nodes.handlers.mathmatrixrules", nil, "nut", "disabled" )
appendaction("localboxes", "lists", "typesetters.localboxes.handler", nil, "nut", "enabled" )
diff --git a/tex/context/base/mkxl/type-set.mkxl b/tex/context/base/mkxl/type-set.mkxl
index 8a11888e5..a14a99630 100644
--- a/tex/context/base/mkxl/type-set.mkxl
+++ b/tex/context/base/mkxl/type-set.mkxl
@@ -63,7 +63,8 @@
\definefilesynonym [type-imp-modern-latin.mkiv] [type-imp-modernlatin.mkiv]
\definefilesynonym [type-imp-less-modern-latin.mkiv] [type-imp-modernlatin.mkiv]
-\definefilesynonym [type-imp-lucida.mkiv] [type-imp-lucida-typeone.mkiv]
+%definefilesynonym [type-imp-lucida.mkiv] [type-imp-lucida-typeone.mkiv]
+\definefilesynonym [type-imp-lucida.mkiv] [type-imp-lucida-opentype.mkiv]
\definefilesynonym [type-imp-lucidaot.mkiv] [type-imp-lucida-opentype.mkiv]
\definefilesynonym [type-imp-lucidadk.mkiv] [type-imp-lucida-opentype.mkiv]
diff --git a/tex/context/base/mkxl/typo-bld.mkxl b/tex/context/base/mkxl/typo-bld.mkxl
index ff1f569cb..a84b0ef2c 100644
--- a/tex/context/base/mkxl/typo-bld.mkxl
+++ b/tex/context/base/mkxl/typo-bld.mkxl
@@ -33,6 +33,28 @@
% \dorecurse{100}{\input ward \par}
% \stopparbuilder
+% \startluacode
+% function builders.paragraphs.constructors.methods.preroll_a(head)
+% local result, info = tex.linebreak(head)
+% tex.prevdepth = info.prevdepth
+% tex.prevgraf = info.prevgraf
+% return result
+% end
+% function builders.paragraphs.constructors.methods.preroll_b(head)
+% local result, info = tex.linebreak(nodes.nuts.copylist(head))
+% return true
+% end
+% \stopluacode
+%
+% \defineparbuilder[preroll_a]
+% \defineparbuilder[preroll_b]
+%
+% \starttext
+% \setmainparbuilder[default] \input tufte \par \input tufte \page
+% \setmainparbuilder[preroll_a] \input tufte \par \input tufte \page
+% \setmainparbuilder[preroll_b] \input tufte \par \input tufte \page
+% \stoptext
+
\unprotect
\registerctxluafile{typo-bld}{autosuffix}
diff --git a/tex/context/base/mkxl/typo-lbx.lmt b/tex/context/base/mkxl/typo-lbx.lmt
index ac67959d6..55b9a9ca7 100644
--- a/tex/context/base/mkxl/typo-lbx.lmt
+++ b/tex/context/base/mkxl/typo-lbx.lmt
@@ -153,7 +153,8 @@ do
end
end
- -- these two are now more or less the same so ...
+ -- these two are now more or less the same so ... todo: add
+ -- warning about non zero width
local function processleftbox(box)
local list = getlist(box)
diff --git a/tex/context/base/mkxl/typo-lbx.mkxl b/tex/context/base/mkxl/typo-lbx.mkxl
index 61060362d..a57564f61 100644
--- a/tex/context/base/mkxl/typo-lbx.mkxl
+++ b/tex/context/base/mkxl/typo-lbx.mkxl
@@ -357,8 +357,8 @@
%D % \protected\def\LeftNumber {\hbox to \localboxesparameter{width}{\strut\box\localboxcontentbox\hss)}}
%D % \protected\def\RightNumber{\hbox to \localboxesparameter{width}{\strut(\hss\box\localboxcontentbox)}}
%D
-%D \protected\def\LeftText #1{#1\quad}
-%D \protected\def\RightText#1{\quad#1}
+%D \protected\def\LeftText {\localboxcontentbox\quad}
+%D \protected\def\RightText{\quad\localboxcontentbox}
%D
%D \start
%D \localbox[linenumber]{}%
diff --git a/tex/context/fonts/mkiv/bonum-math.lfg b/tex/context/fonts/mkiv/bonum-math.lfg
index 3b3f02343..154f7c346 100644
--- a/tex/context/fonts/mkiv/bonum-math.lfg
+++ b/tex/context/fonts/mkiv/bonum-math.lfg
@@ -35,6 +35,10 @@ return {
DisplayOperatorMinHeight = 1900, -- 1250 in font
-- AccentSuperscriptDrop = 100,
-- AccentSuperscriptPercent = 20,
+ -- PrimeRaisePercent = 50,
+ PrimeRaiseComposedPercent = 0,
+ -- PrimeShiftUp = 0,
+ -- PrimeBaselineDropMax = 0,
},
tweaks = {
aftercopying = {
@@ -186,6 +190,11 @@ return {
topleft = -0.2,
bottomright = -0.2,
},
+-- [0x1D453] = {
+-- [0x0210E] = {
+-- topleft = 0.5,
+-- bottomright = -0.2,
+-- },
-- [0x28] = { -- left parenthesis. No!
-- topleft = -0.1,
-- bottomleft = -0.1,
@@ -374,6 +383,16 @@ return {
factor = 1,--1.1
},
{
+ tweak = "addprivates",
+ -- list = {
+ -- -- for specific parameters see act file
+ -- ["unary minus"] = { preset = "unary minus" },
+ -- ["unary plus"] = { preset = "unary plus" },
+ -- ["unary plus minus"] = { preset = "unary plus minus" },
+ -- ["unary minus plus"] = { preset = "unary minus plus" },
+ -- },
+ },
+ {
tweak = "addscripts",
},
{
@@ -382,6 +401,58 @@ return {
{
tweak = "addrules",
},
+ {
+ tweak = "kernpairs",
+ list = {
+ [mathematics.tweaks.subsets.acenorsuvxz] = {
+ [0x1D453] = -.1, -- f
+ [0x1D457] = -.1, -- j
+ },
+ [mathematics.tweaks.subsets.bhklt] = {
+ [0x1D453] = -.1, -- f
+ [0x1D457] = -.1, -- j
+ },
+ [mathematics.tweaks.subsets.d] = {
+ [0x1D453] = -.075, -- f
+ [0x1D457] = -.075, -- j
+ },
+ [mathematics.tweaks.subsets.f] = {
+ -- [mathematics.tweaks.subsets.aceimnorsuvwxz] = -.05,
+ [mathematics.tweaks.subsets.gjqy] = -.15,
+ [0x1D453] = -.2, -- ff
+ },
+ [mathematics.tweaks.subsets.i] = {
+ [0x1D453] = -.2, -- f
+ [0x1D457] = -.2, -- j
+ },
+ [mathematics.tweaks.subsets.mw] = {
+ [0x1D453] = -.05, -- f
+ [0x1D457] = -.05, -- j
+ },
+ [mathematics.tweaks.subsets.p] = {
+ [0x1D453] = -.05, -- f
+ [0x1D457] = -.05, -- j
+ },
+ [0x1D45F] = { -- r
+ [0x1D460] = -.1, -- s
+ },
+-- [mathematics.tweaks.subsets.acenorsuvxz] = {
+-- [mathematics.tweaks.subsets.acenorsuvxz] = 2,
+-- },
+-- [0x1D452] = {
+-- [0x1D453] = -.05,
+-- [0x1D465] = -.3,
+-- },
+-- [0x1D453] = {
+-- [0x1D453] = -.1,
+-- [0x1D454] = -.1,
+-- [0x1D465] = -.3,
+-- },
+-- [0x1D465] = {
+-- [0x1D465] = .1,
+-- }
+ }
+ },
-- {
-- tweak = "fixanchors",
-- factor = .5,
diff --git a/tex/context/fonts/mkiv/cambria-math.lfg b/tex/context/fonts/mkiv/cambria-math.lfg
index 7a28eb2b6..a76e68e13 100644
--- a/tex/context/fonts/mkiv/cambria-math.lfg
+++ b/tex/context/fonts/mkiv/cambria-math.lfg
@@ -57,6 +57,8 @@ return {
DelimiterPercent = 90,
DelimiterShortfall = 400,
DisplayOperatorMinHeight = 2800, -- 2500 in font
+ PrimeRaisePercent = 75, -- 50 default
+ -- PrimeRaiseComposedPercent = 25, -- 25 default
},
tweaks = {
aftercopying = {
diff --git a/tex/context/fonts/mkiv/dejavu-math.lfg b/tex/context/fonts/mkiv/dejavu-math.lfg
index 6f5dfc7b3..cbba910ce 100644
--- a/tex/context/fonts/mkiv/dejavu-math.lfg
+++ b/tex/context/fonts/mkiv/dejavu-math.lfg
@@ -27,6 +27,8 @@ return {
DelimiterPercent = 90,
DelimiterShortfall = 400,
DisplayOperatorMinHeight = 1800, -- 1333 in font
+ -- PrimeRaisePercent = 50, -- 50 default
+ PrimeRaiseComposedPercent = 10, -- 25 default
},
tweaks = {
aftercopying = {
diff --git a/tex/context/fonts/mkiv/garamond-math.lfg b/tex/context/fonts/mkiv/garamond-math.lfg
index d385b6c7a..cdefd8077 100644
--- a/tex/context/fonts/mkiv/garamond-math.lfg
+++ b/tex/context/fonts/mkiv/garamond-math.lfg
@@ -19,6 +19,8 @@ return {
DelimiterPercent = 90,
DelimiterShortfall = 400,
-- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one)
+ PrimeRaisePercent = 85, -- 50 default
+ -- PrimeRaiseComposedPercent = 25, -- 25 default
},
tweaks = {
aftercopying = {
diff --git a/tex/context/fonts/mkiv/kpfonts-math.lfg b/tex/context/fonts/mkiv/kpfonts-math.lfg
index ffec77b56..cb75644a9 100644
--- a/tex/context/fonts/mkiv/kpfonts-math.lfg
+++ b/tex/context/fonts/mkiv/kpfonts-math.lfg
@@ -15,6 +15,8 @@ return {
DelimiterPercent = 90,
DelimiterShortfall = 400,
-- DisplayOperatorMinHeight = 1800, -- 1500 in font (only one)
+ PrimeRaisePercent = 25, -- 50 default
+ -- PrimeRaiseComposedPercent = 25, -- 25 default
},
tweaks = {
aftercopying = {
diff --git a/tex/context/fonts/mkiv/libertinus-math.lfg b/tex/context/fonts/mkiv/libertinus-math.lfg
index c5a4bcbcb..f0b542f42 100644
--- a/tex/context/fonts/mkiv/libertinus-math.lfg
+++ b/tex/context/fonts/mkiv/libertinus-math.lfg
@@ -26,6 +26,8 @@ return {
DelimiterPercent = 90,
DelimiterShortfall = 400,
-- DisplayOperatorMinHeight = 1800, -- 1250 in font (only one)
+ PrimeRaisePercent = 70, -- 50 default
+ PrimeRaiseComposedPercent = 10, -- 25 default
},
tweaks = {
aftercopying = {
diff --git a/tex/context/fonts/mkiv/lm.lfg b/tex/context/fonts/mkiv/lm.lfg
index 0c0b0a1dc..e3dbfc6b8 100644
--- a/tex/context/fonts/mkiv/lm.lfg
+++ b/tex/context/fonts/mkiv/lm.lfg
@@ -70,174 +70,175 @@ return {
{
tweak = "dimensions",
list = {
- -- [0x00060] = { yoffset = -0.05 }, -- grave
- -- [0x000B4] = { yoffset = -0.05 }, -- acute
- -- -- [0x002C6] = { yoffset = -0.05 }, -- hat
- -- [0x002DC] = { yoffset = -0.05 }, -- tilde
- -- [0x000AF] = { yoffset = -0.075 }, -- bar
- -- [0x002D8] = { yoffset = -0.05 }, -- breve
- -- [0x002D9] = { yoffset = -0.05 }, -- dot
- -- [0x000A8] = { yoffset = -0.05 }, -- ddot
- -- [0x020DB] = { yoffset = 0.2 }, -- dddot (done below!)
- [0x002DA] = { width = 0, }, -- ring (bounding box is wrong)
- -- [0x002C7] = { yoffset = -0.05 }, -- check
- -- [0x020D7] = { yoffset = -0.05 }, -- vec
+ -- [0x00060] = { yoffset = -0.05 }, -- grave
+ -- [0x000B4] = { yoffset = -0.05 }, -- acute
+ -- [0x002C6] = { yoffset = -0.05 }, -- hat
+ -- [0x002DC] = { yoffset = -0.05 }, -- tilde
+ -- [0x000AF] = { yoffset = -0.075 }, -- bar
+ -- [0x002D8] = { yoffset = -0.05 }, -- breve
+ -- [0x002D9] = { yoffset = -0.05 }, -- dot
+ -- [0x000A8] = { yoffset = -0.05 }, -- ddot
+ -- [0x020DB] = { yoffset = 0.2 }, -- dddot (done below!)
+ [0x002DA] = { width = 0 }, -- ring (bounding box is wrong)
+ -- [0x002C7] = { yoffset = -0.05 }, -- check
+ -- [0x020D7] = { yoffset = -0.05 }, -- vec
+
[0x00300] = { yoffset = -0.03, all = true }, -- widegrave
[0x00301] = { yoffset = -0.03, all = true }, -- wideacute
- [0x00302] = { yoffset = -0.075, all = true }, -- widehat
+ [0x00302] = { yoffset = -0.075, all = true }, -- widehat
[0x00303] = { yoffset = -0.05, all = true }, -- widetilde
[0x00304] = { yoffset = -0.02, all = true }, -- widebar
[0x00306] = { yoffset = -0.05, all = true }, -- widebreve
- [0x00307] = { yoffset = -0.027, all = true }, -- widedot
- [0x00308] = { yoffset = -0.027, all = true }, -- wideddot
+ [0x00307] = { yoffset = -0.027, all = true }, -- widedot
+ [0x00308] = { yoffset = -0.027, all = true }, -- wideddot
[0x020DB] = { yoffset = -0.065, all = true }, -- widedddot
- [0x0030C] = { yoffset = -0.05, all = true }, -- widecheck
- [0x0030A] = { yoffset = -0.025, all = true }, -- widering
-
- -- [0x0212C] = { width = 0.95, italic = 0.05 }, -- script B
- -- [0x1D49E] = { width = 0.8, italic = 0.25 }, -- script C
- -- [0x1D49F] = { width = 0.9, italic = 0.11 }, -- script D
- -- [0x02130] = { width = 0.85, italic = 0.18 }, -- script E
- -- [0x02131] = { width = 0.75, italic = 0.3 }, -- script F
- -- [0x1D4A2] = { width = 0.9, italic = 0.11 }, -- script G
- -- [0x0210B] = { width = 0.85, italic = 0.18 }, -- script H
- -- [0x02110] = { width = 0.8, italic = 0.25 }, -- script I
- -- [0x1D4A5] = { width = 0.8, italic = 0.25 }, -- script J
- -- [0x1D4A6] = { width = 0.9, italic = 0.11 }, -- script K
- -- [0x02112] = { width = 0.95, italic = 0.05 }, -- script L
- -- [0x02133] = { width = 0.9, italic = 0.11 }, -- script M
- -- [0x1D4A9] = { width = 0.85, italic = 0.18 }, -- script N
- -- [0x1D4AA] = { width = 0.95, italic = 0.05 }, -- script O
- -- [0x1D4AB] = { width = 0.8, italic = 0.25 }, -- script P
- -- [0x1D4AB] = { width = 0.95, italic = 0.05 }, -- script Q
- -- [0x0211B] = { width = 0.95, italic = 0.05 }, -- script R
- -- [0x1D4AE] = { width = 0.9, italic = 0.11 }, -- script S
- -- [0x1D4AF] = { width = 0.75, italic = 0.33 }, -- script T
- -- [0x1D4B0] = { width = 0.9, italic = 0.11 }, -- script U
- -- [0x1D4B1] = { width = 0.8, italic = 0.25 }, -- script V
- -- [0x1D4B2] = { width = 0.8, italic = 0.25 }, -- script W
- -- [0x1D4B3] = { width = 0.9, italic = 0.11 }, -- script X
- -- [0x1D4B4] = { width = 0.85, italic = 0.18 }, -- script Y
- -- [0x1D4B5] = { width = 0.95, italic = 0.05 }, -- script Z
+ [0x0030C] = { yoffset = -0.05, all = true }, -- widecheck
+ [0x0030A] = { yoffset = -0.025, all = true }, -- widering
+
+ -- [0x0212C] = { width = 0.95, italic = 0.05 }, -- script B
+ -- [0x1D49E] = { width = 0.8, italic = 0.25 }, -- script C
+ -- [0x1D49F] = { width = 0.9, italic = 0.11 }, -- script D
+ -- [0x02130] = { width = 0.85, italic = 0.18 }, -- script E
+ -- [0x02131] = { width = 0.75, italic = 0.3 }, -- script F
+ -- [0x1D4A2] = { width = 0.9, italic = 0.11 }, -- script G
+ -- [0x0210B] = { width = 0.85, italic = 0.18 }, -- script H
+ -- [0x02110] = { width = 0.8, italic = 0.25 }, -- script I
+ -- [0x1D4A5] = { width = 0.8, italic = 0.25 }, -- script J
+ -- [0x1D4A6] = { width = 0.9, italic = 0.11 }, -- script K
+ -- [0x02112] = { width = 0.95, italic = 0.05 }, -- script L
+ -- [0x02133] = { width = 0.9, italic = 0.11 }, -- script M
+ -- [0x1D4A9] = { width = 0.85, italic = 0.18 }, -- script N
+ -- [0x1D4AA] = { width = 0.95, italic = 0.05 }, -- script O
+ -- [0x1D4AB] = { width = 0.8, italic = 0.25 }, -- script P
+ -- [0x1D4AB] = { width = 0.95, italic = 0.05 }, -- script Q
+ -- [0x0211B] = { width = 0.95, italic = 0.05 }, -- script R
+ -- [0x1D4AE] = { width = 0.9, italic = 0.11 }, -- script S
+ -- [0x1D4AF] = { width = 0.75, italic = 0.33 }, -- script T
+ -- [0x1D4B0] = { width = 0.9, italic = 0.11 }, -- script U
+ -- [0x1D4B1] = { width = 0.8, italic = 0.25 }, -- script V
+ -- [0x1D4B2] = { width = 0.8, italic = 0.25 }, -- script W
+ -- [0x1D4B3] = { width = 0.9, italic = 0.11 }, -- script X
+ -- [0x1D4B4] = { width = 0.85, italic = 0.18 }, -- script Y
+ -- [0x1D4B5] = { width = 0.95, italic = 0.05 }, -- script Z
-- Setting anchors to shift the location of accents
-- Note: Many non-italic alphabets are wiped below
-- Todo: Check the less common italic alphabets
- -- [0x1D483] = { anchor = 1.15, }, -- bold italic b
- -- [0x1D485] = { anchor = 0.8, }, -- bold italic d
- [0x1D487] = { anchor = 0.9, }, -- bold italic f
- [0x1D489] = { anchor = 1.2, }, -- bold italic h
- [0x1D48C] = { anchor = 1.2, }, -- bold italic k
- [0x1D48F] = { anchor = 1.1, }, -- bold italic n
- [0x1D491] = { anchor = 1.2, }, -- bold italic p
- [0x1D492] = { anchor = 0.9, }, -- bold italic q
- [0x1D49B] = { anchor = 0.9, }, -- bold italic z
-
- [0x1D736] = { anchor = 0.9, }, -- bold italic alpha
- [0x1D737] = { anchor = 0.9, }, -- bold italic beta
- [0x1D738] = { anchor = 1.1, }, -- bold italic gamma
- [0x1D740] = { anchor = 1.2, }, -- bold italic lambda
- [0x1D744] = { anchor = 1.2, }, -- bold italic omicron
-
- [0x1D6FE] = { anchor = 1.1, }, -- italic gamma
- [0x1D702] = { anchor = 1.1, }, -- italic eta
- -- [0x1D70A] = { anchor = 1.2, }, -- italic omicron -- no difference
- -- [0x1D70D] = { anchor = 1.2, }, -- italic varsigma -- no difference
-
- [0x1D44F] = { anchor = 1.15, }, -- italic b
+
+ -- [0x1D483] = { anchor = 1.15 }, -- bold italic b
+ -- [0x1D485] = { anchor = 0.8 }, -- bold italic d
+ [0x1D487] = { anchor = 0.9 }, -- bold italic f
+ [0x1D489] = { anchor = 1.2 }, -- bold italic h
+ [0x1D48C] = { anchor = 1.2 }, -- bold italic k
+ [0x1D48F] = { anchor = 1.1 }, -- bold italic n
+ [0x1D491] = { anchor = 1.2 }, -- bold italic p
+ [0x1D492] = { anchor = 0.9 }, -- bold italic q
+ [0x1D49B] = { anchor = 0.9 }, -- bold italic z
+
+ [0x1D736] = { anchor = 0.9 }, -- bold italic alpha
+ [0x1D737] = { anchor = 0.9 }, -- bold italic beta
+ [0x1D738] = { anchor = 1.1 }, -- bold italic gamma
+ [0x1D740] = { anchor = 1.2 }, -- bold italic lambda
+ [0x1D744] = { anchor = 1.2 }, -- bold italic omicron
+
+ [0x1D6FE] = { anchor = 1.1 }, -- italic gamma
+ [0x1D702] = { anchor = 1.1 }, -- italic eta
+ -- [0x1D70A] = { anchor = 1.2 }, -- italic omicron -- no difference
+ -- [0x1D70D] = { anchor = 1.2 }, -- italic varsigma -- no difference
+
+ [0x1D44F] = { anchor = 1.15 }, -- italic b
[0x1D451] = { anchor = 0.8, }, -- italic d
- [0x1D455] = { anchor = 1.15, }, -- italic h
- -- [0x1D456] = { anchor = 1.15, }, -- italic i (wrong code?)
- [0x1D458] = { anchor = 1.15, }, -- italic k
- [0x1D45B] = { anchor = 1.1, }, -- italic n
- [0x1D45D] = { anchor = 1.1, }, -- italic p
- [0x1D45E] = { anchor = 0.9, }, -- italic q
- [0x1D467] = { anchor = 0.9, }, -- italic z
-
- [0x1D6FE] = { anchor = 1.2, }, -- italic gamma
- [0x1D706] = { anchor = 1.2, }, -- italic lambda
- [0x1D70A] = { anchor = 1.1, }, -- italic omikron
- [0x1D70D] = { anchor = 1.1, }, -- italic varsigma
-
- [0x1D46A] = { anchor = 0.75, }, -- bold italic C
- [0x1D46B] = { anchor = 1.1, }, -- bold italic D
- [0x1D46E] = { anchor = 0.75, }, -- bold italic G
- [0x1D479] = { anchor = 1.2, }, -- bold italic R
- [0x1D47A] = { anchor = 0.8, }, -- bold italic S
+ [0x1D455] = { anchor = 1.15 }, -- italic h
+ -- [0x1D456] = { anchor = 1.15 }, -- italic i (wrong code?)
+ [0x1D458] = { anchor = 1.15 }, -- italic k
+ [0x1D45B] = { anchor = 1.1 }, -- italic n
+ [0x1D45D] = { anchor = 1.1 }, -- italic p
+ [0x1D45E] = { anchor = 0.9 }, -- italic q
+ [0x1D467] = { anchor = 0.9 }, -- italic z
+
+ [0x1D6FE] = { anchor = 1.2 }, -- italic gamma
+ [0x1D706] = { anchor = 1.2 }, -- italic lambda
+ [0x1D70A] = { anchor = 1.1 }, -- italic omikron
+ [0x1D70D] = { anchor = 1.1 }, -- italic varsigma
+
+ [0x1D46A] = { anchor = 0.75 }, -- bold italic C
+ [0x1D46B] = { anchor = 1.1 }, -- bold italic D
+ [0x1D46E] = { anchor = 0.75 }, -- bold italic G
+ [0x1D479] = { anchor = 1.2 }, -- bold italic R
+ [0x1D47A] = { anchor = 0.8 }, -- bold italic S
-- uppercaseboldscript could be improved
- [0x1D435] = { anchor = 1.05, }, -- italic B
- [0x1D436] = { anchor = 0.7, }, -- italic C
- [0x1D437] = { anchor = 1.05, }, -- italic D
- [0x1D43A] = { anchor = 0.8, }, -- italic G
- [0x1D443] = { anchor = 1.1, }, -- italic P
- [0x1D445] = { anchor = 1.05, }, -- italic R
- [0x1D446] = { anchor = 0.85, }, -- italic S
-
- [0x1D49C] = { anchor = 0.9 }, -- script A
- [0x1D49D] = { anchor = 0.95, }, -- script B
- [0x1D49E] = { anchor = 0.8, }, -- script C
- [0x1D49F] = { anchor = 0.95, }, -- script D
- [0x1D4A0] = { anchor = 0.85, }, -- script E
- [0x1D4A1] = { anchor = 0.75, }, -- script F
- [0x1D4A2] = { anchor = 0.9, }, -- script G
- [0x1D4A3] = { anchor = 0.85, }, -- script H
- [0x1D4A4] = { anchor = 0.8, }, -- script I
- [0x1D4A5] = { anchor = 0.8, }, -- script J
- [0x1D4A6] = { anchor = 0.85, }, -- script K
- [0x1D4A7] = { anchor = 0.75, }, -- script L
- [0x1D4A8] = { anchor = 0.9, }, -- script M
- [0x1D4A9] = { anchor = 0.85, }, -- script N
- [0x1D4AA] = { anchor = 0.95, }, -- script O
- [0x1D4AB] = { anchor = 0.95, }, -- script P
- [0x1D4AC] = { anchor = 0.95, }, -- script Q
- [0x1D4AD] = { anchor = 0.95, }, -- script R
- [0x1D4AE] = { anchor = 0.9, }, -- script S
- [0x1D4AF] = { anchor = 0.75, }, -- script T
- [0x1D4B0] = { anchor = 0.9, }, -- script U
- [0x1D4B1] = { anchor = 0.95, }, -- script V
- [0x1D4B2] = { anchor = 0.95, }, -- script W
- [0x1D4B3] = { anchor = 0.95, }, -- script X
- [0x1D4B4] = { anchor = 0.9, }, -- script Y
- [0x1D4B5] = { anchor = 1, }, -- script Z
-
--- [984874]={ squeeze = 0.50, height = 0.50, depth = 0.50 },
--- [984881]={ squeeze = 0.50, height = 0.50, depth = 0.50 },
--- [984888]={ squeeze = 0.50, height = 0.50, depth = 0.50 },
--- [984895]={ squeeze = 0.50, height = 0.50, depth = 0.50 },
--- [984902]={ squeeze = 0.50, height = 0.50, depth = 0.50 },
--- [984909]={ squeeze = 0.50, height = 0.50, depth = 0.50 },
--- [984916]={ squeeze = 0.50, height = 0.50, depth = 0.50 },
--- ["0x7C.variants.*"]={ squeeze = 0.75, height = 0.75, depth = 0.75, extend = 1.15, width = 1.15 }, -- squeeze: glyph, height, depth: bbox
--- ["0x7C.variants.*"]={ squeeze = 0.75, height = 0.8, depth = 0.8, extend = 1.1, width = 1.1 }, -- squeeze: glyph, height, depth: bbox
-
-
-["0x7C.variants.1"]={ squeeze = 0.90, height = 0.90, depth = 0.90 },
-["0x7C.variants.2"]={ squeeze = 0.85, height = 0.85, depth = 0.85 },
-["0x7C.variants.3"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
-["0x7C.variants.4"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
-["0x7C.variants.5"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
-["0x7C.variants.6"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
-["0x7C.variants.7"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
-
-
--- [utf.byte("1")] = {
--- original = utf.byte("2"),
--- mode = 1,
--- scale = 2,
--- },
--- ["lowercasegreeksansserifbolditalic"] = {
--- delta = 0x003B1 - 0x1D7AA,
--- slant = 0.4,
--- slant = -0.2,
--- line = 0.1,
--- -- line = 0.4,
--- mode = 1,
--- width = 1.25,
--- width = 0.95,
--- scale = 0.975,
--- },
+ [0x1D435] = { anchor = 1.05 }, -- italic B
+ [0x1D436] = { anchor = 0.7 }, -- italic C
+ [0x1D437] = { anchor = 1.05 }, -- italic D
+ [0x1D43A] = { anchor = 0.8 }, -- italic G
+ [0x1D443] = { anchor = 1.1 }, -- italic P
+ [0x1D445] = { anchor = 1.05 }, -- italic R
+ [0x1D446] = { anchor = 0.85 }, -- italic S
+
+ [0x1D49C] = { anchor = 0.9 }, -- script A
+ [0x1D49D] = { anchor = 0.95 }, -- script B
+ [0x1D49E] = { anchor = 0.8 }, -- script C
+ [0x1D49F] = { anchor = 0.95 }, -- script D
+ [0x1D4A0] = { anchor = 0.85 }, -- script E
+ [0x1D4A1] = { anchor = 0.75 }, -- script F
+ [0x1D4A2] = { anchor = 0.9 }, -- script G
+ [0x1D4A3] = { anchor = 0.85 }, -- script H
+ [0x1D4A4] = { anchor = 0.8 }, -- script I
+ [0x1D4A5] = { anchor = 0.8 }, -- script J
+ [0x1D4A6] = { anchor = 0.85 }, -- script K
+ [0x1D4A7] = { anchor = 0.75 }, -- script L
+ [0x1D4A8] = { anchor = 0.9 }, -- script M
+ [0x1D4A9] = { anchor = 0.85 }, -- script N
+ [0x1D4AA] = { anchor = 0.95 }, -- script O
+ [0x1D4AB] = { anchor = 0.95 }, -- script P
+ [0x1D4AC] = { anchor = 0.95 }, -- script Q
+ [0x1D4AD] = { anchor = 0.95 }, -- script R
+ [0x1D4AE] = { anchor = 0.9 }, -- script S
+ [0x1D4AF] = { anchor = 0.75 }, -- script T
+ [0x1D4B0] = { anchor = 0.9, }, -- script U
+ [0x1D4B1] = { anchor = 0.95 }, -- script V
+ [0x1D4B2] = { anchor = 0.95 }, -- script W
+ [0x1D4B3] = { anchor = 0.95 }, -- script X
+ [0x1D4B4] = { anchor = 0.9 }, -- script Y
+ [0x1D4B5] = { anchor = 1 }, -- script Z
+
+ -- [984874] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
+ -- [984881] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
+ -- [984888] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
+ -- [984895] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
+ -- [984902] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
+ -- [984909] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
+ -- [984916] = { squeeze = 0.50, height = 0.50, depth = 0.50 },
+
+ -- ["0x7C.variants.*"] = { squeeze = 0.75, height = 0.75, depth = 0.75, extend = 1.15, width = 1.15 }, -- squeeze: glyph, height, depth: bbox
+ -- ["0x7C.variants.*"] = { squeeze = 0.75, height = 0.8, depth = 0.8, extend = 1.1, width = 1.1 }, -- squeeze: glyph, height, depth: bbox
+
+ ["0x7C.variants.1"]={ squeeze = 0.90, height = 0.90, depth = 0.90 },
+ ["0x7C.variants.2"]={ squeeze = 0.85, height = 0.85, depth = 0.85 },
+ ["0x7C.variants.3"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
+ ["0x7C.variants.4"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
+ ["0x7C.variants.5"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
+ ["0x7C.variants.6"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
+ ["0x7C.variants.7"]={ squeeze = 0.80, height = 0.80, depth = 0.80 },
+
+ -- [utf.byte("1")] = {
+ -- original = utf.byte("2"),
+ -- mode = 1,
+ -- scale = 2,
+ -- },
+
+ -- ["lowercasegreeksansserifbolditalic"] = {
+ -- delta = 0x003B1 - 0x1D7AA,
+ -- slant = 0.4,
+ -- slant = -0.2,
+ -- line = 0.1,
+ -- mode = 1,
+ -- width = 1.25,
+ -- width = 0.95,
+ -- scale = 0.975,
+ -- },
},
},
{
@@ -280,82 +281,82 @@ return {
[0x1D4B5] = { bottomright = -0.05, }, -- script Z
},
},
- -- {
- -- tweak = "staircase",
- -- list = {
- -- },
- -- },
+ -- {
+ -- tweak = "staircase",
+ -- list = {
+ -- },
+ -- },
{
-- For upright alphabets, we unset the anchor.
- -- This means that accents are placed
+ -- This means that accents are placed
-- centered over the character
tweak = "wipeanchors",
- -- list = { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58 }, -- todo: ranges
- list = {
- "digitsbold",
- "digitsdoublestruck",
- "digitsmonospace",
- "digitsnormal",
- "digitssansserifbold",
- "digitssansserifnormal",
- "lowercasebold",
- "lowercaseboldfraktur",
- "lowercasedoublestruck",
- "lowercasefraktur",
- "lowercasegreekbold",
- "lowercasegreeknormal",
- "lowercasegreeksansserifbold",
- "lowercasemonospace",
- "lowercasenormal",
- "lowercasesansserifbold",
- "lowercasesansserifnormal",
- "uppercasebold",
- "uppercaseboldfraktur",
- "uppercasedoublestruck",
- "uppercasefraktur",
- "uppercasegreekbold",
- "uppercasegreeknormal",
- "uppercasegreeksansserifbold",
- "uppercasemonospace",
- "uppercasenormal", -- they are italic!
- "uppercasesansserifbold",
- "uppercasesansserifnormal",
- },
- },
- {
- -- For non-italic alphabets we
+ -- list = { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58 }, -- todo: ranges
+ list = {
+ "digitsbold",
+ "digitsdoublestruck",
+ "digitsmonospace",
+ "digitsnormal",
+ "digitssansserifbold",
+ "digitssansserifnormal",
+ "lowercasebold",
+ "lowercaseboldfraktur",
+ "lowercasedoublestruck",
+ "lowercasefraktur",
+ "lowercasegreekbold",
+ "lowercasegreeknormal",
+ "lowercasegreeksansserifbold",
+ "lowercasemonospace",
+ "lowercasenormal",
+ "lowercasesansserifbold",
+ "lowercasesansserifnormal",
+ "uppercasebold",
+ "uppercaseboldfraktur",
+ "uppercasedoublestruck",
+ "uppercasefraktur",
+ "uppercasegreekbold",
+ "uppercasegreeknormal",
+ "uppercasegreeksansserifbold",
+ "uppercasemonospace",
+ "uppercasenormal", -- they are italic!
+ "uppercasesansserifbold",
+ "uppercasesansserifnormal",
+ },
+ },
+ {
+ -- For non-italic alphabets we
-- remove italic correction.
tweak = "wipeitalics",
list = {
- -- "digitsbold",
- -- "digitsdoublestruck",
- -- "digitsmonospace",
- -- "digitsnormal",
- -- "digitssansserifbold",
- -- "digitssansserifnormal",
- -- "lowercasebold",
- -- "lowercaseboldfraktur",
- -- "lowercasedoublestruck",
- -- "lowercasefraktur",
- "lowercasemonospace",
- "lowercasenormal",
- -- "lowercasesansserifbold",
- -- "lowercasesansserifnormal",
- -- "lowercasegreeknormal",
- "uppercasebold",
- -- "uppercaseboldfraktur",
- -- "uppercasedoublestruck",
- -- "uppercasefraktur",
- -- "uppercasegreekbold",
- -- "uppercasegreeknormal",
- -- "uppercasegreeksansserifbold",
- "uppercasemonospace",
- "uppercasesansserifbold",
- "uppercasesanserifnormal",
+ -- "digitsbold",
+ -- "digitsdoublestruck",
+ -- "digitsmonospace",
+ -- "digitsnormal",
+ -- "digitssansserifbold",
+ -- "digitssansserifnormal",
+ -- "lowercasebold",
+ -- "lowercaseboldfraktur",
+ -- "lowercasedoublestruck",
+ -- "lowercasefraktur",
+ "lowercasemonospace",
+ "lowercasenormal",
+ -- "lowercasesansserifbold",
+ -- "lowercasesansserifnormal",
+ -- "lowercasegreeknormal",
+ "uppercasebold",
+ -- "uppercaseboldfraktur",
+ -- "uppercasedoublestruck",
+ -- "uppercasefraktur",
+ -- "uppercasegreekbold",
+ -- "uppercasegreeknormal",
+ -- "uppercasegreeksansserifbold",
+ "uppercasemonospace",
+ "uppercasesansserifbold",
+ "uppercasesanserifnormal",
},
},
{
- -- This one fakes margins to get larger/smaller accents
+ -- This one fakes margins to get larger/smaller accents
-- with for example \widetilde.
tweak = "margins",
list = {
@@ -397,10 +398,9 @@ return {
[0x00393] = { left = .1, right = .1 }, -- upfight Gamma
[0x00396] = { left = .1, right = .1 }, -- upfight Zeta
-
[0x1D5D8] = { left = .1, right = .1 }, -- sans bold E
[0x1D5D9] = { left = .1, right = .1 }, -- sans bold F
- -- [0x1D5DD] = { left = .2, right = .2 }, -- sans bold J -- nope
+ -- [0x1D5DD] = { left = .2, right = .2 }, -- sans bold J -- nope
[0x1D5DF] = { left = .1, right = .1 }, -- sans bold L
[0x1D5E6] = { left = .1, right = .1 }, -- sans bold S
@@ -409,7 +409,7 @@ return {
[0x1D5A2] = { left = .1, right = .1 }, -- sans C
[0x1D5A4] = { left = .1, right = .1 }, -- sans E
[0x1D5A5] = { left = .1, right = .1 }, -- sans F
- -- [0x1D5AB] = { left = .1, right = .1 }, -- sans L -- nope
+ -- [0x1D5AB] = { left = .1, right = .1 }, -- sans L -- nope
[0x1D5AF] = { left = .1, right = .1 }, -- sans P
[0x1D5B2] = { left = .1, right = .1 }, -- sans S
[0x1D5B9] = { left = .1, right = .1 }, -- sans Z
@@ -418,19 +418,16 @@ return {
[0x1D4AE] = { left = .1, right = .1 }, -- script S
[0x1D4B4] = { left = .1, right = .1 }, -- script Y
- -- [0x4A] = { left = .2, right = .2 }, -- J
+ -- [0x4A] = { left = .2, right = .2 }, -- J
[0x4C] = { left = .1, right = .1 }, -- L
[0x53] = { left = .1, right = .1 }, -- S
[0x5A] = { left = .1, right = .1 }, -- Z
- [0x1D43D] = { left = -.1, right = -.1 }, -- italic J
-
- [0x1D409] = { left = -.1, right = -.1 }, -- bold J
-
- [0x1D471] = { left = -.1, right = -.1 }, -- bold italic J
-
+ [0x1D43D] = { left = -.1, right = -.1 }, -- italic J
+ [0x1D409] = { left = -.1, right = -.1 }, -- bold J
+ [0x1D471] = { left = -.1, right = -.1 }, -- bold italic J
[0x1D4D9] = { left = -.05, right = -.05 }, -- bold script J
- },
+ },
},
{
tweak = "fixprimes",
@@ -463,17 +460,19 @@ return {
},
},
parameters = {
- FractionNumeratorDisplayStyleShiftUp = 600, -- used to be a function
- NoLimitSupFactor = 0,
- NoLimitSubFactor = 900,
- -- AccentBaseHeight = 0,
- -- AccentBaseDepth = 0,
- -- AccentTopOvershoot = 66,
- AccentSuperscriptDrop = 100, -- drop the superscripts if accents are present. Amount in percentage of height of accent(?)
- AccentSuperscriptPercent = 0,
- DelimiterPercent = 90,
- DelimiterShortfall = 400,
- -- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one)
+ FractionNumeratorDisplayStyleShiftUp = 600, -- used to be a function
+ NoLimitSupFactor = 0,
+ NoLimitSubFactor = 900,
+ -- AccentBaseHeight = 0,
+ -- AccentBaseDepth = 0,
+ -- AccentTopOvershoot = 66,
+ AccentSuperscriptDrop = 100, -- drop the superscripts if accents are present. Amount in percentage of height of accent(?)
+ AccentSuperscriptPercent = 0,
+ DelimiterPercent = 90,
+ DelimiterShortfall = 400,
+ -- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one)
+ PrimeRaisePercent = 60, -- 50 default
+ PrimeRaiseComposedPercent = 15, -- 25 default
},
bigslots = {
1, 3, 5, 7 -- In fact, 6 is the last one.
diff --git a/tex/context/fonts/mkiv/lucida-opentype-math.lfg b/tex/context/fonts/mkiv/lucida-opentype-math.lfg
index 20dc3aeb1..f02cc2aea 100644
--- a/tex/context/fonts/mkiv/lucida-opentype-math.lfg
+++ b/tex/context/fonts/mkiv/lucida-opentype-math.lfg
@@ -40,10 +40,12 @@ return {
AccentBaseDepth = 150,
RadicalDegreeBottomRaisePercent = 50,
RadicalKernAfterDegree = -600,
- RadicalRuleThickness = 35, -- 40 in font (46 in demi)
+ -- RadicalRuleThickness = 35, -- 40 in font (46 in demi)
DelimiterPercent = 90,
DelimiterShortfall = 400,
-- DisplayOperatorMinHeight = 1800, -- 1300 in font (only one)
+ PrimeRaisePercent = 60, -- 50 default
+ PrimeRaiseComposedPercent = 50, -- 25 default
},
tweaks = {
aftercopying = {
diff --git a/tex/context/fonts/mkiv/pagella-math.lfg b/tex/context/fonts/mkiv/pagella-math.lfg
index 4ace3e650..88018193d 100644
--- a/tex/context/fonts/mkiv/pagella-math.lfg
+++ b/tex/context/fonts/mkiv/pagella-math.lfg
@@ -40,12 +40,16 @@ return {
AccentTopShiftUp = 30,
-- AccentBaseHeight = 0,
AccentBaseDepth = 80,
+-- SpaceAfterScript = 0,
+-- SpaceAfterScript = 30,
RadicalDegreeBottomRaisePercent = 60,
RadicalKernAfterDegree = -500,
RadicalRuleThickness = 54, -- 60 in font
DelimiterPercent = 90,
DelimiterShortfall = 400,
DisplayOperatorMinHeight = 1800, -- 1500 in font
+ PrimeRaisePercent = 75, -- 50 default
+ PrimeRaiseComposedPercent = 10, -- 25 default
},
tweaks = {
aftercopying = {
@@ -103,7 +107,7 @@ return {
[0x1D450] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- c
[0x1D451] = { xoffset = 0, width = 1, italic = 0, anchor = 0.7 }, -- d
[0x1D452] = { xoffset = 0, width = 1, italic = 0, anchor = 0.9 }, -- e
- [0x1D453] = { xoffset = 0.50, width = 1.70, italic = 0.6 }, -- f
+ [0x1D453] = { xoffset = 0.50, width = 1.70, italic = 0.6, anchor = 1.2 }, -- f
[0x1D454] = { xoffset = 0.10, width = 1.15, italic = 0.2 }, -- g
[0x0210E] = { xoffset = 0, width = 1, italic = 0, anchor = 1.3 }, -- h
[0x1D458] = { xoffset = 0, width = 1, italic = 0, anchor = 1.3 }, -- k
@@ -132,6 +136,14 @@ return {
-- topright = 0,
bottomright = -0.2,
},
+
+-- [0x1D453] = {
+-- topleft = 3,
+-- bottomleft = 3,
+-- topright = 3,
+-- bottomright = 3,
+-- },
+
},
},
{
@@ -148,6 +160,9 @@ return {
tweak = "addscripts",
},
{
+ tweak = "addprivates",
+ },
+ {
tweak = "accentdimensions",
},
{
diff --git a/tex/context/fonts/mkiv/schola-math.lfg b/tex/context/fonts/mkiv/schola-math.lfg
index 21062320c..1287f19d0 100644
--- a/tex/context/fonts/mkiv/schola-math.lfg
+++ b/tex/context/fonts/mkiv/schola-math.lfg
@@ -28,6 +28,8 @@ return {
DelimiterPercent = 90,
DelimiterShortfall = 400,
DisplayOperatorMinHeight = 1800, -- 1333 in font
+ -- PrimeRaisePercent = 50, -- 50 default
+ PrimeRaiseComposedPercent = 10, -- 25 default
},
tweaks = {
aftercopying = {
diff --git a/tex/context/fonts/mkiv/stix-two-math.lfg b/tex/context/fonts/mkiv/stix-two-math.lfg
index b61b0b2bf..d543a4e9b 100644
--- a/tex/context/fonts/mkiv/stix-two-math.lfg
+++ b/tex/context/fonts/mkiv/stix-two-math.lfg
@@ -33,6 +33,8 @@ return {
DelimiterPercent = 90,
DelimiterShortfall = 400,
DisplayOperatorMinHeight = 1800, -- 1800 in font
+ PrimeRaisePercent = 75, -- 50 default
+ PrimeRaiseComposedPercent = 10, -- 25 default
},
tweaks = {
aftercopying = {
diff --git a/tex/context/fonts/mkiv/termes-math.lfg b/tex/context/fonts/mkiv/termes-math.lfg
index 977217b1c..b7e3b2d45 100644
--- a/tex/context/fonts/mkiv/termes-math.lfg
+++ b/tex/context/fonts/mkiv/termes-math.lfg
@@ -35,6 +35,8 @@ return {
DelimiterPercent = 90,
DelimiterShortfall = 400,
DisplayOperatorMinHeight = 1800, -- 1300 in font (only one)
+ PrimeRaisePercent = 60, -- 50 default
+ PrimeRaiseComposedPercent = 10, -- 25 default
},
tweaks = {
aftercopying = {
diff --git a/tex/context/fonts/mkiv/type-imp-euler.mkiv b/tex/context/fonts/mkiv/type-imp-euler.mkiv
index 6c2266579..00df63458 100644
--- a/tex/context/fonts/mkiv/type-imp-euler.mkiv
+++ b/tex/context/fonts/mkiv/type-imp-euler.mkiv
@@ -28,7 +28,6 @@
\definefontfallback [pagellaovereuler] [texgyrepagella-math] [0x02100-0x02BFF] [\s!check=yes]
\definefontfallback [pagellaovereuler] [texgyrepagella-math] [0x1D400-0x1D7FF] [\s!check=yes]
-\definefontfallback [pagellaovereuler] [texgyrepagella-math] [0x1D400-0x1D7FF] [\s!check=yes]
\definefontfallback [pagellaovereuler] [texgyrepagella-math] [0x0210E] [\s!check=yes,\c!force=\v!yes]
%definefontfallback [pagellaovereuler] [texgyrepagella-math] [0x1D538-0x1D550] [\s!check=yes]
@@ -67,11 +66,15 @@
\stoptypescript
\starttypescript [\s!math] [euleroverpagella] [\s!name]
- \definefontsynonym [MathRoman] [texgyrepagella-math] [\s!features={\s!math\mathsizesuffix,mathextra},\s!fallbacks=euleroverpagella]
+ \definefontsynonym [MathRoman] [texgyrepagella-math] [\s!features={\s!math\mathsizesuffix,mathextra},\s!fallbacks=euleroverpagella%
+ ,\s!goodies=pagella-with-euler-math%
+ ]
\stoptypescript
\starttypescript [\s!math] [pagellaovereuler] [\s!name]
- \definefontsynonym [MathRoman] [\s!file:euler.otf] [\s!features={\s!math\mathsizesuffix,mathextra},\s!fallbacks=pagellaovereuler]
+ \definefontsynonym [MathRoman] [\s!file:euler.otf] [\s!features={\s!math\mathsizesuffix,mathextra},\s!fallbacks=pagellaovereuler%
+ ,\s!goodies=euler-with-pagella-math%
+ ]
\stoptypescript
\starttypescript [pagella-with-euler]
diff --git a/tex/context/fonts/mkiv/type-imp-lucida-opentype.mkiv b/tex/context/fonts/mkiv/type-imp-lucida-opentype.mkiv
index 4ac23d4c1..7237f7d08 100644
--- a/tex/context/fonts/mkiv/type-imp-lucida-opentype.mkiv
+++ b/tex/context/fonts/mkiv/type-imp-lucida-opentype.mkiv
@@ -21,7 +21,7 @@
\starttypescriptcollection[lucida-opentype]
- \starttypescript [lucidaot,lucidadk]
+ \starttypescript [lucida,lucidaot,lucidadk]
\loadfontgoodies[lucida-opentype-math]
\definetypeface [\typescriptone] [\s!rm] [\s!serif] [\typescriptone] [\s!default] [\s!features=\s!default]
\definetypeface [\typescriptone] [\s!ss] [\s!sans] [\typescriptone] [\s!default] [\s!features=\s!default]
@@ -33,7 +33,7 @@
\quittypescriptscanning
\stoptypescript
- \starttypescript [\s!serif] [lucidaot,lucidadk]
+ \starttypescript [\s!serif] [lucida,lucidaot,lucidadk]
\definefontsynonym [\s!Serif] [\s!file:LucidaBrightOT.otf]
\definefontsynonym [\s!SerifBold] [\s!file:LucidaBrightOT-Demi.otf]
\definefontsynonym [\s!SerifItalic] [\s!file:LucidaBrightOT-Italic.otf]
@@ -42,7 +42,7 @@
\definefontsynonym [\s!SerifBoldSlanted] [\s!SerifBoldItalic]
\stoptypescript
- \starttypescript [\s!sans] [lucidaot,lucidadk]
+ \starttypescript [\s!sans] [lucida,lucidaot,lucidadk]
\definefontsynonym [\s!Sans] [\s!file:LucidaSansOT.otf]
\definefontsynonym [\s!SansBold] [\s!file:LucidaSansOT-Demi.otf]
\definefontsynonym [\s!SansItalic] [\s!file:LucidaSansOT-Italic.otf]
@@ -51,7 +51,7 @@
\definefontsynonym [\s!SansBoldSlanted] [\s!SansBoldItalic]
\stoptypescript
- \starttypescript [\s!mono] [lucidaot]
+ \starttypescript [\s!mono] [lucida,lucidaot]
\definefontsynonym [\s!Mono] [\s!file:LucidaSansTypewriterOT.otf]
\definefontsynonym [\s!MonoBold] [\s!file:LucidaSansTypewriterOT-Bold.otf]
\definefontsynonym [\s!MonoItalic] [\s!file:LucidaSansTypewriterOT-Oblique.otf]
@@ -69,16 +69,16 @@
\definefontsynonym [\s!MonoBoldSlanted] [\s!MonoBoldItalic]
\stoptypescript
- \starttypescript [\s!math] [lucidaot,lucidadk]
+ \starttypescript [\s!math] [lucida,lucidaot,lucidadk]
\definefontsynonym [\s!MathRoman] [\s!file:LucidaBrightMathOT.otf] [\s!features={\s!math\mathsizesuffix,mathlucida,mathextra},\s!goodies=lucida-opentype-math]
\definefontsynonym [\s!MathRomanBold] [\s!file:LucidaBrightMathOT-Demi.otf] [\s!features={\s!math\mathsizesuffix,mathlucida,mathextra},\s!goodies=lucida-opentype-math]
\stoptypescript
- \starttypescript [\s!handwriting] [lucidaot,lucidadk]
+ \starttypescript [\s!handwriting] [lucida,lucidaot,lucidadk]
\definefontsynonym [\s!Handwriting] [\s!file:LucidaHandwritingOT.otf]
\stoptypescript
- \starttypescript [\s!calligraphy] [lucidaot,lucidadk]
+ \starttypescript [\s!calligraphy] [lucida,lucidaot,lucidadk]
\definefontsynonym [\s!Calligraphy] [\s!file:LucidaCalligraphyOT.otf]
\stoptypescript
diff --git a/tex/context/interface/mkii/keys-cs.xml b/tex/context/interface/mkii/keys-cs.xml
index 5b470d75b..58002a9f3 100644
--- a/tex/context/interface/mkii/keys-cs.xml
+++ b/tex/context/interface/mkii/keys-cs.xml
@@ -876,6 +876,7 @@
<cd:constant name='frameradius' value='polomerramecku'/>
<cd:constant name='frames' value='ramecky'/>
<cd:constant name='freeregion' value='freeregion'/>
+ <cd:constant name='freezespacing' value='freezespacing'/>
<cd:constant name='from' value='z'/>
<cd:constant name='functioncolor' value='functioncolor'/>
<cd:constant name='functionstyle' value='functionstyle'/>
@@ -956,6 +957,7 @@
<cd:constant name='lastpubsep' value='lastpubsep'/>
<cd:constant name='layout' value='layout'/>
<cd:constant name='left' value='vlevo'/>
+ <cd:constant name='leftclass' value='leftclass'/>
<cd:constant name='leftcolor' value='barvavlevo'/>
<cd:constant name='leftcompoundhyphen' value='leftcompoundhyphen'/>
<cd:constant name='leftedge' value='levahrana'/>
@@ -1014,6 +1016,7 @@
<cd:constant name='menu' value='menu'/>
<cd:constant name='method' value='metoda'/>
<cd:constant name='middle' value='stredni'/>
+ <cd:constant name='middleclass' value='middleclass'/>
<cd:constant name='middlecolor' value='middlecolor'/>
<cd:constant name='middlecommand' value='middlecommand'/>
<cd:constant name='middlesource' value='middlesource'/>
@@ -1126,6 +1129,7 @@
<cd:constant name='palet' value='paleta'/>
<cd:constant name='paper' value='papir'/>
<cd:constant name='paragraph' value='odstavec'/>
+ <cd:constant name='penalties' value='penalties'/>
<cd:constant name='period' value='period'/>
<cd:constant name='place' value='umistit'/>
<cd:constant name='placehead' value='umistihlavicku'/>
@@ -1179,6 +1183,7 @@
<cd:constant name='reverse' value='reverse'/>
<cd:constant name='right' value='vpravo'/>
<cd:constant name='rightchars' value='rightchars'/>
+ <cd:constant name='rightclass' value='rightclass'/>
<cd:constant name='rightcolor' value='barvavpravo'/>
<cd:constant name='rightcompoundhyphen' value='rightcompoundhyphen'/>
<cd:constant name='rightedge' value='pravahrana'/>
diff --git a/tex/context/interface/mkii/keys-it.xml b/tex/context/interface/mkii/keys-it.xml
index 8a2dc7180..eedcdaa82 100644
--- a/tex/context/interface/mkii/keys-it.xml
+++ b/tex/context/interface/mkii/keys-it.xml
@@ -876,6 +876,7 @@
<cd:constant name='frameradius' value='raggiocornice'/>
<cd:constant name='frames' value='cornici'/>
<cd:constant name='freeregion' value='freeregion'/>
+ <cd:constant name='freezespacing' value='freezespacing'/>
<cd:constant name='from' value='da'/>
<cd:constant name='functioncolor' value='functioncolor'/>
<cd:constant name='functionstyle' value='functionstyle'/>
@@ -956,6 +957,7 @@
<cd:constant name='lastpubsep' value='lastpubsep'/>
<cd:constant name='layout' value='layout'/>
<cd:constant name='left' value='sinistra'/>
+ <cd:constant name='leftclass' value='leftclass'/>
<cd:constant name='leftcolor' value='coloresinistra'/>
<cd:constant name='leftcompoundhyphen' value='leftcompoundhyphen'/>
<cd:constant name='leftedge' value='bordosinistro'/>
@@ -1014,6 +1016,7 @@
<cd:constant name='menu' value='menu'/>
<cd:constant name='method' value='metodo'/>
<cd:constant name='middle' value='centro'/>
+ <cd:constant name='middleclass' value='middleclass'/>
<cd:constant name='middlecolor' value='middlecolor'/>
<cd:constant name='middlecommand' value='middlecommand'/>
<cd:constant name='middlesource' value='middlesource'/>
@@ -1060,6 +1063,8 @@
<cd:constant name='numberconversionset' value='numberconversionset'/>
<cd:constant name='numberdistance' value='numberdistance'/>
<cd:constant name='numbering' value='numerazione'/>
+ <cd:constant name='numberlocation' value='numberlocation'/>
+ <cd:constant name='numbermethod' value='numbermethod'/>
<cd:constant name='numberorder' value='numberorder'/>
<cd:constant name='numberprefix' value='numberprefix'/>
<cd:constant name='numbersegments' value='numbersegments'/>
@@ -1070,6 +1075,7 @@
<cd:constant name='numberstopper' value='numberstopper'/>
<cd:constant name='numberstrut' value='numberstrut'/>
<cd:constant name='numberstyle' value='stilenumero'/>
+ <cd:constant name='numberthreshold' value='numberthreshold'/>
<cd:constant name='numberwidth' value='numberwidth'/>
<cd:constant name='nx' value='nx'/>
<cd:constant name='ny' value='ny'/>
@@ -1123,6 +1129,7 @@
<cd:constant name='palet' value='tavolozza'/>
<cd:constant name='paper' value='carta'/>
<cd:constant name='paragraph' value='capoverso'/>
+ <cd:constant name='penalties' value='penalties'/>
<cd:constant name='period' value='period'/>
<cd:constant name='place' value='metti'/>
<cd:constant name='placehead' value='mettitesta'/>
@@ -1176,6 +1183,7 @@
<cd:constant name='reverse' value='invertito'/>
<cd:constant name='right' value='destra'/>
<cd:constant name='rightchars' value='rightchars'/>
+ <cd:constant name='rightclass' value='rightclass'/>
<cd:constant name='rightcolor' value='coloredestra'/>
<cd:constant name='rightcompoundhyphen' value='rightcompoundhyphen'/>
<cd:constant name='rightedge' value='bordodestro'/>
diff --git a/tex/context/interface/mkii/keys-ro.xml b/tex/context/interface/mkii/keys-ro.xml
index 175143c2c..78255c1cc 100644
--- a/tex/context/interface/mkii/keys-ro.xml
+++ b/tex/context/interface/mkii/keys-ro.xml
@@ -876,6 +876,7 @@
<cd:constant name='frameradius' value='razaframe'/>
<cd:constant name='frames' value='frames'/>
<cd:constant name='freeregion' value='freeregion'/>
+ <cd:constant name='freezespacing' value='freezespacing'/>
<cd:constant name='from' value='dela'/>
<cd:constant name='functioncolor' value='functioncolor'/>
<cd:constant name='functionstyle' value='functionstyle'/>
@@ -956,6 +957,7 @@
<cd:constant name='lastpubsep' value='lastpubsep'/>
<cd:constant name='layout' value='layout'/>
<cd:constant name='left' value='stanga'/>
+ <cd:constant name='leftclass' value='leftclass'/>
<cd:constant name='leftcolor' value='culoarestanga'/>
<cd:constant name='leftcompoundhyphen' value='leftcompoundhyphen'/>
<cd:constant name='leftedge' value='bordurastanga'/>
@@ -1014,6 +1016,7 @@
<cd:constant name='menu' value='meniu'/>
<cd:constant name='method' value='metoda'/>
<cd:constant name='middle' value='mijloc'/>
+ <cd:constant name='middleclass' value='middleclass'/>
<cd:constant name='middlecolor' value='middlecolor'/>
<cd:constant name='middlecommand' value='middlecommand'/>
<cd:constant name='middlesource' value='middlesource'/>
@@ -1126,6 +1129,7 @@
<cd:constant name='palet' value='paleta'/>
<cd:constant name='paper' value='hartie'/>
<cd:constant name='paragraph' value='paragraf'/>
+ <cd:constant name='penalties' value='penalties'/>
<cd:constant name='period' value='period'/>
<cd:constant name='place' value='pune'/>
<cd:constant name='placehead' value='punetitlu'/>
@@ -1179,6 +1183,7 @@
<cd:constant name='reverse' value='reverse'/>
<cd:constant name='right' value='dreapta'/>
<cd:constant name='rightchars' value='rightchars'/>
+ <cd:constant name='rightclass' value='rightclass'/>
<cd:constant name='rightcolor' value='culoaredreapta'/>
<cd:constant name='rightcompoundhyphen' value='rightcompoundhyphen'/>
<cd:constant name='rightedge' value='borduradreapta'/>
diff --git a/tex/context/modules/mkiv/m-scite.mkiv b/tex/context/modules/mkiv/m-scite.mkiv
index a34d4921c..7686b0ec1 100644
--- a/tex/context/modules/mkiv/m-scite.mkiv
+++ b/tex/context/modules/mkiv/m-scite.mkiv
@@ -454,6 +454,7 @@ moduledata.scite = scite
\unexpanded\def\module_scite_buffer_inline[#1][#2]%
{\dontleavehmode
\begingroup
+ \lettypingparameter\c!margin\zeropoint
\setcatcodetable\ctxcatcodes % needed in xml
\ifsecondargument
\clf_scitelexbuffer{#2}{#1}%
@@ -465,6 +466,7 @@ moduledata.scite = scite
\module_scite_inherit_typing
\dontcomplain
\getbuffer[lex]%
+ \removeunwantedspaces
\endgroup}
\unexpanded\def\startInlineScite#1%
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 33524ae92..8379da1b8 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 2022-07-06 21:34
+-- merge date : 2022-07-24 12:17
do -- begin closure to overcome local limits and interference