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/mkii/mult-en.mkii1
-rw-r--r--tex/context/base/mkii/mult-nl.mkii3
-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/math-fbk.lua7
-rw-r--r--tex/context/base/mkiv/mult-def.lua4
-rw-r--r--tex/context/base/mkiv/mult-low.lua1
-rw-r--r--tex/context/base/mkiv/mult-prm.lua1
-rw-r--r--tex/context/base/mkiv/node-rul.mkiv7
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin0 -> 24755 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin0 -> 257166 bytes
-rw-r--r--tex/context/base/mkxl/attr-ini.mkxl1
-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/driv-shp.lmt100
-rw-r--r--tex/context/base/mkxl/lpdf-rul.lmt1
-rw-r--r--tex/context/base/mkxl/mult-aux.mkxl2
-rw-r--r--tex/context/base/mkxl/node-rul.lmt55
-rw-r--r--tex/context/base/mkxl/node-rul.mkxl84
-rw-r--r--tex/context/base/mkxl/node-scn.lmt50
-rw-r--r--tex/context/base/mkxl/page-imp.mkxl9
-rw-r--r--tex/context/base/mkxl/spac-par.mkxl2
-rw-r--r--tex/context/base/mkxl/strc-ref.lmt2
-rw-r--r--tex/context/base/mkxl/strc-ref.mklx4
-rw-r--r--tex/context/base/mkxl/strc-reg.mkxl294
-rw-r--r--tex/context/base/mkxl/syst-ini.mkxl4
-rw-r--r--tex/context/base/mkxl/tabl-tbl.mkxl5
-rw-r--r--tex/context/base/mkxl/trac-vis.lmt3
-rw-r--r--tex/context/fonts/mkiv/euler-math.lfg28
-rw-r--r--tex/context/fonts/mkiv/type-imp-euler.mkiv2
-rw-r--r--tex/context/interface/mkii/keys-en.xml1
-rw-r--r--tex/context/interface/mkii/keys-nl.xml3
-rw-r--r--tex/context/interface/mkiv/context-en.xml28
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin963860 -> 848669 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin24990 -> 24624 bytes
-rw-r--r--tex/context/interface/mkiv/i-visualizer.xml29
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
39 files changed, 589 insertions, 156 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 35bbc0049..5536dd894 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.26 10:41}
+\newcontextversion{2021.11.30 19:43}
%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 ea4de3fc8..9f51621bf 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.26 10:41}
+\edef\contextversion{2021.11.30 19:43}
%D For those who want to use this:
diff --git a/tex/context/base/mkii/mult-en.mkii b/tex/context/base/mkii/mult-en.mkii
index fcf27a17b..e8314e044 100644
--- a/tex/context/base/mkii/mult-en.mkii
+++ b/tex/context/base/mkii/mult-en.mkii
@@ -1282,6 +1282,7 @@
\setinterfaceconstant{tab}{tab}
\setinterfaceconstant{text}{text}
\setinterfaceconstant{textalign}{textalign}
+\setinterfaceconstant{textalternative}{textalternative}
\setinterfaceconstant{textcolor}{textcolor}
\setinterfaceconstant{textcommand}{textcommand}
\setinterfaceconstant{textdistance}{textdistance}
diff --git a/tex/context/base/mkii/mult-nl.mkii b/tex/context/base/mkii/mult-nl.mkii
index 9095e93ed..8e7baf1dd 100644
--- a/tex/context/base/mkii/mult-nl.mkii
+++ b/tex/context/base/mkii/mult-nl.mkii
@@ -315,6 +315,7 @@
\setinterfacevariable{lefthanging}{linkshangend}
\setinterfacevariable{leftmargin}{linkermarge}
\setinterfacevariable{leftpage}{linkerpagina}
+\setinterfacevariable{lefttext}{linkertekst}
\setinterfacevariable{lefttoright}{lefttoright}
\setinterfacevariable{legend}{legenda}
\setinterfacevariable{less}{minder}
@@ -476,6 +477,7 @@
\setinterfacevariable{righthanging}{rechtshangend}
\setinterfacevariable{rightmargin}{rechtermarge}
\setinterfacevariable{rightpage}{rechterpagina}
+\setinterfacevariable{righttext}{rechtertekst}
\setinterfacevariable{righttoleft}{righttoleft}
\setinterfacevariable{roman}{romaan}
\setinterfacevariable{romannumerals}{romeins}
@@ -1280,6 +1282,7 @@
\setinterfaceconstant{tab}{tab}
\setinterfaceconstant{text}{tekst}
\setinterfaceconstant{textalign}{textalign}
+\setinterfaceconstant{textalternative}{tekstvariant}
\setinterfaceconstant{textcolor}{tekstkleur}
\setinterfaceconstant{textcommand}{tekstcommando}
\setinterfaceconstant{textdistance}{tekstafstand}
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index a7daf8181..529d7448d 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.26 10:41}
+\newcontextversion{2021.11.30 19:43}
%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 99180f380..956425aa6 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.26 10:41}
+\edef\contextversion{2021.11.30 19:43}
%D Kind of special:
diff --git a/tex/context/base/mkiv/math-fbk.lua b/tex/context/base/mkiv/math-fbk.lua
index aecffb466..b42704629 100644
--- a/tex/context/base/mkiv/math-fbk.lua
+++ b/tex/context/base/mkiv/math-fbk.lua
@@ -7,6 +7,7 @@ if not modules then modules = { } end modules ['math-fbk'] = {
}
local next, type = next, type
+local floor = math.floor
local trace_fallbacks = false trackers.register("math.fallbacks", function(v) trace_fallbacks = v end)
@@ -712,9 +713,9 @@ local function threedots(data,shift)
if shift then
local plusht = pluschar.height or 0
local plusdp = pluschar.depth or 0
- local axis = (plusdp + plusht)//2 - plusdp
- offset = axis - periodht//2
- periodht = axis + periodht//2
+ local axis = floor((plusdp + plusht)/2) - plusdp
+ offset = axis - floor(periodht/2)
+ periodht = axis + floor(periodht/2)
end
return {
width = 3*periodwd,
diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua
index 2cc8a1c19..7389fa9d9 100644
--- a/tex/context/base/mkiv/mult-def.lua
+++ b/tex/context/base/mkiv/mult-def.lua
@@ -12170,6 +12170,10 @@ return {
["en"]="textalign",
["fr"]="alignertexte",
},
+ ["textalternative"]={
+ ["en"]="textalternative",
+ ["nl"]="tekstvariant",
+ },
["textcolor"]={
["cs"]="barvatextu",
["de"]="textfarbe",
diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua
index b2a3f9b3c..baf85eb04 100644
--- a/tex/context/base/mkiv/mult-low.lua
+++ b/tex/context/base/mkiv/mult-low.lua
@@ -21,6 +21,7 @@ return {
"zeromuskip", "onemuskip",
"pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi",
"normalpagebox",
+ "binaryshiftedten", "binaryshiftedtwenty", "binaryshiftedthirty",
--
"directionlefttoright", "directionrighttoleft",
--
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index 3fd680c20..2c0d9d41b 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -288,6 +288,7 @@ return {
"boxattribute",
"boxdirection",
"boxorientation",
+ "boxshift",
"boxtotal",
"boxxmove",
"boxxoffset",
diff --git a/tex/context/base/mkiv/node-rul.mkiv b/tex/context/base/mkiv/node-rul.mkiv
index 660c0d4e6..84463f21f 100644
--- a/tex/context/base/mkiv/node-rul.mkiv
+++ b/tex/context/base/mkiv/node-rul.mkiv
@@ -341,16 +341,17 @@
[undergraphic]
[\c!mp=rules:under:dash,
\c!offset=-.2,
+ \c!continue=\v!yes,
\c!order=\v!background]
\definebar[underrandom] [undergraphic][\c!mp=rules:under:random]
-\definebar[underrandoms][underrandom] [\c!continue=\v!yes]
+\definebar[underrandoms][underrandom] [\c!continue=\v!no]
\definebar[underdash] [undergraphic][\c!mp=rules:under:dash]
-\definebar[underdashes] [underdash] [\c!continue=\v!yes]
+\definebar[underdashes] [underdash] [\c!continue=\v!no]
\definebar[underdot] [undergraphic][\c!mp=rules:under:dots]
-\definebar[underdots] [underdot] [\c!continue=\v!yes]
+\definebar[underdots] [underdot] [\c!continue=\v!no]
%D This will move: (a bit duplicated)
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
new file mode 100644
index 000000000..2cd4adcf2
--- /dev/null
+++ 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
new file mode 100644
index 000000000..9c5a72289
--- /dev/null
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkxl/attr-ini.mkxl b/tex/context/base/mkxl/attr-ini.mkxl
index e707a478f..23a38eb12 100644
--- a/tex/context/base/mkxl/attr-ini.mkxl
+++ b/tex/context/base/mkxl/attr-ini.mkxl
@@ -125,6 +125,7 @@
\definesystemattribute [layoutcomponent] [public]
\definesystemattribute [internal] [public]
\definesystemattribute [ruled] [public]
+\definesystemattribute [ruledextra] [public]
\definesystemattribute [shifted] [public]
\definesystemattribute [checkedbreak] [public]
\definesystemattribute [alternate] [public]
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index 29f5d2db7..3bfffe608 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.26 10:41}
+\newcontextversion{2021.11.30 19:43}
%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 f93975914..854c65e98 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.26 10:41}
+\immutable\edef\contextversion{2021.11.30 19:43}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
diff --git a/tex/context/base/mkxl/driv-shp.lmt b/tex/context/base/mkxl/driv-shp.lmt
index 3a3d3e6e7..0ab9dacc2 100644
--- a/tex/context/base/mkxl/driv-shp.lmt
+++ b/tex/context/base/mkxl/driv-shp.lmt
@@ -479,7 +479,7 @@ else
kind = type(code)
end
if kind == "function" then
- code(font,char,pos_h,pos_v,sx,sy)
+ code(font,char,pos_h,pos_v,sx,sy) -- maybe also packet
end
elseif command == "node" then
local h = packet[2]
@@ -497,7 +497,7 @@ else
else
local injector = vfinjectors[command]
if injector then
- injector(pos_h,pos_v,packet)
+ injector(pos_h,pos_v,packet) -- maybe also sx, sy but then we need to check usage
end
end
end
@@ -669,6 +669,8 @@ local hlist_out, vlist_out do
-- check frequencies of nodes
+ local eps <const> = 10
+
hlist_out = function(this_box,current)
local ref_h = pos_h
local ref_v = pos_v
@@ -732,22 +734,24 @@ local hlist_out, vlist_out do
end
cur_h = cur_h + gluewidth
end
- elseif id == hlist_code or id == vlist_code and gluewidth > 0 then
+ elseif (id == hlist_code or id == vlist_code or id == glyph_code) and gluewidth > 0 then
local width, height, depth = getwhd(leader)
+ -- no need for //
if width > 0 then
- local boxdir = getdirection(leader) or lefttoright_code
- gluewidth = gluewidth + 10
+ gluewidth = gluewidth + eps
local edge = cur_h + gluewidth
local lx = 0
if subtype == gleaders_code then
local save_h = cur_h
if pos_r == righttoleft_code then
cur_h = ref_h - shipbox_h + cur_h
- cur_h = width * (cur_h // width)
+-- cur_h = width * (cur_h // width)
+ cur_h = width * (cur_h / width)
cur_h = ref_h - shipbox_h - cur_h
else
cur_h = ref_h - shipbox_h - cur_h
- cur_h = width * (cur_h // width)
+-- cur_h = width * (cur_h // width)
+ cur_h = width * (cur_h / width)
cur_h = ref_h - shipbox_h - cur_h
end
if cur_h < save_h then
@@ -755,7 +759,8 @@ local hlist_out, vlist_out do
end
elseif subtype == leaders_code then
local save_h = cur_h
- cur_h = width * (cur_h // width)
+-- cur_h = width * (cur_h // width)
+ cur_h = width * (cur_h / width)
if cur_h < save_h then
cur_h = cur_h + width
end
@@ -763,37 +768,78 @@ local hlist_out, vlist_out do
lq = gluewidth / width
lr = gluewidth % width
if subtype == cleaders_code then
- cur_h = cur_h + lr // 2
+-- cur_h = cur_h + lr // 2
+ cur_h = cur_h + lr / 2
else
- lx = lr // (lq + 1)
- cur_h = cur_h + (lr - (lq - 1) * lx) // 2
+-- lx = lr // (lq + 1)
+ lx = lr / (lq + 1)
+-- cur_h = cur_h + (lr - (lq - 1) * lx) // 2
+ cur_h = cur_h + (lr - (lq - 1) * lx) / 2
end
end
- local shift = getshift(leader)
- pushleaderlevel()
- while cur_h + width <= edge do
+ if id == glyph_code then
+ local char, font = isglyph(leader)
+ local x_offset, y_offset, left, right, raise = getoffsets(leader)
+ local h = ref_h
+ local v = ref_v
+ if x_offset ~= 0 or y_offset ~= 0 then
+ if pos_r == righttoleft_code then
+ h = h - x_offset
+ else
+ h = h + x_offset
+ end
+ v = v + y_offset
+ end
+ v = v + raise
+ h = h - left
local basepoint_h = 0
- -- local basepoint_v = shift
if boxdir ~= pos_r then
basepoint_h = boxwidth
end
- -- synch_pos_with_cur(ref_h,ref_v,cur_h + basepoint_h,shift)
if pos_r == righttoleft_code then
- pos_h = ref_h - (cur_h + basepoint_h)
+ pos_h = h - basepoint_h
else
- pos_h = ref_h + (cur_h + basepoint_h)
+ pos_h = h + basepoint_h
end
- pos_v = ref_v - shift
- -- synced
- if getid(leader) == vlist_code then
- vlist_out(leader,getlist(leader))
- else
- hlist_out(leader,getlist(leader))
+ while cur_h + width <= edge do
+ if pos_r == righttoleft_code then
+ pos_h = h - cur_h
+ else
+ pos_h = h + cur_h
+ end
+ pos_v = v
+ flush_character(leader,font,char,false,true,pos_h,pos_v,pos_r)
+ cur_h = cur_h + width + lx
+ end
+ else
+ local shift = isglyph and 0 or getshift(leader)
+ local boxdir = getdirection(leader) or lefttoright_code
+ pushleaderlevel()
+ while cur_h + width <= edge do
+ -- todo: move some out of loop as above
+ local basepoint_h = 0
+ -- local basepoint_v = shift
+ if boxdir ~= pos_r then
+ basepoint_h = boxwidth
+ end
+ -- synch_pos_with_cur(ref_h,ref_v,cur_h + basepoint_h,shift)
+ if pos_r == righttoleft_code then
+ pos_h = ref_h - (cur_h + basepoint_h)
+ else
+ pos_h = ref_h + (cur_h + basepoint_h)
+ end
+ pos_v = ref_v - shift
+ -- synced
+ if id == vlist_code then
+ vlist_out(leader,getlist(leader))
+ else
+ hlist_out(leader,getlist(leader))
+ end
+ cur_h = cur_h + width + lx
end
- cur_h = cur_h + width + lx
+ popleaderlevel()
end
- popleaderlevel()
- cur_h = edge - 10
+ cur_h = edge - eps
else
cur_h = cur_h + gluewidth
end
diff --git a/tex/context/base/mkxl/lpdf-rul.lmt b/tex/context/base/mkxl/lpdf-rul.lmt
index f0676dee9..4c7bcf633 100644
--- a/tex/context/base/mkxl/lpdf-rul.lmt
+++ b/tex/context/base/mkxl/lpdf-rul.lmt
@@ -72,6 +72,7 @@ do
local replacer = utilities.templates.replacer
-- todo: RuleColor -> just string ?
+ -- todo: fetch them instead fo push them
local predefined = {
["fake:word"] = replacer [[
diff --git a/tex/context/base/mkxl/mult-aux.mkxl b/tex/context/base/mkxl/mult-aux.mkxl
index 64623efe6..864516ad5 100644
--- a/tex/context/base/mkxl/mult-aux.mkxl
+++ b/tex/context/base/mkxl/mult-aux.mkxl
@@ -358,6 +358,8 @@
\mutable\let\currentstyleparameter\empty
\mutable\let\currentcolorparameter\empty
+% maybe we should have \names ones too
+
\protected\def\mult_interfaces_install_style_and_color_handler#1#2#3#4%
{\frozen\protected\def#2##1##2% style color
{\edef\currentstyleparameter{#1{##1}}% this name is public (can also set color e.g. in underline)
diff --git a/tex/context/base/mkxl/node-rul.lmt b/tex/context/base/mkxl/node-rul.lmt
index 4931569a7..8fa02cc89 100644
--- a/tex/context/base/mkxl/node-rul.lmt
+++ b/tex/context/base/mkxl/node-rul.lmt
@@ -104,6 +104,7 @@ local implement = interfaces.implement
local privateattributes = attributes.private
local a_ruled = privateattributes('ruled')
+local a_ruledextra = privateattributes('ruledextra')
local a_runningtext = privateattributes('runningtext')
local a_color = privateattributes('color')
local a_transparency = privateattributes('transparency')
@@ -239,6 +240,13 @@ function rules.define(settings)
return nofdata
end
+local extrarules = false
+local extra = false
+
+function rules.enableextra()
+ extrarules = true
+end
+
local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but acceptable for this purpose
local font = nil
local char, id = isglyph(f)
@@ -334,20 +342,22 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a
end
if mp and mp ~= "" then
- local r = usernutrule {
- width = wd,
- height = ht,
- depth = dp,
- type = "mp",
- factor = e,
- offset = offset,
- line = rulethickness,
- data = mp,
- ma = colorspace,
- ca = color,
- ta = transparency,
- }
- inject(r,wd,ht,dp)
+ for i=extra and level or 1,level do
+ local r = usernutrule {
+ width = wd,
+ height = ht,
+ depth = dp,
+ type = "mp",
+ factor = e,
+ offset = offset - (i-1)*dy,
+ line = rulethickness,
+ data = mp,
+ ma = colorspace,
+ ca = color,
+ ta = transparency,
+ }
+ inject(r,wd,ht,dp)
+ end
else
local tx = d.text
if tx then
@@ -359,7 +369,7 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a
l = hpack_nodes(l,wd,"exactly")
inject(l,wd,ht,dp)
else
- for i=1,level do
+ for i=extra and level or 1,level do
local hd = (offset+(i-1)*dy)*e - m
local ht = hd + rulethickness
local dp = -hd + rulethickness
@@ -370,8 +380,15 @@ local function flush_ruled(head,f,l,d,level,parent,strip) -- not that fast but a
return head
end
+
rules.handler = function(head)
- return processwords(a_ruled,data,flush_ruled,head)
+ extra = false
+ head = processwords(a_ruled,data,flush_ruled,head)
+ if extrarules then
+ extra = true
+ head = processwords(a_ruledextra,data,flush_ruled,head)
+ end
+ return head
end
function rules.enable()
@@ -643,6 +660,12 @@ implement {
}
implement {
+ name = "enableextrarules",
+ onlyonce = true,
+ actions = rules.enableextra
+}
+
+implement {
name = "defineshift",
actions = { shifts.define, context },
arguments = {
diff --git a/tex/context/base/mkxl/node-rul.mkxl b/tex/context/base/mkxl/node-rul.mkxl
index 2b55561d8..208ea430e 100644
--- a/tex/context/base/mkxl/node-rul.mkxl
+++ b/tex/context/base/mkxl/node-rul.mkxl
@@ -74,7 +74,7 @@
\registerctxluafile{node-rul}{autosuffix,optimize}
\installcorenamespace{bar}
-\installcorenamespace{barindex}
+% \installcorenamespace{barindex}
\installcorenamespace{barattribute}
\installcorenamespace{barstack}
@@ -96,11 +96,11 @@
\to \everysetupbar
\appendtoks
- \ifcsname\??barindex\currentbar\endcsname
- \lastnamedcs\zerocount
- \else
- \expandafter\newcount\csname\??barindex\currentbar\endcsname
- \fi
+% \ifcsname\??barindex\currentbar\endcsname
+% \lastnamedcs\zerocount
+% \else
+% \expandafter\newcount\csname\??barindex\currentbar\endcsname
+% \fi
% \normalexpanded{\t_node_rules_checklist{\node_rules_redefine{\currentbar}\the\t_node_rules_checklist}}%
\normalexpanded{\t_node_rules_checklist{\the\t_node_rules_checklist\relax\node_rules_redefine{\currentbar}}}%
% \etoksapp\t_node_rules_checklist{\node_rules_redefine{\currentbar}}%
@@ -110,6 +110,8 @@
\newbox\b_node_rules
+% todo: delay mp graphic
+
\protected\def\node_rules_define
{\edef\p_node_rules_color{\barparameter\c!color}%
\edef\p_node_text{\barparameter\c!text}%
@@ -155,22 +157,56 @@
% store in properties
+% \permanent\protected\def\node_rules_set#1% maybe reverse the 1000 (also maybe use more attributes instead of settings)
+% {\edef\currentbar{#1}%
+% \usebarstyleandcolor\c!foregroundstyle\c!foregroundcolor
+% % maybe: \usebarstyleandcolor\c!textgroundstyle\c!textcolor
+% % todo: move this to lua .. we callout anyway
+% \expandafter\let\expandafter\c_node_rules_index\csname\??barindex#1\endcsname
+% \advance\c_node_rules_index\plusone
+% \clf_enablerules % will be relaxed
+% \c_attr_ruled\numexpr
+% \plusthousand*\c_node_rules_index
+% % optimizing this one needs testing
+% +\csname\??barattribute#1\ifcsname\??bar#1:\number\c_node_rules_index\s!parent\endcsname:\number\c_node_rules_index\fi\endcsname
+% \relax}
+
+%D \underbar {\underbar {\samplefile{tufte}}}\par
+%D \underbar {\underdot {\samplefile{tufte}}}\par
+%D \underbar {\underdot {\samplefile{tufte}}}\par
+%D \underdot {\underbar {\samplefile{tufte}}}\par
+%D \underbars{\underdot {\samplefile{tufte}}}\par
+%D \underbar {\underdots{\samplefile{tufte}}}\par
+%D \underdots{\underdots{\samplefile{tufte}}}\par
+
+\newcount\c_node_rules_index % can barindex go?
+
\permanent\protected\def\node_rules_set#1% maybe reverse the 1000 (also maybe use more attributes instead of settings)
- {\edef\currentbar{#1}%
+ {\let\previousbar\currentbar
+ \edef\currentbar{#1}%
\usebarstyleandcolor\c!foregroundstyle\c!foregroundcolor
% maybe: \usebarstyleandcolor\c!textgroundstyle\c!textcolor
% todo: move this to lua .. we callout anyway
- \expandafter\let\expandafter\c_node_rules_index\csname\??barindex#1\endcsname
+ % \expandafter\let\expandafter\c_node_rules_index\csname\??barindex#1\endcsname
\advance\c_node_rules_index\plusone
\clf_enablerules % will be relaxed
- \c_attr_ruled\numexpr
- \plusthousand*\c_node_rules_index
- % optimizing this one needs testing
- +\csname\??barattribute#1\ifcsname\??bar#1:\number\c_node_rules_index\s!parent\endcsname:\number\c_node_rules_index\fi\endcsname
- \relax}
+ \ifempty\previousbar
+ \c_attr_ruled
+ \orelse\ifx\previousbar\currentbar
+ \c_attr_ruled
+ \else
+ \clf_enableextrarules % will be relaxed
+ \c_attr_ruledextra
+ \fi
+ \numexpr
+ \plusthousand*\c_node_rules_index
+ % optimizing this one needs testing
+ +\csname\??barattribute#1\ifcsname\??bar#1:\number\c_node_rules_index\s!parent\endcsname:\number\c_node_rules_index\fi\endcsname
+ \relax}
\permanent\protected\def\resetbar
- {\c_attr_ruled\attributeunsetvalue}
+ {\c_attr_ruled \attributeunsetvalue
+ \c_attr_ruledextra\attributeunsetvalue}
\permanent\protected\def\nobar
{\groupedcommand
@@ -193,17 +229,19 @@
\aliased\let\directsetbar\node_rules_set
-% ungrouped
+% ungrouped % todo: use the lua based stacker
\newcount\c_node_rules_nesting % todo: same as colors
\permanent\protected\def\pushbar[#1]%
{\global\advance\c_node_rules_nesting\plusone
- \edefcsname\??barstack\number\c_node_rules_nesting\endcsname{\c_attr_ruled\the\c_attr_ruled}%
+ \edefcsname\??barstack\number\c_node_rules_nesting\endcsname
+ {\c_attr_ruled \the\c_attr_ruled
+ \c_attr_ruledextra\the\c_attr_ruledextra}%
\node_rules_set{#1}}
\permanent\protected\def\popbar
- {\csname\??barstack\number\c_node_rules_nesting\endcsname
+ {\csname\??barstack\number\c_node_rules_nesting\endcsname\relax
\global\advance\c_node_rules_nesting\minusone}
\setupbars
@@ -342,16 +380,18 @@
[undergraphic]
[\c!mp=rules:under:dash,
\c!offset=-.2,
+ \c!dy=.4,
+ \c!continue=\v!yes,
\c!order=\v!background]
-\definebar[underrandom] [undergraphic][\c!mp=rules:under:random]
-\definebar[underrandoms][underrandom] [\c!continue=\v!yes]
+\definebar[underrandom] [undergraphic][\c!mp=rules:under:random,]
+\definebar[underrandoms][underrandom] [\c!continue=\v!no]
\definebar[underdash] [undergraphic][\c!mp=rules:under:dash]
-\definebar[underdashes] [underdash] [\c!continue=\v!yes]
+\definebar[underdashes] [underdash] [\c!continue=\v!no]
\definebar[underdot] [undergraphic][\c!mp=rules:under:dots]
-\definebar[underdots] [underdot] [\c!continue=\v!yes]
+\definebar[underdots] [underdot] [\c!continue=\v!no]
%D This will move: (a bit duplicated)
@@ -387,7 +427,7 @@
\to \everydefineshift
\protected\def\node_shifts_define
- {\setevalue{\??shiftattribute\currentshift}{\number
+ {\edefcsname\??shiftattribute\currentshift\endcsname{\number
\clf_defineshift
continue {\shiftparameter\c!continue}%
unit {\shiftparameter\c!unit}%
diff --git a/tex/context/base/mkxl/node-scn.lmt b/tex/context/base/mkxl/node-scn.lmt
index 55f39a74b..947b9e25c 100644
--- a/tex/context/base/mkxl/node-scn.lmt
+++ b/tex/context/base/mkxl/node-scn.lmt
@@ -117,11 +117,14 @@ local function processwords(attribute,data,flush,head,parent,skip) -- we have hl
local n = head
if n then
local f, l, a, d, i, class
- local continue, leaders, done, strip, level = false, false, false, true, -1
+ local continue, leaders, strip, level = false, false, false, true, -1
while n do
local id = getid(n)
- if id == glyph_code or id == rule_code or (id == hlist_code and getattr(n,a_runningtext))
-or id == disc_code or id == boundary_code
+ if id == glyph_code
+ or id == rule_code
+ or (id == hlist_code and getattr(n,a_runningtext))
+ or id == disc_code
+ or id == boundary_code
then
local aa = getattr(n,attribute)
if aa and aa ~= skip then
@@ -136,9 +139,9 @@ or id == disc_code or id == boundary_code
-- strip = not continue or level == 1 -- 0
if f then
if class == newclass then -- and newlevel > level then
- head, done = flush(head,f,l,d,level,parent,false), true
+ head = flush(head,f,l,d,level,parent,false), true
else
- head, done = flush(head,f,l,d,level,parent,strip), true
+ head = flush(head,f,l,d,level,parent,strip), true
end
end
f, l, a = n, n, aa
@@ -154,14 +157,14 @@ or id == disc_code or id == boundary_code
end
else
if f then
- head, done = flush(head,f,l,d,level,parent,strip), true
+ head = flush(head,f,l,d,level,parent,strip), true
end
f, l, a = nil, nil, nil
end
if id == hlist_code then
local list = getlist(n)
if list then
- setlist(n,(processwords(attribute,data,flush,list,n,aa))) -- watch ()
+ setlist(n,processwords(attribute,data,flush,list,n,aa))
end
end
-- elseif id == disc_code or id == boundary_code then
@@ -176,17 +179,17 @@ or id == disc_code or id == boundary_code
-- otherwise not consistent: a $b$ c vs a $b+c$ d etc
-- we need a special (optional) go over math variant
if f then
- head, done = flush(head,f,l,d,level,parent,strip), true
+ head = flush(head,f,l,d,level,parent,strip), true
f, l, a = nil, nil, nil
end
elseif id == hlist_code or id == vlist_code then
if f then
- head, done = flush(head,f,l,d,level,parent,strip), true
+ head = flush(head,f,l,d,level,parent,strip), true
f, l, a = nil, nil, nil
end
local list = getlist(n)
if list then
- setlist(n,(processwords(attribute,data,flush,list,n,skip))) -- watch ()
+ setlist(n,processwords(attribute,data,flush,list,n,skip))
end
elseif id == dir_code then -- only changes in dir, we assume proper boundaries
if f then
@@ -204,24 +207,22 @@ or id == disc_code or id == boundary_code
if getattr(n,attribute) and (subtype == userskip_code or subtype == spaceskip_code or subtype == xspaceskip_code or (leaders and subtype >= leaders_code)) then
l = n
else
- head, done = flush(head,f,l,d,level,parent,strip), true
+ head = flush(head,f,l,d,level,parent,strip), true
f, l, a = nil, nil, nil
end
end
else
- head, done = flush(head,f,l,d,level,parent,strip), true
+ head = flush(head,f,l,d,level,parent,strip), true
f, l, a = nil, nil, nil
end
end
n = getnext(n)
end
if f then
- head, done = flush(head,f,l,d,level,parent,strip), true
+ head = flush(head,f,l,d,level,parent,strip), true
end
- return head, true -- todo: done
- else
- return head, false
end
+ return head
end
nuts.processwords = function(attribute,data,flush,head,parent) -- we have hlistdir and local dir
@@ -235,7 +236,6 @@ local function processranges(attribute,flush,head,parent,depth,skip)
local n = head
if n then
local f, l, a
- local done = false
while n do
local id = getid(n)
if id == glyph_code or id == rule_code then
@@ -249,13 +249,13 @@ local function processranges(attribute,flush,head,parent,depth,skip)
l = n
else
if f then
- head, done = flush(head,f,l,a,parent,depth), true
+ head = flush(head,f,l,a,parent,depth), true
end
f, l, a = n, n, aa
end
else
if f then
- head, done = flush(head,f,l,a,parent,depth), true
+ head = flush(head,f,l,a,parent,depth), true
end
f, l, a = nil, nil, nil
end
@@ -283,30 +283,28 @@ local function processranges(attribute,flush,head,parent,depth,skip)
l = n
else
if f then
- head, done = flush(head,f,l,a,parent,depth), true
+ head = flush(head,f,l,a,parent,depth), true
end
f, l, a = n, n, aa
end
else
if f then
- head, done = flush(head,f,l,a,parent,depth), true
+ head = flush(head,f,l,a,parent,depth), true
end
f, l, a = nil, nil, nil
end
local list = getlist(n)
if list then
- setlist(n,(processranges(attribute,flush,list,n,depth+1,aa)))
+ setlist(n,processranges(attribute,flush,list,n,depth+1,aa))
end
end
n = getnext(n)
end
if f then
- head, done = flush(head,f,l,a,parent,depth), true
+ head = flush(head,f,l,a,parent,depth), true
end
- return head, done
- else
- return head, false
end
+ return head
end
nuts.processranges = function(attribute,flush,head,parent) -- we have hlistdir and local dir
diff --git a/tex/context/base/mkxl/page-imp.mkxl b/tex/context/base/mkxl/page-imp.mkxl
index b555ffab6..8271d7aad 100644
--- a/tex/context/base/mkxl/page-imp.mkxl
+++ b/tex/context/base/mkxl/page-imp.mkxl
@@ -169,6 +169,15 @@
\box\scratchbox
\endgroup}
+%D We just ignore \type {\shipout}.
+
+\pushoverloadmode
+
+\permanent\protected\def\shipout
+ {\begingroup\dowithnextboxcs\endgroup}
+
+\popoverloadmode
+
%D Also in normal \MKIV\ we nos use the indirect way so that we benefit from timing
%D and tracing.
diff --git a/tex/context/base/mkxl/spac-par.mkxl b/tex/context/base/mkxl/spac-par.mkxl
index f094e2807..d382a6c8c 100644
--- a/tex/context/base/mkxl/spac-par.mkxl
+++ b/tex/context/base/mkxl/spac-par.mkxl
@@ -448,7 +448,7 @@
{\unhbox\b_spac_postponed_data
\scratchdimen\wd\nextbox
\unhbox\nextbox
- \ifcase\scratchdimen\else\kern-\b_spac_postponed_data\fi}%
+ \ifcase\scratchdimen\else\kern-\scratchdimen\fi}%
\endgroup}
\def\spac_postponed_data_flush
diff --git a/tex/context/base/mkxl/strc-ref.lmt b/tex/context/base/mkxl/strc-ref.lmt
index 807305ce7..ddbb160ff 100644
--- a/tex/context/base/mkxl/strc-ref.lmt
+++ b/tex/context/base/mkxl/strc-ref.lmt
@@ -380,7 +380,7 @@ implement {
}
implement {
- name = "currentreferenceorder",
+ name = "getinternalorderreference",
public = true,
protected = true,
actions = { currentorder, context },
diff --git a/tex/context/base/mkxl/strc-ref.mklx b/tex/context/base/mkxl/strc-ref.mklx
index cbc4142da..d5e054962 100644
--- a/tex/context/base/mkxl/strc-ref.mklx
+++ b/tex/context/base/mkxl/strc-ref.mklx
@@ -78,7 +78,7 @@
\mutable\let\currentreferencekind \empty
\mutable\let\currentreferencelabels \empty
%mutable\let\currentreferencenumber \empty
-\mutable\let\currentreferenceorder \empty
+%mutable\let\currentreferenceorder \empty
%mutable\let\currentreferencepage \empty
%mutable\let\currentreferencerealpage \empty
%mutable\let\currentreferencetext \empty
@@ -990,6 +990,8 @@
\permanent\def\currentreferencetext {\clf_filterreference{text}}
%permanent\def\currentreferencedefault {\clf_filterreference{default}}
\permanent\def\currentreferencerealpage{\clf_filterreference{realpage}}
+\aliased \let\currentreferenceorder \getinternalorderreference
+
%D The most straightforward way of retrieving references is using \type {\ref}.
diff --git a/tex/context/base/mkxl/strc-reg.mkxl b/tex/context/base/mkxl/strc-reg.mkxl
index 17d8b6e78..22b1202db 100644
--- a/tex/context/base/mkxl/strc-reg.mkxl
+++ b/tex/context/base/mkxl/strc-reg.mkxl
@@ -168,6 +168,7 @@
\newconditional\c_strc_registers_defining
\setnewconstant\c_strc_registers_maxlevel \plusfive
+\newconditional\c_strc_registers_vertical \settrue\c_strc_registers_vertical
\ifdefined\Word \else \protected\def\Word#1{#1} \fi
@@ -800,7 +801,7 @@
\endgroup
\blank[\v!samepage]%
\registerparameter\c!after
- \par
+ \endgraf
\nobreak}
% b = <goodbreak> <before> <character> <after> <nobreak>
@@ -877,6 +878,68 @@
\newdimen\d_strc_registers_hangindent
\newcount\c_strc_registers_hangafter
+% \permanent\protected\def\usenestedregisterstyleandcolor#1#2% will change
+% {\useregisterstyleandcolor#1#2%
+% % how about style
+% \ifconditional\c_strc_registers_text_interaction
+% \ifempty\currentcolorparameter \else
+% \resetinteractionparameter\c!color
+% \resetinteractionparameter\c!contrastcolor
+% \fi
+% \fi}
+%
+% \permanent\protected\def\startregisterentries#1% depth
+% {\endgraf
+% \begingroup
+% \c_strc_register_level\ifnum#1>\c_strc_registers_maxlevel\c_strc_registers_maxlevel\else#1\fi\relax
+% \dostarttagged\t!registerentries\empty
+% % \let\savedcurrentregister\currentregister
+% \pushmacro\currentregister
+% \edef\currentregister{\currentregister:\number\c_strc_register_level}%
+% \usenestedregisterstyleandcolor\c!textstyle\c!textcolor
+% \ifnum\c_strc_register_level>\plusone
+% \advance\leftskip\d_strc_registers_distance\relax
+% \fi
+% \d_strc_registers_hangindent\registerparameter\c!distance\relax
+% \c_strc_registers_hangafter \plusone
+% \blank[\v!samepage]%
+% % \let\currentregister\savedcurrentregister}
+% \popmacro\currentregister}
+%
+% \permanent\protected\def\stopregisterentries
+% {\endgraf
+% \dostoptagged
+% \endgroup}
+
+%D See test suite \type {registers/horizontal-001.tex} for a more extensive example
+%D of horizontal:
+%D
+%D \stoptyping
+%D \defineregister
+%D [demo]
+%D [n=1,
+%D pagenumber=no,
+%D textalternative=horizontal,
+%D distance=0pt]
+%D
+%D \setupregister [demo] [2] [textstyle=bold,left={, }]
+%D \setupregister [demo] [3] [textstyle=italic,left={, }]
+%D
+%D \setregisterentry [demo] [entries:1={alpha}, entries:2={one}, entries:3={first}]
+%D \setregisterentry [demo] [entries:1={beta}, entries:2={two}, entries:3={last}]
+%D
+%D \starttext
+%D \starttitle[title=Demo]
+%D \placeregister[demo]
+%D \stoptitle
+%D \stoptext
+%D \stoptyping
+
+\appendtoks
+ \doifelse{\registerparameter\c!textalternative}\v!horizontal
+ \setfalse\settrue\c_strc_registers_vertical
+\to \everysetupregister
+
\permanent\protected\def\usenestedregisterstyleandcolor#1#2% will change
{\useregisterstyleandcolor#1#2%
% how about style
@@ -888,21 +951,24 @@
\fi}
\permanent\protected\def\startregisterentries#1% depth
- {\endgraf
+ {\ifconditional\c_strc_registers_vertical
+ \endgraf
+ \fi
\begingroup
\c_strc_register_level\ifnum#1>\c_strc_registers_maxlevel\c_strc_registers_maxlevel\else#1\fi\relax
\dostarttagged\t!registerentries\empty
-% \let\savedcurrentregister\currentregister
- \pushmacro\currentregister
+ \pushmacro\currentregister % bah
\edef\currentregister{\currentregister:\number\c_strc_register_level}%
+ \let\currentnestedregister\currentregister
\usenestedregisterstyleandcolor\c!textstyle\c!textcolor
\ifnum\c_strc_register_level>\plusone
\advance\leftskip\d_strc_registers_distance\relax
\fi
\d_strc_registers_hangindent\registerparameter\c!distance\relax
\c_strc_registers_hangafter \plusone
- \blank[\v!samepage]%
-% \let\currentregister\savedcurrentregister}
+ \ifconditional\c_strc_registers_vertical
+ \blank[\v!samepage]%
+ \fi
\popmacro\currentregister}
\permanent\protected\def\stopregisterentries
@@ -910,17 +976,40 @@
\dostoptagged
\endgroup}
+% \permanent\protected\def\startregisterentry#1% todo: level
+% {\typo_injectors_check_register
+% \begingroup
+% \dostarttagged\t!registerentry\empty
+% \global\setconstant\c_strc_registers_page_state\zerocount
+% \hangindent\d_strc_registers_hangindent
+% \hangafter \c_strc_registers_hangafter
+% \typo_injectors_mark_register}
+%
+% \permanent\protected\def\stopregisterentry
+% {\endgraf
+% \global\setconstant\c_strc_registers_page_state\zerocount
+% \dostoptagged
+% \endgroup}
+
\permanent\protected\def\startregisterentry#1% todo: level
{\typo_injectors_check_register
\begingroup
\dostarttagged\t!registerentry\empty
\global\setconstant\c_strc_registers_page_state\zerocount
- \hangindent\d_strc_registers_hangindent
- \hangafter \c_strc_registers_hangafter
+ \ifconditional\c_strc_registers_vertical
+ \hangindent\d_strc_registers_hangindent
+ \hangafter \c_strc_registers_hangafter
+ \else
+ \namedregisterparameter\currentnestedregister\c!left\relax
+ \fi
\typo_injectors_mark_register}
\permanent\protected\def\stopregisterentry
- {\endgraf
+ {\ifconditional\c_strc_registers_vertical
+ \endgraf
+ \else
+ \namedregisterparameter\currentnestedregister\c!right\relax
+ \fi
\global\setconstant\c_strc_registers_page_state\zerocount
\dostoptagged
\endgroup}
@@ -1292,3 +1381,190 @@
\stopcontextdefinitioncode
\protect \endinput
+
+% % maybe also more levels with [entries|keys|processors]:n
+% %
+% % \setregisterentry
+% % [index]
+% % [entries:1=one,
+% % entries:2=two,
+% % entries:3=three,
+% % entries:4=four]
+% %
+% % test \blank \placeregister[index][balance=no]
+%
+% \def\expanddetokenizedregistervalues#1#2%
+% {\edef\expandedregistervalue{\detokenizedregisterparameter{#1:#2}}%
+% \ifempty\expandedregistervalue\else
+% \letregisterparameter{#1:#2}\expandedregistervalue
+% \expandafter\expanddetokenizedregistervalues
+% \expandafter#1%
+% \expandafter{\the\numexpr#2+1}%
+% \fi}%
+%
+% \def\expandregistervalues#1#2%
+% {\edef\expandedregistervalue{\registerparameter{#1:#2}}%
+% \ifempty\expandedregistervalue\else
+% \letregisterparameter{#1:#2}\expandedregistervalue
+% \expandafter\expandregistervalues
+% \expandafter#1%
+% \expandafter{\the\numexpr#2+1}%
+% \fi}%
+%
+% % \def\injectregistervalues#1#2%
+% % {\beginlocalcontrol
+% % \edef\expandedregistervalue{\registerparameter{#1:\the\numexpr#2}}%
+% % \endlocalcontrol
+% % \ifempty\expandedregistervalue\else
+% % {\expandedregistervalue}%
+% % \injectregistervalues#1{#2+1}%
+% % \fi}%
+%
+% \def\injectregistervalues#1#2%
+% {\iftok{\registerparameter{#1:\the\numexpr#2}}\emptytoks\else
+% \expandafter{\lastnamedcs}%
+% \injectregistervalues#1{#2+1}%
+% \fi}%
+%
+% \def\strc_registers_register_page_expand_xml_entries
+% {\xmlstartraw
+% \beginlocalcontrol
+% \expandregistervalues\c!entries1%
+% \endlocalcontrol
+% \xmlstopraw
+% \glet\currentregistercoding\s!xml}
+%
+% \def\strc_registers_register_page_expand_yes_entries
+% {\beginlocalcontrol
+% \expandregistervalues\c!entries1%
+% \endlocalcontrol
+% \glet\currentregistercoding\s!tex}
+%
+% \def\strc_registers_register_page_expand_nop_entries
+% {\beginlocalcontrol
+% \expanddetokenizesregistervalues\c!entries1%
+% \endlocalcontrol
+% \glet\currentregistercoding\s!tex}
+%
+% \def\strc_registers_register_page_expand_nop_entries
+% {\beginlocalcontrol
+% \expandregistervalues\c!entries1%
+% \endlocalcontrol
+% \glet\currentregistercoding\s!tex}
+%
+% \def\strc_registers_register_page_expand_xml_keys
+% {\xmlstartraw
+% \beginlocalcontrol
+% \expandregistervalues\c!keys1%
+% \endlocalcontrol
+% \xmlstopraw}
+%
+% \def\strc_registers_register_page_expand_yes_keys
+% {\beginlocalcontrol
+% \expandregistervalues\c!keys1%
+% \endlocalcontrol}
+%
+% \def\strc_registers_register_page_expand_processors
+% {\beginlocalcontrol
+% \expandregistervalues\c!processors1%
+% \endlocalcontrol}
+%
+% \def\strc_registers_register_page_entry_indeed#1#2#3% register data userdata
+% {\begingroup
+% \edef\currentregister{#1}%
+% %\setupcurrentregister[\c!entries=,\c!label=,\c!keys=,\c!alternative=,#2]%
+% \setupcurrentregister[#2]%
+% \edef\currentregisterlabel {\registerparameter\c!label}%
+% \edef\currentregisterexpansion {\registerparameter\c!expansion}%
+% \edef\currentregisterownnumber {\registerparameter\c!ownnumber}%
+% \xdef\currentregisterkeys {\registerparameter\c!keys}%
+% \xdef\currentregisterentries {\registerparameter\c!entries}%
+% \xdef\currentregisterprocessors{\registerparameter\c!processors}%
+% \xdef\currentregisterxmlsetup {\registerparameter\c!xmlsetup}%
+% \ifempty\currentregisterentries
+% \ifx\currentregisterexpansion\s!xml
+% \strc_registers_register_page_expand_xml_entries
+% \orelse\ifx\currentregisterexpansion\v!yes
+% \strc_registers_register_page_expand_yes_entries
+% \else
+% \strc_registers_register_page_expand_nop_entries
+% \fi
+% \else
+% \ifx\currentregisterexpansion\s!xml
+% \strc_registers_register_page_expand_xml
+% \orelse\ifx\currentregisterexpansion\v!yes
+% \strc_registers_register_page_expand_yes
+% \else
+% \strc_registers_register_page_expand_nop
+% \fi
+% \fi
+% \ifempty\currentregisterkeys
+% \ifx\currentregistercoding\s!xml
+% \strc_registers_register_page_expand_xml_keys
+% \else
+% \strc_registers_register_page_expand_yes_keys
+% \fi
+% \fi
+% \strc_registers_register_page_expand_processors
+% \setnextinternalreference
+% % we could consider storing register entries in a list which we
+% % could then sort
+% \glet\currentregistername\currentregister
+% \xdef\currentregisternumber{\clf_storeregister % 'own' should not be in metadata
+% metadata {%
+% name {\currentregister}%
+% coding {\currentregistercoding}%
+% \ifx\currentregisterownnumber\v!yes
+% own {\registerparameter\c!alternative}% can be used instead of pagenumber
+% \fi
+% \ifx\currentreferencecoding\s!xml
+% xmlroot {\xmldocument} % only useful when text
+% \fi
+% \ifempty\currentregisterxmlsetup \else
+% xmlsetup {\currentregisterxmlsetup}%
+% \fi
+% }%
+% references {%
+% \ifempty\currentregisterlabel \else
+% label {\currentregisterlabel}%
+% \fi
+% % view {\interactionparameter\c!focus}%
+% }%
+% entries {%
+% % we need a special one for xml, this is just a single one
+% \ifempty\currentregisterentries
+% entries {\injectregistervalues\c!entries1}%
+% \else
+% entry {\currentregisterentries}%
+% \fi
+% \ifempty\currentregisterkeys
+% keys {\injectregistervalues\c!keys1}%
+% \else
+% key {\currentregisterkeys}%
+% \fi
+% \ifempty\currentregisterprocessors
+% processors {\injectregistervalues\c!processors1}%
+% \else
+% processor {\currentregisterprocessors}%
+% \fi
+% }%
+% userdata {\detokenize\expandafter{\normalexpanded{#3}}}
+% }%
+% \clf_setinternalreference
+% internal \locationcount
+% view {\interactionparameter\c!focus}%
+% \relax % this will change
+% \ifx\currentregisterownnumber\v!yes
+% \glet\currentregistersynchronize\relax
+% \else
+% \xdef\currentregistersynchronize{\clf_deferredenhanceregister{\currentregister}\number\currentregisternumber}%
+% \fi
+% \currentregistersynchronize % here?
+% % needs thinking ... bla\index{bla}. will break before the . but adding a
+% % penalty is also no solution
+% \dostarttagged\t!registerlocation\currentregister
+% \c_attr_destination\lastdestinationattribute
+% \signalcharacter % no \strut as it will be removed during cleanup
+% \dotagregisterlocation
+% \dostoptagged
+% \endgroup}
diff --git a/tex/context/base/mkxl/syst-ini.mkxl b/tex/context/base/mkxl/syst-ini.mkxl
index 11b7c1262..8a446277a 100644
--- a/tex/context/base/mkxl/syst-ini.mkxl
+++ b/tex/context/base/mkxl/syst-ini.mkxl
@@ -591,6 +591,10 @@
\immutable\integerdef\maxcard 65536 % pdftex has less mathchars
\immutable\integerdef\maxcardminusone 65535
+\immutable\integerdef\binaryshiftedten 1024
+\immutable\integerdef\binaryshiftedtwenty 1048576
+\immutable\integerdef\binaryshiftedthirty 1073741824
+
%D \macros
%D {doubleexpandafter,tripleexpandafter,expanded,startexpanded}
%D
diff --git a/tex/context/base/mkxl/tabl-tbl.mkxl b/tex/context/base/mkxl/tabl-tbl.mkxl
index 0b6669d4e..e329da268 100644
--- a/tex/context/base/mkxl/tabl-tbl.mkxl
+++ b/tex/context/base/mkxl/tabl-tbl.mkxl
@@ -917,7 +917,7 @@
\let\tabl_tabulate_check_linenumbers\relax
-\def\tabl_tabulate_splitoff_box
+\def\tabl_tabulate_splitoff_box % maybe use the modern splitter
{\dontcomplain
\global\setbox\b_tabl_tabulate\vsplit\b_tabl_tabulate_current\c_tabl_tabulate_column to \lineheight % % % global ? % % %
\setbox\b_tabl_tabulate\vbox
@@ -1808,6 +1808,7 @@
%D Beware, we cannot use \type {\protected} on \type {\HL} cum suis, since \TEX's
%D hard coded noalign lookahead fails on it! I mistakenly added this for a while.
+%D Well, this is no longer true in \LMTX.
\defcsname\??tabulatealigning\v!normal\endcsname{0}
\defcsname\??tabulatealigning\v!right \endcsname{1}
@@ -2453,6 +2454,8 @@
% \NC test \NC \input tufte \relax \NC \NR
% \stoptabulate
+% todo: use the more modern line getter
+
\def\tabl_split_box#1% #1 <> 0/2 / derived from the one in core-ntb.tex
{\ifinsidesplitfloat
\tabl_split_box_indeed#1%
diff --git a/tex/context/base/mkxl/trac-vis.lmt b/tex/context/base/mkxl/trac-vis.lmt
index 59d9a01f6..7f9341722 100644
--- a/tex/context/base/mkxl/trac-vis.lmt
+++ b/tex/context/base/mkxl/trac-vis.lmt
@@ -159,8 +159,7 @@ local preset_makeup = preset_boxes
local preset_all = preset_makeup
+ modes.fontkern + modes.marginkern + modes.mathkern
+ modes.whatsit + modes.glyph + modes.user + modes.math
- + modes.dir + modes.whatsit + modes.mathglue
- + modes.mark + modes.insert
+ + modes.dir + modes.mathglue + modes.mark + modes.insert
function visualizers.setfont(id)
usedfont = id or current_font()
diff --git a/tex/context/fonts/mkiv/euler-math.lfg b/tex/context/fonts/mkiv/euler-math.lfg
index da7647c53..77b144754 100644
--- a/tex/context/fonts/mkiv/euler-math.lfg
+++ b/tex/context/fonts/mkiv/euler-math.lfg
@@ -6,18 +6,22 @@ return {
comment = "Goodies that complement euler math.",
author = "Hans Hagen",
copyright = "ConTeXt development team",
- mathematics = {
- -- virtuals = {
- -- ["euler-nova"] = {
- -- { name = "texgyrepagella-math.otf", main = true, parameters = true },
- -- { name = "euler.otf", overlay = true }, -- first = 0x1234, last = 0x1256
- --
- -- -- { name = "euler.otf", main = true, parameters = true },
- -- -- { name = "texgyrepagella-math.otf", overlay = true },
- --
- -- },
- -- }
- }
+
+ mathematics = {
+ tweaks = {
+ aftercopying = {
+ {
+ tweak = "fixprimes",
+ factor = 0.9,
+ smaller = true,
+ scale = 0.60,
+ fake = 0.75,
+ },
+ },
+ },
+ },
+
+
}
diff --git a/tex/context/fonts/mkiv/type-imp-euler.mkiv b/tex/context/fonts/mkiv/type-imp-euler.mkiv
index 64961830c..6c2266579 100644
--- a/tex/context/fonts/mkiv/type-imp-euler.mkiv
+++ b/tex/context/fonts/mkiv/type-imp-euler.mkiv
@@ -49,7 +49,7 @@
\starttypescript [\s!math] [eulernova] [\s!name]
% \loadfontgoodies[euler-math]
- \definefontsynonym [MathRoman] [\s!file:euler.otf] [\s!features={\s!math\mathsizesuffix,mathextra}]
+ \definefontsynonym [MathRoman] [\s!file:euler.otf] [\s!features={\s!math\mathsizesuffix,mathextra},\s!goodies=euler-math]
\stoptypescript
\starttypescript [pagella-eulernova]
diff --git a/tex/context/interface/mkii/keys-en.xml b/tex/context/interface/mkii/keys-en.xml
index 06da1c646..9f4fbcbc0 100644
--- a/tex/context/interface/mkii/keys-en.xml
+++ b/tex/context/interface/mkii/keys-en.xml
@@ -1288,6 +1288,7 @@
<cd:constant name='tab' value='tab'/>
<cd:constant name='text' value='text'/>
<cd:constant name='textalign' value='textalign'/>
+ <cd:constant name='textalternative' value='textalternative'/>
<cd:constant name='textcolor' value='textcolor'/>
<cd:constant name='textcommand' value='textcommand'/>
<cd:constant name='textdistance' value='textdistance'/>
diff --git a/tex/context/interface/mkii/keys-nl.xml b/tex/context/interface/mkii/keys-nl.xml
index 86a5622e8..3ce73abf3 100644
--- a/tex/context/interface/mkii/keys-nl.xml
+++ b/tex/context/interface/mkii/keys-nl.xml
@@ -318,6 +318,7 @@
<cd:variable name='lefthanging' value='linkshangend'/>
<cd:variable name='leftmargin' value='linkermarge'/>
<cd:variable name='leftpage' value='linkerpagina'/>
+ <cd:variable name='lefttext' value='linkertekst'/>
<cd:variable name='lefttoright' value='lefttoright'/>
<cd:variable name='legend' value='legenda'/>
<cd:variable name='less' value='minder'/>
@@ -479,6 +480,7 @@
<cd:variable name='righthanging' value='rechtshangend'/>
<cd:variable name='rightmargin' value='rechtermarge'/>
<cd:variable name='rightpage' value='rechterpagina'/>
+ <cd:variable name='righttext' value='rechtertekst'/>
<cd:variable name='righttoleft' value='righttoleft'/>
<cd:variable name='roman' value='romaan'/>
<cd:variable name='romannumerals' value='romeins'/>
@@ -1286,6 +1288,7 @@
<cd:constant name='tab' value='tab'/>
<cd:constant name='text' value='tekst'/>
<cd:constant name='textalign' value='textalign'/>
+ <cd:constant name='textalternative' value='tekstvariant'/>
<cd:constant name='textcolor' value='tekstkleur'/>
<cd:constant name='textcommand' value='tekstcommando'/>
<cd:constant name='textdistance' value='tekstafstand'/>
diff --git a/tex/context/interface/mkiv/context-en.xml b/tex/context/interface/mkiv/context-en.xml
index 476e8ee62..996ca4f05 100644
--- a/tex/context/interface/mkiv/context-en.xml
+++ b/tex/context/interface/mkiv/context-en.xml
@@ -48614,7 +48614,7 @@
<cd:content/>
</cd:arguments>
</cd:command>
- <cd:command category="boxes" file="trc-vis.mkiv" level="document" name="showmakeup">
+ <cd:command category="boxes" file="trc-vis.mkxl" level="document" name="showmakeup">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant default="yes" type="makeup"/>
@@ -48624,26 +48624,30 @@
<cd:constant type="hbox"/>
<cd:constant type="vbox"/>
<cd:constant type="vtop"/>
+ <cd:constant type="origin"/>
<cd:constant type="kern"/>
<cd:constant type="glue"/>
<cd:constant type="penalty"/>
- <cd:constant type="fontkern"/>
- <cd:constant type="strut"/>
- <cd:constant type="whatsit"/>
<cd:constant type="glyph"/>
- <cd:constant type="simple"/>
- <cd:constant type="simplehbox"/>
- <cd:constant type="simplevbox"/>
- <cd:constant type="simplevtop"/>
- <cd:constant type="user"/>
- <cd:constant type="math"/>
- <cd:constant type="italic"/>
- <cd:constant type="origin"/>
<cd:constant type="discretionary"/>
+ <cd:constant type="italic"/>
<cd:constant type="expansion"/>
+ <cd:constant type="fontkern"/>
+ <cd:constant type="marginkern"/>
+ <cd:constant type="par"/>
+ <cd:constant type="dir"/>
<cd:constant type="line"/>
+ <cd:constant type="strut"/>
<cd:constant type="space"/>
<cd:constant type="depth"/>
+ <cd:constant type="insert"/>
+ <cd:constant type="mark"/>
+ <cd:constant type="math"/>
+ <cd:constant type="mathglue"/>
+ <cd:constant type="mathkern"/>
+ <cd:constant type="mathshapekern"/>
+ <cd:constant type="user"/>
+ <cd:constant type="whatsit"/>
</cd:keywords>
</cd:arguments>
</cd:command>
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 552b8f5eb..ee5d4853c 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index 654cbb8de..1160ae482 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-visualizer.xml b/tex/context/interface/mkiv/i-visualizer.xml
index 817cdb383..c6b196910 100644
--- a/tex/context/interface/mkiv/i-visualizer.xml
+++ b/tex/context/interface/mkiv/i-visualizer.xml
@@ -108,7 +108,8 @@
</cd:arguments>
</cd:command>
- <cd:command name="showmakeup" level="document" category="boxes" file="trc-vis.mkiv">
+ <!-- file="trc-vis.mkiv"-->
+ <cd:command name="showmakeup" level="document" category="boxes" file="trc-vis.mkxl">
<cd:arguments>
<cd:keywords optional="yes">
<cd:constant type="makeup" default="yes"/>
@@ -118,26 +119,30 @@
<cd:constant type="hbox"/>
<cd:constant type="vbox"/>
<cd:constant type="vtop"/>
+ <cd:constant type="origin"/>
<cd:constant type="kern"/>
<cd:constant type="glue"/>
<cd:constant type="penalty"/>
- <cd:constant type="fontkern"/>
- <cd:constant type="strut"/>
- <cd:constant type="whatsit"/>
<cd:constant type="glyph"/>
- <cd:constant type="simple"/>
- <cd:constant type="simplehbox"/>
- <cd:constant type="simplevbox"/>
- <cd:constant type="simplevtop"/>
- <cd:constant type="user"/>
- <cd:constant type="math"/>
- <cd:constant type="italic"/>
- <cd:constant type="origin"/>
<cd:constant type="discretionary"/>
+ <cd:constant type="italic"/>
<cd:constant type="expansion"/>
+ <cd:constant type="fontkern"/>
+ <cd:constant type="marginkern"/>
+ <cd:constant type="par"/>
+ <cd:constant type="dir"/>
<cd:constant type="line"/>
+ <cd:constant type="strut"/>
<cd:constant type="space"/>
<cd:constant type="depth"/>
+ <cd:constant type="insert"/>
+ <cd:constant type="mark"/>
+ <cd:constant type="math"/>
+ <cd:constant type="mathglue"/>
+ <cd:constant type="mathkern"/>
+ <cd:constant type="mathshapekern"/>
+ <cd:constant type="user"/>
+ <cd:constant type="whatsit"/>
</cd:keywords>
</cd:arguments>
</cd:command>
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 56f05f2d9..7ac66bfc7 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-26 10:41
+-- merge date : 2021-11-30 19:43
do -- begin closure to overcome local limits and interference