summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2021-11-05 13:35:55 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2021-11-05 13:35:55 +0100
commitce22f093d2d9af63927792e2a821e81a49a2ca10 (patch)
tree6957d03f5c5723a60e62716250c8e2d0e772c9d0 /tex
parentca2f0f64dbb46140d36db84ac6e1b6079a386cfa (diff)
downloadcontext-ce22f093d2d9af63927792e2a821e81a49a2ca10.tar.gz
2021-11-05 12:35:00
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/lang-ini.mkiv8
-rw-r--r--tex/context/base/mkiv/mult-prm.lua2
-rw-r--r--tex/context/base/mkiv/mult-sys.mkiv2
-rw-r--r--tex/context/base/mkiv/phys-dim.lua2
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin24767 -> 24744 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin253917 -> 253975 bytes
-rw-r--r--tex/context/base/mkiv/syst-aux.mkiv4
-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-imp-math.lmt13
-rw-r--r--tex/context/base/mkxl/lang-ini.mkxl19
-rw-r--r--tex/context/base/mkxl/mult-sys.mkxl2
-rw-r--r--tex/context/base/mkxl/node-pro.lmt46
-rw-r--r--tex/context/base/mkxl/node-tsk.lmt77
-rw-r--r--tex/context/base/mkxl/task-ini.lmt4
-rw-r--r--tex/context/base/mkxl/trac-vis.lmt191
-rw-r--r--tex/context/base/mkxl/typo-lbx.lmt26
-rw-r--r--tex/context/base/mkxl/typo-lbx.mkxl36
-rw-r--r--tex/context/fonts/mkiv/type-imp-ebgaramond.mkiv2
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
25 files changed, 278 insertions, 175 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 2ac02f2e3..bf9af64df 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2021.11.02 09:59}
+\newcontextversion{2021.11.05 12:33}
%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 5bf011408..31a4e6a86 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2021.11.02 09:59}
+\edef\contextversion{2021.11.05 12:33}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 5bee9fbb3..61b417145 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2021.11.02 09:59}
+\newcontextversion{2021.11.05 12:33}
%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 c61fb2936..4b88b06e9 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{2021.11.02 09:59}
+\edef\contextversion{2021.11.05 12:33}
%D Kind of special:
diff --git a/tex/context/base/mkiv/lang-ini.mkiv b/tex/context/base/mkiv/lang-ini.mkiv
index ffa280b05..5bf08343a 100644
--- a/tex/context/base/mkiv/lang-ini.mkiv
+++ b/tex/context/base/mkiv/lang-ini.mkiv
@@ -287,6 +287,8 @@
\s!righthyphenmin=2,
\s!lefthyphenchar=-1,
\s!righthyphenchar=45,
+ \s!explicitlefthyphenchar=\languageparameter\s!lefthyphenchar,
+ \s!explicitrighthyphenchar=\languageparameter\s!righthyphenchar,
% used in compound i.e. interfaced with c! and can be anything so no numbers
\c!lefthyphen=,
\c!righthyphen=-,
@@ -442,8 +444,10 @@
\righthyphenmin\numexpr0\languageparameter\s!righthyphenmin+\hyphenminoffset\relax
\hyphenationmin\numexpr0\languageparameter\s!hyphenmin\relax
% these values are stored with the language (global!)
- \prehyphenchar \languageparameter\s!righthyphenchar\relax
- \posthyphenchar\languageparameter\s!lefthyphenchar \relax}
+ \prehyphenchar \languageparameter\s!righthyphenchar\relax
+ \posthyphenchar \languageparameter\s!lefthyphenchar \relax
+ \preexhyphenchar \languageparameter\s!explicitrighthyphenchar\relax
+ \postexhyphenchar\languageparameter\s!explicitlefthyphenchar \relax}
\appendtoks
\lang_basics_synchronize_min_max
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index 7579eb4e9..ce983bde3 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -430,6 +430,7 @@ return {
"localleftbox",
"localleftboxbox",
"localmiddlebox",
+ "localmiddleboxbox",
"localrightbox",
"localrightboxbox",
"lpcode",
@@ -451,6 +452,7 @@ return {
"mathflattenmode",
"mathfontcontrol",
"mathitalicsmode",
+ "mathlimitsmode",
"mathnolimitsmode",
"mathpenaltiesmode",
"mathrulesfam",
diff --git a/tex/context/base/mkiv/mult-sys.mkiv b/tex/context/base/mkiv/mult-sys.mkiv
index 32d1b40a0..149a7ac24 100644
--- a/tex/context/base/mkiv/mult-sys.mkiv
+++ b/tex/context/base/mkiv/mult-sys.mkiv
@@ -338,6 +338,8 @@
\definesystemconstant {righthyphenmin}
\definesystemconstant {lefthyphenchar}
\definesystemconstant {righthyphenchar}
+\definesystemconstant {explicitlefthyphenchar}
+\definesystemconstant {explicitrighthyphenchar}
\definesystemconstant {head}
\definesystemconstant {symbol}
diff --git a/tex/context/base/mkiv/phys-dim.lua b/tex/context/base/mkiv/phys-dim.lua
index e0cea7bab..91803e4fd 100644
--- a/tex/context/base/mkiv/phys-dim.lua
+++ b/tex/context/base/mkiv/phys-dim.lua
@@ -1008,7 +1008,7 @@ implement {
protected = true,
arguments = { "optional", "string" },
actions = function(filler, digits)
- digits = gsub(digits,"(%d)","%1\\digitsbreak")
+ digits = gsub(digits,"(%d)","%1\\digitsbreak ") -- space needed for following letters
digits = gsub(digits,"\\-$",filler)
context(digits)
end
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 6e149394e..c75fcc69f 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 ed087bd8f..102012b26 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/syst-aux.mkiv b/tex/context/base/mkiv/syst-aux.mkiv
index 79b118a9b..44668dcc9 100644
--- a/tex/context/base/mkiv/syst-aux.mkiv
+++ b/tex/context/base/mkiv/syst-aux.mkiv
@@ -1503,8 +1503,8 @@
\protected\def\syst_helpers_do_if_in_csname_else#1#2%
{\def\syst_helpers_do_do_if_in_csname_else##1#1##2##3^^^^0004%
- {\unless\ifx##2^^^^3}%
- \expandafter\syst_helpers_do_do_if_in_csname_else#2#1^^^^3^^^^3^^^^0004}
+ {\unless\ifx##2^^^^0003}%
+ \expandafter\syst_helpers_do_do_if_in_csname_else#2#1^^^^0003^^^^0003^^^^0004}
\protected\def\doifelseincsname#1#2%
{\normalexpanded{\syst_helpers_do_if_in_csname_else{#1}}{#2}%
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index 9f20ffaf8..727f63268 100644
--- a/tex/context/base/mkxl/cont-new.mkxl
+++ b/tex/context/base/mkxl/cont-new.mkxl
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2021.11.02 09:59}
+\newcontextversion{2021.11.05 12:33}
%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 f48c343c5..11cd22e91 100644
--- a/tex/context/base/mkxl/context.mkxl
+++ b/tex/context/base/mkxl/context.mkxl
@@ -29,7 +29,7 @@
%D {YYYY.MM.DD HH:MM} format.
\immutable\edef\contextformat {\jobname}
-\immutable\edef\contextversion{2021.11.02 09:59}
+\immutable\edef\contextversion{2021.11.05 12:33}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
@@ -388,6 +388,7 @@
\loadmkxlfile{typo-tal}
\loadmkxlfile{typo-par} % par builders (uses fonts)
\loadmkxlfile{typo-lbx}
+\loadmkxlfile{typo-adj}
\loadmkxlfile{tabl-com}
%loadmarkfile{tabl-pln}
diff --git a/tex/context/base/mkxl/font-con.lmt b/tex/context/base/mkxl/font-con.lmt
index 36e5efbb6..cee94f6d2 100644
--- a/tex/context/base/mkxl/font-con.lmt
+++ b/tex/context/base/mkxl/font-con.lmt
@@ -740,6 +740,10 @@ function constructors.scale(tfmdata,specification)
chr.italic = vi*hdelta
end
end
+ local ft = character.options
+ if ft then
+ chr.options = ft
+ end
elseif autoitalicamount then -- itlc feature
local vi = description.italic
if not vi then
diff --git a/tex/context/base/mkxl/font-imp-math.lmt b/tex/context/base/mkxl/font-imp-math.lmt
index 3077d0dcd..677bff91a 100644
--- a/tex/context/base/mkxl/font-imp-math.lmt
+++ b/tex/context/base/mkxl/font-imp-math.lmt
@@ -53,6 +53,7 @@ registerotffeature {
}
}
+
-- this will become a mode in the engine
local function initialize(tfmdata,value)
@@ -180,7 +181,7 @@ end
-- }
-- }
-local specification = {
+registerotffeature {
name = "compactmath",
description = "use one math font",
initializers = {
@@ -189,8 +190,6 @@ local specification = {
}
}
-registerotffeature(specification)
-
-- The problem is that the traditional code path doesn't add an italic to the subscript,
-- simply because it assumes that the width has that already subtracted. So, we cannot
-- compensate in the following way. We're stuck with the fact that the texgyre fonts
@@ -232,7 +231,7 @@ local function initialize(tfmdata,value)
end
end
-local specification = {
+registerotffeature {
name = "oldmath",
description = "deal with fake opentype fonts",
-- manipulators = {
@@ -245,8 +244,6 @@ local specification = {
}
}
-registerotffeature(specification)
-
local function initialize(tfmdata,value)
if type(value) == "string" then
local rawdata = tfmdata.shared.rawdata
@@ -260,7 +257,7 @@ local function initialize(tfmdata,value)
end
end
-local specification = {
+registerotffeature {
name = "mathcontrol",
description = "control specific old/new math handling",
initializers = {
@@ -268,5 +265,3 @@ local specification = {
node = initialize,
}
}
-
-registerotffeature(specification)
diff --git a/tex/context/base/mkxl/lang-ini.mkxl b/tex/context/base/mkxl/lang-ini.mkxl
index 2b7f34ef3..f964a5083 100644
--- a/tex/context/base/mkxl/lang-ini.mkxl
+++ b/tex/context/base/mkxl/lang-ini.mkxl
@@ -273,6 +273,8 @@
\s!righthyphenmin=2,
\s!lefthyphenchar=-1,
\s!righthyphenchar=45,
+ \s!explicitlefthyphenchar=\languageparameter\s!lefthyphenchar,
+ \s!explicitrighthyphenchar=\languageparameter\s!righthyphenchar,
% used in compound i.e. interfaced with c! and can be anything so no numbers
\c!lefthyphen=,
\c!righthyphen=-,
@@ -509,17 +511,28 @@
\fi
\lang_basics_synchronize_min_max}
+% \protected\def\lang_basics_synchronize_min_max % maybe store this at the lua end
+% {% these values are stored along with glyph nodes
+% \lefthyphenmin \numexpr0\languageparameter\s!lefthyphenmin +\hyphenminoffset\relax
+% \righthyphenmin\numexpr0\languageparameter\s!righthyphenmin+\hyphenminoffset\relax
+% \hyphenationmin\numexpr0\languageparameter\s!hyphenmin\relax
+% % these values are stored with the language (global!)
+% \prehyphenchar \languageparameter\s!righthyphenchar\relax
+% \posthyphenchar\languageparameter\s!lefthyphenchar \relax}
+
\protected\def\lang_basics_synchronize_min_max % maybe store this at the lua end
{% these values are stored along with glyph nodes
\lefthyphenmin \numexpr0\languageparameter\s!lefthyphenmin +\hyphenminoffset\relax
\righthyphenmin\numexpr0\languageparameter\s!righthyphenmin+\hyphenminoffset\relax
\hyphenationmin\numexpr0\languageparameter\s!hyphenmin\relax
% these values are stored with the language (global!)
- \prehyphenchar \languageparameter\s!righthyphenchar\relax
- \posthyphenchar\languageparameter\s!lefthyphenchar \relax}
+ \prehyphenchar \languageparameter\s!righthyphenchar\relax
+ \posthyphenchar \languageparameter\s!lefthyphenchar \relax
+ \preexhyphenchar \languageparameter\s!explicitrighthyphenchar\relax
+ \postexhyphenchar\languageparameter\s!explicitlefthyphenchar \relax}
\appendtoks
- \lang_basics_synchronize_min_max
+ \lang_basics_synchronize_min_max % todo: also sync when already in language
\to \everylanguage
\permanent\protected\def\unhyphenated
diff --git a/tex/context/base/mkxl/mult-sys.mkxl b/tex/context/base/mkxl/mult-sys.mkxl
index 11b9f9cb9..500d929c6 100644
--- a/tex/context/base/mkxl/mult-sys.mkxl
+++ b/tex/context/base/mkxl/mult-sys.mkxl
@@ -181,6 +181,8 @@
\definesystemconstant {empty}
\definesystemconstant {em}
\definesystemconstant {environment}
+\definesystemconstant {explicitlefthyphenchar}
+\definesystemconstant {explicitrighthyphenchar}
\definesystemconstant {extensions}
\definesystemconstant {external}
\definesystemconstant {ex}
diff --git a/tex/context/base/mkxl/node-pro.lmt b/tex/context/base/mkxl/node-pro.lmt
index e09729ace..bbcbc9bdc 100644
--- a/tex/context/base/mkxl/node-pro.lmt
+++ b/tex/context/base/mkxl/node-pro.lmt
@@ -15,6 +15,7 @@ local nodes = nodes
local tasks = nodes.tasks
local nuts = nodes.nuts
local tonut = nodes.tonut
+local tonode = nodes.tonode
nodes.processors = nodes.processors or { }
local processors = nodes.processors
@@ -99,7 +100,7 @@ end
do
----- texnest = tex.nest
- local getnest = tex.getnest
+ ----- getnest = tex.getnest
local getlist = nuts.getlist
local setlist = nuts.setlist
@@ -107,30 +108,39 @@ do
local linelist_code = nodes.listcodes.line
- local actions = tasks.actions("contributers")
-
- function processors.contribute_filter(groupcode)
- if groupcode == "box" then -- "pre_box"
- local whatever = getnest()
- if whatever then
- local line = whatever.tail
- if line then
- line = tonut(line)
- if getsubtype(line) == linelist_code then
- local head = getlist(line)
- if head then
- local result = actions(head,groupcode,line)
- if result and result ~= head then
- setlist(line,result)
- end
+ local lineactions = tasks.actions("contributers")
+ local adjustactions = tasks.actions("adjusters")
+
+ -- contribute_head : pre_box
+ -- pre_adjust_head : pre_adjust
+ -- just_box : box
+ -- post_adjust_head : adjust
+
+ -- this was the "contributers" callback but we changed the interface
+
+ -- historically we use a different order than the callback
+
+ function processors.append_line_filter(head,tail,where,index)
+ if tail then
+ if where == "box" then
+ -- here we don't return something, we operate on the line (content)
+ if getsubtype(tail) == linelist_code then -- always
+ local list = getlist(tail)
+ if list then
+ local result = lineactions(list,where,tail,index) -- tail is parent of list
+ if result and result ~= list then
+ setlist(tail,result)
end
end
end
+ elseif where == "post_adjust" or where == "pre_adjust" then
+ -- we use the same order as for lines
+ return adjustactions(head,where,tail,index)
end
end
end
- callbacks.register("contribute_filter", processors.contribute_filter, "things done with lines")
+ callbacks.register("append_line_filter", processors.append_line_filter, "things done with lines")
end
diff --git a/tex/context/base/mkxl/node-tsk.lmt b/tex/context/base/mkxl/node-tsk.lmt
index dfa1e9475..ca18c9c3b 100644
--- a/tex/context/base/mkxl/node-tsk.lmt
+++ b/tex/context/base/mkxl/node-tsk.lmt
@@ -710,6 +710,7 @@ nonut = [[
]],
}
+
}
tasks.new {
@@ -762,6 +763,8 @@ nonut = [[
}
+-- these operate on the content on a line, so no injections
+
tasks.new {
name = "contributers",
processor = nodeprocessor,
@@ -784,31 +787,93 @@ local tonode = nodes.nuts.tonode
%localize%
+-- we operate exclusively on nuts (no index yet)
+
+return function(head,where,tail)
+ local nuthead = tonut(head)
+ local nuttail = tonut(tail)
+
+%actions%
+ return tonode(nuthead)
+end
+]],
+
+step = [[
+ nuthead = tonut((%action%(tonode(nuthead),where,tonode(nuttail))))
+]],
+
+nut = [[
+ nuthead = %action%(nuthead,where,nuttail)
+]],
+
+nohead = [[
+ %action%(tonode(nuthead),where,tonode(nuttail))
+]],
+
+nonut = [[
+ %action%(nuthead,where,nuttail)
+]],
+
+ }
+
+}
+
+ tasks.new {
+ name = "adjusters",
+ processor = nodeprocessor,
+ sequence = {
+ "before", -- for users
+ "normalizers",
+ "after", -- for users
+ },
+ templates = {
+
+default = [[
+return function(head)
+ return head
+end
+]],
+
+process = [[
+local tonut = nodes.tonut
+local tonode = nodes.nuts.tonode
+local nodetail = nodes.nuts.tail
+
+%localize%
+
-- we operate exclusively on nuts
-return function(nuthead,groupcode,nutline)
+return function(head,where,tail,index)
+ local nuthead = tonut(head)
+ local nuttail = tonut(tail)
+
%actions%
- return nuthead
+ return tonode(nuthead)
end
]],
step = [[
- nuthead = tonut((%action%(tonode(nuthead),groupcode,line)))
+ nuthead = tonut((%action%(tonode(nuthead),where,tonode(nuttail),index)))
+ nuttail = nodetail(nuthead)
]],
nut = [[
- nuthead = %action%(nuthead,groupcode,nutline)
+ nuthead = %action%(nuthead,where,nuttail,index)
+ nuttail = nodetail(nuthead)
]],
nohead = [[
- %action%(tonode(nuthead),groupcode,line)
+ %action%(tonode(nuthead),where,tonode(nuttail),index)
+ nuttail = nodetail(nuthead)
]],
nonut = [[
- %action%(nuthead,groupcode,nutline)
+ %action%(nuthead,where,nuttail,index)
+ nuttail = nodetail(nuthead)
]],
}
+
}
-- -- math -- --
diff --git a/tex/context/base/mkxl/task-ini.lmt b/tex/context/base/mkxl/task-ini.lmt
index 0018ed690..4af05b3cf 100644
--- a/tex/context/base/mkxl/task-ini.lmt
+++ b/tex/context/base/mkxl/task-ini.lmt
@@ -134,6 +134,8 @@ appendaction("contributers", "normalizers", "nodes.handlers.flattenline",
appendaction("contributers", "normalizers", "nodes.handlers.textbackgrounds", nil, "nut", "disabled" )
appendaction("contributers", "normalizers", "nodes.handlers.wipe", nil, "nut", "disabled" )
+appendaction("adjusters", "normalizers", "nodes.handlers.adjusters", nil, "nut", "enabled")
+
appendaction("vboxbuilders", "normalizers", "nodes.handlers.backgroundsvbox", nil, "nut", "disabled" )
------------("vboxbuilders", "normalizers", "typesetters.margins.localhandler", nil, "nut", "disabled" )
appendaction("vboxbuilders", "normalizers", "builders.vspacing.vboxhandler", nil, "nut", "enabled" )
@@ -191,7 +193,7 @@ freezegroup("everypar", "normalizers")
freezegroup("alignments", "normalizers")
-freezegroup("localboxes", "lists")
+-----------("localboxes", "lists")
-- new: disabled here
diff --git a/tex/context/base/mkxl/trac-vis.lmt b/tex/context/base/mkxl/trac-vis.lmt
index 38078f08d..6f59d0e7f 100644
--- a/tex/context/base/mkxl/trac-vis.lmt
+++ b/tex/context/base/mkxl/trac-vis.lmt
@@ -136,7 +136,7 @@ local modes = {
space = 0x0040000,
depth = 0x0080000,
marginkern = 0x0100000,
- mathlistkern = 0x0200000,
+ mathkern = 0x0200000,
dir = 0x0400000,
par = 0x0800000,
mathglue = 0x1000000,
@@ -147,7 +147,7 @@ local modes = {
visualizers.modes = modes
local usedfont, exheight, emwidth
-local l_penalty, l_glue, l_kern, l_fontkern, l_hbox, l_vbox, l_vtop, l_strut, l_whatsit, l_glyph, l_user, l_math, l_marginkern, l_mathlistkern, l_italic, l_origin, l_discretionary, l_expansion, l_line, l_space, l_depth,
+local l_penalty, l_glue, l_kern, l_fontkern, l_hbox, l_vbox, l_vtop, l_strut, l_whatsit, l_glyph, l_user, l_math, l_marginkern, l_mathkern, l_italic, l_origin, l_discretionary, l_expansion, l_line, l_space, l_depth,
l_dir, l_whatsit, l_mark, l_insert
local enabled = false
@@ -157,7 +157,7 @@ local preset_boxes = modes.hbox + modes.vbox + modes.vtop + modes.origin
local preset_makeup = preset_boxes
+ modes.kern + modes.glue + modes.penalty
local preset_all = preset_makeup
- + modes.fontkern + modes.marginkern + modes.mathlistkern
+ + modes.fontkern + modes.marginkern + modes.mathkern
+ modes.whatsit + modes.glyph + modes.user + modes.math
+ modes.dir + modes.whatsit + modes.mathglue
+ modes.mark + modes.insert
@@ -206,7 +206,7 @@ local function initialize()
l_math = layers.math
l_italic = layers.italic
l_marginkern = layers.marginkern
- l_mathlistkern = layers.mathlistkern
+ l_mathkern = layers.mathkern
l_origin = layers.origin
l_discretionary = layers.discretionary
l_expansion = layers.expansion
@@ -428,12 +428,12 @@ end
local caches = setmetatableindex("table")
-local fontkern, italickern, marginkern, mathlistkern do
+local fontkern, italickern, marginkern, mathkern do
local f_cache = caches["fontkern"]
local i_cache = caches["italickern"]
local m_cache = caches["marginkern"]
- local l_cache = caches["mathlistkern"]
+ local l_cache = caches["mathkern"]
local function somekern(head,current,cache,color,layer)
local width = getkern(current)
@@ -475,8 +475,8 @@ local fontkern, italickern, marginkern, mathlistkern do
return somekern(head,current,m_cache,"trace:do",l_marginkern)
end
- mathlistkern = function(head,current)
- return somekern(head,current,l_cache,"trace:do",l_mathlistkern)
+ mathkern = function(head,current)
+ return somekern(head,current,l_cache,"trace:do",l_mathkern)
end
end
@@ -1128,15 +1128,15 @@ end
local ruledkern do
- local k_cache_v = caches["vkern"]
- local k_cache_h = caches["hkern"]
+ local v_cache = caches["vkern"]
+ local h_cache = caches["hkern"]
- ruledkern = function(head,current,vertical,mk)
+ ruledkern = function(head,current,vertical)
local kern = getkern(current)
- local cache = vertical and k_cache_v or k_cache_h
+ local cache = vertical and v_cache or h_cache
local info = cache[kern]
if not info then
- local amount = formatters["%s:%0.3f"](vertical and "VK" or (mk and "MK") or "HK",kern*pt_factor)
+ local amount = formatters["%s:%0.3f"](vertical and "VK" or "HK",kern*pt_factor)
if kern > 0 then
info = sometext(amount,l_kern,"trace:b")
elseif kern < 0 then
@@ -1183,13 +1183,16 @@ end
local ruledmarginkern do
- local m_cache = caches["marginkern"]
+ local l_cache = caches["leftmarginkern"]
+ local r_cache = caches["rightmarginkern"]
- ruledmarginkern = function(head,current)
- local kern = getkern(current)
- local info = m_cache[kern]
+ ruledmarginkern = function(head,current,subtype)
+ local kern = getkern(current)
+ local left = subtype == leftmarginkern_code
+ local cache = left and l_cache or r_cache
+ local info = cache[kern]
if not info then
- local amount = formatters["%s:%0.3f"]("MK",kern*pt_factor)
+ local amount = formatters["%s:%0.3f"](left and "ML" or "MR",kern*pt_factor)
if kern > 0 then
info = sometext(amount,l_marginkern,"trace:b")
elseif kern < 0 then
@@ -1197,7 +1200,7 @@ local ruledmarginkern do
else
info = sometext(amount,l_marginkern,"trace:g")
end
- m_cache[kern] = info
+ cache[kern] = info
end
info = copylist(info)
head, current = insertnodebefore(head,current,info)
@@ -1206,23 +1209,26 @@ local ruledmarginkern do
end
-local ruledmathlistkern do
+local ruledmathkern do
- local l_cache = caches["mathlistkern"]
+ local h_cache = caches["horizontalmathkern"]
+ local v_cache = caches["verticalmathkern"]
- ruledmathlistkern = function(head,current)
- local kern = getkern(current)
- local info = l_cache[kern]
+ ruledmathkern = function(head,current,subtype)
+ local kern = getkern(current)
+ local vertical = subtype == verticalmathkern_code
+ local cache = vertical and v_cache or h_cache
+ local info = cache[kern]
if not info then
- local amount = formatters["%s:%0.3f"]("LK",kern*pt_factor)
+ local amount = formatters["%s:%0.3f"](vertical and "MV" or "MH",kern*pt_factor)
if kern > 0 then
- info = sometext(amount,l_mathlistkern,"trace:b")
+ info = sometext(amount,l_mathkern,"trace:b")
elseif kern < 0 then
- info = sometext(amount,l_mathlistkern,"trace:r")
+ info = sometext(amount,l_mathkern,"trace:r")
else
- info = sometext(amount,l_mathlistkern,"trace:g")
+ info = sometext(amount,l_mathkern,"trace:g")
end
- l_cache[kern] = info
+ cache[kern] = info
end
info = copylist(info)
head, current = insertnodebefore(head,current,info)
@@ -1294,48 +1300,47 @@ end
do
- local nodecodes = nodes.nodecodes
- local disc_code = nodecodes.disc
- local kern_code = nodecodes.kern
- local glyph_code = nodecodes.glyph
- local glue_code = nodecodes.glue
- local penalty_code = nodecodes.penalty
- local whatsit_code = nodecodes.whatsit
- local user_code = nodecodes.user
- local math_code = nodecodes.math
- local hlist_code = nodecodes.hlist
- local vlist_code = nodecodes.vlist
- local marginkern_code = nodecodes.marginkern
- local mathlistkern_code = nodecodes.mathlistkern
- local dir_code = nodecodes.dir
- local par_code = nodecodes.par
- local mark_code = nodecodes.mark
- local insert_code = nodecodes.insert
-
- local kerncodes = nodes.kerncodes
- local fontkern_code = kerncodes.fontkern
- local italickern_code = kerncodes.italiccorrection
- local leftmarginkern_code = kerncodes.leftmarginkern
- local rightmarginkern_code = kerncodes.rightmarginkern
- local mathlistkern_code = kerncodes.mathlistkern
- ----- userkern_code = kerncodes.userkern
-
- local skipcodes = nodes.skipcodes
- local spaceskip_code = skipcodes.spaceskip
- local xspaceskip_code = skipcodes.xspaceskip
- local zerospaceskip_code = skipcodes.zerospaceskip
- local intermathskip_code = skipcodes.intermathskip
-
- local listcodes = nodes.listcodes
- local linelist_code = listcodes.line
-
- local vtop_package_state = 3 -- todo: symbolic
-
- local getleader = nuts.getleader
- local getdisc = nuts.getdisc
-
- local setleader = nuts.setleader
- local setdisc = nuts.setdisc
+ local nodecodes = nodes.nodecodes
+ local disc_code = nodecodes.disc
+ local kern_code = nodecodes.kern
+ local glyph_code = nodecodes.glyph
+ local glue_code = nodecodes.glue
+ local penalty_code = nodecodes.penalty
+ local whatsit_code = nodecodes.whatsit
+ local user_code = nodecodes.user
+ local math_code = nodecodes.math
+ local hlist_code = nodecodes.hlist
+ local vlist_code = nodecodes.vlist
+ local dir_code = nodecodes.dir
+ local par_code = nodecodes.par
+ local mark_code = nodecodes.mark
+ local insert_code = nodecodes.insert
+
+ local kerncodes = nodes.kerncodes
+ local fontkern_code = kerncodes.fontkern
+ local italickern_code = kerncodes.italiccorrection
+ local leftmarginkern_code = kerncodes.leftmarginkern
+ local rightmarginkern_code = kerncodes.rightmarginkern
+ local horizontalmathkern_code = kerncodes.horizontalmathkern
+ local verticalmathkern_code = kerncodes.verticalmathkern
+ ----- userkern_code = kerncodes.userkern
+
+ local skipcodes = nodes.skipcodes
+ local spaceskip_code = skipcodes.spaceskip
+ local xspaceskip_code = skipcodes.xspaceskip
+ local zerospaceskip_code = skipcodes.zerospaceskip
+ local intermathskip_code = skipcodes.intermathskip
+
+ local listcodes = nodes.listcodes
+ local linelist_code = listcodes.line
+
+ local vtop_package_state = 3 -- todo: symbolic
+
+ local getleader = nuts.getleader
+ local getdisc = nuts.getdisc
+
+ local setleader = nuts.setleader
+ local setdisc = nuts.setdisc
-- local cache
@@ -1353,6 +1358,8 @@ do
local trace_simple = false
local trace_user = false
local trace_math = false
+ local trace_mathkern = false
+ local trace_marginkern = false
local trace_italic = false
local trace_origin = false
local trace_discretionary = false
@@ -1362,7 +1369,7 @@ do
local trace_depth = false
local trace_dir = false
local trace_par = false
- local trace_math_glue = false
+ local trace_mathglue = false
local trace_mark = false
local trace_insert = false
local current = head
@@ -1370,8 +1377,6 @@ do
local attr = unsetvalue
local prev_trace_fontkern = nil
local prev_trace_italic = nil
- local prev_trace_marginkern = nil
- -- local prev_trace_mathlist = nil
local prev_trace_expansion = nil
while current do
@@ -1379,11 +1384,9 @@ do
local a = forced or getattr(current,a_visual) or unsetvalue
local subtype, content
if a ~= attr then
- prev_trace_fontkern = trace_fontkern
- prev_trace_italic = trace_italic
- prev_trace_marginkern = trace_marginkern
- -- prev_trace_mathlistkern = trace_mathlistkern
- prev_trace_expansion = trace_expansion
+ prev_trace_fontkern = trace_fontkern
+ prev_trace_italic = trace_italic
+ prev_trace_expansion = trace_expansion
attr = a
if a == unsetvalue then
trace_hbox = false
@@ -1407,10 +1410,10 @@ do
trace_space = false
trace_depth = false
trace_marginkern = false
- trace_mathlistkern = false
+ trace_mathkern = false
trace_dir = false
trace_par = false
- trace_math_glue = false
+ trace_mathglue = false
trace_mark = false
trace_insert = false
if id == kern_code then
@@ -1441,10 +1444,10 @@ do
trace_space = a & 0x0040000 ~= 0
trace_depth = a & 0x0080000 ~= 0
trace_marginkern = a & 0x0100000 ~= 0
- trace_mathlistkern = a & 0x0200000 ~= 0
+ trace_mathkern = a & 0x0200000 ~= 0
trace_dir = a & 0x0400000 ~= 0
trace_par = a & 0x0800000 ~= 0
- trace_math_glue = a & 0x1000000 ~= 0
+ trace_mathglue = a & 0x1000000 ~= 0
trace_mark = a & 0x2000000 ~= 0
trace_insert = a & 0x4000000 ~= 0
end
@@ -1497,10 +1500,6 @@ do
if trace_math then
head, current = ruledmath(head,current)
end
- elseif id == marginkern_code then
- if trace_kern then
- head, current = ruledkern(head,current,vertical,true)
- end
elseif id == dir_code then
if trace_dir then
head, current = ruleddir(head,current)
@@ -1532,7 +1531,7 @@ do
head, current = ruledspace(head,current,parent)
end
elseif subtype == intermathskip_code then
- if trace_math or trace_math_glue then
+ if trace_math or trace_mathglue then
head = ruledmathglue(head,current,parent)
end
end
@@ -1554,16 +1553,20 @@ do
head, current = ruleditalic(head,current)
end
elseif subtype == leftmarginkern_code or subtype == rightmarginkern_code then
- if trace_marginkern or prev_trace_marginkern then
+ if trace_marginkern then
head, current = marginkern(head,current)
elseif trace_kern then
- head, current = ruledmarginkern(head,current)
+ head, current = ruledmarginkern(head,current,subtype)
+ end
+ elseif subtype == verticalmathkern_code then
+ if trace_mathkern or trace_kern then
+ head, current = ruledmathkern(head,current,subtype)
end
- elseif subtype == mathlistkern_code then
- if trace_mathlist then -- or prev_trace_mathlist then
- head, current = mathlistkern(head,current)
+ elseif subtype == horizontalmathkern_code then
+ if trace_mathkern then
+ head, current = mathkern(head,current)
elseif trace_kern then
- head, current = ruledmathlistkern(head,current)
+ head, current = ruledmarginkern(head,current,subtype)
end
else
if trace_kern then
diff --git a/tex/context/base/mkxl/typo-lbx.lmt b/tex/context/base/mkxl/typo-lbx.lmt
index 758f3c700..99d593d46 100644
--- a/tex/context/base/mkxl/typo-lbx.lmt
+++ b/tex/context/base/mkxl/typo-lbx.lmt
@@ -61,7 +61,7 @@ local stoptiming = statistics.stoptiming
do
local lb_found = nil
- local lb_class = 0
+ local lb_index = 0
local lb_linenumber = 0
local lb_linewidth = 0
local lb_localwidth = 0
@@ -77,7 +77,7 @@ do
local lb_parfillrightskip = 0
local lb_overshoot = 0
- implement { name = "localboxclass", public = true, usage = "value", actions = function() return integer_value, lb_class end }
+ implement { name = "localboxindex", public = true, usage = "value", actions = function() return integer_value, lb_index end }
implement { name = "localboxlinenumber", public = true, usage = "value", actions = function() return integer_value, lb_linenumber end }
implement { name = "localboxlinewidth", public = true, usage = "value", actions = function() return dimension_value, lb_linewidth end }
implement { name = "localboxlocalwidth", public = true, usage = "value", actions = function() return dimension_value, lb_localwidth end }
@@ -128,7 +128,7 @@ do
local list = getlist(current)
if list then
local attr = getattribute(list,a_localboxesmark) or 0
- local cach = attr and cache[lb_class]
+ local cach = attr and cache[lb_index]
local once = cach and cach[attr]
if once == false then
setlist(current)
@@ -155,10 +155,10 @@ do
local list = getlist(box)
for current, id, subtype in traverse_list, list do
if subtype == local_box_code and getwidth(current) == 0 then
- local class = getindex(current)
- if class then
+ local index = getindex(current)
+ if index then
lb_found = current
- lb_class = class
+ lb_index = index
lb_progress = rangedimensions(box,list,current)
action(current)
end
@@ -170,10 +170,10 @@ do
local list = getlist(box)
for current, id, subtype in traverse_list, list do
if subtype == local_box_code and getwidth(current) == 0 then
- local class = getindex(current)
- if class then
+ local index = getindex(current)
+ if index then
lb_found = current
- lb_class = class
+ lb_index = index
lb_progress = rangedimensions(box,list,current)
action(current)
end
@@ -185,10 +185,10 @@ do
local list = getlist(box)
for current, id, subtype in traverse_list, list do
if subtype == local_box_code and getwidth(current) == 0 then
- local class = getindex(current)
- if class then
+ local index = getindex(current)
+ if index then
lb_found = current
- lb_class = class
+ lb_index = index
lb_progress = rangedimensions(line,getlist(line),box)
action(current)
end
@@ -199,7 +199,7 @@ do
local function processlocalboxes(line,leftbox,rightbox,middlebox,linenumber,leftskip,rightskip,lefthang,righthang,indent,parfillleftskip,parfillrightskip,overshoot)
--
lb_found = nil
- lb_class = 0
+ lb_index = 0
lb_linenumber = linenumber
lb_progress = 0
lb_leftskip = leftskip
diff --git a/tex/context/base/mkxl/typo-lbx.mkxl b/tex/context/base/mkxl/typo-lbx.mkxl
index 0310a441f..bf296dac4 100644
--- a/tex/context/base/mkxl/typo-lbx.mkxl
+++ b/tex/context/base/mkxl/typo-lbx.mkxl
@@ -1,8 +1,8 @@
%D \module
-%D [ file=typo-dig,
-%D version=2010.01.18,
+%D [ file=typo-lbx,
+%D version=2021.10.10,
%D title=\CONTEXT\ Typesetting Macros,
-%D subtitle=Digits,
+%D subtitle=Local Boxes,
%D author=Hans Hagen,
%D date=\currentdate,
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
@@ -31,7 +31,7 @@
\unprotect
\def\typo_localboxes_reset
- {\localleftbox {}% no class here, works grouped
+ {\localleftbox {}% no index here, works grouped
\localrightbox {}%
\localmiddlebox{}}
@@ -60,7 +60,7 @@
\c!distance=\zeropoint]
\newcount\c_typo_localboxes
-\newcount\c_typo_localboxes_class
+\newcount\c_typo_localboxes_index
\appendtoks
\global\advance\c_typo_localboxes\plusone
@@ -72,7 +72,7 @@
%D when the assignment happens after e.g.\ \type {\everypar} but is also meant for the first
%D line.
-%D Todo: reserve class 1 for this:
+%D Todo: reserve index 1 for this:
\def\typo_paragraphs_l#1{\localleftbox \ifcstok{#1}\v!global par\fi}
\def\typo_paragraphs_r#1{\localrightbox\ifcstok{#1}\v!global par\fi}
@@ -86,7 +86,7 @@
{\box\localboxcontentbox}
\permanent\protected\def\localboxcommand
- {\ifcsname\??localboxesnamespace\number\localboxclass\endcsname
+ {\ifcsname\??localboxesnamespace\number\localboxindex\endcsname
%\edef\currentlocalboxes{\lastnamedcs}%
\expandafter\let\expandafter\currentlocalboxes\lastnamedcs
\setbox\localboxcontentbox\hbox
@@ -109,15 +109,15 @@
\def\typo_localboxes_zero#1#2#3%
{\ifcsname\??localboxesattribute#2\endcsname
- \c_typo_localboxes_class\lastnamedcs
+ \c_typo_localboxes_index\lastnamedcs
\edef\currentlocalboxes{#2}%
\edef\currentlocalboxeslocation{#1}%
\typo_localboxes_localbox
- class \c_typo_localboxes_class
+ index \c_typo_localboxes_index
\bgroup
\hpack
\ifcstok{\localboxesparameter\c!repeat}\v!no
- attr \localboxesmarkattribute \localboxmarkonce\c_typo_localboxes_class\relax
+ attr \localboxesmarkattribute \localboxmarkonce\c_typo_localboxes_index\relax
\fi
to \zeropoint
\bgroup
@@ -130,15 +130,15 @@
\def\typo_localboxes_asis#1#2#3%
{\ifcsname\??localboxesattribute#2\endcsname
- \c_typo_localboxes_class\lastnamedcs
+ \c_typo_localboxes_index\lastnamedcs
\edef\currentlocalboxes{#2}%
\edef\currentlocalboxeslocation{#1}%
\typo_localboxes_localbox
- class \c_typo_localboxes_class
+ index \c_typo_localboxes_index
\bgroup
\hpack
\ifcstok{\localboxesparameter\c!repeat}\v!no
- attr \localboxesmarkattribute \localboxmarkonce\c_typo_localboxes_class\relax
+ attr \localboxesmarkattribute \localboxmarkonce\c_typo_localboxes_index\relax
\fi
% todo: use width if dimension, use distance if given
\bgroup
@@ -162,11 +162,11 @@
\permanent\tolerant\protected\def\resetlocalbox[#1]%
{\ifcsname\??localboxesattribute#1\endcsname
- \c_typo_localboxes_class\lastnamedcs
+ \c_typo_localboxes_index\lastnamedcs
\edef\currentlocalboxes{#1}%
\ifcsname\??localboxesresetters\localboxesparameter\c!location\endcsname
\edef\currentlocalboxeslocation{\lastnamedcs}%
- \typo_localboxes_localbox class \c_typo_localboxes_class {}%
+ \typo_localboxes_localbox index \c_typo_localboxes_index {}%
\fi
\fi}
@@ -262,15 +262,15 @@
\permanent\protected\def\localmargintext[#1]#2%
{\dontleavehmode
\ifcsname\??localboxesattribute#1\endcsname
- \c_typo_localboxes_class\lastnamedcs
+ \c_typo_localboxes_index\lastnamedcs
\edef\currentlocalboxes{#1}%
\edef\currentlocalboxeslocation{\localboxesparameter\c!location}%
\ifx\currentlocalboxeslocation\v!right\localrightbox\orelse\ifx\currentlocalboxeslocation\v!left\localleftbox\else\localmiddlebox\fi
- class \c_typo_localboxes_class
+ index \c_typo_localboxes_index
\bgroup
\hpack
\ifcstok{\localboxesparameter\c!repeat}\v!no
- attr \localboxesmarkattribute \localboxmarkonce\c_typo_localboxes_class\relax
+ attr \localboxesmarkattribute \localboxmarkonce\c_typo_localboxes_index\relax
\fi
to \zeropoint
\bgroup
diff --git a/tex/context/fonts/mkiv/type-imp-ebgaramond.mkiv b/tex/context/fonts/mkiv/type-imp-ebgaramond.mkiv
index 87f8b5cad..8fdeee83b 100644
--- a/tex/context/fonts/mkiv/type-imp-ebgaramond.mkiv
+++ b/tex/context/fonts/mkiv/type-imp-ebgaramond.mkiv
@@ -68,7 +68,7 @@
\starttypescript [\s!math] [ebgaramond] [\s!name]
\loadfontgoodies[ebgaramond]
- \definefontsynonym [\s!MathRoman] [\s!file:garamond-math.otf] [\s!features=\s!math\mathsizesuffix,\s!goodies=ebgaramond]
+ \definefontsynonym [\s!MathRoman] [\s!file:garamond-math.otf] [\s!features={\s!math\mathsizesuffix,mathextra},\s!goodies=ebgaramond]
\stoptypescript
\starttypescript[ebgaramond]
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 9ecdb0f6f..693fa599f 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 2021-11-02 09:59
+-- merge date : 2021-11-05 12:33
do -- begin closure to overcome local limits and interference