summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkiv/char-def.lua17
-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/status-files.pdfbin24626 -> 24626 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin259607 -> 259165 bytes
-rw-r--r--tex/context/base/mkxl/cont-new.mkxl2
-rw-r--r--tex/context/base/mkxl/context.mkxl2
-rw-r--r--tex/context/base/mkxl/math-ini.lmt239
-rw-r--r--tex/context/base/mkxl/math-ini.mkxl8
-rw-r--r--tex/context/base/mkxl/math-noa.lmt103
-rw-r--r--tex/context/base/mkxl/task-ini.lmt1
-rw-r--r--tex/context/modules/mkiv/s-fonts-emoji.mkiv2
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
15 files changed, 285 insertions, 99 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index e5eeff7b9..40172106d 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.08.05 11:40}
+\newcontextversion{2022.08.05 17:16}
%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 e302eb6f9..e7b236699 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.08.05 11:40}
+\edef\contextversion{2022.08.05 17:16}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/char-def.lua b/tex/context/base/mkiv/char-def.lua
index 3208eab6b..6449e085e 100644
--- a/tex/context/base/mkiv/char-def.lua
+++ b/tex/context/base/mkiv/char-def.lua
@@ -456,6 +456,7 @@ characters.data={
direction="es",
linebreak="pr",
mathclass="binary",
+ mathgroup="nary arithmic",
unicodeslot=0x2B,
},
{
@@ -479,6 +480,7 @@ characters.data={
direction="es",
linebreak="hy",
mathclass="ordinary",
+ mathgroup="binary arithmic",
mathextensible="h",
mathfiller="relfill",
mathname="mathhyphen",
@@ -656,6 +658,7 @@ characters.data={
direction="on",
linebreak="al",
mathclass="relation",
+ mathgroup="nary relation",
mathname="lt",
mirror=0x3E,
textclass="open",
@@ -671,6 +674,7 @@ characters.data={
linebreak="al",
mathextensible="h",
mathfiller="equalfill",
+ mathgroup="nary relation",
mathspec={
{
class="relation",
@@ -691,6 +695,7 @@ characters.data={
direction="on",
linebreak="al",
mathclass="relation",
+ mathgroup="nary relation",
mathname="gt",
mirror=0x3C,
textclass="close",
@@ -2299,6 +2304,7 @@ characters.data={
direction="on",
linebreak="ai",
mathclass="binary",
+ mathgroup="nary arithmic",
mathname="times",
synonyms={ "cartesian product" },
unicodeslot=0xD7,
@@ -2698,6 +2704,7 @@ characters.data={
direction="on",
linebreak="ai",
mathclass="binary",
+ mathgroup="binary arithmic",
mathname="div",
synonyms={ "obelus" },
unicodeslot=0xF7,
@@ -64126,6 +64133,7 @@ characters.data={
description="DOUBLE-STRUCK CAPITAL C",
direction="l",
linebreak="al",
+ mathgroup="constant set",
mathname="complexes",
specials={ "font", 0x43 },
synonyms={ "complex numbers", "the set of complex numbers" },
@@ -64318,6 +64326,7 @@ characters.data={
description="DOUBLE-STRUCK CAPITAL N",
direction="l",
linebreak="al",
+ mathgroup="constant set",
mathname="naturalnumbers",
specials={ "font", 0x4E },
synonyms={ "natural number" },
@@ -64358,6 +64367,7 @@ characters.data={
description="DOUBLE-STRUCK CAPITAL P",
direction="l",
linebreak="al",
+ mathgroup="constant set",
mathname="primes",
specials={ "font", 0x50 },
unicodeslot=0x2119,
@@ -64367,6 +64377,7 @@ characters.data={
description="DOUBLE-STRUCK CAPITAL Q",
direction="l",
linebreak="al",
+ mathgroup="constant set",
mathname="rationals",
specials={ "font", 0x51 },
synonyms={ "rational numbers", "the set of rational numbers" },
@@ -64399,6 +64410,7 @@ characters.data={
description="DOUBLE-STRUCK CAPITAL R",
direction="l",
linebreak="al",
+ mathgroup="constant set",
mathname="reals",
specials={ "font", 0x52 },
synonyms={ "real numbers", "the set of real numbers" },
@@ -64462,6 +64474,7 @@ characters.data={
description="DOUBLE-STRUCK CAPITAL Z",
direction="l",
linebreak="al",
+ mathgroup="constant set",
mathname="integers",
specials={ "font", 0x5A },
synonyms={ "integers", "the set of integers" },
@@ -66814,6 +66827,7 @@ characters.data={
description="EMPTY SET",
direction="on",
linebreak="al",
+ mathgroup="constant set",
mathclass="ordinary",
mathname="emptyset",
synonyms={ "null set" },
@@ -66981,6 +66995,7 @@ characters.data={
description="MINUS SIGN",
direction="es",
linebreak="pr",
+ mathgroup="binary arithmic",
mathspec={
{
class="binary",
@@ -67937,6 +67952,7 @@ characters.data={
description="LESS-THAN OR EQUAL TO",
direction="on",
linebreak="ai",
+ mathgroup="nary relation",
mathlist={ 0x3C, 0x3D },
mathspec={
{
@@ -67958,6 +67974,7 @@ characters.data={
description="GREATER-THAN OR EQUAL TO",
direction="on",
linebreak="ai",
+ mathgroup="nary relation",
mathlist={ 0x3E, 0x3D },
mathspec={
{
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 493ef50a7..e4a711f11 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.08.05 11:40}
+\newcontextversion{2022.08.05 17:16}
%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 736cd6e73..664316e97 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.08.05 11:40}
+\edef\contextversion{2022.08.05 17:16}
%D Kind of special:
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index a41240d11..3c36ed7cf 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 aafa04ff5..c57cfee7c 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/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index f9cc4b1b1..8b974f841 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.08.05 11:40}
+\newcontextversion{2022.08.05 17:16}
%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 f167c0f58..6d8c81284 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.08.05 11:40}
+\immutable\edef\contextversion{2022.08.05 17:16}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
diff --git a/tex/context/base/mkxl/math-ini.lmt b/tex/context/base/mkxl/math-ini.lmt
index 48d905ca6..0af62a45e 100644
--- a/tex/context/base/mkxl/math-ini.lmt
+++ b/tex/context/base/mkxl/math-ini.lmt
@@ -6,19 +6,23 @@ if not modules then modules = { } end modules ['math-ini'] = {
license = "see context related readme files"
}
--- if needed we can use the info here to set up xetex definition files
--- the "8000 hackery influences direct characters (utf) as indirect \char's
---
--- isn't characters.data loaded already ... shortcut it here
---
--- replace code 7 by 0 as we don't use it anyway (chars with code 7 will adapt to
--- to the fam when set ... we use other means .. ok, we could use it for spacing but
--- then we also have to set the other characters (only a subset done now)
+-- The way we do math in \CONTEXT\ \MKIV\ differs from other macro packages so you
+-- should not mix the somewhat unique (and bit weird) approach here with the more
+-- traditional (\TEX) approach. Also, we use char-def.lua as starting point and that
+-- file is quite \CONTEXT\ specific. When we added math to that there was no
+-- interest (quite the contrary) so we didn't went generic there which in retrospect
+-- also gives us the freedom to add more information, something that happens
+-- occasionally. Because that file is shared between \MKIV\ and \LMTX\ some
+-- information is only used by \LMTX. We also have quite some runs over the math
+-- list but that has been so since we started and performance will not degrade much
+-- by it; after all math is not that demanding. More details can be found in the
+-- manuals that discuss math. Most code (and concepts) date from 2005 so maybe I
+-- will upgrade the lot some day, although it has been adapted on the way to the
+-- changes in the engine(s).
local next, type = next, type
local formatters, find, nospaces = string.formatters, string.find, string.nospaces
-local utfchar, utfbyte, utflength = utf.char, utf.byte, utf.length
------ floor = math.floor
+local utfchar, utfbyte = utf.char, utf.byte
local sortedhash = table.sortedhash
local toboolean = toboolean
@@ -31,8 +35,6 @@ local ctx_doifelsesomething = commands.doifelsesomething
local trace_defining = false trackers.register("math.defining", function(v) trace_defining = v end)
-trace_defining = true
-
local report_math = logs.reporter("mathematics","initializing")
mathematics = mathematics or { }
@@ -54,17 +56,32 @@ local texintegerdef = tex.integerdef
do
- local dictionaries = { }
+ local dictionaries = mathematics.dictionaries or { }
mathematics.dictionaries = dictionaries
- local names = dictionaries.names or utilities.storage.allocate()
- local groups = dictionaries.groups or utilities.storage.allocate()
- local data = dictionaries.data or utilities.storage.allocate()
-
- if storage then
- storage.register("mathematics/dictionaries/names", names, "characters.dictionaries.names")
- storage.register("mathematics/dictionaries/groups", groups, "characters.dictionaries.groups")
- storage.register("mathematics/dictionaries/data", data, "characters.dictionaries.data")
+ local names = dictionaries.names or utilities.storage.allocate()
+ local groups = dictionaries.groups or utilities.storage.allocate()
+ local data = dictionaries.data or utilities.storage.allocate()
+ local sets = dictionaries.sets or utilities.storage.allocate()
+ local variants = dictionaries.variants or utilities.storage.allocate() -- todo: get from char-def
+ local defaults = dictionaries.defaults or utilities.storage.allocate() -- todo: get from char-def
+
+ storage.register("mathematics/dictionaries/names", names, "mathematics.dictionaries.names")
+ storage.register("mathematics/dictionaries/groups", groups, "mathematics.dictionaries.groups")
+ storage.register("mathematics/dictionaries/data", data, "mathematics.dictionaries.data")
+ storage.register("mathematics/dictionaries/sets", sets, "mathematics.dictionaries.sets")
+ storage.register("mathematics/dictionaries/variants", variants, "mathematics.dictionaries.variants")
+ storage.register("mathematics/dictionaries/defaults", defaults, "mathematics.dictionaries.defaults")
+
+ dictionaries.names = dictionaries.names or names
+ dictionaries.groups = dictionaries.groups or groups
+ dictionaries.data = dictionaries.data or data
+ dictionaries.sets = dictionaries.sets or sets
+ dictionaries.variants = dictionaries.variants or variants
+ dictionaries.defaults = dictionaries.defaults or defaults
+
+ if not sets.n then
+ sets.n = 0
end
function dictionaries.registergroup(name)
@@ -81,13 +98,71 @@ do
return group
end
+ function dictionaries.registergroupset(name,set)
+ local s = sets[name]
+ if not s then
+ local d = dictionaries.registergroup(name)
+ local n = sets.n + 1
+ local l = utilities.parsers.settings_to_array(set)
+ local g = { }
+ for i=1,#l do
+ local n = names[l[i]]
+ if n then
+ g[#g+1] = n -- ordered
+ end
+ end
+ s = {
+ names = l,
+ groups = g,
+ group = d,
+ }
+ sets[name] = s
+ sets[d] = s
+
+ end
+ end
+
+ function dictionaries.groupset(name)
+ return sets[name] or { }
+ end
+
+ function dictionaries.groupsetgroup(name)
+ local s = sets[name]
+ if s then
+ return s.group
+ else
+ return names[name] or 0
+ end
+ end
+
function dictionaries.registercharacter(group,index,description)
local d = names[group] -- can be number or string
if d then
- data[d][index] = description
+ data[d][index] = description or true
+ local v = variants[index]
+ if v then
+ v[d] = true
+ else
+ variants[index] = { [d] = true }
+ end
+ if not defaults[index] then
+ defaults[index] = d
+ end
end
end
+ implement {
+ name = "registergroupset",
+ arguments = "2 strings",
+ actions = dictionaries.registergroupset,
+ }
+
+ implement {
+ name = "groupsetgroup",
+ arguments = "string",
+ actions = { dictionaries.groupsetgroup, context },
+ }
+
local fontchardata = fonts.hashes.characters
local f_dictionary = false
local register = callback.register
@@ -106,7 +181,7 @@ do
else
groupname = "unknown"
end
- if not indexname then
+ if not indexname or indexname == true then
indexname = chardata[unicode]
indexname = indexname and indexname.description or "unknown"
end
@@ -143,42 +218,46 @@ do
--
-- The char-def.lua file will have mathgroup entries reflecting this.
- local registergroup = mathematics.dictionaries.registergroup
-
- registergroup("default")
- registergroup("binary arithmic")
- registergroup("binary linear algebra")
- registergroup("binary logical")
- registergroup("binary relation")
- registergroup("binary set")
- registergroup("constant arithmic")
- registergroup("constant set")
- registergroup("differential")
- registergroup("integral")
- registergroup("interval")
- registergroup("lambda")
- registergroup("limit")
- registergroup("nary arithmic")
- registergroup("nary constructor")
- registergroup("nary functional")
- registergroup("nary linear algebra")
- registergroup("nary logical")
- registergroup("nary minmax")
- registergroup("nary relation")
- registergroup("nary set list")
- registergroup("nary set relation")
- registergroup("nary set")
- registergroup("nary statistics")
- registergroup("partial") -- partial differential
- registergroup("product")
- registergroup("quantifier")
- registergroup("unary arithmic")
- registergroup("unary elementary")
- registergroup("unary functional")
- registergroup("unary linear algebra")
- registergroup("unary logical")
- registergroup("unary set")
- registergroup("unary vector")
+ if environment.initex then
+
+ local registergroup = mathematics.dictionaries.registergroup
+
+ registergroup("default")
+ registergroup("binary arithmic")
+ registergroup("binary linear algebra")
+ registergroup("binary logical")
+ registergroup("binary relation")
+ registergroup("binary set")
+ registergroup("constant arithmic")
+ registergroup("constant set")
+ registergroup("differential")
+ registergroup("integral")
+ registergroup("interval")
+ registergroup("lambda")
+ registergroup("limit")
+ registergroup("nary arithmic")
+ registergroup("nary constructor")
+ registergroup("nary functional")
+ registergroup("nary linear algebra")
+ registergroup("nary logical")
+ registergroup("nary minmax")
+ registergroup("nary relation")
+ registergroup("nary set list")
+ registergroup("nary set relation")
+ registergroup("nary set")
+ registergroup("nary statistics")
+ registergroup("partial") -- partial differential
+ registergroup("product")
+ registergroup("quantifier")
+ registergroup("unary arithmic")
+ registergroup("unary elementary")
+ registergroup("unary functional")
+ registergroup("unary linear algebra")
+ registergroup("unary logical")
+ registergroup("unary set")
+ registergroup("unary vector")
+
+ end
-- \Umathdictdef\vdash 1 \mathbinarylogicaldictionary "22A2 \mathrelationcode 0 "22A2
--
@@ -408,7 +487,10 @@ mathematics.virtualized = virtualized
do
- local setmathcharacter = function(class,family,slot,unicode,mset,dset)
+ local registercharacter = mathematics.dictionaries.registercharacter
+ local groupnames = mathematics.dictionaries.names
+
+ local setmathcharacter = function(class,family,slot,unicode,mset,dset,group)
if mset and class ~= ordinary_class then
setmathcode("global",slot,class,family,unicode)
mset = false
@@ -417,6 +499,14 @@ do
setdelcode("global",slot,family,unicode,0,0)
dset = false
end
+ if group then
+ group = groupnames[group] or 0
+ if group ~= 0 then
+ -- which one
+ registercharacter(group,unicode)
+ -- registercharacter(group,slot)
+ end
+ end
return mset, dset
end
@@ -446,7 +536,7 @@ do
local texmathchardef = tex.mathchardef
- local setmathsymbol = function(name,class,engine,family,slot,stretch) -- hex is nicer for tracing
+ local setmathsymbol = function(name,class,engine,family,slot,stretch,group) -- hex is nicer for tracing
if class == accent_class then
ctx_sprint(f_topaccent(name,0,family,slot))
elseif class == topaccent_class then
@@ -468,6 +558,13 @@ do
elseif class == root_class then
ctx_sprint(f_root(name,family,slot))
elseif texmathchardef then
+ if group then
+ group = groupnames[group] or 0
+ if group ~= 0 then
+ texmathchardef(name,engine,family,slot,"permanent",0,group,slot)
+ return
+ end
+ end
texmathchardef(name,engine,family,slot,"permanent")
else
-- beware, open/close and other specials should not end up here
@@ -505,7 +602,7 @@ do
if trace_defining then
report(class,engine,family,unicode,symbol)
end
- mset, dset = setmathcharacter(engine,family,unicode,symbol,mset,dset)
+ mset, dset = setmathcharacter(engine,family,unicode,symbol,mset,dset,group)
end
local spec = other.mathspec
if spec then
@@ -515,7 +612,7 @@ do
if class then
local engine = toengineclass(class)
-- todo: trace
- mset, dset = setmathcharacter(engine,family,unicode,symbol,mset,dset)
+ mset, dset = setmathcharacter(engine,family,unicode,symbol,mset,dset,group)
end
end
end
@@ -524,6 +621,7 @@ do
local spec = character.mathspec
local name = character.mathname
local stretch = character.mathstretch
+ local group = character.mathgroup
if spec then
local done = false
if class then
@@ -536,7 +634,7 @@ do
if trace_defining then
report(class,engine,family,unicode)
end
- mset, dset = setmathcharacter(engine,family,unicode,unicode,mset,dset)
+ mset, dset = setmathcharacter(engine,family,unicode,unicode,mset,dset,group)
done = true
end
end
@@ -544,6 +642,7 @@ do
local m = spec[i]
local name = m.name
local class = m.class or class
+ local group = m.group or group
if class then
class = classes[class] or ordinary_class
else
@@ -555,7 +654,7 @@ do
if trace_defining then
report(class,engine,family,unicode,name)
end
- setmathsymbol(name,class,engine,family,unicode,stretch)
+ setmathsymbol(name,class,engine,family,unicode,stretch,group)
else
name = (class == classes.ordinary or class == classes.digit) and character.adobename -- bad
if name and trace_defining then
@@ -563,7 +662,7 @@ do
end
end
if not done then
- mset, dset = setmathcharacter(engine,family,unicode,m.unicode or unicode,mset,dset) -- see solidus
+ mset, dset = setmathcharacter(engine,family,unicode,m.unicode or unicode,mset,dset,group) -- see solidus
done = true
end
end
@@ -580,7 +679,7 @@ do
if trace_defining then
report(class,engine,family,unicode,name)
end
- mset, dset = setmathcharacter(engine,family,unicode,unicode,mset,dset)
+ mset, dset = setmathcharacter(engine,family,unicode,unicode,mset,dset,group)
else
-- if not name then
-- name = character.contextname -- too dangerous, we loose textslash and a few more
@@ -589,20 +688,20 @@ do
if trace_defining then
report(class,engine,family,unicode,name)
end
- setmathsymbol(name,class,engine,family,unicode,stretch)
+ setmathsymbol(name,class,engine,family,unicode,stretch,group)
else
if trace_defining then
report(class,engine,family,unicode,character.adobename)
end
end
- mset, dset = setmathcharacter(engine,family,unicode,unicode,mset,dset)
+ mset, dset = setmathcharacter(engine,family,unicode,unicode,mset,dset,group)
end
elseif class ~= ordinary_class then
local engine = toengineclass(class)
if trace_defining then
report(class,engine,family,unicode,character.adobename)
end
- mset, dset = setmathcharacter(engine,family,unicode,unicode,mset,dset)
+ mset, dset = setmathcharacter(engine,family,unicode,unicode,mset,dset,group)
end
end
end
diff --git a/tex/context/base/mkxl/math-ini.mkxl b/tex/context/base/mkxl/math-ini.mkxl
index 0ce6d14ef..9dd9675f3 100644
--- a/tex/context/base/mkxl/math-ini.mkxl
+++ b/tex/context/base/mkxl/math-ini.mkxl
@@ -4072,6 +4072,14 @@
#2\ifparameter#1\or\low{#1}\fi
\fi}
+%D New:
+
+\permanent\tolerant\protected\def\definemathgroupset[#1]#*[#2]%
+ {\clf_registergroupset{#1}{#2}}
+
+\permanent\tolerant\protected\def\setmathgroupset[#1]%
+ {\mathdictgroup\clf_groupsetgroup{#1}\relax}
+
\protect \endinput
% % not used (yet)
diff --git a/tex/context/base/mkxl/math-noa.lmt b/tex/context/base/mkxl/math-noa.lmt
index 9ba92bbc7..8e5b75ef4 100644
--- a/tex/context/base/mkxl/math-noa.lmt
+++ b/tex/context/base/mkxl/math-noa.lmt
@@ -57,26 +57,27 @@ local mathmode_code = tex.modelevels.math
local colortracers = nodes.tracers.colors
-local trace_remapping = false registertracker("math.remapping", function(v) trace_remapping = v end)
-local trace_processing = false registertracker("math.processing", function(v) trace_processing = v end)
-local trace_analyzing = false registertracker("math.analyzing", function(v) trace_analyzing = v end)
-local trace_normalizing = false registertracker("math.normalizing", function(v) trace_normalizing = v end)
-local trace_collapsing = false registertracker("math.collapsing", function(v) trace_collapsing = v end)
-local trace_fixing = false registertracker("math.fixing", function(v) trace_fixing = v end)
-local trace_patching = false registertracker("math.patching", function(v) trace_patching = v end)
-local trace_goodies = false registertracker("math.goodies", function(v) trace_goodies = v end)
-local trace_variants = false registertracker("math.variants", function(v) trace_variants = v end)
-local trace_alternates = false registertracker("math.alternates", function(v) trace_alternates = v end)
-local trace_italics = false registertracker("math.italics", function(v) trace_italics = v end)
-local trace_kernpairs = false registertracker("math.kernpairs", function(v) trace_kernpairs = v end)
-local trace_domains = false registertracker("math.domains", function(v) trace_domains = v end)
-local trace_families = false registertracker("math.families", function(v) trace_families = v end)
-local trace_fences = false registertracker("math.fences", function(v) trace_fences = v end)
-local trace_unstacking = false registertracker("math.unstack", function(v) trace_unstacking = v end)
-local trace_snapping = false registertracker("math.snapping", function(v) trace_snapping = v end)
-
-local check_coverage = true registerdirective("math.checkcoverage", function(v) check_coverage = v end)
-local use_math_goodies = true registerdirective("math.nogoodies", function(v) use_math_goodies = not v end)
+local trace_remapping = false registertracker("math.remapping", function(v) trace_remapping = v end)
+local trace_processing = false registertracker("math.processing", function(v) trace_processing = v end)
+local trace_analyzing = false registertracker("math.analyzing", function(v) trace_analyzing = v end)
+local trace_normalizing = false registertracker("math.normalizing", function(v) trace_normalizing = v end)
+local trace_collapsing = false registertracker("math.collapsing", function(v) trace_collapsing = v end)
+local trace_fixing = false registertracker("math.fixing", function(v) trace_fixing = v end)
+local trace_patching = false registertracker("math.patching", function(v) trace_patching = v end)
+local trace_goodies = false registertracker("math.goodies", function(v) trace_goodies = v end)
+local trace_variants = false registertracker("math.variants", function(v) trace_variants = v end)
+local trace_alternates = false registertracker("math.alternates", function(v) trace_alternates = v end)
+local trace_italics = false registertracker("math.italics", function(v) trace_italics = v end)
+local trace_kernpairs = false registertracker("math.kernpairs", function(v) trace_kernpairs = v end)
+local trace_domains = false registertracker("math.domains", function(v) trace_domains = v end)
+local trace_families = false registertracker("math.families", function(v) trace_families = v end)
+local trace_fences = false registertracker("math.fences", function(v) trace_fences = v end)
+local trace_unstacking = false registertracker("math.unstack", function(v) trace_unstacking = v end)
+local trace_snapping = false registertracker("math.snapping", function(v) trace_snapping = v end)
+local trace_dictionaries = false registertracker("math.dictionaries", function(v) trace_dictionaries = v end)
+
+local check_coverage = true registerdirective("math.checkcoverage", function(v) check_coverage = v end)
+local use_math_goodies = true registerdirective("math.nogoodies", function(v) use_math_goodies = not v end)
local report_processing = logreporter("mathematics","processing")
local report_remapping = logreporter("mathematics","remapping")
@@ -679,7 +680,6 @@ do
local remapalphabets = mathematics.remapalphabets
local fallbackstyleattr = mathematics.fallbackstyleattr
- local setnodecolor = colortracers.set
local function report_remap(tag,id,old,new,extra)
if new then
@@ -2551,6 +2551,67 @@ do
end
+-- for Mikael and me
+
+-- This could be an early callback, when we actually assign a character.
+
+do
+
+ local setnodecolor = colortracers.set
+ local getchardict = nuts.getchardict
+ local setchardict = nuts.setchardict
+
+ local dictionaries = { } noads.processors.dictionaries = dictionaries
+ local groups = mathematics.dictionaries.groups
+ local sets = mathematics.dictionaries.sets
+ local variants = mathematics.dictionaries.variants
+ local defaults = mathematics.dictionaries.defaults
+
+ local function check(pointer,group,index)
+ local v = variants[index]
+ if v and v[group] then
+ return group
+ end
+ return 1
+ end
+
+ dictionaries[mathchar_code] = function(pointer)
+ local properties, group, index = getchardict(pointer)
+ local set = sets[group]
+ local real = 1
+ if set then
+ local groups = set.groups
+ local nofgroups = groups and #groups
+ if nofgroups > 0 then
+ for i=1,nofgroups do
+ real = check(pointer,groups[i],index)
+ if real ~= 1 then
+ goto done
+ end
+ end
+ end
+ else
+ real = check(pointer,group,index)
+ end
+ ::done::
+ if real == 1 then
+ real = defaults[index] or 1
+ end
+ setchardict(pointer,properties,real,index)
+ if trace_dictionaries and real > 1 then
+ local groupname = groups[real]
+ if groupname then
+ setnodecolor(pointer,"dictionary:"..groupname)
+ end
+ end
+ end
+
+ function handlers.dictionaries(head,style,penalties)
+ processnoads(head,dictionaries,"dictionaries")
+ end
+
+end
+
-- the normal builder
-- do
diff --git a/tex/context/base/mkxl/task-ini.lmt b/tex/context/base/mkxl/task-ini.lmt
index 1f53a13b9..397f02292 100644
--- a/tex/context/base/mkxl/task-ini.lmt
+++ b/tex/context/base/mkxl/task-ini.lmt
@@ -115,6 +115,7 @@ appendaction("math", "normalizers", "noads.handlers.tags",
appendaction("math", "normalizers", "noads.handlers.italics", nil, "nonut", "disabled" )
appendaction("math", "normalizers", "noads.handlers.kernpairs", nil, "nonut", "disabled" )
appendaction("math", "normalizers", "noads.handlers.classes", nil, "nonut", "disabled" )
+appendaction("math", "normalizers", "noads.handlers.dictionaries", nil, "nonut", "enabled" )
appendaction("math", "builders", "builders.kernel.mlisttohlist", nil, "nut", "enabled" ) -- mandate
appendaction("math", "builders", "typesetters.directions.processmath", nil, "nut", "disabled" )
diff --git a/tex/context/modules/mkiv/s-fonts-emoji.mkiv b/tex/context/modules/mkiv/s-fonts-emoji.mkiv
index 096b90263..f26a2bb09 100644
--- a/tex/context/modules/mkiv/s-fonts-emoji.mkiv
+++ b/tex/context/modules/mkiv/s-fonts-emoji.mkiv
@@ -79,7 +79,7 @@ local function emojiglyphs(name)
end
end
end
- nodes.flush_list(e)
+ nodes.flushlist(e)
return #s > 0 and s or nil
end
end
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index ae49b363f..05086a7f8 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-08-05 11:40
+-- merge date : 2022-08-05 17:16
do -- begin closure to overcome local limits and interference