summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-01-08 00:40:23 +0200
committerMarius <mariausol@gmail.com>2013-01-08 00:40:23 +0200
commit1cf7d62e4c6bdb5cac3ead4dc8ccd387c1eef194 (patch)
tree24b5071d5be82962fac4da7ce3957222955e3013 /tex
parent250316e74df7a2fe9544318ed39fd2f6621e8dbb (diff)
downloadcontext-1cf7d62e4c6bdb5cac3ead4dc8ccd387c1eef194.tar.gz
beta 2013.01.07 23:25
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/buff-ini.mkiv6
-rw-r--r--tex/context/base/char-def.lua16
-rw-r--r--tex/context/base/chem-str.mkiv17
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context-version.pdfbin4137 -> 4120 bytes
-rw-r--r--tex/context/base/context-version.pngbin39751 -> 40067 bytes
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/font-mis.lua2
-rw-r--r--tex/context/base/font-otf.lua2
-rw-r--r--tex/context/base/m-chart.lua20
-rw-r--r--tex/context/base/math-act.lua94
-rw-r--r--tex/context/base/math-arr.mkiv6
-rw-r--r--tex/context/base/math-fbk.lua2
-rw-r--r--tex/context/base/math-ini.lua21
-rw-r--r--tex/context/base/math-ini.mkiv5
-rw-r--r--tex/context/base/math-stc.mkvi766
-rw-r--r--tex/context/base/math-ttv.lua4
-rw-r--r--tex/context/base/math-vfu.lua120
-rw-r--r--tex/context/base/mult-de.mkii4
-rw-r--r--tex/context/base/mult-def.lua16
-rw-r--r--tex/context/base/mult-en.mkii4
-rw-r--r--tex/context/base/mult-fr.mkii4
-rw-r--r--tex/context/base/mult-it.mkii4
-rw-r--r--tex/context/base/mult-low.lua4
-rw-r--r--tex/context/base/mult-nl.mkii4
-rw-r--r--tex/context/base/mult-pe.mkii4
-rw-r--r--tex/context/base/mult-ro.mkii4
-rw-r--r--tex/context/base/node-bck.lua12
-rw-r--r--tex/context/base/spac-ver.mkiv8
-rw-r--r--tex/context/base/status-files.pdfbin24711 -> 24781 bytes
-rw-r--r--tex/context/base/status-lua.pdfbin208419 -> 208038 bytes
-rw-r--r--tex/context/base/strc-lst.lua6
-rw-r--r--tex/context/base/strc-ref.lua12
-rw-r--r--tex/context/base/strc-ref.mkvi1
-rw-r--r--tex/context/base/syst-aux.mkiv4
-rw-r--r--tex/context/base/syst-ini.mkiv2
-rw-r--r--tex/context/base/trac-vis.mkiv2
-rw-r--r--tex/context/interface/keys-cs.xml4
-rw-r--r--tex/context/interface/keys-de.xml4
-rw-r--r--tex/context/interface/keys-en.xml4
-rw-r--r--tex/context/interface/keys-fr.xml4
-rw-r--r--tex/context/interface/keys-it.xml4
-rw-r--r--tex/context/interface/keys-nl.xml4
-rw-r--r--tex/context/interface/keys-pe.xml4
-rw-r--r--tex/context/interface/keys-ro.xml4
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua4
48 files changed, 1098 insertions, 122 deletions
diff --git a/tex/context/base/buff-ini.mkiv b/tex/context/base/buff-ini.mkiv
index 8160fa613..7616a1dee 100644
--- a/tex/context/base/buff-ini.mkiv
+++ b/tex/context/base/buff-ini.mkiv
@@ -34,9 +34,9 @@
\setuvalue{\e!start\v!buffer}%
{\begingroup % (3)
\obeylines
- \dosingleempty\buff_start}
+ \dodoubleempty\buff_start}
-\def\buff_start[#1]%
+\def\buff_start[#1][#2]%
{\buff_start_indeed{}{#1}{\e!start\v!buffer}{\e!stop\v!buffer}}
\def\buff_start_indeed#1#2#3#4% \donothing needed !
@@ -182,7 +182,7 @@
{\begingroup
\doifassignmentelse{#1}
{\setupcurrentsavebuffer[#1]}%
- {\setupcurrentsavebuffer[\c!list=#1,\c!file=#2]}%
+ {\setupcurrentsavebuffer[\c!list={#1},\c!file=#2]}%
\ctxcommand{savebuffer("\directsavebufferparameter\c!list","\directsavebufferparameter\c!file","\directsavebufferparameter\c!prefix")}%
\endgroup}
diff --git a/tex/context/base/char-def.lua b/tex/context/base/char-def.lua
index 29a325697..60e445ea9 100644
--- a/tex/context/base/char-def.lua
+++ b/tex/context/base/char-def.lua
@@ -3192,8 +3192,6 @@ characters.data={
description="LATIN SMALL LETTER H WITH STROKE",
direction="l",
linebreak="al",
- mathclass="ord",
- mathname="hbar",
shcode=0x0068,
uccode=0x0126,
unicodeslot=0x0127,
@@ -58119,8 +58117,16 @@ characters.data={
description="PLANCK CONSTANT OVER TWO PI",
direction="l",
linebreak="al",
- mathclass="variable",
- mathname="hslash",
+ mathspec={
+ {
+ class="variable",
+ name="hslash",
+ },
+ {
+ class="ord",
+ name="hbar",
+ },
+ },
specials={ "font", 0x0127 },
unicodeslot=0x210F,
},
@@ -187663,4 +187669,4 @@ characters.data={
linebreak="cm",
unicodeslot=0xE01EF,
},
-} \ No newline at end of file
+}
diff --git a/tex/context/base/chem-str.mkiv b/tex/context/base/chem-str.mkiv
index cb840ed80..efd1e6547 100644
--- a/tex/context/base/chem-str.mkiv
+++ b/tex/context/base/chem-str.mkiv
@@ -593,23 +593,6 @@
\unexpanded\def\formulachemical
{\relax\dotriplegroupempty\chem_formula}
-% \def\chem_formula#1#2#3% we could do hboxes and measure
-% {\ifcsname\??chemicalsymbol\detokenize{#1}\endcsname
-% \t_chem_mid\expandafter{\the\t_chem_mid\chem_formula_mid{#1}{#2}{#3}}%
-% \else
-% \ifthirdargument
-% \doifelsenothing{#2}\chem_formula_top_nop{\chem_formula_top_yes{#2}}%
-% \doifelsenothing{#3}\chem_formula_bot_nop{\chem_formula_bot_yes{#3}}%
-% \else\ifsecondargument
-% \chem_formula_top_nop
-% \doifelsenothing{#2}\chem_formula_bot_nop{\chem_formula_bot_yes{#2}}%
-% \else
-% \chem_formula_top_nop
-% \chem_formula_bot_nop
-% \fi\fi
-% \t_chem_mid\expandafter{\the\t_chem_mid\molecule{#1}\aligntab}%
-% \fi}
-
\def\chem_formula#1#2#3% we could do hboxes and measure
{\ifthirdargument
\doifelsenothing{#2}\chem_formula_top_nop{\chem_formula_top_yes{#2}}%
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 1c7abf47e..945da783e 100644
--- a/tex/context/base/cont-new.mkii
+++ b/tex/context/base/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2013.01.02 18:19}
+\newcontextversion{2013.01.07 23:25}
%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/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 612d225e2..73f67a61e 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2013.01.02 18:19}
+\newcontextversion{2013.01.07 23:25}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index db3542344..42db0bec5 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/context-version.png b/tex/context/base/context-version.png
index db1256efe..c7091dca5 100644
--- a/tex/context/base/context-version.png
+++ b/tex/context/base/context-version.png
Binary files differ
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index f052759f8..3cd9c6955 100644
--- a/tex/context/base/context.mkii
+++ b/tex/context/base/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.01.02 18:19}
+\edef\contextversion{2013.01.07 23:25}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 8b3bed1c1..8948430cd 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -25,7 +25,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2013.01.02 18:19}
+\edef\contextversion{2013.01.07 23:25}
%D For those who want to use this:
diff --git a/tex/context/base/font-mis.lua b/tex/context/base/font-mis.lua
index c0ee7dec4..c103d57d5 100644
--- a/tex/context/base/font-mis.lua
+++ b/tex/context/base/font-mis.lua
@@ -22,7 +22,7 @@ local handlers = fonts.handlers
handlers.otf = handlers.otf or { }
local otf = handlers.otf
-otf.version = otf.version or 2.737
+otf.version = otf.version or 2.738
otf.cache = otf.cache or containers.define("fonts", "otf", otf.version, true)
function otf.loadcached(filename,format,sub)
diff --git a/tex/context/base/font-otf.lua b/tex/context/base/font-otf.lua
index 8e9930a54..4d0828209 100644
--- a/tex/context/base/font-otf.lua
+++ b/tex/context/base/font-otf.lua
@@ -47,7 +47,7 @@ local otf = fonts.handlers.otf
otf.glists = { "gsub", "gpos" }
-otf.version = 2.737 -- beware: also sync font-mis.lua
+otf.version = 2.738 -- beware: also sync font-mis.lua
otf.cache = containers.define("fonts", "otf", otf.version, true)
local fontdata = fonts.hashes.identifiers
diff --git a/tex/context/base/m-chart.lua b/tex/context/base/m-chart.lua
index a00f246a9..a5201fc98 100644
--- a/tex/context/base/m-chart.lua
+++ b/tex/context/base/m-chart.lua
@@ -36,10 +36,10 @@ local defaults = {
name = "",
option = "",
backgroundcolor = "",
- width = 100*65436,
- height = 50*65436,
- dx = 30*65436,
- dy = 30*65436,
+ width = 100*65536,
+ height = 50*65536,
+ dx = 30*65536,
+ dy = 30*65536,
offset = 0,
bodyfont = "",
dot = "",
@@ -47,25 +47,25 @@ local defaults = {
vcompact = variables_no,
autofocus = "",
focus = "",
- labeloffset = 5*65436,
- commentoffset = 5*65436,
+ labeloffset = 5*65536,
+ commentoffset = 5*65536,
exitoffset = 0,
},
shape = { -- FLOS
- rulethickness = 65436,
+ rulethickness = 65536,
default = "",
framecolor = "darkblue",
backgroundcolor = "lightgray",
},
focus = { -- FLOF
- rulethickness = 65436,
+ rulethickness = 65536,
framecolor = "darkred",
backgroundcolor = "gray",
},
line = { -- FLOL
- rulethickness = 65436,
- radius = 10*65436,
+ rulethickness = 65536,
+ radius = 10*65536,
color = "darkgreen",
corner = "",
dash = "",
diff --git a/tex/context/base/math-act.lua b/tex/context/base/math-act.lua
index 71b9353d5..eaeb15656 100644
--- a/tex/context/base/math-act.lua
+++ b/tex/context/base/math-act.lua
@@ -14,6 +14,8 @@ local report_math = logs.reporter("mathematics","initializing")
local context = context
local commands = commands
local mathematics = mathematics
+local texdimen = tex.dimen
+local abs = math.abs
local sequencers = utilities.sequencers
local appendgroup = sequencers.appendgroup
@@ -216,45 +218,101 @@ local fontcharacters = fonts.hashes.characters
local extensibles = utilities.storage.allocate()
fonts.hashes.extensibles = extensibles
+local chardata = characters.data
+local extensibles = mathematics.extensibles
+
+-- we use numbers at the tex end (otherwise we could stick to chars)
+
+local e_left = extensibles.left
+local e_right = extensibles.right
+local e_horizontal = extensibles.horizontal
+local e_vertical = extensibles.vertical
+local e_mixed = extensibles.mixed
+local e_unknown = extensibles.unknown
+
+local unknown = { e_unknown, false, false }
+
local function extensiblecode(font,unicode)
local characters = fontcharacters[font]
- local chardata = characters[unicode]
- if not chardata then
- return 0
+ local character = characters[unicode]
+ if not character then
+ return unknown
end
- local next = chardata.next
+ local code = unicode
+ local next = character.next
while next do
- chardata = characters[next]
- next = chardata.next
+ code = next
+ character = characters[next]
+ next = character.next
end
- if chardata.horiz_variants then
- if chardata.vert_variants then
- return 4
+ local char = chardata[unicode]
+ local matharrow = char and char.matharrow
+ if character.horiz_variants then
+ if character.vert_variants then
+ return { e_mixed, code, character }
else
- return 1
+ local e = matharrow and extensibles[matharrow]
+ return e and { e, code, character } or unknown
end
- elseif chardata.vert_variants then
- return 2
+ elseif character.vert_variants then
+ local e = matharrow and extensibles[matharrow]
+ return e and { e, code, character } or unknown
else
- return 0
+ return unknown
end
end
setmetatableindex(extensibles,function(extensibles,font)
local codes = { }
setmetatableindex(codes, function(codes,unicode)
- local code = extensiblecode(font,unicode)
- codes[unicode] = code
- return code
+ local status = extensiblecode(font,unicode)
+ codes[unicode] = status
+ return status
end)
extensibles[font] = codes
return codes
end)
function mathematics.extensiblecode(family,unicode)
- return extensibles[family_font(family or 0)][unicode]
+ return extensibles[family_font(family or 0)][unicode][1]
end
function commands.extensiblecode(family,unicode)
- context(extensibles[family_font(family or 0)][unicode])
+ context(extensibles[family_font(family or 0)][unicode][1])
+end
+
+-- left : [head] ...
+-- right : ... [head]
+-- horizontal : [head] ... [head]
+--
+-- abs(right["start"] - right["end"]) | right.advance | characters[right.glyph].width
+
+function commands.horizontalcode(family,unicode)
+ local font = family_font(family or 0)
+ local data = extensibles[font][unicode]
+ local kind = data[1]
+ if kind == e_left then
+ local charlist = data[3].horiz_variants
+ local characters = fontcharacters[font]
+ local left = charlist[1]
+ texdimen.scratchleftoffset = abs((left["start"] or 0) - (left["end"] or 0))
+ texdimen.scratchrightoffset = 0
+ elseif kind == e_right then
+ local charlist = data[3].horiz_variants
+ local characters = fontcharacters[font]
+ local right = charlist[#charlist]
+ texdimen.scratchleftoffset = 0
+ texdimen.scratchrightoffset = abs((right["start"] or 0) - (right["end"] or 0))
+ elseif kind == e_horizontal then
+ local charlist = data[3].horiz_variants
+ local characters = fontcharacters[font]
+ local left = charlist[1]
+ local right = charlist[#charlist]
+ texdimen.scratchleftoffset = abs((left["start"] or 0) - (left["end"] or 0))
+ texdimen.scratchrightoffset = abs((right["start"] or 0) - (right["end"] or 0))
+ else
+ texdimen.scratchleftoffset = 0
+ texdimen.scratchrightoffset = 0
+ end
+ context(kind)
end
diff --git a/tex/context/base/math-arr.mkiv b/tex/context/base/math-arr.mkiv
index 179e4de8a..e0ef6095e 100644
--- a/tex/context/base/math-arr.mkiv
+++ b/tex/context/base/math-arr.mkiv
@@ -215,13 +215,13 @@
{\setuvalue{#1}{\math_arrows_do[#2][#3]}}
\unexpanded\def\math_arrows_do
- {\dotripleempty\math_arrows_handle}
+ {\doquadrupleempty\math_arrows_handle}
-\def\math_arrows_handle[#1][#2][#3]% #3 == optional arg .. \empty can be just 'empty'
+\def\math_arrows_handle[#1][#2][#3][#4]% #3 == optional arg .. \empty can be just 'empty' [#4] gobbles spaces
{\def\math_arrows_handle_indeed{\math_arrows_handle_finalize[#1,\empty,\empty][#2,\empty,\empty][#3]}% {##1}{##2}
\dodoublegroupempty\math_arrows_handle_indeed}
-\def\math_arrows_handle_finalize[#1,#2,#3][#4,#5,#6][#7]#8#9% [3] is the optional arg
+\def\math_arrows_handle_finalize[#1,#2,#3][#4,#5,#6][#7]#8#9% [#7] is the optional arg
{\edef\!!stringa{#2}%
\ifx\!!stringa\empty
\ifsecondargument
diff --git a/tex/context/base/math-fbk.lua b/tex/context/base/math-fbk.lua
index 826f50f7c..565bead1d 100644
--- a/tex/context/base/math-fbk.lua
+++ b/tex/context/base/math-fbk.lua
@@ -267,7 +267,7 @@ virtualcharacters[0xFE350] = function(data)
end
virtualcharacters[0xFE351] = function(data)
- -- return combined(data,0x2212,0x2212) -- relbar, relbar
+ -- return combined(data,0x2212,0x2212) -- relbar, relbar (isn't that just equal)
local char = data.characters[0x2212]
if char then
local size = data.size/2
diff --git a/tex/context/base/math-ini.lua b/tex/context/base/math-ini.lua
index af9a8495e..22a079337 100644
--- a/tex/context/base/math-ini.lua
+++ b/tex/context/base/math-ini.lua
@@ -85,17 +85,20 @@ local codes = allocate {
variable = 7, [7] = "variable",
}
-local arrowtypes = allocate {
- l = "left",
- r = "right",
- u = "up",
- d = "down",
- h = "horizontal", -- double : lr or rl
- v = "vertical", -- double : ud or du
- m = "mixed",
+local extensibles = allocate {
+ unknown = 0,
+ l = 1, left = 1,
+ r = 2, right = 2,
+ h = 3, horizontal = 3,-- lr or rl
+ u = 5, up = 4,
+ d = 5, down = 5,
+ v = 6, vertical = 6,-- ud or du
+ m = 7, mixed = 7,
}
-mathematics.arrowtypes = arrowtypes
+table.setmetatableindex(extensibles,function(t,k) t[k] = 0 return 0 end)
+
+mathematics.extensibles = extensibles
mathematics.classes = classes
mathematics.codes = codes
-----------.accents = codes
diff --git a/tex/context/base/math-ini.mkiv b/tex/context/base/math-ini.mkiv
index a1f747a79..8c5b59356 100644
--- a/tex/context/base/math-ini.mkiv
+++ b/tex/context/base/math-ini.mkiv
@@ -1312,7 +1312,10 @@
% \def\mathextensiblecode#1#2%
% {\cldcontext{mathematics.extensiblecode(\number#1,\number#2)}}
-\def\mathextensiblecode#1#2% should be a primitive
+\def\mathextensiblecode#1#2%
{\ctxcommand{extensiblecode(\number#1,\number#2)}}
+\def\mathhorizontalcode#1#2%
+ {\ctxcommand{horizontalcode(\number#1,\number#2)}}
+
\protect \endinput
diff --git a/tex/context/base/math-stc.mkvi b/tex/context/base/math-stc.mkvi
new file mode 100644
index 000000000..4760c4b3c
--- /dev/null
+++ b/tex/context/base/math-stc.mkvi
@@ -0,0 +1,766 @@
+%D \module
+%D [ file=math-stc,
+%D version=2012.12.29,
+%D title=\CONTEXT\ Math Macros,
+%D subtitle=Stackers,
+%D comment=This replaces math-arr and friends,
+%D author=Hans Hagen,
+%D date=\currentdate,
+%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
+%C
+%C This module is part of the \CONTEXT\ macro||package and is
+%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
+%C details.
+
+\writestatus{loading}{ConTeXt Math Macros / Stackers}
+
+\unprotect
+
+%D At some point the \MKII\ arrow mechanism has been converted to \MKIV, but we kept
+%D most of the logic. We now have a more generic variant dealing with extensibles.
+%D There are a few demands than we need to meet:
+%D
+%D \startitemize
+%D \startitem The width of the extensible need to adapt itself automatically. \stopitem
+%D \startitem We need to be able to control horizontal and vertical offsets. \stopitem
+%D \startitem We best have a math as well as a text variant (which is handy for chemistry). \stopitem
+%D \startitem For historic reasons we need to deal with optional arguments in a special (reverse) way. \stopitem
+%D \startitem We need alternatives for extensibles on top, in the middle and at the bottom. \stopitem
+%D \stopitemize
+%D
+%D After I had experimented a bit with virtual characters for two headed arrows I
+%D discussed the issue with the Gyre folks and we came to the conclusion that it
+%D made sense to have real extensibles instead of constructing them out of snippets.
+%D After all, \OPENTYPE\ math provides for it. So, in December 2013 beta versions of
+%D Latin Modern and Gyre fonts came available that had these! Because we still want
+%D to support the traditional Latin Modern Virtual math font those were extended
+%D with a couple of virtual extensibles as well.
+%D
+%D {\em For the moment we still have some mess here: we can deal with known dimensions, but
+%D fillers (like \type {\rightarrowfil} don't work with \OPENTYPE\ extensibles yet
+%D because there is no way to let them stretch like leaders. At some point \LUATEX\
+%D might provide a auto||fit||to||encapsulated||box and if not I will cook up a \LUA\
+%D based variant.}
+%D
+%D We could mess with something like \type {$mid\limits^{top}_{bottom}$} but we like
+%D a bit more control. At some point we need to add some hacks to get exports
+%D working well.
+%D
+%D In the end we have a more flexible mechanism which also handles text variants.
+
+% possible improvements:
+%
+% - we could skip the left/right offsets when offset=normal, this saves some access time
+% at the lua end and some checking: use \mathhorizontalcode or \mathextensiblecode
+% but in practice arrows etc are not used that often
+
+\installcorenamespace {mathextensiblefallbacks}
+
+\def\math_stackers_fallback
+ {\hbox to \scratchwidth{\csname\??mathextensiblefallbacks\ifcsname\??mathextensiblefallbacks\number\scratchunicode\endcsname\number\scratchunicode\fi\endcsname}}
+ %{\csname\??mathextensiblefallbacks\ifcsname\??mathextensiblefallbacks\number\scratchunicode\endcsname\number\scratchunicode\fi\endcsname }
+
+\def\math_stackers_regular
+ {\mathstylehbox{\Umathaccent\fam\zerocount\scratchunicode{\hskip\scratchwidth}}}
+
+\def\math_stackers_stretch % we don't have that one yet
+ {\mathstylehbox{\Umathaccent\fam\zerocount\scratchunicode{\hskip\hsize}}}
+
+\setvalue{\??mathextensiblefallbacks}{\hbox{\vrule\!!width\scratchwidth\!!height.1\exheight\!!depth\zeropoint}}
+
+\def\math_stackers_with_fallback#codepoint%
+ {\begingroup
+ \scratchunicode#codepoint\relax
+ \ifcase\mathextensiblecode\fam\scratchunicode\relax
+ \math_stackers_fallback
+ \else
+ \math_stackers_stretch
+ \fi
+ \endgroup}
+
+%D We don't really need this because we can assume that fonts have the right
+%D extensibles. If needed I will make a general virtual extender for \OPENTYPE\
+%D fonts.
+%D
+%D Because we have quite some control over positioning, we have somewhat extensive
+%D tracing built in.
+
+\let\math_stackers_top \relax
+\let\math_stackers_middle\relax
+\let\math_stackers_bottom\relax
+\let\math_stackers_skip \hskip
+
+\installtextracker
+ {math.stackers.texts}
+ {\let\math_stackers_top \filledhboxb
+ \let\math_stackers_middle\filledhboxr
+ \let\math_stackers_bottom\filledhboxg
+ \let\math_stackers_skip \math_stackers_skip_indeed}
+ {\let\math_stackers_top \relax
+ \let\math_stackers_middle\relax
+ \let\math_stackers_bottom\relax
+ \let\math_stackers_skip \hskip}
+
+\def\math_stackers_skip_indeed#amount%
+ {\filledhboxk{\unsetteststrut\strut\hskip#amount}} % \dontshowstruts
+
+%D We define a full featured command handler.
+
+\installcorenamespace {mathstackers}
+
+\installcommandhandler \??mathstackers {mathstackers} \??mathstackers
+
+\setupmathstackers
+ [%c!alternative=\v!text, % text | mathematics
+ \c!left=,
+ \c!right=,
+ \c!voffset=.25\exheight,
+ \c!hoffset=.5\emwidth,
+ \c!minheight=\exheight,
+ \c!mindepth=\zeropoint,
+ \c!minwidth=\emwidth,
+ \c!order=\v!normal,
+ \c!topcommand=,
+ \c!middlecommand=,
+ \c!bottomcommand=,
+ \c!offset=\v!normal, % normal | min | max
+ \c!location=\v!top] % none | normal | small | medium | big
+
+%D We assume that the middle characters (that can be an extensible) to sit on
+%D top of the baseline by default.
+
+\installcorenamespace {mathstackerslocation}
+
+\letvalue{\??mathstackerslocation\v!top }\plusone % on top of baseline
+\letvalue{\??mathstackerslocation\v!high }\plustwo % 25 % down
+\letvalue{\??mathstackerslocation\v!middle }\plusthree % centered
+\letvalue{\??mathstackerslocation\v!low }\plusfour % 75 % down
+\letvalue{\??mathstackerslocation\v!bottom }\plusfive % below baseline
+\letvalue{\??mathstackerslocation }\zerocount
+
+%D First we implement the helper that deals with an extensible in the middle and
+%D top and|/|or bottom texts:
+
+\let\m_math_stackers_text_top \empty
+\let\m_math_stackers_text_bottom\empty
+\let\m_math_stackers_text_middle\empty
+
+\def\math_stackers_flushtext#command#text%
+ {\ifdim\scratchleftoffset >\zeropoint\math_stackers_skip\scratchleftoffset \fi
+ \strut\mathstackersparameter#command#text%
+ \ifdim\scratchrightoffset>\zeropoint\math_stackers_skip\scratchrightoffset\fi}
+
+\def\math_stackers_toptext {\math_stackers_flushtext\c!topcommand \m_math_stackers_text_top }
+\def\math_stackers_bottomtext{\math_stackers_flushtext\c!bottomcommand\m_math_stackers_text_bottom}
+\def\math_stackers_middletext{\math_stackers_flushtext\c!middlecommand\m_math_stackers_text_middle}
+
+\def\math_stackers_content
+ {\ifcase\scratchcounter
+ \math_stackers_fallback
+ \or % left
+ \math_stackers_regular
+ \or % right
+ \math_stackers_regular
+ \or % horizontal
+ \math_stackers_regular
+ \else
+ \math_stackers_fallback
+ \fi}
+
+\def\math_stackers_check_unicode#codepoint%
+ {\scratchunicode#codepoint\relax
+ \scratchhoffset\mathstackersparameter\c!hoffset\relax
+ \scratchvoffset\mathstackersparameter\c!voffset\relax
+ \scratchcounter\mathhorizontalcode\fam\scratchunicode\relax % also sets \leftscratchoffset and \rightscratchoffset
+ \ifx\p_offset\v!max
+ % heads/tails + hoffset
+ \else\ifx\p_offset\v!min
+ % heads/tails - hoffset
+ \advance\scratchleftoffset -\scratchhoffset
+ \advance\scratchrightoffset-\scratchhoffset
+ \else % \v!normal
+ % hoffset
+ \scratchleftoffset \zeropoint
+ \scratchrightoffset\zeropoint
+ \fi\fi
+ \ifdim\scratchleftoffset <\zeropoint
+ \scratchleftoffset \zeropoint
+ \fi
+ \ifdim\scratchrightoffset<\zeropoint
+ \scratchrightoffset\zeropoint
+ \fi}
+
+\def\math_stackers_normalize_three
+ {\scratchheight\ht\scratchboxthree
+ \scratchdepth \dp\scratchboxthree
+ \scratchtopoffset \scratchheight
+ \scratchbottomoffset\scratchdepth
+ \scratchdimen\mathstackersparameter\c!minheight\relax
+ \ifdim\scratchheight<\scratchdimen
+ \scratchheight\scratchdimen
+ \ht\scratchboxthree\scratchheight
+ \fi
+ \scratchdimen\mathstackersparameter\c!mindepth\relax
+ \ifdim\scratchdepth<\scratchdimen
+ \scratchdepth\scratchdimen
+ \dp\scratchboxthree\scratchdepth
+ \fi
+ \advance\scratchtopoffset -\scratchheight
+ \advance\scratchbottomoffset-\scratchdepth
+ \ifdim\scratchtopoffset<\zeropoint
+ \scratchtopoffset\zeropoint
+ \fi
+ \ifdim\scratchbottomoffset<\zeropoint
+ \scratchbottomoffset\zeropoint
+ \fi}
+
+\unexpanded\def\math_stackers_triplet#method#category#codepoint#toptext#bottomtext%
+ {\begingroup
+ \edef\currentmathstackers{#category}%
+ \mathstackersparameter\c!left\relax
+ \ifmmode\mathrel\else\dontleavehmode\fi
+ {\edef\p_offset {\mathstackersparameter\c!offset}%
+ \edef\p_location{\mathstackersparameter\c!location}%
+ \edef\p_order {\mathstackersparameter\c!order}%
+ \ifx\p_order\v!reverse
+ \edef\m_math_stackers_text_top {#bottomtext}%
+ \edef\m_math_stackers_text_bottom{#toptext}%
+ \else
+ \edef\m_math_stackers_text_top {#toptext}%
+ \edef\m_math_stackers_text_bottom{#bottomtext}%
+ \fi
+ \scratchleftoffset \zeropoint
+ \scratchrightoffset\zeropoint
+ \ifx\m_math_stackers_text_top\empty
+ \setbox\scratchboxone\emptyhbox
+ \else
+ \setmathsmalltextbox\scratchboxone\hbox{\math_stackers_toptext}%
+ \fi
+ \ifx\m_math_stackers_text_bottom\empty
+ \setbox\scratchboxtwo\emptyhbox
+ \else
+ \setmathsmalltextbox\scratchboxtwo\hbox{\math_stackers_bottomtext}%
+ \fi
+ %
+ \ifcase#method\relax
+ \math_stackers_check_unicode{#codepoint}%
+ \scratchwidth\wd
+ \ifdim\wd\scratchboxone>\wd\scratchboxtwo
+ \scratchboxone
+ \else
+ \scratchboxtwo
+ \fi
+ \relax
+ \else
+ \edef\m_math_stackers_text_middle{#codepoint}%
+ \ifx\m_math_stackers_text_middle\empty
+ \setbox\scratchboxthree\emptyhbox
+ \else
+ \setmathtextbox\scratchboxthree\hbox{\math_stackers_middletext}%
+ \fi
+ \scratchwidth\wd
+ \ifdim\wd\scratchboxone>\wd\scratchboxtwo
+ \scratchboxone
+ \else\ifdim\wd\scratchboxtwo>\wd\scratchboxthree
+ \scratchboxtwo
+ \else
+ \scratchboxthree
+ \fi\fi
+ \relax
+ \fi
+ %
+ \scratchdimen\mathstackersparameter\c!minwidth\relax
+ \ifdim\scratchwidth<\scratchdimen
+ \scratchwidth\scratchdimen
+ \fi
+ \advance\scratchwidth2\scratchhoffset
+ %
+ \ifcase#method\relax
+ \setbox\scratchboxthree\math_stackers_content
+ \fi
+ %
+ \ifdim\wd\scratchboxone<\scratchwidth
+ \setbox\scratchboxone\hbox to \scratchwidth{\hss\box\scratchboxone\hss}%
+ \fi
+ \ifdim\wd\scratchboxtwo<\scratchwidth
+ \setbox\scratchboxtwo\hbox to \scratchwidth{\hss\box\scratchboxtwo\hss}%
+ \fi
+ \ifdim\wd\scratchboxthree<\scratchwidth
+ \setbox\scratchboxthree\hbox to \scratchwidth{\hss\box\scratchboxthree\hss}%
+ \fi
+ %
+ \ifcsname\??mathstackerslocation\p_location\endcsname
+ \ifcase\csname\??mathstackerslocation\p_location\endcsname\relax
+ \scratchdistance\zeropoint
+ \or
+ % top
+ \scratchdistance\zeropoint
+ \or
+ % high
+ \scratchdistance.25\htdp\scratchboxthree
+ \or
+ % centered
+ \scratchdistance.5\htdp\scratchboxthree
+ \or
+ % low
+ \scratchdistance.75\htdp\scratchboxthree
+ \or
+ % bottom
+ \scratchdistance\htdp\scratchboxthree
+ \else
+ \scratchdistance\zeropoint
+ \fi
+ \else
+ \scratchdistance\p_location\htdp\scratchboxthree
+ \fi
+ %
+ \ifzeropt\scratchdistance\else
+ \setbox\scratchboxthree\hbox{\lower\scratchdistance\box\scratchboxthree}%
+ \fi
+ %
+ \math_stackers_normalize_three
+ %
+ \math_stackers_middle\bgroup
+ \box\scratchboxthree
+ \egroup
+ %
+ \ifdim\htdp\scratchboxone>\zeropoint
+ \scratchoffset\dimexpr\scratchvoffset
+ \kern-\scratchwidth
+ \math_stackers_top\bgroup
+ \raise\dimexpr\dp\scratchboxone+\scratchheight+\scratchoffset+\scratchtopoffset\relax
+ \box\scratchboxone
+ \egroup
+ \fi
+ %
+ \ifdim\htdp\scratchboxtwo>\zeropoint
+ \scratchoffset\dimexpr\scratchvoffset
+ \kern-\scratchwidth
+ \math_stackers_bottom\bgroup
+ \lower\dimexpr\ht\scratchboxtwo+\scratchdepth+\scratchoffset+\scratchbottomoffset\relax
+ \box\scratchboxtwo
+ \egroup
+ \fi}%
+ \mathstackersparameter\c!right\relax
+ \endgroup}
+
+\unexpanded\def\definemathextensible
+ {\dotripleempty\math_stackers_define_normal}
+
+\def\math_stackers_define_normal[#1][#2][#3]% category name unicode
+ {\ifthirdargument
+ \setuevalue{#2}{\math_stackers_auto_normal{#1}{\number#3}}%
+ \else
+ \setuevalue{#1}{\math_stackers_auto_normal\noexpand\currentmathstackers{\number#2}}%
+ \fi}
+
+\unexpanded\def\math_stackers_auto_normal#category#codepoint%
+ {\begingroup
+ \edef\currentmathstackers{#category}%
+ \scratchcounter#codepoint\relax
+ \dosingleempty\math_stackers_auto_normal_first}
+
+\unexpanded\def\math_stackers_auto_normal_first[#category]% [#2]% #2 gobble spaces
+ {\iffirstargument\edef\currentmathstackers{#category}\fi
+ \permitspacesbetweengroups
+ \dodoublegroupempty\math_stackers_auto_normal_second}
+
+\def\math_stackers_auto_normal_second#toptext#bottomtext%
+ {\math_stackers_triplet\zerocount\currentmathstackers\scratchcounter{#toptext}{#bottomtext}%
+ \endgroup}
+
+%D A few direct accessors:
+
+\unexpanded\def\mathextensible{\begingroup\dosingleempty\math_stackers_handle_math}
+\unexpanded\def\textextensible{\begingroup\dosingleempty\math_stackers_handle_text}
+
+\unexpanded\def\math_stackers_handle_math[#category]%
+ {\math_stackers_handle_extensible{\iffirstargument#category\else\v!mathematics\fi}} % will be defined later on
+
+\unexpanded\def\math_stackers_handle_text[#category]%
+ {\math_stackers_handle_extensible{\iffirstargument#category\else\v!text \fi}} % will be defined later on
+
+\def\math_stackers_handle_extensible#category#codepoint#toptext#bottomtext%
+ {\math_stackers_triplet\zerocount{#category}{#codepoint}{#toptext}{#bottomtext}%
+ \endgroup}
+
+%D The next one deals with under and over extensibles (arrows mostly):
+
+\unexpanded\def\math_stackers_double#where#category#codepoint#text%
+ {\begingroup
+ \edef\currentmathstackers{#category}%
+ \mathstackersparameter\c!left\relax
+ \ifmmode\mathrel\else\dontleavehmode\fi
+ {\edef\currentmathstackers{#category}%
+ \edef\m_math_stackers_text_middle {#text}%
+ %
+ \edef\p_offset {\mathstackersparameter\c!offset}%
+ \edef\p_location{\mathstackersparameter\c!location}%
+ %
+ \scratchleftoffset \zeropoint
+ \scratchrightoffset\zeropoint
+ %
+ \math_stackers_check_unicode{#codepoint}%
+ %
+ \ifx\currentmathtext\empty
+ \setbox\scratchboxthree\emptyhbox
+ \else
+ \setmathsmalltextbox\scratchboxthree\hbox{\math_stackers_middletext}%
+ \fi
+ \scratchwidth\wd\scratchboxthree
+ %
+ \scratchdimen\mathstackersparameter\c!minwidth\relax
+ \ifdim\scratchwidth<\scratchdimen
+ \scratchwidth\scratchdimen
+ \fi
+ \advance\scratchwidth2\scratchhoffset
+ %
+ \setbox\scratchboxtwo \math_stackers_content
+ \setbox\scratchboxthree\hbox to \scratchwidth{\hss\box\scratchboxthree\hss}%
+ %
+ \math_stackers_normalize_three
+ %
+ \math_stackers_middle\bgroup
+ \box\scratchboxthree
+ \egroup
+ %
+ \ifdim\htdp\scratchboxtwo>\zeropoint
+ \kern-\scratchwidth
+ \ifcase#where\relax
+ \math_stackers_top\bgroup
+ \raise\dimexpr\scratchheight+\scratchtopoffset\relax
+ \box\scratchboxtwo
+ \egroup
+ \else
+ \math_stackers_bottom\bgroup
+ \lower\dimexpr\scratchdepth+\ht\scratchboxtwo+\scratchbottomoffset\relax
+ \box\scratchboxtwo
+ \egroup
+ \fi
+ \fi}%
+ \mathstackersparameter\c!right\relax
+ \endgroup}
+
+\unexpanded\def\definemathoverextensible {\dotripleempty\math_extensiblies_define_over }
+\unexpanded\def\definemathunderextensible{\dotripleempty\math_extensiblies_define_under}
+
+\def\math_extensiblies_define_over[#1][#2][#3]%
+ {\ifthirdargument
+ \setuevalue{#2}{\math_stackers_double\zerocount{#1}{\number#3}}%
+ \else
+ \setuevalue{#1}{\math_stackers_double\zerocount\noexpand\currentmathstackers{\number#2}}%
+ \fi}
+
+\def\math_extensiblies_define_under[#1][#2][#3]%
+ {\ifthirdargument
+ \setuevalue{#2}{\math_stackers_double\plusone{#1}{\number#3}}%
+ \else
+ \setuevalue{#1}{\math_stackers_double\plusone\noexpand\currentmathstackers{\number#2}}%
+ \fi}
+
+\unexpanded\def\mathover {\begingroup\dosingleempty\math_stackers_handle_over }
+\unexpanded\def\mathunder{\begingroup\dosingleempty\math_stackers_handle_under}
+
+\def\math_stackers_handle_over[#category]%
+ {\math_stackers_handle_double\zerocount{\iffirstargument#category\else\v!top \fi}} % will be defined later on
+
+\def\math_stackers_handle_under[#category]#codepoint#bottomtext%
+ {\math_stackers_handle_double\plusone {\iffirstargument#category\else\v!bottom\fi}} % will be defined later on
+
+\def\math_stackers_handle_double#location#category#codepoint#text%
+ {\math_stackers_double#location{#category}{#codepoint}{#text}%
+ \endgroup}
+
+%D Here is a bonus macro that takes three texts. It can be used to get consistent
+%D mixed usage.
+
+\unexpanded\def\mathtriplet
+ {\begingroup
+ \dosingleempty\math_stackers_handle_triplet}
+
+\def\math_stackers_handle_triplet[#category]#middletext#toptext#bottomtext%
+ {\math_stackers_triplet\plusone{\iffirstargument#category\else\currentmathstackers\fi}{#middletext}{#toptext}{#bottomtext}%
+ \endgroup}
+
+\unexpanded\def\definemathtriplet
+ {\dotripleempty\math_stackers_define_triplet}
+
+\def\math_stackers_define_triplet[#1][#2][#3]% category name default
+ {\ifthirdargument
+ \setuevalue{#2}{\math_stackers_auto_triplet_yes{#1}{#3}}%
+ \else\ifsecondargument
+ \setuevalue{#2}{\math_stackers_auto_triplet_nop{#1}}%
+ \else
+ \setuevalue{#1}{\math_stackers_auto_triplet_nop\noexpand\currentmathstackers}%
+ \fi\fi}
+
+\unexpanded\def\math_stackers_auto_triplet_yes#category#middletext%
+ {\begingroup
+ \edef\currentmathstackers {#category}%
+ \def \m_math_stackers_text_middle{#middletext}%
+ \dosingleempty\math_stackers_auto_triplet_yes_first}
+
+\unexpanded\def\math_stackers_auto_triplet_yes_first[#category]% [#2]% #2 gobble spaces
+ {\iffirstargument\edef\currentmathstackers{#category}\fi
+ \permitspacesbetweengroups
+ \dodoublegroupempty\math_stackers_auto_triplet_yes_second}
+
+\def\math_stackers_auto_triplet_yes_second#toptext#bottomtext%
+ {\math_stackers_triplet\plusone\currentmathstackers\m_math_stackers_text_middle{#toptext}{#bottomtext}%
+ \endgroup}
+
+\unexpanded\def\math_stackers_auto_triplet_nop#category%
+ {\begingroup
+ \edef\currentmathstackers{#category}%
+ \dosingleempty\math_stackers_auto_triplet_nop_first}
+
+\unexpanded\def\math_stackers_auto_triplet_nop_first[#category]% [#2]% #2 gobble spaces
+ {\iffirstargument\edef\currentmathstackers{#category}\fi
+ \permitspacesbetweengroups
+ \dotriplegroupempty\math_stackers_auto_triplet_nop_second}
+
+\def\math_stackers_auto_triplet_nop_second#middletext#toptext#bottomtext%
+ {\math_stackers_triplet\plusone\currentmathstackers{#middletext}{#toptext}{#bottomtext}%
+ \endgroup}
+
+%D Definitions:
+
+\definemathstackers
+ [\v!mathematics]
+ [\c!topcommand=\mathematics,
+ \c!middlecommand=\mathematics,
+ \c!bottomcommand=\mathematics]
+
+\definemathstackers
+ [\s!math]
+ [\v!mathematics]
+
+\definemathstackers
+ [\v!text]
+ [\v!mathematics]
+ [\c!topcommand=,
+ \c!middlecommand=\mathematics,
+ \c!bottomcommand=]
+
+\definemathstackers
+ [\v!reverse]
+ [\v!mathematics]
+ [\c!order=\v!reverse]
+
+\definemathstackers
+ [\v!top]
+ [\v!mathematics]
+ [\c!location=\v!top,
+ \c!middlecommand=\mathematics,
+ \c!hoffset=\zeropoint]
+
+\definemathstackers
+ [\v!bottom]
+ [\v!mathematics]
+ [\c!location=\v!top,
+ \c!middlecommand=\mathematics,
+ \c!hoffset=\zeropoint]
+
+% These are compatibity definitions, math only.
+
+\definemathstackers [\v!none] [\v!mathematics] [\c!hoffset=\zeropoint]
+\definemathstackers [\v!normal] [\v!mathematics] [\c!hoffset=0.5\emwidth] % the default
+\definemathstackers [\v!small] [\v!mathematics] [\c!hoffset=1\emwidth]
+\definemathstackers [\v!medium] [\v!mathematics] [\c!hoffset=1.5\emwidth]
+\definemathstackers [\v!big] [\v!mathematics] [\c!hoffset=2\emwidth]
+
+\definemathextensible [\v!reverse] [xrel] ["002D]
+\definemathextensible [\v!reverse] [xequal] ["003D]
+\definemathextensible [\v!reverse] [xleftarrow] ["2190]
+\definemathextensible [\v!reverse] [xrightarrow] ["2192]
+\definemathextensible [\v!reverse] [xtwoheadleftarrow] ["219E]
+\definemathextensible [\v!reverse] [xtwoheadrightarrow] ["21A0]
+\definemathextensible [\v!reverse] [xmapsto] ["21A6]
+\definemathextensible [\v!reverse] [xhookleftarrow] ["21A9]
+\definemathextensible [\v!reverse] [xhookrightarrow] ["21AA]
+\definemathextensible [\v!reverse] [xleftharpoondown] ["21BD]
+\definemathextensible [\v!reverse] [xleftharpoonup] ["21BC]
+\definemathextensible [\v!reverse] [xrightharpoondown] ["21C1]
+\definemathextensible [\v!reverse] [xrightharpoonup] ["21C0]
+\definemathextensible [\v!reverse] [xrightoverleftarrow] ["21C4]
+\definemathextensible [\v!reverse] [xleftrightharpoons] ["21CB]
+\definemathextensible [\v!reverse] [xrightleftharpoons] ["21CC]
+\definemathextensible [\v!reverse] [xtriplerel] ["2261]
+\definemathextensible [\v!reverse] [xleftrightarrow] ["27F7]
+\definemathextensible [\v!reverse] [xLeftarrow] ["27F8]
+\definemathextensible [\v!reverse] [xRightarrow] ["27F9]
+\definemathextensible [\v!reverse] [xLeftrightarrow] ["27FA]
+
+\definemathextensible [\v!mathematics] [mrel] ["002D]
+\definemathextensible [\v!mathematics] [mequal] ["003D]
+\definemathextensible [\v!mathematics] [mleftarrow] ["2190]
+\definemathextensible [\v!mathematics] [mrightarrow] ["2192]
+\definemathextensible [\v!mathematics] [mtwoheadleftarrow] ["219E]
+\definemathextensible [\v!mathematics] [mtwoheadrightarrow] ["21A0]
+\definemathextensible [\v!mathematics] [mmapsto] ["21A6]
+\definemathextensible [\v!mathematics] [mhookleftarrow] ["21A9]
+\definemathextensible [\v!mathematics] [mhookrightarrow] ["21AA]
+\definemathextensible [\v!mathematics] [mleftharpoondown] ["21BD]
+\definemathextensible [\v!mathematics] [mleftharpoonup] ["21BC]
+\definemathextensible [\v!mathematics] [mrightharpoondown] ["21C1]
+\definemathextensible [\v!mathematics] [mrightharpoonup] ["21C0]
+\definemathextensible [\v!mathematics] [mrightoverleftarrow] ["21C4]
+\definemathextensible [\v!mathematics] [mleftrightharpoons] ["21CB]
+\definemathextensible [\v!mathematics] [mrightleftharpoons] ["21CC]
+\definemathextensible [\v!mathematics] [mtriplerel] ["2261]
+\definemathextensible [\v!mathematics] [mleftrightarrow] ["27F7]
+\definemathextensible [\v!mathematics] [mLeftarrow] ["27F8]
+\definemathextensible [\v!mathematics] [mRightarrow] ["27F9]
+\definemathextensible [\v!mathematics] [mLeftrightarrow] ["27FA]
+
+\definemathextensible [\v!text] [trel] ["002D]
+\definemathextensible [\v!text] [tequal] ["003D]
+\definemathextensible [\v!text] [tleftarrow] ["2190]
+\definemathextensible [\v!text] [trightarrow] ["2192]
+\definemathextensible [\v!text] [ttwoheadleftarrow] ["219E]
+\definemathextensible [\v!text] [ttwoheadrightarrow] ["21A0]
+\definemathextensible [\v!text] [tmapsto] ["21A6]
+\definemathextensible [\v!text] [thookleftarrow] ["21A9]
+\definemathextensible [\v!text] [thookrightarrow] ["21AA]
+\definemathextensible [\v!text] [tleftharpoondown] ["21BD]
+\definemathextensible [\v!text] [tleftharpoonup] ["21BC]
+\definemathextensible [\v!text] [trightharpoondown] ["21C1]
+\definemathextensible [\v!text] [trightharpoonup] ["21C0]
+\definemathextensible [\v!text] [trightoverleftarrow] ["21C4]
+\definemathextensible [\v!text] [tleftrightharpoons] ["21CB]
+\definemathextensible [\v!text] [trightleftharpoons] ["21CC]
+\definemathextensible [\v!text] [ttriplerel] ["2261]
+\definemathextensible [\v!text] [tleftrightarrow] ["27F7]
+\definemathextensible [\v!text] [tLeftarrow] ["27F8]
+\definemathextensible [\v!text] [tRightarrow] ["27F9]
+\definemathextensible [\v!text] [tLeftrightarrow] ["27FA]
+
+\definemathoverextensible [\v!top] [overleftarrow] ["2190]
+\definemathoverextensible [\v!top] [overrightarrow] ["2192]
+\definemathoverextensible [\v!top] [overleftharpoondown] ["21BD]
+\definemathoverextensible [\v!top] [overleftharpoonup] ["21BC]
+\definemathoverextensible [\v!top] [overrightharpoondown] ["21C1]
+\definemathoverextensible [\v!top] [overrightharpoonup] ["21C0]
+\definemathoverextensible [\v!top] [overleftrightarrow] ["27F7]
+\definemathoverextensible [\v!top] [overtwoheadleftarrow] ["27F8]
+\definemathoverextensible [\v!top] [overtwoheadrightarrow] ["27F9]
+
+\definemathunderextensible [\v!bottom] [underleftarrow] ["2190]
+\definemathunderextensible [\v!bottom] [underrightarrow] ["2192]
+\definemathunderextensible [\v!bottom] [underleftharpoondown] ["21BD]
+\definemathunderextensible [\v!bottom] [underleftharpoonup] ["21BC]
+\definemathunderextensible [\v!bottom] [underrightharpoondown] ["21C1]
+\definemathunderextensible [\v!bottom] [underrightharpoonup] ["21C0]
+\definemathunderextensible [\v!bottom] [underleftrightarrow] ["27F7]
+\definemathunderextensible [\v!bottom] [undertwoheadleftarrow] ["27F8]
+\definemathunderextensible [\v!bottom] [undertwoheadrightarrow] ["27F9]
+
+%D Some bonus ones (for the moment here):
+
+\definemathstackers
+ [\v!chemistry]
+ [\c!offset=\v!max,
+ \c!left=\enspace,
+ \c!right=\enspace,
+ \c!hoffset=.5\emwidth]
+
+\definemathextensible [\v!chemistry] [cleftarrow] ["2190]
+\definemathextensible [\v!chemistry] [crightarrow] ["2192]
+\definemathextensible [\v!chemistry] [crightoverleftarrow] ["21C4]
+
+% for the moment:
+
+\def\math_stackers_hacked_fill#1#2#3%
+ {\mathematics
+ {\begingroup
+ \mathsurround\zeropoint
+ \thickmuskip \zeromuskip
+ \medmuskip \zeromuskip
+ \thinmuskip \zeromuskip
+ #1%
+ \mkern-7\onemuskip
+ \cleaders\mathstylehbox{\mkern-2\onemuskip#2\mkern-2\onemuskip}\hfill
+ \mkern-7\onemuskip
+ #3%
+ \endgroup}}
+
+\unexpanded\def\rightarrowfill {\math_stackers_hacked_fill \relbar \relbar \rightarrow}
+\unexpanded\def\leftarrowfill {\math_stackers_hacked_fill \leftarrow \relbar \relbar }
+\unexpanded\def\rightoverleftarrowfill{\math_stackers_hacked_fill \ctxdoublearrowfillleftend\ctxdoublearrowfillmiddlepart\ctxdoublearrowfillrightend}
+\unexpanded\def\equalfill {\math_stackers_hacked_fill \Relbar \Relbar \Relbar}
+\unexpanded\def\Rightarrowfill {\math_stackers_hacked_fill \Relbar \Relbar \Rightarrow}
+\unexpanded\def\Leftarrowfill {\math_stackers_hacked_fill \Leftarrow \Relbar \Relbar}
+\unexpanded\def\Leftrightarrowfill {\math_stackers_hacked_fill \Leftarrow \Relbar \Rightarrow}
+\unexpanded\def\leftrightarrowfill {\math_stackers_hacked_fill \leftarrow \relbar \rightarrow}
+\unexpanded\def\mapstofill {\math_stackers_hacked_fill{\mapstochar\relbar} \relbar \rightarrow}
+\unexpanded\def\twoheadrightarrowfill {\math_stackers_hacked_fill \relbar \relbar \twoheadrightarrow}
+\unexpanded\def\twoheadleftarrowfill {\math_stackers_hacked_fill \twoheadleftarrow \relbar \relbar}
+\unexpanded\def\rightharpoondownfill {\math_stackers_hacked_fill \relbar \relbar \rightharpoondown}
+\unexpanded\def\rightharpoonupfill {\math_stackers_hacked_fill \relbar \relbar \rightharpoonup}
+\unexpanded\def\leftharpoondownfill {\math_stackers_hacked_fill \leftharpoondown \relbar \relbar}
+\unexpanded\def\leftharpoonupfill {\math_stackers_hacked_fill \leftharpoonup \relbar \relbar}
+\unexpanded\def\hookleftfill {\math_stackers_hacked_fill \leftarrow \relbar {\relbar\joinrel\rhook}}
+\unexpanded\def\hookrightfill {\math_stackers_hacked_fill{\lhook\joinrel\relbar} \relbar \rightarrow}
+\unexpanded\def\relfill {\math_stackers_hacked_fill \relbar \relbar \relbar}
+\unexpanded\def\triplerelfill {\math_stackers_hacked_fill \equiv \equiv \equiv}
+
+\unexpanded\def\singlebond {{\xrel}} % or \def\singlebond{{\xrel[2]}}
+\unexpanded\def\doublebond {{\xequal}}
+\unexpanded\def\triplebond {{\xtriplerel}}
+
+\unexpanded\def\defineextensiblefiller
+ {\dodoubleargument\math_stackers_define_filler}
+
+\def\math_stackers_define_filler[#1][#2]%
+ {\setuevalue{#1}{\leaders\number#2\hfill}}
+
+%D For the moment:
+
+\def\math_stackers_define_filler[#1][#2]%
+ {\expandafter\let\csname\??mathextensiblefallbacks\number#2\expandafter\endcsname\csname#1\endcsname
+ \expandafter\let\csname #1\expandafter\endcsname\csname#1\endcsname}
+
+\defineextensiblefiller [relfill] ["002D]
+\defineextensiblefiller [equalfill] ["003D]
+\defineextensiblefiller [leftarrowfill] ["2190]
+\defineextensiblefiller [rightarrowfill] ["2192]
+\defineextensiblefiller [twoheadleftarrowfill] ["219E]
+\defineextensiblefiller [twoheadrightarrowfill] ["21A0]
+\defineextensiblefiller [mapstofill] ["21A6]
+\defineextensiblefiller [hookleftarrowfill] ["21A9]
+\defineextensiblefiller [hookrightarrowfill] ["21AA]
+\defineextensiblefiller [leftharpoondownfill] ["21BD]
+\defineextensiblefiller [leftharpoonupfill] ["21BC]
+\defineextensiblefiller [rightharpoondownfill] ["21C1]
+\defineextensiblefiller [rightharpoonupfill] ["21C0]
+\defineextensiblefiller [rightoverleftarrowfill] ["21C4]
+\defineextensiblefiller [leftrightharpoonsfill] ["21CB]
+\defineextensiblefiller [rightleftharpoonsfill] ["21CC]
+\defineextensiblefiller [triplerelfill] ["2261]
+\defineextensiblefiller [leftrightarrowfill] ["27F7]
+\defineextensiblefiller [Leftarrowfill] ["27F8]
+\defineextensiblefiller [Rightarrowfill] ["27F9]
+\defineextensiblefiller [Leftrightarrowfill] ["27FA]
+
+%D Extra:
+
+\unexpanded\edef\singlebond{\mathematics{\mathsurround\zeropoint\char\number"002D}}
+\unexpanded\edef\doublebond{\mathematics{\mathsurround\zeropoint\char\number"003D}}
+\unexpanded\edef\triplebond{\mathematics{\mathsurround\zeropoint\char\number"2261}}
+
+% \mathchardef\singlebond"002D
+% \mathchardef\doublebond"003D
+% \mathchardef\triplebond"2261
+
+\protect \endinput
+
+% \mathrel{\mathop{\hbox to \dimen0{\hss\copy4\hss}}
+% \limits\normalsuperscript{\box0}\normalsubscript{\box2}}%
+
+% $\Uoverdelimiter \defaultmathfamily "2194 {xxxx}$
+% $\Udelimiterover \defaultmathfamily "2194 {xxxx}$
+% $\Uunderdelimiter\defaultmathfamily "2194 {xxxx}$
+% $\Udelimiterunder\defaultmathfamily "2194 {xxxx}$
+% $\Udelimiterover \defaultmathfamily "219A {\Udelimiterunder \defaultmathfamily "219B {xxxx}}$
+
+% $a \mathrel{\mathop{\filledhboxr{mid}}}\limits^{\filledhboxg{\strut top}}_{\filledhboxb{\strut bottom}} b$
diff --git a/tex/context/base/math-ttv.lua b/tex/context/base/math-ttv.lua
index be7d1949b..74f8a2a7b 100644
--- a/tex/context/base/math-ttv.lua
+++ b/tex/context/base/math-ttv.lua
@@ -714,8 +714,8 @@ mathencodings["tex-mb"] = {
[0x003DC] = 0x7A, -- Digamma \digamma
[0x003F0] = 0x7B, -- kappa \varkappa
[0x1D55C] = 0x7C, -- k \Bbbk (blackboard k)
- [0x0210F] = 0x7D, -- planckover2pi \hslash
- [0x00127] = 0x7E, -- planckover2pi1 \hbar
+ [0x0210F] = 0x7D, -- planckover2pi \hslash % 0x7D
+ [0x00127] = 0x7E, -- planckover2pi1 \hbar % 0x7E
[0x003F6] = 0x7F, -- epsiloninv \backepsilon
}
diff --git a/tex/context/base/math-vfu.lua b/tex/context/base/math-vfu.lua
index 317924a41..b5ee71e62 100644
--- a/tex/context/base/math-vfu.lua
+++ b/tex/context/base/math-vfu.lua
@@ -92,21 +92,21 @@ local function brace(main,characters,id,size,unicode,first,rule,left,right,rule,
end
end
-local function arrow(main,characters,id,size,unicode,arrow,minus,isleft)
+local function extension(main,characters,id,size,unicode,first,middle,last)
local chr = characters[unicode]
if not chr then
- -- skip
- elseif isleft then
- chr.horiz_variants = {
- { extender = 0, glyph = arrow },
- { extender = 1, glyph = minus },
- }
- else
- chr.horiz_variants = {
- { extender = 1, glyph = minus },
- { extender = 0, glyph = arrow },
- }
+ return -- skip
end
+ local fw = characters[first ].width
+ local mw = characters[middle].width
+ local lw = characters[last ].width
+ if fw == 0 then fw = 1 end
+ if lw == 0 then lw = 1 end
+ chr.horiz_variants = {
+ { extender = 0, glyph = first, ["end"] = fw/2, start = 0, advance = fw },
+ { extender = 1, glyph = middle, ["end"] = mw/2, start = mw/2, advance = mw },
+ { extender = 0, glyph = last, ["end"] = 0, start = lw/2, advance = lw },
+ }
end
local function parent(main,characters,id,size,unicode,first,rule,last)
@@ -150,14 +150,24 @@ local function make(main,characters,id,size,n,m)
end
end
-local function minus(main,characters,id,size,unicode) -- push/pop needed?
- local minus = characters[0x002D]
+local function clipped(main,characters,id,size,unicode,original) -- push/pop needed?
+ local minus = characters[original]
if minus then
local mu = size/18
- local width = minus.width - 5*mu
+ local step = 3*mu
+ local width = minus.width
+ if width > step then
+ width = width - step
+ step = step / 2
+ else
+ width = width / 2
+ step = width
+ end
characters[unicode] = {
- width = width, height = minus.height, depth = minus.depth,
- commands = { push, { "right", -3*mu }, { "slot", id, 0x002D }, pop }
+ width = width,
+ height = minus.height,
+ depth = minus.depth,
+ commands = { push, { "right", -step }, { "slot", id, original }, pop }
}
end
end
@@ -290,20 +300,20 @@ local function vertbar(main,characters,id,size,parent,scale,unicode)
end
end
-local function jointwo(main,characters,id,size,unicode,u1,d12,u2)
+local function jointwo(main,characters,id,size,unicode,u1,d12,u2,what)
local c1, c2 = characters[u1], characters[u2]
if c1 and c2 then
local w1, w2 = c1.width, c2.width
local mu = size/18
characters[unicode] = {
- width = w1 + w2 - d12*mu,
+ width = w1 + w2 - d12 * mu,
height = max(c1.height or 0, c2.height or 0),
- depth = max(c1.depth or 0, c2.depth or 0),
+ depth = max(c1.depth or 0, c2.depth or 0),
commands = {
{ "slot", id, u1 },
{ "right", -d12*mu } ,
{ "slot", id, u2 },
- }
+ },
}
end
end
@@ -388,19 +398,20 @@ function vfmath.addmissing(main,id,size)
for i=0x7A,0x7D do
make(main,characters,id,size,i,1)
end
+
brace (main,characters,id,size,0x23DE,0xFF17A,0xFF301,0xFF17D,0xFF17C,0xFF301,0xFF17B)
brace (main,characters,id,size,0x23DF,0xFF27C,0xFF401,0xFF27B,0xFF27A,0xFF401,0xFF27D)
+
parent (main,characters,id,size,0x23DC,0xFF17A,0xFF301,0xFF17B)
parent (main,characters,id,size,0x23DD,0xFF27C,0xFF401,0xFF27D)
+
-- negate (main,characters,id,size,0x2260,0x003D)
dots (main,characters,id,size,0x2026) -- ldots
dots (main,characters,id,size,0x22EE) -- vdots
dots (main,characters,id,size,0x22EF) -- cdots
dots (main,characters,id,size,0x22F1) -- ddots
dots (main,characters,id,size,0x22F0) -- udots
- minus (main,characters,id,size,0xFF501)
- arrow (main,characters,id,size,0x2190,0x2190,0xFF501,true) -- left
- arrow (main,characters,id,size,0x2192,0x2192,0xFF501,false) -- right
+
vertbar (main,characters,id,size,0x0007C,0.10,0xFF601) -- big : 0.85 bodyfontsize
vertbar (main,characters,id,size,0xFF601,0.30,0xFF602) -- Big : 1.15 bodyfontsize
vertbar (main,characters,id,size,0xFF602,0.30,0xFF603) -- bigg : 1.45 bodyfontsize
@@ -409,24 +420,69 @@ function vfmath.addmissing(main,id,size)
vertbar (main,characters,id,size,0xFF605,0.30,0xFF606)
vertbar (main,characters,id,size,0xFF606,0.30,0xFF607)
vertbar (main,characters,id,size,0xFF607,0.30,0xFF608)
+
+ clipped (main,characters,id,size,0xFF501,0x0002D) -- minus
+ clipped (main,characters,id,size,0xFF502,0x02190) -- lefthead
+ clipped (main,characters,id,size,0xFF503,0x02192) -- righthead
+ clipped (main,characters,id,size,0xFF504,0xFE321) -- mapsto
+ clipped (main,characters,id,size,0xFF505,0xFE322) -- lhook
+ clipped (main,characters,id,size,0xFF506,0xFE323) -- rhook
+ clipped (main,characters,id,size,0xFF507,0xFE324) -- mapsfrom
+ clipped (main,characters,id,size,0xFF508,0x021D0) -- double lefthead
+ clipped (main,characters,id,size,0xFF509,0x021D2) -- double righthead
+ clipped (main,characters,id,size,0xFF50A,0x0003D) -- equal
+ clipped (main,characters,id,size,0xFF50B,0x0219E) -- lefttwohead
+ clipped (main,characters,id,size,0xFF50C,0x021A0) -- righttwohead
+ clipped (main,characters,id,size,0xFF50D,0xFF350) -- lr arrow combi snippet
+ clipped (main,characters,id,size,0xFF50E,0xFF351) -- lr arrow combi snippet
+ clipped (main,characters,id,size,0xFF50F,0xFF352) -- lr arrow combi snippet
+ clipped (main,characters,id,size,0xFF510,0x02261) -- equiv
+
+ extension(main,characters,id,size,0x2190,0xFF502,0xFF501,0xFF501) -- \leftarrow
+ extension(main,characters,id,size,0x2192,0xFF501,0xFF501,0xFF503) -- \rightarrow
+
+ extension(main,characters,id,size,0x002D,0xFF501,0xFF501,0xFF501) -- \rel
+ extension(main,characters,id,size,0x003D,0xFF50A,0xFF50A,0xFF50A) -- \equal
+ extension(main,characters,id,size,0x2261,0xFF510,0xFF510,0xFF510) -- \equiv
+
jointwo (main,characters,id,size,0x21A6,0xFE321,0,0x02192) -- \mapstochar\rightarrow
jointwo (main,characters,id,size,0x21A9,0x02190,joinrelfactor,0xFE323) -- \leftarrow\joinrel\rhook
jointwo (main,characters,id,size,0x21AA,0xFE322,joinrelfactor,0x02192) -- \lhook\joinrel\rightarrow
- stack (main,characters,id,size,0x2259,0x0003D,3,0x02227) -- \buildrel\wedge\over=
- jointwo (main,characters,id,size,0x22C8,0x022B3,joinrelfactor,0x022B2) -- \mathrel\triangleright\joinrel\mathrel\triangleleft (4 looks better than 3)
- jointwo (main,characters,id,size,0x2260,0x00338,0,0x0003D) -- \not\equal
- jointwo (main,characters,id,size,0x2284,0x00338,0,0x02282) -- \not\subset
- jointwo (main,characters,id,size,0x2285,0x00338,0,0x02283) -- \not\supset
- jointwo (main,characters,id,size,0x2209,0x00338,0,0x02208) -- \not\in
- jointwo (main,characters,id,size,0x22A7,0x0007C,joinrelfactor,0x0003D) -- \mathrel|\joinrel=
jointwo (main,characters,id,size,0x27F5,0x02190,joinrelfactor,0x0002D) -- \leftarrow\joinrel\relbar
- jointwo (main,characters,id,size,0x27F6,0x0002D,joinrelfactor,0x02192) -- \relbar\joinrel\rightarrow
+ jointwo (main,characters,id,size,0x27F6,0x0002D,joinrelfactor,0x02192,2) -- \relbar\joinrel\rightarrow
jointwo (main,characters,id,size,0x27F7,0x02190,joinrelfactor,0x02192) -- \leftarrow\joinrel\rightarrow
jointwo (main,characters,id,size,0x27F8,0x021D0,joinrelfactor,0x0003D) -- \Leftarrow\joinrel\Relbar
jointwo (main,characters,id,size,0x27F9,0x0003D,joinrelfactor,0x021D2) -- \Relbar\joinrel\Rightarrow
jointwo (main,characters,id,size,0x27FA,0x021D0,joinrelfactor,0x021D2) -- \Leftarrow\joinrel\Rightarrow
jointhree(main,characters,id,size,0x27FB,0x02190,joinrelfactor,0x0002D,0,0xFE324) -- \leftarrow\joinrel\relbar\mapsfromchar
jointhree(main,characters,id,size,0x27FC,0xFE321,0,0x0002D,joinrelfactor,0x02192) -- \mapstochar\relbar\joinrel\rightarrow
+
+ extension(main,characters,id,size,0x21A6,0xFF504,0xFF501,0xFF503) -- \mapstochar\rightarrow
+ extension(main,characters,id,size,0x21A9,0xFF502,0xFF501,0xFF506) -- \leftarrow\joinrel\rhook
+ extension(main,characters,id,size,0x21AA,0xFF505,0xFF501,0xFF503) -- \lhook\joinrel\rightarrow
+ extension(main,characters,id,size,0x27F5,0xFF502,0xFF501,0xFF501) -- \leftarrow\joinrel\relbar
+ extension(main,characters,id,size,0x27F6,0xFF501,0xFF501,0xFF503) -- \relbar\joinrel\rightarrow
+ extension(main,characters,id,size,0x27F7,0xFF502,0xFF501,0xFF503) -- \leftarrow\joinrel\rightarrow
+ extension(main,characters,id,size,0x27F8,0xFF508,0xFF50A,0xFF50A) -- \Leftarrow\joinrel\Relbar
+ extension(main,characters,id,size,0x27F9,0xFF50A,0xFF50A,0xFF509) -- \Relbar\joinrel\Rightarrow
+ extension(main,characters,id,size,0x27FA,0xFF508,0xFF50A,0xFF509) -- \Leftarrow\joinrel\Rightarrow
+ extension(main,characters,id,size,0x27FB,0xFF502,0xFF501,0xFF507) -- \leftarrow\joinrel\relbar\mapsfromchar
+ extension(main,characters,id,size,0x27FC,0xFF504,0xFF501,0xFF503) -- \mapstochar\relbar\joinrel\rightarrow
+
+ extension(main,characters,id,size,0x219E,0xFF50B,0xFF501,0xFF501) -- \twoheadleftarrow\joinrel\relbar
+ extension(main,characters,id,size,0x21A0,0xFF501,0xFF501,0xFF50C) -- \relbar\joinrel\twoheadrightarrow
+ extension(main,characters,id,size,0x21C4,0xFF50D,0xFF50E,0xFF50F) -- leftoverright
+
+ -- 21CB leftrightharpoon
+ -- 21CC rightleftharpoon
+
+ stack (main,characters,id,size,0x2259,0x0003D,3,0x02227) -- \buildrel\wedge\over=
+ jointwo (main,characters,id,size,0x22C8,0x022B3,joinrelfactor,0x022B2) -- \mathrel\triangleright\joinrel\mathrel\triangleleft (4 looks better than 3)
+ jointwo (main,characters,id,size,0x22A7,0x0007C,joinrelfactor,0x0003D) -- \mathrel|\joinrel=
+ jointwo (main,characters,id,size,0x2260,0x00338,0,0x0003D) -- \not\equal
+ jointwo (main,characters,id,size,0x2284,0x00338,0,0x02282) -- \not\subset
+ jointwo (main,characters,id,size,0x2285,0x00338,0,0x02283) -- \not\supset
+ jointwo (main,characters,id,size,0x2209,0x00338,0,0x02208) -- \not\in
jointwo (main,characters,id,size,0x2254,0x03A,0,0x03D) -- := (≔)
repeated(main,characters,id,size,0x222C,0x222B,2,0xFF800,1/3)
diff --git a/tex/context/base/mult-de.mkii b/tex/context/base/mult-de.mkii
index 99a5944b0..3bf540b9f 100644
--- a/tex/context/base/mult-de.mkii
+++ b/tex/context/base/mult-de.mkii
@@ -120,6 +120,7 @@
\setinterfacevariable{chapter}{kapitel}
\setinterfacevariable{character}{buchstabe}
\setinterfacevariable{characters}{buchstaben}
+\setinterfacevariable{chemistry}{chemistry}
\setinterfacevariable{cite}{cite}
\setinterfacevariable{color}{farbe}
\setinterfacevariable{column}{column}
@@ -594,6 +595,7 @@
\setinterfaceconstant{bottom}{unten}
\setinterfaceconstant{bottomafter}{bottomafter}
\setinterfaceconstant{bottombefore}{bottombefore}
+\setinterfaceconstant{bottomcommand}{bottomcommand}
\setinterfaceconstant{bottomdistance}{abstandunten}
\setinterfaceconstant{bottomframe}{untenrahmen}
\setinterfaceconstant{bottomoffset}{untenoffset}
@@ -805,6 +807,7 @@
\setinterfaceconstant{menu}{menue}
\setinterfaceconstant{method}{methode}
\setinterfaceconstant{middle}{mittig}
+\setinterfaceconstant{middlecommand}{middlecommand}
\setinterfaceconstant{middlespeech}{middlespeech}
\setinterfaceconstant{middletext}{mittigertext}
\setinterfaceconstant{midsentence}{midsentence}
@@ -1045,6 +1048,7 @@
\setinterfaceconstant{toffset}{toffset}
\setinterfaceconstant{tolerance}{toleranz}
\setinterfaceconstant{top}{oben}
+\setinterfaceconstant{topcommand}{topcommand}
\setinterfaceconstant{topdistance}{obenabstand}
\setinterfaceconstant{topframe}{obenrahmen}
\setinterfaceconstant{topoffset}{obenoffset}
diff --git a/tex/context/base/mult-def.lua b/tex/context/base/mult-def.lua
index 9c7b4f767..3c7700414 100644
--- a/tex/context/base/mult-def.lua
+++ b/tex/context/base/mult-def.lua
@@ -6630,6 +6630,18 @@ return {
["en"]="layout",
["nl"]="layout",
},
+ ["topcommand"]={
+ ["en"]="topcommand",
+ ["nl"]="bovencommando",
+ },
+ ["middlecommand"]={
+ ["en"]="middlecommand",
+ ["nl"]="middencommando",
+ },
+ ["bottomcommand"]={
+ ["en"]="bottomcommand",
+ ["nl"]="ondercommando",
+ },
["action"]={
["cs"]="akce",
["de"]="aktion",
@@ -12586,6 +12598,10 @@ return {
["pe"]="حرفها",
["ro"]="caractere",
},
+ ["chemistry"]={
+ ["en"]="chemistry",
+ ["nl"]="chemie",
+ },
["color"]={
["cs"]="barevne",
["de"]="farbe",
diff --git a/tex/context/base/mult-en.mkii b/tex/context/base/mult-en.mkii
index 24bf6c074..80d86546e 100644
--- a/tex/context/base/mult-en.mkii
+++ b/tex/context/base/mult-en.mkii
@@ -120,6 +120,7 @@
\setinterfacevariable{chapter}{chapter}
\setinterfacevariable{character}{character}
\setinterfacevariable{characters}{characters}
+\setinterfacevariable{chemistry}{chemistry}
\setinterfacevariable{cite}{cite}
\setinterfacevariable{color}{color}
\setinterfacevariable{column}{column}
@@ -594,6 +595,7 @@
\setinterfaceconstant{bottom}{bottom}
\setinterfaceconstant{bottomafter}{bottomafter}
\setinterfaceconstant{bottombefore}{bottombefore}
+\setinterfaceconstant{bottomcommand}{bottomcommand}
\setinterfaceconstant{bottomdistance}{bottomdistance}
\setinterfaceconstant{bottomframe}{bottomframe}
\setinterfaceconstant{bottomoffset}{bottomoffset}
@@ -805,6 +807,7 @@
\setinterfaceconstant{menu}{menu}
\setinterfaceconstant{method}{method}
\setinterfaceconstant{middle}{middle}
+\setinterfaceconstant{middlecommand}{middlecommand}
\setinterfaceconstant{middlespeech}{middlespeech}
\setinterfaceconstant{middletext}{middletext}
\setinterfaceconstant{midsentence}{midsentence}
@@ -1045,6 +1048,7 @@
\setinterfaceconstant{toffset}{toffset}
\setinterfaceconstant{tolerance}{tolerance}
\setinterfaceconstant{top}{top}
+\setinterfaceconstant{topcommand}{topcommand}
\setinterfaceconstant{topdistance}{topdistance}
\setinterfaceconstant{topframe}{topframe}
\setinterfaceconstant{topoffset}{topoffset}
diff --git a/tex/context/base/mult-fr.mkii b/tex/context/base/mult-fr.mkii
index 0640cbecb..e68763dfc 100644
--- a/tex/context/base/mult-fr.mkii
+++ b/tex/context/base/mult-fr.mkii
@@ -120,6 +120,7 @@
\setinterfacevariable{chapter}{chapitre}
\setinterfacevariable{character}{caractere}
\setinterfacevariable{characters}{caracteres}
+\setinterfacevariable{chemistry}{chemistry}
\setinterfacevariable{cite}{cite}
\setinterfacevariable{color}{couleur}
\setinterfacevariable{column}{colonne}
@@ -594,6 +595,7 @@
\setinterfaceconstant{bottom}{inf}
\setinterfaceconstant{bottomafter}{bottomafter}
\setinterfaceconstant{bottombefore}{bottombefore}
+\setinterfaceconstant{bottomcommand}{bottomcommand}
\setinterfaceconstant{bottomdistance}{distanceinf}
\setinterfaceconstant{bottomframe}{cadreinf}
\setinterfaceconstant{bottomoffset}{decalageinf}
@@ -805,6 +807,7 @@
\setinterfaceconstant{menu}{menu}
\setinterfaceconstant{method}{methode}
\setinterfaceconstant{middle}{milieu}
+\setinterfaceconstant{middlecommand}{middlecommand}
\setinterfaceconstant{middlespeech}{middlespeech}
\setinterfaceconstant{middletext}{textecentre}
\setinterfaceconstant{midsentence}{midsentence}
@@ -1045,6 +1048,7 @@
\setinterfaceconstant{toffset}{toffset}
\setinterfaceconstant{tolerance}{tolerance}
\setinterfaceconstant{top}{sup}
+\setinterfaceconstant{topcommand}{topcommand}
\setinterfaceconstant{topdistance}{distancesup}
\setinterfaceconstant{topframe}{cadresup}
\setinterfaceconstant{topoffset}{decalagesup}
diff --git a/tex/context/base/mult-it.mkii b/tex/context/base/mult-it.mkii
index f4d02ad46..e86a35b97 100644
--- a/tex/context/base/mult-it.mkii
+++ b/tex/context/base/mult-it.mkii
@@ -120,6 +120,7 @@
\setinterfacevariable{chapter}{capitolo}
\setinterfacevariable{character}{lettera}
\setinterfacevariable{characters}{lettere}
+\setinterfacevariable{chemistry}{chemistry}
\setinterfacevariable{cite}{cite}
\setinterfacevariable{color}{colore}
\setinterfacevariable{column}{colonna}
@@ -594,6 +595,7 @@
\setinterfaceconstant{bottom}{fondo}
\setinterfaceconstant{bottomafter}{bottomafter}
\setinterfaceconstant{bottombefore}{bottombefore}
+\setinterfaceconstant{bottomcommand}{bottomcommand}
\setinterfaceconstant{bottomdistance}{distanzafondo}
\setinterfaceconstant{bottomframe}{cornicefondo}
\setinterfaceconstant{bottomoffset}{offsetfondo}
@@ -805,6 +807,7 @@
\setinterfaceconstant{menu}{menu}
\setinterfaceconstant{method}{metodo}
\setinterfaceconstant{middle}{centro}
+\setinterfaceconstant{middlecommand}{middlecommand}
\setinterfaceconstant{middlespeech}{middlespeech}
\setinterfaceconstant{middletext}{testocentro}
\setinterfaceconstant{midsentence}{midsentence}
@@ -1045,6 +1048,7 @@
\setinterfaceconstant{toffset}{toffset}
\setinterfaceconstant{tolerance}{tolleranza}
\setinterfaceconstant{top}{cima}
+\setinterfaceconstant{topcommand}{topcommand}
\setinterfaceconstant{topdistance}{distanzacima}
\setinterfaceconstant{topframe}{cornicecima}
\setinterfaceconstant{topoffset}{offsetcima}
diff --git a/tex/context/base/mult-low.lua b/tex/context/base/mult-low.lua
index 921a3062d..5e797590e 100644
--- a/tex/context/base/mult-low.lua
+++ b/tex/context/base/mult-low.lua
@@ -174,6 +174,8 @@ return {
"ruledhglue", "ruledvglue", "normalhglue", "normalvglue",
"ruledpenalty",
--
+ "filledhboxb", "filledhboxr", "filledhboxg", "filledhboxc", "filledhboxm", "filledhboxy", "filledhboxk",
+ --
"scratchcounter", "globalscratchcounter",
"scratchdimen", "globalscratchdimen",
"scratchskip", "globalscratchskip",
@@ -198,6 +200,7 @@ return {
"scratchtoksone", "scratchtokstwo", "scratchtoksthree",
"scratchboxone", "scratchboxtwo", "scratchboxthree",
"scratchnx", "scratchny", "scratchmx", "scratchmy",
+ "scratchunicode",
--
"scratchleftskip", "scratchrightskip", "scratchtopskip", "scratchbottomskip",
--
@@ -270,6 +273,7 @@ return {
"dosingleempty", "dodoubleempty", "dotripleempty", "doquadrupleempty", "doquintupleempty", "dosixtupleempty", "doseventupleempty",
"dosingleargument", "dodoubleargument", "dotripleargument", "doquadrupleargument", "doquintupleargument", "dosixtupleargument", "doseventupleargument",
"dosinglegroupempty", "dodoublegroupempty", "dotriplegroupempty", "doquadruplegroupempty", "doquintuplegroupempty",
+ "permitspacesbetweengroups", "dontpermitspacesbetweengroups",
--
"nopdfcompression", "maximumpdfcompression", "normalpdfcompression",
--
diff --git a/tex/context/base/mult-nl.mkii b/tex/context/base/mult-nl.mkii
index 9247f7ebf..3e4d6ede1 100644
--- a/tex/context/base/mult-nl.mkii
+++ b/tex/context/base/mult-nl.mkii
@@ -120,6 +120,7 @@
\setinterfacevariable{chapter}{hoofdstuk}
\setinterfacevariable{character}{letter}
\setinterfacevariable{characters}{letters}
+\setinterfacevariable{chemistry}{chemie}
\setinterfacevariable{cite}{cite}
\setinterfacevariable{color}{kleur}
\setinterfacevariable{column}{kolom}
@@ -594,6 +595,7 @@
\setinterfaceconstant{bottom}{onder}
\setinterfaceconstant{bottomafter}{bottomafter}
\setinterfaceconstant{bottombefore}{bottombefore}
+\setinterfaceconstant{bottomcommand}{ondercommando}
\setinterfaceconstant{bottomdistance}{onderafstand}
\setinterfaceconstant{bottomframe}{onderkader}
\setinterfaceconstant{bottomoffset}{onderoffset}
@@ -805,6 +807,7 @@
\setinterfaceconstant{menu}{menu}
\setinterfaceconstant{method}{methode}
\setinterfaceconstant{middle}{midden}
+\setinterfaceconstant{middlecommand}{middencommando}
\setinterfaceconstant{middlespeech}{middenuitspraak}
\setinterfaceconstant{middletext}{middentekst}
\setinterfaceconstant{midsentence}{middenzin}
@@ -1045,6 +1048,7 @@
\setinterfaceconstant{toffset}{toffset}
\setinterfaceconstant{tolerance}{tolerantie}
\setinterfaceconstant{top}{boven}
+\setinterfaceconstant{topcommand}{bovencommando}
\setinterfaceconstant{topdistance}{bovenafstand}
\setinterfaceconstant{topframe}{bovenkader}
\setinterfaceconstant{topoffset}{bovenoffset}
diff --git a/tex/context/base/mult-pe.mkii b/tex/context/base/mult-pe.mkii
index 82f7abcd9..ecff40bd7 100644
--- a/tex/context/base/mult-pe.mkii
+++ b/tex/context/base/mult-pe.mkii
@@ -120,6 +120,7 @@
\setinterfacevariable{chapter}{فصل}
\setinterfacevariable{character}{حرف}
\setinterfacevariable{characters}{حرفها}
+\setinterfacevariable{chemistry}{chemistry}
\setinterfacevariable{cite}{cite}
\setinterfacevariable{color}{رنگ}
\setinterfacevariable{column}{ستون}
@@ -594,6 +595,7 @@
\setinterfaceconstant{bottom}{پایین}
\setinterfaceconstant{bottomafter}{bottomafter}
\setinterfaceconstant{bottombefore}{bottombefore}
+\setinterfaceconstant{bottomcommand}{bottomcommand}
\setinterfaceconstant{bottomdistance}{فاصله‌پایین}
\setinterfaceconstant{bottomframe}{قالب‌پایین}
\setinterfaceconstant{bottomoffset}{آفست‌پایین}
@@ -805,6 +807,7 @@
\setinterfaceconstant{menu}{منو}
\setinterfaceconstant{method}{روش}
\setinterfaceconstant{middle}{میان}
+\setinterfaceconstant{middlecommand}{middlecommand}
\setinterfaceconstant{middlespeech}{سخنرانی‌میانی}
\setinterfaceconstant{middletext}{متن‌میانی}
\setinterfaceconstant{midsentence}{جمله‌میانی}
@@ -1045,6 +1048,7 @@
\setinterfaceconstant{toffset}{toffset}
\setinterfaceconstant{tolerance}{بردباری}
\setinterfaceconstant{top}{بالا}
+\setinterfaceconstant{topcommand}{topcommand}
\setinterfaceconstant{topdistance}{فاصله‌بالا}
\setinterfaceconstant{topframe}{قالب‌راست}
\setinterfaceconstant{topoffset}{آفست‌بالا}
diff --git a/tex/context/base/mult-ro.mkii b/tex/context/base/mult-ro.mkii
index 01ffe9fbe..6f4a1be86 100644
--- a/tex/context/base/mult-ro.mkii
+++ b/tex/context/base/mult-ro.mkii
@@ -120,6 +120,7 @@
\setinterfacevariable{chapter}{capitol}
\setinterfacevariable{character}{caracter}
\setinterfacevariable{characters}{caractere}
+\setinterfacevariable{chemistry}{chemistry}
\setinterfacevariable{cite}{cite}
\setinterfacevariable{color}{culoare}
\setinterfacevariable{column}{coloana}
@@ -594,6 +595,7 @@
\setinterfaceconstant{bottom}{jos}
\setinterfaceconstant{bottomafter}{bottomafter}
\setinterfaceconstant{bottombefore}{bottombefore}
+\setinterfaceconstant{bottomcommand}{bottomcommand}
\setinterfaceconstant{bottomdistance}{distantajos}
\setinterfaceconstant{bottomframe}{framejos}
\setinterfaceconstant{bottomoffset}{offsetjos}
@@ -805,6 +807,7 @@
\setinterfaceconstant{menu}{meniu}
\setinterfaceconstant{method}{metoda}
\setinterfaceconstant{middle}{mijloc}
+\setinterfaceconstant{middlecommand}{middlecommand}
\setinterfaceconstant{middlespeech}{middlespeech}
\setinterfaceconstant{middletext}{textmijloc}
\setinterfaceconstant{midsentence}{midsentence}
@@ -1045,6 +1048,7 @@
\setinterfaceconstant{toffset}{toffset}
\setinterfaceconstant{tolerance}{toleranta}
\setinterfaceconstant{top}{sus}
+\setinterfaceconstant{topcommand}{topcommand}
\setinterfaceconstant{topdistance}{distantasus}
\setinterfaceconstant{topframe}{framesus}
\setinterfaceconstant{topoffset}{offsetsus}
diff --git a/tex/context/base/node-bck.lua b/tex/context/base/node-bck.lua
index 35fdd3a36..2630df2f4 100644
--- a/tex/context/base/node-bck.lua
+++ b/tex/context/base/node-bck.lua
@@ -73,8 +73,10 @@ local function add_backgrounds(head) -- rather old code .. to be redone
end
rule.next = glue
glue.prev = rule
- glue.next = list
- list.prev = glue
+ if list then
+ glue.next = list
+ list.prev = glue
+ end
current.list = rule
end
end
@@ -132,8 +134,10 @@ local function add_alignbackgrounds(head)
end
rule.next = glue
glue.prev = rule
- glue.next = list
- list.prev = glue
+ if list then
+ glue.next = list
+ list.prev = glue
+ end
current.list = rule
end
end
diff --git a/tex/context/base/spac-ver.mkiv b/tex/context/base/spac-ver.mkiv
index 0b280c149..f407a66d8 100644
--- a/tex/context/base/spac-ver.mkiv
+++ b/tex/context/base/spac-ver.mkiv
@@ -972,6 +972,14 @@
{\def\strutwidth{.8pt}%
\setstrut}
+\unexpanded\def\dontshowstruts
+ {\unsetteststrut
+ \settestcrlf}
+
+\unexpanded\def\unsetteststrut
+ {\let\strutwidth\zeropoint
+ \setstrut}
+
\def\autostrutfactor{1.1}
\unexpanded\def\setautostrut
diff --git a/tex/context/base/status-files.pdf b/tex/context/base/status-files.pdf
index 7f3f8b150..dd73b2e66 100644
--- a/tex/context/base/status-files.pdf
+++ b/tex/context/base/status-files.pdf
Binary files differ
diff --git a/tex/context/base/status-lua.pdf b/tex/context/base/status-lua.pdf
index f59856803..c1712b6b2 100644
--- a/tex/context/base/status-lua.pdf
+++ b/tex/context/base/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/strc-lst.lua b/tex/context/base/strc-lst.lua
index 115b58063..578c0adeb 100644
--- a/tex/context/base/strc-lst.lua
+++ b/tex/context/base/strc-lst.lua
@@ -239,10 +239,10 @@ local function filtercollected(names, criterium, number, collected, forced, nest
criterium = gsub(criterium or ""," ","") -- not needed
-- new, will be applied stepwise
local wantedblock, wantedcriterium = lpegmatch(splitter,criterium) -- block:criterium
- if not wantedcriterium then
- block = documents.data.block
- elseif wantedblock == "" or wantedblock == variables.all or wantedblock == variables.text then
+ if wantedblock == "" or wantedblock == variables.all or wantedblock == variables.text then
criterium = wantedcriterium ~= "" and wantedcriterium or criterium
+ elseif not wantedcriterium then
+ block = documents.data.block
else
block, criterium = wantedblock, wantedcriterium
end
diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua
index 0fd8fcd93..e5ce5973b 100644
--- a/tex/context/base/strc-ref.lua
+++ b/tex/context/base/strc-ref.lua
@@ -1858,13 +1858,19 @@ filters.section = { }
function filters.section.number(data,what,prefixspec)
if data then
local numberdata = data.numberdata
- if numberdata then
- sections.typesetnumber(numberdata,"number",prefixspec,numberdata)
- else
+ if not numberdata then
local useddata = data.useddata
if useddata and useddata.number then
context(useddata.number)
end
+ elseif numberdata.hidenumber then
+ local references = data.references
+ if references then
+ report_unknown("reference %q has a hidden number",references.reference or "?")
+ end
+ context.wrongreference() -- maybe an option
+ else
+ sections.typesetnumber(numberdata,"number",prefixspec,numberdata)
end
end
end
diff --git a/tex/context/base/strc-ref.mkvi b/tex/context/base/strc-ref.mkvi
index edbeded68..e69df8d7b 100644
--- a/tex/context/base/strc-ref.mkvi
+++ b/tex/context/base/strc-ref.mkvi
@@ -603,6 +603,7 @@
%D text).
\def\dummyreference{{\tttf ??}}
+\def\wrongreference{{\tttf !!}}
%D To prevent repetitive messages concerning a reference
%D being defined, we set such an unknown reference to an empty
diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv
index 058a251cb..406bbae8b 100644
--- a/tex/context/base/syst-aux.mkiv
+++ b/tex/context/base/syst-aux.mkiv
@@ -2712,8 +2712,8 @@
\newconditional\c_syst_helpers_permit_spaces_between_groups
-\def \permitspacesbetweengroups{\settrue \c_syst_helpers_permit_spaces_between_groups}
-\def\dontpermitspacesbetweengroups{\setfalse\c_syst_helpers_permit_spaces_between_groups}
+\unexpanded\def \permitspacesbetweengroups{\settrue \c_syst_helpers_permit_spaces_between_groups}
+\unexpanded\def\dontpermitspacesbetweengroups{\setfalse\c_syst_helpers_permit_spaces_between_groups}
\dontpermitspacesbetweengroups
diff --git a/tex/context/base/syst-ini.mkiv b/tex/context/base/syst-ini.mkiv
index 1c87c4ed4..59313ba49 100644
--- a/tex/context/base/syst-ini.mkiv
+++ b/tex/context/base/syst-ini.mkiv
@@ -364,6 +364,8 @@
\newcount\scratchmx
\newcount\scratchmy
+\newcount\scratchunicode
+
\newdimen\scratchleftskip
\newdimen\scratchrightskip
\newdimen\scratchtopskip
diff --git a/tex/context/base/trac-vis.mkiv b/tex/context/base/trac-vis.mkiv
index 2ec48f375..99269c6dc 100644
--- a/tex/context/base/trac-vis.mkiv
+++ b/tex/context/base/trac-vis.mkiv
@@ -89,7 +89,7 @@
\definecolor[f:c:t][a=1,t=.25,c=1]
\definecolor[f:m:t][a=1,t=.25,m=1]
\definecolor[f:y:t][a=1,t=.25,y=1]
-\definecolor[f:k:t][a=1,t=.25,k=1]
+\definecolor[f:k:t][a=1,t=.25,s=0]
% \def\node_backgrounds_boxes_add#1[#2]%
% {\node_backgrounds_boxes_initialize
diff --git a/tex/context/interface/keys-cs.xml b/tex/context/interface/keys-cs.xml
index 05c9fdf1d..a4afdd708 100644
--- a/tex/context/interface/keys-cs.xml
+++ b/tex/context/interface/keys-cs.xml
@@ -123,6 +123,7 @@
<cd:variable name='chapter' value='kapitola'/>
<cd:variable name='character' value='pismeno'/>
<cd:variable name='characters' value='pismena'/>
+ <cd:variable name='chemistry' value='chemistry'/>
<cd:variable name='cite' value='cite'/>
<cd:variable name='color' value='barevne'/>
<cd:variable name='column' value='column'/>
@@ -600,6 +601,7 @@
<cd:constant name='bottom' value='spodek'/>
<cd:constant name='bottomafter' value='bottomafter'/>
<cd:constant name='bottombefore' value='bottombefore'/>
+ <cd:constant name='bottomcommand' value='bottomcommand'/>
<cd:constant name='bottomdistance' value='vzdalenostspodku'/>
<cd:constant name='bottomframe' value='ramecekdole'/>
<cd:constant name='bottomoffset' value='offsetspodku'/>
@@ -811,6 +813,7 @@
<cd:constant name='menu' value='menu'/>
<cd:constant name='method' value='metoda'/>
<cd:constant name='middle' value='stredni'/>
+ <cd:constant name='middlecommand' value='middlecommand'/>
<cd:constant name='middlespeech' value='middlespeech'/>
<cd:constant name='middletext' value='strednitext'/>
<cd:constant name='midsentence' value='midsentence'/>
@@ -1051,6 +1054,7 @@
<cd:constant name='toffset' value='toffset'/>
<cd:constant name='tolerance' value='tolerance'/>
<cd:constant name='top' value='vrsek'/>
+ <cd:constant name='topcommand' value='topcommand'/>
<cd:constant name='topdistance' value='vzdalenostvrsku'/>
<cd:constant name='topframe' value='rameceknahore'/>
<cd:constant name='topoffset' value='offsetvrsku'/>
diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml
index 31a48c2a2..db8b98c10 100644
--- a/tex/context/interface/keys-de.xml
+++ b/tex/context/interface/keys-de.xml
@@ -123,6 +123,7 @@
<cd:variable name='chapter' value='kapitel'/>
<cd:variable name='character' value='buchstabe'/>
<cd:variable name='characters' value='buchstaben'/>
+ <cd:variable name='chemistry' value='chemistry'/>
<cd:variable name='cite' value='cite'/>
<cd:variable name='color' value='farbe'/>
<cd:variable name='column' value='column'/>
@@ -600,6 +601,7 @@
<cd:constant name='bottom' value='unten'/>
<cd:constant name='bottomafter' value='bottomafter'/>
<cd:constant name='bottombefore' value='bottombefore'/>
+ <cd:constant name='bottomcommand' value='bottomcommand'/>
<cd:constant name='bottomdistance' value='abstandunten'/>
<cd:constant name='bottomframe' value='untenrahmen'/>
<cd:constant name='bottomoffset' value='untenoffset'/>
@@ -811,6 +813,7 @@
<cd:constant name='menu' value='menue'/>
<cd:constant name='method' value='methode'/>
<cd:constant name='middle' value='mittig'/>
+ <cd:constant name='middlecommand' value='middlecommand'/>
<cd:constant name='middlespeech' value='middlespeech'/>
<cd:constant name='middletext' value='mittigertext'/>
<cd:constant name='midsentence' value='midsentence'/>
@@ -1051,6 +1054,7 @@
<cd:constant name='toffset' value='toffset'/>
<cd:constant name='tolerance' value='toleranz'/>
<cd:constant name='top' value='oben'/>
+ <cd:constant name='topcommand' value='topcommand'/>
<cd:constant name='topdistance' value='obenabstand'/>
<cd:constant name='topframe' value='obenrahmen'/>
<cd:constant name='topoffset' value='obenoffset'/>
diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml
index 57475e65b..ea8596926 100644
--- a/tex/context/interface/keys-en.xml
+++ b/tex/context/interface/keys-en.xml
@@ -123,6 +123,7 @@
<cd:variable name='chapter' value='chapter'/>
<cd:variable name='character' value='character'/>
<cd:variable name='characters' value='characters'/>
+ <cd:variable name='chemistry' value='chemistry'/>
<cd:variable name='cite' value='cite'/>
<cd:variable name='color' value='color'/>
<cd:variable name='column' value='column'/>
@@ -600,6 +601,7 @@
<cd:constant name='bottom' value='bottom'/>
<cd:constant name='bottomafter' value='bottomafter'/>
<cd:constant name='bottombefore' value='bottombefore'/>
+ <cd:constant name='bottomcommand' value='bottomcommand'/>
<cd:constant name='bottomdistance' value='bottomdistance'/>
<cd:constant name='bottomframe' value='bottomframe'/>
<cd:constant name='bottomoffset' value='bottomoffset'/>
@@ -811,6 +813,7 @@
<cd:constant name='menu' value='menu'/>
<cd:constant name='method' value='method'/>
<cd:constant name='middle' value='middle'/>
+ <cd:constant name='middlecommand' value='middlecommand'/>
<cd:constant name='middlespeech' value='middlespeech'/>
<cd:constant name='middletext' value='middletext'/>
<cd:constant name='midsentence' value='midsentence'/>
@@ -1051,6 +1054,7 @@
<cd:constant name='toffset' value='toffset'/>
<cd:constant name='tolerance' value='tolerance'/>
<cd:constant name='top' value='top'/>
+ <cd:constant name='topcommand' value='topcommand'/>
<cd:constant name='topdistance' value='topdistance'/>
<cd:constant name='topframe' value='topframe'/>
<cd:constant name='topoffset' value='topoffset'/>
diff --git a/tex/context/interface/keys-fr.xml b/tex/context/interface/keys-fr.xml
index 7fb90a042..13a6924bd 100644
--- a/tex/context/interface/keys-fr.xml
+++ b/tex/context/interface/keys-fr.xml
@@ -123,6 +123,7 @@
<cd:variable name='chapter' value='chapitre'/>
<cd:variable name='character' value='caractere'/>
<cd:variable name='characters' value='caracteres'/>
+ <cd:variable name='chemistry' value='chemistry'/>
<cd:variable name='cite' value='cite'/>
<cd:variable name='color' value='couleur'/>
<cd:variable name='column' value='colonne'/>
@@ -600,6 +601,7 @@
<cd:constant name='bottom' value='inf'/>
<cd:constant name='bottomafter' value='bottomafter'/>
<cd:constant name='bottombefore' value='bottombefore'/>
+ <cd:constant name='bottomcommand' value='bottomcommand'/>
<cd:constant name='bottomdistance' value='distanceinf'/>
<cd:constant name='bottomframe' value='cadreinf'/>
<cd:constant name='bottomoffset' value='decalageinf'/>
@@ -811,6 +813,7 @@
<cd:constant name='menu' value='menu'/>
<cd:constant name='method' value='methode'/>
<cd:constant name='middle' value='milieu'/>
+ <cd:constant name='middlecommand' value='middlecommand'/>
<cd:constant name='middlespeech' value='middlespeech'/>
<cd:constant name='middletext' value='textecentre'/>
<cd:constant name='midsentence' value='midsentence'/>
@@ -1051,6 +1054,7 @@
<cd:constant name='toffset' value='toffset'/>
<cd:constant name='tolerance' value='tolerance'/>
<cd:constant name='top' value='sup'/>
+ <cd:constant name='topcommand' value='topcommand'/>
<cd:constant name='topdistance' value='distancesup'/>
<cd:constant name='topframe' value='cadresup'/>
<cd:constant name='topoffset' value='decalagesup'/>
diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml
index 336930e16..63fb0d4f3 100644
--- a/tex/context/interface/keys-it.xml
+++ b/tex/context/interface/keys-it.xml
@@ -123,6 +123,7 @@
<cd:variable name='chapter' value='capitolo'/>
<cd:variable name='character' value='lettera'/>
<cd:variable name='characters' value='lettere'/>
+ <cd:variable name='chemistry' value='chemistry'/>
<cd:variable name='cite' value='cite'/>
<cd:variable name='color' value='colore'/>
<cd:variable name='column' value='colonna'/>
@@ -600,6 +601,7 @@
<cd:constant name='bottom' value='fondo'/>
<cd:constant name='bottomafter' value='bottomafter'/>
<cd:constant name='bottombefore' value='bottombefore'/>
+ <cd:constant name='bottomcommand' value='bottomcommand'/>
<cd:constant name='bottomdistance' value='distanzafondo'/>
<cd:constant name='bottomframe' value='cornicefondo'/>
<cd:constant name='bottomoffset' value='offsetfondo'/>
@@ -811,6 +813,7 @@
<cd:constant name='menu' value='menu'/>
<cd:constant name='method' value='metodo'/>
<cd:constant name='middle' value='centro'/>
+ <cd:constant name='middlecommand' value='middlecommand'/>
<cd:constant name='middlespeech' value='middlespeech'/>
<cd:constant name='middletext' value='testocentro'/>
<cd:constant name='midsentence' value='midsentence'/>
@@ -1051,6 +1054,7 @@
<cd:constant name='toffset' value='toffset'/>
<cd:constant name='tolerance' value='tolleranza'/>
<cd:constant name='top' value='cima'/>
+ <cd:constant name='topcommand' value='topcommand'/>
<cd:constant name='topdistance' value='distanzacima'/>
<cd:constant name='topframe' value='cornicecima'/>
<cd:constant name='topoffset' value='offsetcima'/>
diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml
index 4e0797424..aee1820ca 100644
--- a/tex/context/interface/keys-nl.xml
+++ b/tex/context/interface/keys-nl.xml
@@ -123,6 +123,7 @@
<cd:variable name='chapter' value='hoofdstuk'/>
<cd:variable name='character' value='letter'/>
<cd:variable name='characters' value='letters'/>
+ <cd:variable name='chemistry' value='chemie'/>
<cd:variable name='cite' value='cite'/>
<cd:variable name='color' value='kleur'/>
<cd:variable name='column' value='kolom'/>
@@ -600,6 +601,7 @@
<cd:constant name='bottom' value='onder'/>
<cd:constant name='bottomafter' value='bottomafter'/>
<cd:constant name='bottombefore' value='bottombefore'/>
+ <cd:constant name='bottomcommand' value='ondercommando'/>
<cd:constant name='bottomdistance' value='onderafstand'/>
<cd:constant name='bottomframe' value='onderkader'/>
<cd:constant name='bottomoffset' value='onderoffset'/>
@@ -811,6 +813,7 @@
<cd:constant name='menu' value='menu'/>
<cd:constant name='method' value='methode'/>
<cd:constant name='middle' value='midden'/>
+ <cd:constant name='middlecommand' value='middencommando'/>
<cd:constant name='middlespeech' value='middenuitspraak'/>
<cd:constant name='middletext' value='middentekst'/>
<cd:constant name='midsentence' value='middenzin'/>
@@ -1051,6 +1054,7 @@
<cd:constant name='toffset' value='toffset'/>
<cd:constant name='tolerance' value='tolerantie'/>
<cd:constant name='top' value='boven'/>
+ <cd:constant name='topcommand' value='bovencommando'/>
<cd:constant name='topdistance' value='bovenafstand'/>
<cd:constant name='topframe' value='bovenkader'/>
<cd:constant name='topoffset' value='bovenoffset'/>
diff --git a/tex/context/interface/keys-pe.xml b/tex/context/interface/keys-pe.xml
index 014a138ac..0e39a6ae7 100644
--- a/tex/context/interface/keys-pe.xml
+++ b/tex/context/interface/keys-pe.xml
@@ -123,6 +123,7 @@
<cd:variable name='chapter' value='فصل'/>
<cd:variable name='character' value='حرف'/>
<cd:variable name='characters' value='حرفها'/>
+ <cd:variable name='chemistry' value='chemistry'/>
<cd:variable name='cite' value='cite'/>
<cd:variable name='color' value='رنگ'/>
<cd:variable name='column' value='ستون'/>
@@ -600,6 +601,7 @@
<cd:constant name='bottom' value='پایین'/>
<cd:constant name='bottomafter' value='bottomafter'/>
<cd:constant name='bottombefore' value='bottombefore'/>
+ <cd:constant name='bottomcommand' value='bottomcommand'/>
<cd:constant name='bottomdistance' value='فاصله‌پایین'/>
<cd:constant name='bottomframe' value='قالب‌پایین'/>
<cd:constant name='bottomoffset' value='آفست‌پایین'/>
@@ -811,6 +813,7 @@
<cd:constant name='menu' value='منو'/>
<cd:constant name='method' value='روش'/>
<cd:constant name='middle' value='میان'/>
+ <cd:constant name='middlecommand' value='middlecommand'/>
<cd:constant name='middlespeech' value='سخنرانی‌میانی'/>
<cd:constant name='middletext' value='متن‌میانی'/>
<cd:constant name='midsentence' value='جمله‌میانی'/>
@@ -1051,6 +1054,7 @@
<cd:constant name='toffset' value='toffset'/>
<cd:constant name='tolerance' value='بردباری'/>
<cd:constant name='top' value='بالا'/>
+ <cd:constant name='topcommand' value='topcommand'/>
<cd:constant name='topdistance' value='فاصله‌بالا'/>
<cd:constant name='topframe' value='قالب‌راست'/>
<cd:constant name='topoffset' value='آفست‌بالا'/>
diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml
index 77209d4bb..e9ff43962 100644
--- a/tex/context/interface/keys-ro.xml
+++ b/tex/context/interface/keys-ro.xml
@@ -123,6 +123,7 @@
<cd:variable name='chapter' value='capitol'/>
<cd:variable name='character' value='caracter'/>
<cd:variable name='characters' value='caractere'/>
+ <cd:variable name='chemistry' value='chemistry'/>
<cd:variable name='cite' value='cite'/>
<cd:variable name='color' value='culoare'/>
<cd:variable name='column' value='coloana'/>
@@ -600,6 +601,7 @@
<cd:constant name='bottom' value='jos'/>
<cd:constant name='bottomafter' value='bottomafter'/>
<cd:constant name='bottombefore' value='bottombefore'/>
+ <cd:constant name='bottomcommand' value='bottomcommand'/>
<cd:constant name='bottomdistance' value='distantajos'/>
<cd:constant name='bottomframe' value='framejos'/>
<cd:constant name='bottomoffset' value='offsetjos'/>
@@ -811,6 +813,7 @@
<cd:constant name='menu' value='meniu'/>
<cd:constant name='method' value='metoda'/>
<cd:constant name='middle' value='mijloc'/>
+ <cd:constant name='middlecommand' value='middlecommand'/>
<cd:constant name='middlespeech' value='middlespeech'/>
<cd:constant name='middletext' value='textmijloc'/>
<cd:constant name='midsentence' value='midsentence'/>
@@ -1051,6 +1054,7 @@
<cd:constant name='toffset' value='toffset'/>
<cd:constant name='tolerance' value='toleranta'/>
<cd:constant name='top' value='sus'/>
+ <cd:constant name='topcommand' value='topcommand'/>
<cd:constant name='topdistance' value='distantasus'/>
<cd:constant name='topframe' value='framesus'/>
<cd:constant name='topoffset' value='offsetsus'/>
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 000b7fae9..2e455b3f2 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 : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 01/02/13 18:19:13
+-- merge date : 01/07/13 23:25:28
do -- begin closure to overcome local limits and interference
@@ -5710,7 +5710,7 @@ local otf = fonts.handlers.otf
otf.glists = { "gsub", "gpos" }
-otf.version = 2.737 -- beware: also sync font-mis.lua
+otf.version = 2.738 -- beware: also sync font-mis.lua
otf.cache = containers.define("fonts", "otf", otf.version, true)
local fontdata = fonts.hashes.identifiers