summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2020-12-27 17:39:33 +0100
committerContext Git Mirror Bot <phg@phi-gamma.net>2020-12-27 17:39:33 +0100
commit4a099fb402241bb64a08a0167b458bed09ec8a3e (patch)
treea06162bbffed3cb308f29e0176b0975a578213d7 /tex
parent34bc3e479e76b06633436a744a30719f4d7f20f7 (diff)
downloadcontext-4a099fb402241bb64a08a0167b458bed09ec8a3e.tar.gz
2020-12-27 16:37:00
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkii/mult-it.mkii6
-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/font-imp-effects.lua103
-rw-r--r--tex/context/base/mkiv/mult-fun.lua2
-rw-r--r--tex/context/base/mkiv/mult-prm.lua5
-rw-r--r--tex/context/base/mkiv/phys-dim.lua14
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin26109 -> 26485 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin253687 -> 253526 bytes
-rw-r--r--tex/context/base/mkiv/strc-syn.lua14
-rw-r--r--tex/context/base/mkxl/cont-new.mkxl2
-rw-r--r--tex/context/base/mkxl/context.mkxl3
-rw-r--r--tex/context/base/mkxl/driv-shp.lmt7
-rw-r--r--tex/context/base/mkxl/font-ctx.lmt5
-rw-r--r--tex/context/base/mkxl/font-glf.mklx173
-rw-r--r--tex/context/base/mkxl/font-ini.mklx29
-rw-r--r--tex/context/base/mkxl/mlib-scn.lmt6
-rw-r--r--tex/context/base/mkxl/strc-flt.mklx17
-rw-r--r--tex/context/base/mkxl/strc-not.mklx8
-rw-r--r--tex/context/base/mkxl/strc-syn.mkxl2
-rw-r--r--tex/context/base/mkxl/syst-ini.mkxl2
-rw-r--r--tex/context/interface/mkii/keys-it.xml6
-rw-r--r--tex/context/modules/mkiv/s-system-macros.mkxl13
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua90
26 files changed, 368 insertions, 147 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 4d3bf955f..5ccc6f75e 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{2020.12.24 12:12}
+\newcontextversion{2020.12.27 16:34}
%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 24750486c..c4b59da29 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{2020.12.24 12:12}
+\edef\contextversion{2020.12.27 16:34}
%D For those who want to use this:
diff --git a/tex/context/base/mkii/mult-it.mkii b/tex/context/base/mkii/mult-it.mkii
index 19262c103..cd463106f 100644
--- a/tex/context/base/mkii/mult-it.mkii
+++ b/tex/context/base/mkii/mult-it.mkii
@@ -774,6 +774,7 @@
\setinterfaceconstant{deepnumbercommand}{deepnumbercommand}
\setinterfaceconstant{deeptextcommand}{deeptextcommand}
\setinterfaceconstant{default}{implicito}
+\setinterfaceconstant{define}{define}
\setinterfaceconstant{delay}{attesa}
\setinterfaceconstant{depth}{profondita}
\setinterfaceconstant{depthcorrection}{correzioneprofondita}
@@ -1130,6 +1131,7 @@
\setinterfaceconstant{reference}{riferimento}
\setinterfaceconstant{referencemethod}{referencemethod}
\setinterfaceconstant{referenceprefix}{referenceprefix}
+\setinterfaceconstant{referencetext}{referencetext}
\setinterfaceconstant{referencing}{referencing}
\setinterfaceconstant{region}{region}
\setinterfaceconstant{regionin}{entraregione}
@@ -2073,7 +2075,7 @@
\setinterfacecommand{startnarrower}{iniziapiustretto}
\setinterfacecommand{startopposite}{iniziaopposto}
\setinterfacecommand{startoverlay}{iniziasovrapposizione}
-\setinterfacecommand{startoverzicht}{iniziaoverview}
+\setinterfacecommand{startoverview}{iniziaoverview}
\setinterfacecommand{startpacked}{iniziaimpaccato}
\setinterfacecommand{startpositioning}{iniziaposizionamento}
\setinterfacecommand{startproduct}{iniziaprodotto}
@@ -2116,7 +2118,7 @@
\setinterfacecommand{stopnarrower}{terminapiustretto}
\setinterfacecommand{stopopposite}{terminaopposto}
\setinterfacecommand{stopoverlay}{terminasovrapposizione}
-\setinterfacecommand{stopoverzicht}{terminaoverview}
+\setinterfacecommand{stopoverview}{terminaoverview}
\setinterfacecommand{stoppacked}{terminaimpaccato}
\setinterfacecommand{stoppositioning}{terminaposizionamento}
\setinterfacecommand{stopproduct}{terminaprodotto}
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 4d2e5f928..6382ad7d5 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{2020.12.24 12:12}
+\newcontextversion{2020.12.27 16:34}
%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 146c1276d..38344c8e2 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -45,7 +45,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2020.12.24 12:12}
+\edef\contextversion{2020.12.27 16:34}
%D Kind of special:
diff --git a/tex/context/base/mkiv/font-imp-effects.lua b/tex/context/base/mkiv/font-imp-effects.lua
index cf338ae49..43ce82b71 100644
--- a/tex/context/base/mkiv/font-imp-effects.lua
+++ b/tex/context/base/mkiv/font-imp-effects.lua
@@ -217,64 +217,86 @@ local rules = {
-- radicals are not yet ok
-local function setmathparameters(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
- if delta ~= 0 then
- for i=1,#rules do
- local name = rules[i]
- local value = mathparameters[name]
- if value then
- mathparameters[name] = (squeeze or 1) * (value + dx)
+local setmathparameters
+local setmathcharacters
+
+if CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0 then
+
+ setmathparameters = function(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
+ if delta ~= 0 then
+ for i=1,#rules do
+ local name = rules[i]
+ local value = mathparameters[name]
+ if value then
+ mathparameters[name] = (squeeze or 1) * (value + dy)
+ end
end
end
end
-end
-local function setmathcharacters(tfmdata,characters,mathparameters,dx,dy,squeeze,wdelta,hdelta,ddelta)
+ setmathcharacters = function()
+ end
- -- still not the perfect rule
+else
- local function wdpatch(char)
- if wsnap ~= 0 then
- char.width = char.width + wdelta/2
+ setmathparameters = function(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
+ if delta ~= 0 then
+ for i=1,#rules do
+ local name = rules[i]
+ local value = mathparameters[name]
+ if value then
+ mathparameters[name] = (squeeze or 1) * (value + dy)
+ end
+ end
end
end
- local function htpatch(char)
- if hsnap ~= 0 then
- local height = char.height
- if height then
- char.height = char.height + 2 * dy
+ setmathcharacters = function(tfmdata,characters,mathparameters,dx,dy,squeeze,wdelta,hdelta,ddelta)
+
+ -- still not the perfect rule
+
+ local function wdpatch(char)
+ if wsnap ~= 0 then
+ char.width = char.width + wdelta/2
+ end
+ end
+
+ local function htpatch(char)
+ if hsnap ~= 0 then
+ local height = char.height
+ if height then
+ char.height = char.height + 2 * dy
+ end
end
end
- end
- local character = characters[0x221A]
+ local character = characters[0x221A]
- if character and character.next then
--- print("base char",0x221A,table.sequenced(character))
- local char = character
- local next = character.next
- wdpatch(char)
- htpatch(char)
- while next do
- char = characters[next]
+ if character and character.next then
+ local char = character
+ local next = character.next
wdpatch(char)
htpatch(char)
--- print("next char",next,table.sequenced(char))
- next = char.next
- end
- if char then
- local v = char.vert_variants
- if v then
- local top = v[#v]
- if top then
- local char = characters[top.glyph]
--- print("top char",top.glyph,table.sequenced(char))
- htpatch(char)
+ while next do
+ char = characters[next]
+ wdpatch(char)
+ htpatch(char)
+ next = char.next
+ end
+ if char then
+ local v = char.vert_variants
+ if v then
+ local top = v[#v]
+ if top then
+ local char = characters[top.glyph]
+ htpatch(char)
+ end
end
end
end
+
end
+
end
-- local show_effect = { "lua", function(f,c)
@@ -282,9 +304,6 @@ end
-- inspect(fonts.hashes.characters[f][c])
-- end }
--- local show_effect = { "lua", "print('!')" }
-
------ shiftmode = false -- test in mkiv and lmtx
local shiftmode = CONTEXTLMTXMODE and CONTEXTLMTXMODE > 0
local function manipulateeffect(tfmdata)
diff --git a/tex/context/base/mkiv/mult-fun.lua b/tex/context/base/mkiv/mult-fun.lua
index 41ca68613..ba2e3469c 100644
--- a/tex/context/base/mkiv/mult-fun.lua
+++ b/tex/context/base/mkiv/mult-fun.lua
@@ -17,7 +17,7 @@ return {
"drawoptionsfactor",
"dq", "sq",
"crossingscale", "crossingoption",
- "contextlmtxmode", "metafunversion",
+ "contextlmtxmode", "metafunversion", "minifunversion",
--
-- for the moment we put these here as they need to stand out
--
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index 7014000dd..a62c43db7 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -37,6 +37,7 @@ return {
"marks",
"muexpr",
"mutoglue",
+ "numericscale",
"numexpr",
"pagediscards",
"parshapedimen",
@@ -297,11 +298,12 @@ return {
"gletcsname",
"gluespecdef",
"glyphdatafield",
- "glyphdimensionsmode",
"glyphoptions",
"glyphscriptfield",
"glyphstatefield",
+ "glyphxoffset",
"glyphxscale",
+ "glyphyoffset",
"glyphyscale",
"gtoksapp",
"gtokspre",
@@ -657,6 +659,7 @@ return {
"gdef",
"global",
"globaldefs",
+ "glyph",
"halign",
"hangafter",
"hangindent",
diff --git a/tex/context/base/mkiv/phys-dim.lua b/tex/context/base/mkiv/phys-dim.lua
index 54f6c3c83..faf458738 100644
--- a/tex/context/base/mkiv/phys-dim.lua
+++ b/tex/context/base/mkiv/phys-dim.lua
@@ -269,7 +269,7 @@ local long_units = {
Celsius = "celsius",
Lumen = "lumen",
Lux = "lux",
- Bequerel = "bequerel",
+ Becquerel = "becquerel",
Gray = "gray",
Sievert = "sievert",
Katal = "katal",
@@ -608,7 +608,7 @@ labels.units = allocate {
celsius = { labels = { en = [[\checkedtextcelsius]] } }, -- 0x2103
lumen = { labels = { en = [[lm]] } },
lux = { labels = { en = [[lx]] } },
- bequerel = { labels = { en = [[Bq]] } },
+ becquerel = { labels = { en = [[Bq]] } },
gray = { labels = { en = [[Gy]] } },
sievert = { labels = { en = [[Sv]] } },
katal = { labels = { en = [[kat]] } },
@@ -867,10 +867,12 @@ local function update_parsers() -- todo: don't remap utf sequences
-- todo: avoid \ctx_unitsNstart\ctx_unitsNstop (weird that it can happen .. now catched at tex end)
+ local letter = R("az","AZ")
+ local bound = #(1-letter)
-- local number = lpeg.patterns.number
local number = Cs( P("$") * (1-P("$"))^1 * P("$")
+ P([[\m{]]) * (1-P("}"))^1 * P("}")
- + (1-R("az","AZ")-P(" "))^1 -- todo: catch { } -- not ok
+ + (1-letter-P(" "))^1 -- todo: catch { } -- not ok
) / ctx_unitsN
local start = Cc(nil) / ctx_unitsNstart
@@ -880,11 +882,11 @@ local function update_parsers() -- todo: don't remap utf sequences
local close = P(")") * Cc(nil) / ctx_unitsPclose
local range = somespace
- * ( (P("±") + P("pm")) / "" / ctx_unitsRPM
- + (P("–") + P("to")) / "" / ctx_unitsRTO )
+ * ( (P("±") + P("pm") * bound) / "" / ctx_unitsRPM
+ + (P("–") + P("to") * bound) / "" / ctx_unitsRTO )
* somespace
- local about = (P("±") + P("pm")) / "" / ctx_unitsRabout
+ local about = (P("±") + P("pm") * bound) / "" / ctx_unitsRabout
* somespace
-- todo: start / stop
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 2b8fe901e..3d46ca41f 100644
--- a/tex/context/base/mkiv/status-files.pdf
+++ b/tex/context/base/mkiv/status-files.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/status-lua.pdf b/tex/context/base/mkiv/status-lua.pdf
index f6049db80..57f514203 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/strc-syn.lua b/tex/context/base/mkiv/strc-syn.lua
index eec025593..c0ebb556c 100644
--- a/tex/context/base/mkiv/strc-syn.lua
+++ b/tex/context/base/mkiv/strc-syn.lua
@@ -37,6 +37,20 @@ end
local function finalizer()
for entry, data in next, tobesaved do
data.hash = nil
+ -- being sparse can be an option but often we actually do want the
+ -- whole list so we don't do this ... only as possible option
+ --
+ -- local entries = data.entries
+ -- local t = { }
+ -- local n = 0
+ -- for i=1,#entries do
+ -- local e = entries[i]
+ -- if e.definition.shown then
+ -- n = n + 1
+ -- t[n] = e
+ -- end
+ -- end
+ -- data.entries = t
end
end
diff --git a/tex/context/base/mkxl/cont-new.mkxl b/tex/context/base/mkxl/cont-new.mkxl
index ceb357fad..fe62d0f8e 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{2020.12.24 12:12}
+\newcontextversion{2020.12.27 16:34}
%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 fe891d156..ab96731e4 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{2020.12.24 12:12}
+\immutable\edef\contextversion{2020.12.27 16:34}
%overloadmode 1 % check frozen / warning
%overloadmode 2 % check frozen / error
@@ -373,6 +373,7 @@
\loadmklxfile{font-fea}
\loadmklxfile{font-mat}
\loadmklxfile{font-ini}
+\loadmklxfile{font-glf}
\loadmklxfile{font-sym}
\loadmklxfile{font-sty}
\loadmklxfile{font-set}
diff --git a/tex/context/base/mkxl/driv-shp.lmt b/tex/context/base/mkxl/driv-shp.lmt
index dcdbd3f62..e11ca76be 100644
--- a/tex/context/base/mkxl/driv-shp.lmt
+++ b/tex/context/base/mkxl/driv-shp.lmt
@@ -305,9 +305,6 @@ v = v * sy
pos_v = s[2]
level = level - 1
end
- elseif command == "pdf" then
- -- this will disappear and become a plug
- flushliteral(false,pos_h,pos_v,packet[2],packet[3])
elseif command == "rule" then
local size_v = packet[2]
local size_h = packet[3]
@@ -372,8 +369,12 @@ depth = depth * sy
code(font,char,pos_h,pos_v,sx,sy)
end
elseif command == "node" then
+ -- us this really useful?
local h = packet[2]
hlist_out(h,getlist(h))
+ elseif command == "pdf" then
+ -- this will disappear and become a plug
+ flushliteral(false,pos_h,pos_v,packet[2],packet[3])
-- elseif command == "image" then
-- -- doesn't work because intercepted by engine so we use a different
-- -- mechanism (for now)
diff --git a/tex/context/base/mkxl/font-ctx.lmt b/tex/context/base/mkxl/font-ctx.lmt
index 13785f8dd..8d4cfa05d 100644
--- a/tex/context/base/mkxl/font-ctx.lmt
+++ b/tex/context/base/mkxl/font-ctx.lmt
@@ -1091,6 +1091,7 @@ do -- else too many locals
local stoptiming = statistics.stoptiming
local setmacro = tokens.setters.macro
+ local ctxcatcodes = tex.ctxcatcodes
local reported = setmetatableindex(function(t,k)
local v = setmetatableindex(function(t,k)
@@ -1127,7 +1128,9 @@ do -- else too many locals
if size and mode then
texsetcount("scaledfontmode",mode)
-- ctx_setsomefontsize(size)
- setmacro("somefontsize",size)
+ -- We use a catcodetable, just in case it's 1.2\exheight (a corner case that showed
+ -- up in the lmtx manual: marking that changed size in the mids of some verbatim).
+ setmacro(ctxcatcodes,"somefontsize",size)
else
texsetcount("scaledfontmode",0)
-- ctx_setemptyfontsize()
diff --git a/tex/context/base/mkxl/font-glf.mklx b/tex/context/base/mkxl/font-glf.mklx
new file mode 100644
index 000000000..c1fbfcdaa
--- /dev/null
+++ b/tex/context/base/mkxl/font-glf.mklx
@@ -0,0 +1,173 @@
+%D \module
+%D [ file=font-glf,
+%D version=2020.12.21,
+%D title=\CONTEXT\ Font Macros,
+%D subtitle=Glyph Scaling,
+%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 Font Macros / Glyph Scaling}
+
+\unprotect
+
+%D Experiment:
+
+\installcorenamespace{scaledfont}
+\installcorenamespace{scaledfontxscale}
+\installcorenamespace{scaledfontyscale}
+
+\installcommandhandler \??scaledfont {scaledfont} \??scaledfont
+
+\appendtoks
+ \ifempty\currentscaledfont\else
+ \expandafter\integerdef\csname\??scaledfontxscale\currentscaledfont\endcsname\numericscale\scaledfontparameter\c!xscale\relax
+ \expandafter\integerdef\csname\??scaledfontyscale\currentscaledfont\endcsname\numericscale\scaledfontparameter\c!yscale\relax
+ \fi
+\to \everysetupscaledfont
+
+\integerdef\bodyglyphscale\plusthousand
+
+\appendtoks
+ \expandafter\integerdef\csname\??scaledfontxscale\currentscaledfont\endcsname\numericscale\scaledfontparameter\c!xscale\relax
+ \expandafter\integerdef\csname\??scaledfontyscale\currentscaledfont\endcsname\numericscale\scaledfontparameter\c!yscale\relax
+ \overloaded\frozen\protected\edefcsname\currentscaledfont\endcsname
+ {\glyphxscale\numexpr\csname\??scaledfontxscale\currentscaledfont\endcsname*\bodyglyphscale/\plusthousand\relax
+ \glyphyscale\numexpr\csname\??scaledfontyscale\currentscaledfont\endcsname*\bodyglyphscale/\plusthousand\relax
+ \begincsname\scaledfontparameter\c!style\endcsname}%
+\to \everydefinescaledfont
+
+\setupscaledfont
+ [\c!scale=\plusthousand,
+ \c!xscale=\scaledfontparameter\c!scale,
+ \c!yscale=\scaledfontparameter\c!scale]
+
+\installcorenamespace{scaledfontbody}
+
+\permanent\protected\def\definescaledfontbody[#1]#*[#2]% only for testing
+ {%\expandafter\integerdef\csname\??scaledfontbody#1\endcsname\integerdef\bodyglyphscale\numericscale#2\relax
+ \frozen\protected\defcsname#1\endcsname%
+ {\integerdef\bodyglyphscale\numericscale#2\relax
+ \glyphxscale\bodyglyphscale
+ \glyphyscale\bodyglyphscale
+ \the\everybodyfont}}
+
+\newtoks\everyenableautoglyphscaling
+
+\permanent\protected\def\enableautoglyphscaling
+ {\the\everyenableautoglyphscaling}
+
+\def\font_helpers_set_glyph_scale_by_size#fontsize% gets character (x xx a etc)
+ {\glyphxscale\numexpr\numericscale
+ \ifcsname\??fontenvironments\fontclass\fontbody#fontsize\endcsname
+ \lastnamedcs
+ \orelse\ifcsname\??fontenvironments\fontclass\s!default#fontsize\endcsname
+ \lastnamedcs
+ \orelse\ifcsname\??fontenvironments\fontbody#fontsize\endcsname
+ \lastnamedcs
+ \orelse\ifcsname\??fontenvironments\s!default#fontsize\endcsname
+ \lastnamedcs
+ \orelse\ifcsname\??fontenvironments\fontclass\s!default\s!text\endcsname
+ \lastnamedcs
+ \orelse\ifcsname\??fontenvironments\s!default\s!text\endcsname
+ \lastnamedcs
+ \else
+ \plusthousand
+ \fi*\bodyglyphscale/\plusthousand\relax
+ \glyphyscale\glyphxscale}
+
+% \protected\def\font_helpers_set_current_font_alternative_size#alternative#size% \sla
+% {\edef\fontalternative{#alternative}%
+% \edef\fontsize {#size}%
+% \font_helpers_check_big_math_synchronization % double? better in everymath?
+% \font_helpers_synchronize_font}
+
+\protected\def\font_helpers_set_current_font_alternative_size_g#alternative#size% \sla
+ {\edef\fontalternative{#alternative}%
+ \edef\fontsize{#size}%
+ \csname\fontalternative\endcsname
+ \font_helpers_set_glyph_scale_by_size\fontsize
+ \ifskipfontcharacteristics
+ \setfontcharacteristics
+ \the\everyfontswitch
+ \fi}
+
+% \protected\def\font_helpers_set_current_font_size#size%
+% {\edef\fontsize{#size}%
+% \font_helpers_check_big_math_synchronization % double? better in everymath?
+% \font_helpers_synchronize_font}
+
+\protected\def\font_helpers_set_current_font_size_g#size%
+ {\edef\fontsize{#size}%
+ \font_helpers_set_glyph_scale_by_size\fontsize
+ \ifskipfontcharacteristics
+ \setfontcharacteristics
+ \the\everyfontswitch
+ \fi}
+
+% \protected\def\font_helpers_set_current_font_style_size#style#size% \rma
+% {\edef\fontstyle{#style}%
+% \edef\fontsize {#size}%
+% \font_helpers_check_big_math_synchronization % double? better in everymath?
+% \font_helpers_synchronize_font}
+
+\protected\def\font_helpers_set_current_font_style_size_g#style#size% \rma
+ {\edef\fontstyle{#style}%
+ \edef\fontsize{#size}%
+ \csname\fontstyle\endcsname
+ \font_helpers_set_glyph_scale_by_size\fontsize
+ \ifskipfontcharacteristics
+ \setfontcharacteristics
+ \the\everyfontswitch
+ \fi}
+
+% \protected\def\font_helpers_set_current_font_style_alternative_size#style#alternative#size% \rmsla
+% {\edef\fontstyle {#style}%
+% \edef\fontalternative{#alternative}%
+% \edef\fontsize {#size}%
+% \font_helpers_check_big_math_synchronization % double? better in everymath?
+% \font_helpers_synchronize_font}
+
+\protected\def\font_helpers_set_current_font_style_alternative_size_g#style#alternative#size% \rmsla
+ {\edef\fontstyle{#style}%
+ \edef\fontalternative{#alternative}%
+ \edef\fontsize{#size}%
+ \csname\fontstyle\endcsname
+ \csname\fontalternative\endcsname
+ \font_helpers_set_glyph_scale_by_size\fontsize
+ \ifskipfontcharacteristics
+ \setfontcharacteristics
+ \the\everyfontswitch
+ \fi}
+
+% \def\font_helpers_set_current_font_xxx_alternative#alternative#xsize#scriptstyle%
+% {\ifmmode
+% #scriptstyle%
+% \else
+% \font_helpers_set_current_xsize_alternative{#xsize}{#alternative}%
+% \fi}
+
+\def\font_helpers_set_current_font_xxx_alternative_g#alternative#xsize#scriptstyle%
+ {\ifmmode
+ #scriptstyle%
+ \else
+ \csname#alternative\endcsname
+ \font_helpers_set_glyph_scale_by_size{#alternative}%
+ \ifskipfontcharacteristics
+ \setfontcharacteristics
+ \fi
+ \fi}
+
+\appendtoks
+ \let\font_helpers_set_current_font_alternative_size \font_helpers_set_current_font_alternative_size_g
+ \let\font_helpers_set_current_font_size \font_helpers_set_current_font_size_g
+ \let\font_helpers_set_current_font_style_size \font_helpers_set_current_font_style_size_g
+ \let\font_helpers_set_current_font_style_alternative_size\font_helpers_set_current_font_style_alternative_size_g
+ \let\font_helpers_set_current_font_xxx_alternative \font_helpers_set_current_font_xxx_alternative_g
+\to \everyenableautoglyphscaling
+
+\protect \endinput
diff --git a/tex/context/base/mkxl/font-ini.mklx b/tex/context/base/mkxl/font-ini.mklx
index af4674a6c..b186b8a02 100644
--- a/tex/context/base/mkxl/font-ini.mklx
+++ b/tex/context/base/mkxl/font-ini.mklx
@@ -2512,33 +2512,4 @@
\permanent\protected\def\usefontpath[#1]%
{\clf_addfontpath{#1}}
-%D Experiment:
-
-\installcorenamespace{scaledfont}
-\installcorenamespace{scaledfontxscale}
-\installcorenamespace{scaledfontyscale}
-
-\installcommandhandler \??scaledfont {scaledfont} \??scaledfont
-
-\appendtoks
- \ifempty\currentscaledfont\else
- \expandafter\integerdef\csname\??scaledfontxscale\currentscaledfont\endcsname\scaledfontparameter\c!xscale\relax
- \expandafter\integerdef\csname\??scaledfontyscale\currentscaledfont\endcsname\scaledfontparameter\c!yscale\relax
- \fi
-\to \everysetupscaledfont
-
-\appendtoks
- \expandafter\integerdef\csname\??scaledfontxscale\currentscaledfont\endcsname\scaledfontparameter\c!xscale\relax
- \expandafter\integerdef\csname\??scaledfontyscale\currentscaledfont\endcsname\scaledfontparameter\c!yscale\relax
- \overloaded\frozen\protected\edefcsname\currentscaledfont\endcsname
- {\glyphxscale\csname\??scaledfontxscale\currentscaledfont\endcsname
- \glyphyscale\csname\??scaledfontyscale\currentscaledfont\endcsname
- \begincsname\scaledfontparameter\c!style\endcsname}
-\to \everydefinescaledfont
-
-\setupscaledfont
- [\c!scale=\plusthousand,
- \c!xscale=\scaledfontparameter\c!scale,
- \c!yscale=\scaledfontparameter\c!scale]
-
\protect \endinput
diff --git a/tex/context/base/mkxl/mlib-scn.lmt b/tex/context/base/mkxl/mlib-scn.lmt
index 4c022ea5b..2bca97abb 100644
--- a/tex/context/base/mkxl/mlib-scn.lmt
+++ b/tex/context/base/mkxl/mlib-scn.lmt
@@ -283,6 +283,9 @@ local function applyparameters()
namespaces = saved
end
+local knownparameters = { }
+metapost.knownparameters = knownparameters
+
local function presetparameters()
local namespace = scanstring()
local parent = nil
@@ -291,6 +294,9 @@ local function presetparameters()
parent = presets[scanstring()]
end
local p = get_parameters()
+ for k in next, p do
+ knownparameters[k] = true
+ end
if parent then
setmetatableindex(p,parent)
end
diff --git a/tex/context/base/mkxl/strc-flt.mklx b/tex/context/base/mkxl/strc-flt.mklx
index 2eb7ca6d7..d55a6c77e 100644
--- a/tex/context/base/mkxl/strc-flt.mklx
+++ b/tex/context/base/mkxl/strc-flt.mklx
@@ -1,4 +1,5 @@
%D \module
+%D \module
%D [ file=strc-flt,
%D version=2008.10.20,
%D title=\CONTEXT\ Structure Macros,
@@ -373,6 +374,7 @@
\resetfloatcaptionparameter\c!marking
\resetfloatcaptionparameter\c!list
\resetfloatcaptionparameter\c!bookmark
+ \resetfloatcaptionparameter\c!referencetext
\setupcurrentfloatcaption[#settings]%
\edef\currentfloatcounter{\namedcounterparameter\currentfloat\s!name}%
\iftrialtypesetting\strc_counters_save\currentfloatcounter\fi
@@ -643,7 +645,7 @@
\fi
\strc_floats_analyze_location
% todo: use \lets
- \setupcurrentfloatcaption[\c!reference={#reference},\c!title={#caption},\c!marking=,\c!list=,\c!bookmark=]%
+ \setupcurrentfloatcaption[\c!reference={#reference},\c!title={#caption},\c!marking=,\c!list=,\c!bookmark=,\c!referencetext=]%
\doifelseinset\v!split\floatlocation\strc_floats_place_next_box_split\strc_floats_place_next_box_normal}
\permanent\protected\def\placefloat
@@ -679,15 +681,16 @@
\edef\m_bottomoffset{\floatcaptionparameter\c!bottomoffset}%
\edef\m_freeregion {\floatcaptionparameter\c!freeregion}%
% preset
- \letfloatcaptionparameter \c!location \empty
+ \resetfloatcaptionparameter \c!location
\setexpandedfloatcaptionparameter\c!topoffset {\floatparameter\c!topoffset}%
\setexpandedfloatcaptionparameter\c!bottomoffset{\floatparameter\c!bottomoffset}%
\setexpandedfloatcaptionparameter\c!freeregion {\floatparameter\c!freeregion}%
- \letfloatcaptionparameter \c!reference \empty
- \letfloatcaptionparameter \c!title \empty
- \letfloatcaptionparameter \c!marking \empty
- \letfloatcaptionparameter \c!list \empty
- \letfloatcaptionparameter \c!bookmark \empty
+ \resetfloatcaptionparameter \c!reference
+ \resetfloatcaptionparameter \c!title
+ \resetfloatcaptionparameter \c!marking
+ \resetfloatcaptionparameter \c!list
+ \resetfloatcaptionparameter \c!bookmark
+ \resetfloatcaptionparameter \c!referencetext
% pickup
\ifparameter#settings\or
\setupcurrentfloatcaption[#settings]%
diff --git a/tex/context/base/mkxl/strc-not.mklx b/tex/context/base/mkxl/strc-not.mklx
index cc5455bc6..47d2eba89 100644
--- a/tex/context/base/mkxl/strc-not.mklx
+++ b/tex/context/base/mkxl/strc-not.mklx
@@ -270,11 +270,11 @@
\fi[#2]}
\def\strc_notations_command_setups[#1]%
- {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=,#1]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title=,\c!bookmark=,\c!list=,\c!referencetext=,#1]%
\strc_notations_wrapup}
\tolerant\def\strc_notations_command_reference[#1]#*#=%
- {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=,\c!referencetext=]%
\strc_notations_wrapup}
\def\strc_notations_wrapup
@@ -301,7 +301,7 @@
\strc_pickup_yes}
\protected\def\strc_notations_start_setups_indeed[#1]#*#2%
- {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#2},\c!bookmark=,\c!list=,#1]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference=,\c!title={#2},\c!bookmark=,\c!list=,\c!referencetext=,#1]%
\strc_notations_wrapup}
\protected\def\strc_notations_start_reference[#1]%
@@ -309,7 +309,7 @@
\strc_pickup_yes}
\protected\def\strc_notations_start_reference_indeed[#1]#*#2%
- {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=]%
+ {\strc_constructions_register[][\c!label={\descriptionparameter\c!text},\c!reference={#1},\c!title={#2},\c!bookmark=,\c!list=,\c!referencetext=]%
\strc_notations_wrapup}
\protected\def\strc_notations_stop
diff --git a/tex/context/base/mkxl/strc-syn.mkxl b/tex/context/base/mkxl/strc-syn.mkxl
index 13147a99f..09769bd2f 100644
--- a/tex/context/base/mkxl/strc-syn.mkxl
+++ b/tex/context/base/mkxl/strc-syn.mkxl
@@ -291,7 +291,7 @@
\edef\currentsynonymexpansion{\simplelistparameter\c!expansion}%
\preprocessexpansion\currentsynonymexpansion\m_synonyms_text \currentsynonymcoding{#1}%
\preprocessexpansion\currentsynonymexpansion\m_synonyms_meaning\currentsynonymcoding{#2}%
- %
+ % currently they all end up in the tuc file
\clf_registersynonym
{\currentsynonym}%
{synonym}%
diff --git a/tex/context/base/mkxl/syst-ini.mkxl b/tex/context/base/mkxl/syst-ini.mkxl
index 2aad49bb5..a12a83064 100644
--- a/tex/context/base/mkxl/syst-ini.mkxl
+++ b/tex/context/base/mkxl/syst-ini.mkxl
@@ -1097,7 +1097,7 @@
%D Experiment:
-\glyphdimensionsmode\plusone
+\glyphoptions"80 % replaces \glyphdimensionsmode=1
%D Just in case users use this:
diff --git a/tex/context/interface/mkii/keys-it.xml b/tex/context/interface/mkii/keys-it.xml
index 42340184b..e64127e57 100644
--- a/tex/context/interface/mkii/keys-it.xml
+++ b/tex/context/interface/mkii/keys-it.xml
@@ -780,6 +780,7 @@
<cd:constant name='deepnumbercommand' value='deepnumbercommand'/>
<cd:constant name='deeptextcommand' value='deeptextcommand'/>
<cd:constant name='default' value='implicito'/>
+ <cd:constant name='define' value='define'/>
<cd:constant name='delay' value='attesa'/>
<cd:constant name='depth' value='profondita'/>
<cd:constant name='depthcorrection' value='correzioneprofondita'/>
@@ -1136,6 +1137,7 @@
<cd:constant name='reference' value='riferimento'/>
<cd:constant name='referencemethod' value='referencemethod'/>
<cd:constant name='referenceprefix' value='referenceprefix'/>
+ <cd:constant name='referencetext' value='referencetext'/>
<cd:constant name='referencing' value='referencing'/>
<cd:constant name='region' value='region'/>
<cd:constant name='regionin' value='entraregione'/>
@@ -2085,7 +2087,7 @@
<cd:command name='startnarrower' value='iniziapiustretto'/>
<cd:command name='startopposite' value='iniziaopposto'/>
<cd:command name='startoverlay' value='iniziasovrapposizione'/>
- <cd:command name='startoverzicht' value='iniziaoverview'/>
+ <cd:command name='startoverview' value='iniziaoverview'/>
<cd:command name='startpacked' value='iniziaimpaccato'/>
<cd:command name='startpositioning' value='iniziaposizionamento'/>
<cd:command name='startproduct' value='iniziaprodotto'/>
@@ -2128,7 +2130,7 @@
<cd:command name='stopnarrower' value='terminapiustretto'/>
<cd:command name='stopopposite' value='terminaopposto'/>
<cd:command name='stopoverlay' value='terminasovrapposizione'/>
- <cd:command name='stopoverzicht' value='terminaoverview'/>
+ <cd:command name='stopoverview' value='terminaoverview'/>
<cd:command name='stoppacked' value='terminaimpaccato'/>
<cd:command name='stoppositioning' value='terminaposizionamento'/>
<cd:command name='stopproduct' value='terminaprodotto'/>
diff --git a/tex/context/modules/mkiv/s-system-macros.mkxl b/tex/context/modules/mkiv/s-system-macros.mkxl
index 63ac17913..c3564f5ea 100644
--- a/tex/context/modules/mkiv/s-system-macros.mkxl
+++ b/tex/context/modules/mkiv/s-system-macros.mkxl
@@ -213,10 +213,11 @@ scanning for alignment specific primitives.
metapost.simple("prestine")
- local mptotal = 0
- local codes = metapost.codes
- local types = metapost.types
- local procodes = mplib.propertycodes
+ local mptotal = 0
+ local codes = metapost.codes
+ local types = metapost.types
+ local parameters = metapost.knownparameters
+ local procodes = mplib.propertycodes
context.startcolumns { n = 5, distance = "1em" }
context.nohyphens(false)
@@ -233,7 +234,8 @@ scanning for alignment specific primitives.
local vtype = ti[4]
local vardef = vtype and types[vtype] == "unsuffixedmacro"
context.bgroup()
- context("%-15s\\quad",vardef and "(vardef) tag" or code)
+ -- context("%-15s\\quad",vardef and "(vardef) tag" or code)
+ context("%s %-15s\\quad",parameters[name] and "+" or "\\nbsp",vardef and "(vardef) tag" or code)
if property == "primitive" then
context.bf(false)
context.blue(false)
@@ -273,6 +275,7 @@ scanning for alignment specific primitives.
\NC \type {1} \NC \bf \blue primitive \NC \NR
\NC \type {2} \NC \bf \lightgreen permanent \NC \NR
\NC \type {3} \NC \bf \lightcyan immutable \NC \NR
+\NC \type {+} \NC \bf (also) used as key \NC \NR
\HL
\stoptabulate
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 3e239c7d7..4665b52fd 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 : 2020-12-24 12:12
+-- merge date : 2020-12-27 16:34
do -- begin closure to overcome local limits and interference
@@ -37124,50 +37124,68 @@ local rules={
"FractionRuleThickness",
"UnderbarRuleThickness",
}
-local function setmathparameters(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
- if delta~=0 then
- for i=1,#rules do
- local name=rules[i]
- local value=mathparameters[name]
- if value then
- mathparameters[name]=(squeeze or 1)*(value+dx)
+local setmathparameters
+local setmathcharacters
+if CONTEXTLMTXMODE and CONTEXTLMTXMODE>0 then
+ setmathparameters=function(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
+ if delta~=0 then
+ for i=1,#rules do
+ local name=rules[i]
+ local value=mathparameters[name]
+ if value then
+ mathparameters[name]=(squeeze or 1)*(value+dy)
+ end
end
end
end
-end
-local function setmathcharacters(tfmdata,characters,mathparameters,dx,dy,squeeze,wdelta,hdelta,ddelta)
- local function wdpatch(char)
- if wsnap~=0 then
- char.width=char.width+wdelta/2
- end
+ setmathcharacters=function()
end
- local function htpatch(char)
- if hsnap~=0 then
- local height=char.height
- if height then
- char.height=char.height+2*dy
+else
+ setmathparameters=function(tfmdata,characters,mathparameters,dx,dy,squeeze,multiplier)
+ if delta~=0 then
+ for i=1,#rules do
+ local name=rules[i]
+ local value=mathparameters[name]
+ if value then
+ mathparameters[name]=(squeeze or 1)*(value+dy)
+ end
end
end
end
- local character=characters[0x221A]
- if character and character.next then
- local char=character
- local next=character.next
- wdpatch(char)
- htpatch(char)
- while next do
- char=characters[next]
+ setmathcharacters=function(tfmdata,characters,mathparameters,dx,dy,squeeze,wdelta,hdelta,ddelta)
+ local function wdpatch(char)
+ if wsnap~=0 then
+ char.width=char.width+wdelta/2
+ end
+ end
+ local function htpatch(char)
+ if hsnap~=0 then
+ local height=char.height
+ if height then
+ char.height=char.height+2*dy
+ end
+ end
+ end
+ local character=characters[0x221A]
+ if character and character.next then
+ local char=character
+ local next=character.next
wdpatch(char)
htpatch(char)
- next=char.next
- end
- if char then
- local v=char.vert_variants
- if v then
- local top=v[#v]
- if top then
- local char=characters[top.glyph]
- htpatch(char)
+ while next do
+ char=characters[next]
+ wdpatch(char)
+ htpatch(char)
+ next=char.next
+ end
+ if char then
+ local v=char.vert_variants
+ if v then
+ local top=v[#v]
+ if top then
+ local char=characters[top.glyph]
+ htpatch(char)
+ end
end
end
end