summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2019-07-24 13:08:53 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2019-07-24 13:08:53 +0200
commit47852e5715e7c0374bb6bc173c1728908549e1ed (patch)
treee6df8c61ffb0aadfabbca7e9a33f10d1b61bde68 /tex
parenta92a8d40ce567ecf5b0baacd9a93a94aac9a4a2d (diff)
downloadcontext-47852e5715e7c0374bb6bc173c1728908549e1ed.tar.gz
2019-07-24 11:24: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-en.mkii6
-rw-r--r--tex/context/base/mkii/mult-fr.mkii5
-rw-r--r--tex/context/base/mkiv/back-exp.lua4
-rw-r--r--tex/context/base/mkiv/buff-ver.mkiv2
-rw-r--r--tex/context/base/mkiv/char-fio.lua2
-rw-r--r--tex/context/base/mkiv/cldf-int.lua15
-rw-r--r--tex/context/base/mkiv/colo-ini.lua9
-rw-r--r--tex/context/base/mkiv/cont-log.mkiv28
-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/data-env.lua4
-rw-r--r--tex/context/base/mkiv/data-ini.lua1
-rw-r--r--tex/context/base/mkiv/data-res.lua37
-rw-r--r--tex/context/base/mkiv/data-tmp.lua15
-rw-r--r--tex/context/base/mkiv/font-mis.lua2
-rw-r--r--tex/context/base/mkiv/font-otl.lua3
-rw-r--r--tex/context/base/mkiv/font-oto.lua15
-rw-r--r--tex/context/base/mkiv/font-otr.lua160
-rw-r--r--tex/context/base/mkiv/l-table.lua10
-rw-r--r--tex/context/base/mkiv/lang-rep.lua6
-rw-r--r--tex/context/base/mkiv/lpdf-emb.lua6
-rw-r--r--tex/context/base/mkiv/lpdf-ini.lua8
-rw-r--r--tex/context/base/mkiv/luat-mac.lua12
-rw-r--r--tex/context/base/mkiv/math-noa.lua3
-rw-r--r--tex/context/base/mkiv/meta-imp-dum.mkiv5
-rw-r--r--tex/context/base/mkiv/meta-ini.mkiv2
-rw-r--r--tex/context/base/mkiv/mlib-ctx.mkiv12
-rw-r--r--tex/context/base/mkiv/mlib-lua.lua7
-rw-r--r--tex/context/base/mkiv/mult-prm.lua112
-rw-r--r--tex/context/base/mkiv/node-aux.lua19
-rw-r--r--tex/context/base/mkiv/node-ini.lua16
-rw-r--r--tex/context/base/mkiv/node-met.lua16
-rw-r--r--tex/context/base/mkiv/node-nut.lua2
-rw-r--r--tex/context/base/mkiv/node-res.lua12
-rw-r--r--tex/context/base/mkiv/node-rul.lua4
-rw-r--r--tex/context/base/mkiv/node-syn.lua4
-rw-r--r--tex/context/base/mkiv/page-cst.lua10
-rw-r--r--tex/context/base/mkiv/page-lin.lua2
-rw-r--r--tex/context/base/mkiv/page-mix.lua14
-rw-r--r--tex/context/base/mkiv/publ-ini.lua46
-rw-r--r--tex/context/base/mkiv/scrp-ini.lua12
-rw-r--r--tex/context/base/mkiv/spac-ali.mkiv1
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin26904 -> 26920 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin253018 -> 254119 bytes
-rw-r--r--tex/context/base/mkiv/strc-doc.lua14
-rw-r--r--tex/context/base/mkiv/strc-mar.lua78
-rw-r--r--tex/context/base/mkiv/supp-ran.lua22
-rw-r--r--tex/context/base/mkiv/syst-ini.mkiv96
-rw-r--r--tex/context/base/mkiv/tabl-ltb.mkiv51
-rw-r--r--tex/context/base/mkiv/tabl-tbl.mkiv159
-rw-r--r--tex/context/base/mkiv/trac-vis.lua7
-rw-r--r--tex/context/base/mkiv/typo-bld.lua52
-rw-r--r--tex/context/base/mkiv/typo-fln.lua10
-rw-r--r--tex/context/base/mkiv/typo-krn.lua4
-rw-r--r--tex/context/base/mkiv/util-sci.lua3
-rw-r--r--tex/context/base/mkiv/util-seq.lua14
-rw-r--r--tex/context/interface/mkii/keys-en.xml6
-rw-r--r--tex/context/interface/mkii/keys-fr.xml5
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin967706 -> 967152 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin27519 -> 27517 bytes
-rw-r--r--tex/context/modules/common/s-abbreviations-logos.tex7
-rw-r--r--tex/context/modules/mkiv/x-asciimath.lua32
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua61
65 files changed, 615 insertions, 663 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 27bc7c7b5..db052cd5e 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{2019.07.16 18:23}
+\newcontextversion{2019.07.24 11:17}
%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 2fe0e7bd3..6c59c6cfa 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{2019.07.16 18:23}
+\edef\contextversion{2019.07.24 11:17}
%D For those who want to use this:
diff --git a/tex/context/base/mkii/mult-en.mkii b/tex/context/base/mkii/mult-en.mkii
index 3eb5e7b3d..52f51af5d 100644
--- a/tex/context/base/mkii/mult-en.mkii
+++ b/tex/context/base/mkii/mult-en.mkii
@@ -147,6 +147,7 @@
\setinterfacevariable{comment}{comment}
\setinterfacevariable{component}{component}
\setinterfacevariable{compressseparator}{compressseparator}
+\setinterfacevariable{compressstopper}{compressstopper}
\setinterfacevariable{concept}{concept}
\setinterfacevariable{construction}{construction}
\setinterfacevariable{content}{content}
@@ -477,6 +478,7 @@
\setinterfacevariable{sectionnumber}{sectionnumber}
\setinterfacevariable{see}{see}
\setinterfacevariable{selectfont}{selectfont}
+\setinterfacevariable{separator}{separator}
\setinterfacevariable{september}{september}
\setinterfacevariable{serif}{serif}
\setinterfacevariable{serifbold}{serifbold}
@@ -570,6 +572,7 @@
\setinterfacevariable{temporary}{temporary}
\setinterfacevariable{test}{test}
\setinterfacevariable{text}{text}
+\setinterfacevariable{textnote}{textnote}
\setinterfacevariable{three}{three}
\setinterfacevariable{thursday}{thursday}
\setinterfacevariable{tight}{tight}
@@ -730,7 +733,10 @@
\setinterfaceconstant{component}{component}
\setinterfaceconstant{compoundhyphen}{compoundhyphen}
\setinterfaceconstant{compress}{compress}
+\setinterfaceconstant{compressdistance}{compressdistance}
+\setinterfaceconstant{compressmethod}{compressmethod}
\setinterfaceconstant{compressseparator}{compressseparator}
+\setinterfaceconstant{compressstopper}{compressstopper}
\setinterfaceconstant{concerns}{concerns}
\setinterfaceconstant{connector}{connector}
\setinterfaceconstant{continue}{continue}
diff --git a/tex/context/base/mkii/mult-fr.mkii b/tex/context/base/mkii/mult-fr.mkii
index ef0bd047c..1097d7e18 100644
--- a/tex/context/base/mkii/mult-fr.mkii
+++ b/tex/context/base/mkii/mult-fr.mkii
@@ -147,6 +147,7 @@
\setinterfacevariable{comment}{commentaire}
\setinterfacevariable{component}{composant}
\setinterfacevariable{compressseparator}{compressseparator}
+\setinterfacevariable{compressstopper}{compressstopper}
\setinterfacevariable{concept}{concept}
\setinterfacevariable{construction}{construction}
\setinterfacevariable{content}{contenu}
@@ -477,6 +478,7 @@
\setinterfacevariable{sectionnumber}{numerosection}
\setinterfacevariable{see}{voit}
\setinterfacevariable{selectfont}{selectfont}
+\setinterfacevariable{separator}{separator}
\setinterfacevariable{september}{septembre}
\setinterfacevariable{serif}{serif}
\setinterfacevariable{serifbold}{serifbold}
@@ -731,7 +733,10 @@
\setinterfaceconstant{component}{composant}
\setinterfaceconstant{compoundhyphen}{compoundhyphen}
\setinterfaceconstant{compress}{compress}
+\setinterfaceconstant{compressdistance}{compressdistance}
+\setinterfaceconstant{compressmethod}{compressmethod}
\setinterfaceconstant{compressseparator}{compressseparator}
+\setinterfaceconstant{compressstopper}{compressstopper}
\setinterfaceconstant{concerns}{concerns}
\setinterfaceconstant{connector}{connector}
\setinterfaceconstant{continue}{continue}
diff --git a/tex/context/base/mkiv/back-exp.lua b/tex/context/base/mkiv/back-exp.lua
index 9f16a9e09..9b15028bd 100644
--- a/tex/context/base/mkiv/back-exp.lua
+++ b/tex/context/base/mkiv/back-exp.lua
@@ -46,7 +46,7 @@ local replacetemplate = utilities.templates.replace
local trace_export = false trackers.register ("export.trace", function(v) trace_export = v end)
local trace_spacing = false trackers.register ("export.trace.spacing", function(v) trace_spacing = v end)
-local trace_detail = false trackers.register ("export.trace.detail", function(v) trace_detail = v end)
+local trace_details = false trackers.register ("export.trace.details", function(v) trace_details = v end)
local less_state = false directives.register("export.lessstate", function(v) less_state = v end)
local show_comment = true directives.register("export.comment", function(v) show_comment = v end)
@@ -2970,7 +2970,7 @@ local collectresults do -- too many locals otherwise
local maybewrong
local pid
for n, id, subtype in nextnode, head do
- if trace_detail then
+ if trace_details then
showdetail(n,id,subtype)
end
if id == glyph_code then
diff --git a/tex/context/base/mkiv/buff-ver.mkiv b/tex/context/base/mkiv/buff-ver.mkiv
index dbc9086bd..91778bc4a 100644
--- a/tex/context/base/mkiv/buff-ver.mkiv
+++ b/tex/context/base/mkiv/buff-ver.mkiv
@@ -1047,7 +1047,7 @@
\else
\blank[\typingparameter\c!blank]%
\fi
- \dostarttagged\t!verbatimlines\empty}
+ \dostarttagged\t!verbatimlines\empty}
% hooks:
diff --git a/tex/context/base/mkiv/char-fio.lua b/tex/context/base/mkiv/char-fio.lua
index ad61fee65..b1f652eed 100644
--- a/tex/context/base/mkiv/char-fio.lua
+++ b/tex/context/base/mkiv/char-fio.lua
@@ -95,7 +95,7 @@ directives.register("filters.utf.decompose", function(v) configure("characters.f
utffilters.setskippable {
"mkiv", "mkvi",
"mkix", "mkxi",
- "mkil", "mkli",
+ "mkxl", "mklx",
}
interfaces.implement {
diff --git a/tex/context/base/mkiv/cldf-int.lua b/tex/context/base/mkiv/cldf-int.lua
index 937e1da60..86420f422 100644
--- a/tex/context/base/mkiv/cldf-int.lua
+++ b/tex/context/base/mkiv/cldf-int.lua
@@ -45,7 +45,7 @@ if CONTEXTLMTXMODE > 0 then
local equal = byte('=')
local comma = byte(',')
- function scanhash(t)
+ function scanhash(scanners)
if scanpeek() == open then
local data = { }
scanskip()
@@ -61,7 +61,16 @@ if CONTEXTLMTXMODE > 0 then
if key then
if scanpeek() == equal then
scanskip()
- data[key] = scanvalue(comma,close) or ""
+ if scanners then
+ local scanner = scanners[key]
+ if scanner then
+ data[key] = scanner()
+ else
+ data[key] = scanvalue(comma,close) or ""
+ end
+ else
+ data[key] = scanvalue(comma,close) or ""
+ end
else
break
end
@@ -74,7 +83,7 @@ if CONTEXTLMTXMODE > 0 then
end
end
- function scanarray(t)
+ function scanarray()
if scanpeek() == open then
local data = { }
local d = 0
diff --git a/tex/context/base/mkiv/colo-ini.lua b/tex/context/base/mkiv/colo-ini.lua
index 3c8d23abc..473427198 100644
--- a/tex/context/base/mkiv/colo-ini.lua
+++ b/tex/context/base/mkiv/colo-ini.lua
@@ -734,10 +734,13 @@ local function namedcolorattributes(name)
elseif color == true then
color = paletnamespace .. prefix .. name
end
- elseif valid[name] then
- color = name
else
- return space, l_color.black
+ color = valid[name]
+ if not color then
+ return space, l_color.black
+ elseif color == true then
+ color = name
+ end
end
color = counts[color]
if color then
diff --git a/tex/context/base/mkiv/cont-log.mkiv b/tex/context/base/mkiv/cont-log.mkiv
index 352e53ec9..1fd0cc4d4 100644
--- a/tex/context/base/mkiv/cont-log.mkiv
+++ b/tex/context/base/mkiv/cont-log.mkiv
@@ -275,19 +275,21 @@
\let\LUATEX \LuaTeX
\let\LUAJITTEX\LuajitTeX
-\unexpanded\def\MKII{MkII}
-\unexpanded\def\MKIV{MkIV}
-\unexpanded\def\MKVI{MkVI}
-\unexpanded\def\MKIL{MkIL}
-\unexpanded\def\MKLI{MkLI}
-\unexpanded\def\MKIX{MkIX}
-\unexpanded\def\MKXI{MkXI}
-
-\unexpanded\def\MPII{MpII}
-\unexpanded\def\MPIV{MpIV}
-\unexpanded\def\MPVI{MpVI}
-
-\unexpanded\def\LMTX{lmtx}
+\unexpanded\def\MKII{MkII} % MarkTwo
+\unexpanded\def\MKIV{MkIV} % MarkFour : MKIV
+\unexpanded\def\MKVI{MkVI} % MarkSix : MKIV
+\unexpanded\def\MKXL{MkXL} % MarkFourty : LMTX
+\unexpanded\def\MKLX{MkLX} % MarkSixty : LMTX
+\unexpanded\def\MKIX{MkIX} % : MKIV / LMTX
+\unexpanded\def\MKXI{MkXI} % : MKIV / LMTX
+
+\unexpanded\def\MPII{MpII} % MarkTwo
+\unexpanded\def\MPIV{MpIV} % MarkFour : MetaFun
+\unexpanded\def\MPVI{MpVI} % MarkSix : MetaFun
+\unexpanded\def\MPXL{MpXL} % MarkFourty : LuaMetaFun
+\unexpanded\def\MPLX{MpLX} % MarkSixty : LuaMetaFun
+
+\unexpanded\def\LMTX{lmtx} % for LuaMetaTeX
\appendtoks
\def\ConTeXt {ConTeXt}%
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index bd131ddaf..102438f7a 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{2019.07.16 18:23}
+\newcontextversion{2019.07.24 11:17}
%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/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index bc9549d01..fe13d5930 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{2019.07.16 18:23}
+\edef\contextversion{2019.07.24 11:17}
\edef\contextkind {beta}
%D Kind of special:
diff --git a/tex/context/base/mkiv/data-env.lua b/tex/context/base/mkiv/data-env.lua
index 611504db4..5f9b579cd 100644
--- a/tex/context/base/mkiv/data-env.lua
+++ b/tex/context/base/mkiv/data-env.lua
@@ -94,13 +94,13 @@ local relations = allocate { -- todo: handlers also here
mp = {
names = { "mp" },
variable = 'MPINPUTS',
- suffixes = { 'mp', 'mpvi', 'mpiv', 'mpii' },
+ suffixes = { 'mp', 'mpvi', 'mpiv', 'mpxl', 'mpii' },
usertype = true,
},
tex = {
names = { "tex" },
variable = 'TEXINPUTS',
- suffixes = { "tex", "mkvi", "mkiv", "mkli", "mkil", "mkii", "cld", "lfg", "xml" }, -- known suffixes have less lookups
+ suffixes = { "tex", "mkiv", "mkvi", "mkxl", "mklx", "mkii", "cld", "lfg", "xml" }, -- known suffixes have less lookups
usertype = true,
},
icc = {
diff --git a/tex/context/base/mkiv/data-ini.lua b/tex/context/base/mkiv/data-ini.lua
index 09357368c..c4e1bf468 100644
--- a/tex/context/base/mkiv/data-ini.lua
+++ b/tex/context/base/mkiv/data-ini.lua
@@ -14,7 +14,6 @@ local ostype, osname, osuname, ossetenv, osgetenv = os.type, os.name, os.uname,
local P, S, R, C, Cs, Cc, lpegmatch = lpeg.P, lpeg.S, lpeg.R, lpeg.C, lpeg.Cs, lpeg.Cc, lpeg.match
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
-local trace_detail = false trackers.register("resolvers.details", function(v) trace_detail = v end)
local trace_expansions = false trackers.register("resolvers.expansions", function(v) trace_expansions = v end)
local report_initialization = logs.reporter("resolvers","initialization")
diff --git a/tex/context/base/mkiv/data-res.lua b/tex/context/base/mkiv/data-res.lua
index 0c2735fc2..f3b76778f 100644
--- a/tex/context/base/mkiv/data-res.lua
+++ b/tex/context/base/mkiv/data-res.lua
@@ -38,7 +38,7 @@ local setmetatableindex = table.setmetatableindex
local luasuffixes = utilities.lua.suffixes
local trace_locating = false trackers .register("resolvers.locating", function(v) trace_locating = v end)
-local trace_detail = false trackers .register("resolvers.details", function(v) trace_detail = v end)
+local trace_details = false trackers .register("resolvers.details", function(v) trace_details = v end)
local trace_expansions = false trackers .register("resolvers.expansions", function(v) trace_expansions = v end)
local trace_paths = false trackers .register("resolvers.paths", function(v) trace_paths = v end)
local resolve_otherwise = true directives.register("resolvers.otherwise", function(v) resolve_otherwise = v end)
@@ -957,7 +957,7 @@ end
local function isreadable(name)
local readable = isfile(name) -- not file.is_readable(name) asit can be a dir
- if trace_detail then
+ if trace_details then
if readable then
report_resolving("file %a is readable",name)
else
@@ -977,7 +977,7 @@ local function collect_files(names) -- potential files .. sort of too much when
local variant = hash.type
local search = filejoin(root,path,name) -- funny no concatinator
local result = methodhandler('concatinators',variant,root,path,name)
- if trace_detail then
+ if trace_details then
report_resolving("match: variant %a, search %a, result %a",variant,search,result)
end
noffiles = noffiles + 1
@@ -986,7 +986,7 @@ local function collect_files(names) -- potential files .. sort of too much when
end
for k=1,#names do
local filename = names[k]
- if trace_detail then
+ if trace_details then
report_resolving("checking name %a",filename)
end
local basename = filebasename(filename)
@@ -1003,7 +1003,7 @@ local function collect_files(names) -- potential files .. sort of too much when
local hashname = hash.name
local content = hashname and instance.files[hashname]
if content then
- if trace_detail then
+ if trace_details then
report_resolving("deep checking %a, base %a, pattern %a",hashname,basename,pathname)
end
local path, name = lookup(content,basename)
@@ -1123,7 +1123,7 @@ end
local function find_direct(filename,allresults)
if not dangerous[askedformat] and isreadable(filename) then
- if trace_detail then
+ if trace_details then
report_resolving("file %a found directly",filename)
end
return "direct", { filename }
@@ -1150,12 +1150,12 @@ local function find_qualified(filename,allresults,askedformat,alsostripped) -- t
report_resolving("checking qualified name %a", filename)
end
if isreadable(filename) then
- if trace_detail then
+ if trace_details then
report_resolving("qualified file %a found", filename)
end
return "qualified", { filename }
end
- if trace_detail then
+ if trace_details then
report_resolving("locating qualified file %a", filename)
end
local forcedname, suffix = "", suffixonly(filename)
@@ -1231,7 +1231,7 @@ end
local function check_subpath(fname)
if isreadable(fname) then
- if trace_detail then
+ if trace_details then
report_resolving("found %a by deep scanning",fname)
end
return fname
@@ -1300,7 +1300,7 @@ local function find_intree(filename,filetype,wantedfiles,allresults)
dirlist[i] = filedirname(filelist[i][3]) .. "/" -- was [2] .. gamble
end
end
- if trace_detail then
+ if trace_details then
report_resolving("checking filename %a in tree",filename)
end
for k=1,#pathlist do
@@ -1312,7 +1312,7 @@ local function find_intree(filename,filetype,wantedfiles,allresults)
if filelist then -- database
-- compare list entries with permitted pattern -- /xx /xx//
local expression = entry.expression
- if trace_detail then
+ if trace_details then
report_resolving("using pattern %a for path %a",expression,pathname)
end
for k=1,#filelist do
@@ -1325,16 +1325,16 @@ local function find_intree(filename,filetype,wantedfiles,allresults)
result[#result+1] = resolveprefix(fl[3]) -- no shortcut
done = true
if allresults then
- if trace_detail then
+ if trace_details then
report_resolving("match to %a in hash for file %a and path %a, continue scanning",expression,f,d)
end
else
- if trace_detail then
+ if trace_details then
report_resolving("match to %a in hash for file %a and path %a, quit scanning",expression,f,d)
end
break
end
- elseif trace_detail then
+ elseif trace_details then
report_resolving("no match to %a in hash for file %a and path %a",expression,f,d)
end
end
@@ -1355,9 +1355,8 @@ local function find_intree(filename,filetype,wantedfiles,allresults)
-- that are not hashed (like sources on my machine) .. so, this is slightly
-- out of order but at least fast (and we seldom end up here, only when a file
-- is not already found
--- inspect(entry)
if not done and not entry.prescanned then
- if trace_detail then
+ if trace_details then
report_resolving("quick root scan for %a",pname)
end
for k=1,#wantedfiles do
@@ -1373,7 +1372,7 @@ local function find_intree(filename,filetype,wantedfiles,allresults)
end
if not done and entry.recursive then -- maybe also when allresults
-- collect files in path (and cache the result)
- if trace_detail then
+ if trace_details then
report_resolving("scanning filesystem for %a",pname)
end
local files = resolvers.simplescanfiles(pname,false,true)
@@ -1446,7 +1445,7 @@ local function find_intree(filename,filetype,wantedfiles,allresults)
end
local function find_onpath(filename,filetype,wantedfiles,allresults)
- if trace_detail then
+ if trace_details then
report_resolving("checking filename %a, filetype %a, wanted files %a",filename,filetype,concat(wantedfiles," | "))
end
local result = { }
@@ -1510,7 +1509,7 @@ collect_instance_files = function(filename,askedformat,allresults) -- uses neste
end
end
end
- if trace_detail then
+ if trace_details then
report_resolving("lookup status: %s",table.serialize(status,filename))
end
return result, status
diff --git a/tex/context/base/mkiv/data-tmp.lua b/tex/context/base/mkiv/data-tmp.lua
index d25a6b2f9..e65f7ce61 100644
--- a/tex/context/base/mkiv/data-tmp.lua
+++ b/tex/context/base/mkiv/data-tmp.lua
@@ -29,6 +29,7 @@ local mkdirs, isdir, isfile = dir.mkdirs, lfs.isdir, lfs.isfile
local addsuffix, is_writable, is_readable = file.addsuffix, file.is_writable, file.is_readable
local formatters = string.formatters
local next, type = next, type
+----- pcall, loadfile = pcall, loadfile
local trace_locating = false trackers.register("resolvers.locating", function(v) trace_locating = v end)
local trace_cache = false trackers.register("resolvers.cache", function(v) trace_cache = v end)
@@ -325,22 +326,23 @@ function caches.loaddata(readables,name,writable)
for i=1,#readables do
local path = readables[i]
local loader = false
+ local state = false
local tmaname, tmcname = caches.setluanames(path,name)
if isfile(tmcname) then
- loader = loadfile(tmcname)
+ state, loader = pcall(loadfile,tmcname)
end
if not loader and isfile(tmaname) then
-- can be different paths when we read a file database from disk
local tmacrap, tmcname = caches.setluanames(writable,name)
if isfile(tmcname) then
- loader = loadfile(tmcname)
+ state, loader = pcall(loadfile,tmcname)
end
utilities.lua.compile(tmaname,tmcname)
if isfile(tmcname) then
- loader = loadfile(tmcname)
+ state, loader = pcall(loadfile,tmcname)
end
if not loader then
- loader = loadfile(tmaname)
+ state, loader = pcall(loadfile,tmaname)
end
end
if loader then
@@ -390,7 +392,10 @@ function caches.loadcontent(cachename,dataname,filename)
local full, path = caches.getfirstreadablefile(addsuffix(name,luasuffixes.lua),"trees")
filename = file.join(path,name)
end
- local blob = loadfile(addsuffix(filename,luasuffixes.luc)) or loadfile(addsuffix(filename,luasuffixes.lua))
+ local state, blob = pcall(loadfile,addsuffix(filename,luasuffixes.luc))
+ if not blob then
+ state, blob = pcall(loadfile,addsuffix(filename,luasuffixes.lua))
+ end
if blob then
local data = blob()
if data and data.content then
diff --git a/tex/context/base/mkiv/font-mis.lua b/tex/context/base/mkiv/font-mis.lua
index c3b7f3bb8..68165c9b8 100644
--- a/tex/context/base/mkiv/font-mis.lua
+++ b/tex/context/base/mkiv/font-mis.lua
@@ -21,7 +21,7 @@ local readers = otf.readers
if readers then
- otf.version = otf.version or 3.108
+ otf.version = otf.version or 3.109
otf.cache = otf.cache or containers.define("fonts", "otl", otf.version, true)
function fonts.helpers.getfeatures(name,save)
diff --git a/tex/context/base/mkiv/font-otl.lua b/tex/context/base/mkiv/font-otl.lua
index bba7bcb64..f8cd8217c 100644
--- a/tex/context/base/mkiv/font-otl.lua
+++ b/tex/context/base/mkiv/font-otl.lua
@@ -52,7 +52,7 @@ local report_otf = logs.reporter("fonts","otf loading")
local fonts = fonts
local otf = fonts.handlers.otf
-otf.version = 3.108 -- beware: also sync font-mis.lua and in mtx-fonts
+otf.version = 3.109 -- beware: also sync font-mis.lua and in mtx-fonts
otf.cache = containers.define("fonts", "otl", otf.version, true)
otf.svgcache = containers.define("fonts", "svg", otf.version, true)
otf.pngcache = containers.define("fonts", "png", otf.version, true)
@@ -491,6 +491,7 @@ local function copytotfm(data,cache_id)
parameters.ascender = abs(metadata.ascender or 0)
parameters.descender = abs(metadata.descender or 0)
parameters.units = units
+ parameters.vheight = metadata.defaultvheight
--
properties.space = spacer
properties.encodingbytes = 2
diff --git a/tex/context/base/mkiv/font-oto.lua b/tex/context/base/mkiv/font-oto.lua
index 6f6d89d43..4d112ac31 100644
--- a/tex/context/base/mkiv/font-oto.lua
+++ b/tex/context/base/mkiv/font-oto.lua
@@ -11,14 +11,13 @@ local insert, remove = table.insert, table.remove
local format, gmatch, gsub, find, match, lower, strip = string.format, string.gmatch, string.gsub, string.find, string.match, string.lower, string.strip
local type, next, tonumber, tostring, rawget = type, next, tonumber, tostring, rawget
-local trace_baseinit = false trackers.register("otf.baseinit", function(v) trace_baseinit = v end)
-local trace_singles = false trackers.register("otf.singles", function(v) trace_singles = v end)
-local trace_multiples = false trackers.register("otf.multiples", function(v) trace_multiples = v end)
-local trace_alternatives = false trackers.register("otf.alternatives", function(v) trace_alternatives = v end)
-local trace_ligatures = false trackers.register("otf.ligatures", function(v) trace_ligatures = v end)
------ trace_ligatures_detail = false trackers.register("otf.ligatures.detail", function(v) trace_ligatures_detail = v end)
-local trace_kerns = false trackers.register("otf.kerns", function(v) trace_kerns = v end)
-local trace_preparing = false trackers.register("otf.preparing", function(v) trace_preparing = v end)
+local trace_baseinit = false trackers.register("otf.baseinit", function(v) trace_baseinit = v end)
+local trace_singles = false trackers.register("otf.singles", function(v) trace_singles = v end)
+local trace_multiples = false trackers.register("otf.multiples", function(v) trace_multiples = v end)
+local trace_alternatives = false trackers.register("otf.alternatives", function(v) trace_alternatives = v end)
+local trace_ligatures = false trackers.register("otf.ligatures", function(v) trace_ligatures = v end)
+local trace_kerns = false trackers.register("otf.kerns", function(v) trace_kerns = v end)
+local trace_preparing = false trackers.register("otf.preparing", function(v) trace_preparing = v end)
local report_prepare = logs.reporter("fonts","otf prepare")
diff --git a/tex/context/base/mkiv/font-otr.lua b/tex/context/base/mkiv/font-otr.lua
index 4ac737697..76d7390b6 100644
--- a/tex/context/base/mkiv/font-otr.lua
+++ b/tex/context/base/mkiv/font-otr.lua
@@ -73,56 +73,54 @@ local P, R, S, C, Cs, Cc, Ct, Carg, Cmt = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.C
local lpegmatch = lpeg.match
local rshift = bit32.rshift
-local setmetatableindex = table.setmetatableindex
-local sortedkeys = table.sortedkeys
-local sortedhash = table.sortedhash
-local stripstring = string.nospaces
-local utf16_to_utf8_be = utf.utf16_to_utf8_be
-
-local report = logs.reporter("otf reader")
-
-local trace_cmap = false -- only for checking issues
-local trace_cmap_detail = false -- only for checking issues
-
--- local trace_cmap = true
--- local trace_cmap_detail = true
-
-fonts = fonts or { }
-local handlers = fonts.handlers or { }
-fonts.handlers = handlers
-local otf = handlers.otf or { }
-handlers.otf = otf
-local readers = otf.readers or { }
-otf.readers = readers
-
------ streamreader = utilities.streams -- faster on big files (not true any longer)
-local streamreader = utilities.files -- faster on identify (also uses less memory)
-local streamwriter = utilities.files
-
-readers.streamreader = streamreader
-readers.streamwriter = streamwriter
-
-local openfile = streamreader.open
-local closefile = streamreader.close
------ skipbytes = streamreader.skip
-local setposition = streamreader.setposition
-local skipshort = streamreader.skipshort
-local readbytes = streamreader.readbytes
-local readstring = streamreader.readstring
-local readbyte = streamreader.readcardinal1 -- 8-bit unsigned integer
-local readushort = streamreader.readcardinal2 -- 16-bit unsigned integer
-local readuint = streamreader.readcardinal3 -- 24-bit unsigned integer
-local readulong = streamreader.readcardinal4 -- 32-bit unsigned integer
------ readchar = streamreader.readinteger1 -- 8-bit signed integer
-local readshort = streamreader.readinteger2 -- 16-bit signed integer
-local readlong = streamreader.readinteger4 -- 32-bit unsigned integer
-local readfixed = streamreader.readfixed4
-local read2dot14 = streamreader.read2dot14 -- 16-bit signed fixed number with the low 14 bits of fraction (2.14) (F2DOT14)
-local readfword = readshort -- 16-bit signed integer that describes a quantity in FUnits
-local readufword = readushort -- 16-bit unsigned integer that describes a quantity in FUnits
-local readoffset = readushort
-local readcardinaltable = streamreader.readcardinaltable
-local readintegertable = streamreader.readintegertable
+local setmetatableindex = table.setmetatableindex
+local sortedkeys = table.sortedkeys
+local sortedhash = table.sortedhash
+local stripstring = string.nospaces
+local utf16_to_utf8_be = utf.utf16_to_utf8_be
+
+local report = logs.reporter("otf reader")
+local report_cmap = logs.reporter("otf reader","cmap")
+
+local trace_cmap = false trackers.register("otf.cmap", function(v) trace_cmap = v end)
+local trace_cmap_details = false trackers.register("otf.cmap.details", function(v) trace_cmap_details = v end)
+
+fonts = fonts or { }
+local handlers = fonts.handlers or { }
+fonts.handlers = handlers
+local otf = handlers.otf or { }
+handlers.otf = otf
+local readers = otf.readers or { }
+otf.readers = readers
+
+----- streamreader = utilities.streams -- faster on big files (not true any longer)
+local streamreader = utilities.files -- faster on identify (also uses less memory)
+local streamwriter = utilities.files
+
+readers.streamreader = streamreader
+readers.streamwriter = streamwriter
+
+local openfile = streamreader.open
+local closefile = streamreader.close
+----- skipbytes = streamreader.skip
+local setposition = streamreader.setposition
+local skipshort = streamreader.skipshort
+local readbytes = streamreader.readbytes
+local readstring = streamreader.readstring
+local readbyte = streamreader.readcardinal1 -- 8-bit unsigned integer
+local readushort = streamreader.readcardinal2 -- 16-bit unsigned integer
+local readuint = streamreader.readcardinal3 -- 24-bit unsigned integer
+local readulong = streamreader.readcardinal4 -- 32-bit unsigned integer
+----- readchar = streamreader.readinteger1 -- 8-bit signed integer
+local readshort = streamreader.readinteger2 -- 16-bit signed integer
+local readlong = streamreader.readinteger4 -- 32-bit unsigned integer
+local readfixed = streamreader.readfixed4
+local read2dot14 = streamreader.read2dot14 -- 16-bit signed fixed number with the low 14 bits of fraction (2.14) (F2DOT14)
+local readfword = readshort -- 16-bit signed integer that describes a quantity in FUnits
+local readufword = readushort -- 16-bit unsigned integer that describes a quantity in FUnits
+local readoffset = readushort
+local readcardinaltable = streamreader.readcardinaltable
+local readintegertable = streamreader.readintegertable
function streamreader.readtag(f)
return lower(stripstring(readstring(f,4)))
@@ -1213,7 +1211,7 @@ readers.vmtx = function(f,fontdata,specification)
local glyphs = fontdata.glyphs
local nofglyphs = fontdata.nofglyphs
local vheight = 0
- local vdefault = verticalheader.ascender + verticalheader.descender
+ local vdefault = verticalheader.ascender - verticalheader.descender
local topsidebearing = 0
for i=0,nofmetrics-1 do
local glyph = glyphs[i]
@@ -1222,9 +1220,9 @@ readers.vmtx = function(f,fontdata,specification)
if vheight ~= 0 and vheight ~= vdefault then
glyph.vheight = vheight
end
- -- if topsidebearing ~= 0 then
- -- glyph.tsb = topsidebearing
- -- end
+ if topsidebearing ~= 0 then
+ glyph.tsb = topsidebearing
+ end
end
-- The next can happen in for instance a monospace font or in a cjk font
-- with fixed heights.
@@ -1233,9 +1231,6 @@ readers.vmtx = function(f,fontdata,specification)
if vheight ~= 0 and vheight ~= vdefault then
glyph.vheight = vheight
end
- -- if topsidebearing ~= 0 then
- -- glyph.tsb = topsidebearing
- -- end
end
end
end
@@ -1324,28 +1319,17 @@ local sequence = {
{ 3, 10, 12 },
{ 0, 3, 4 },
{ 0, 1, 4 },
+ -- { 0, 1, 12 }, -- maybe for some old mac fonts
-- { 0, 4, 12 },
{ 0, 0, 6 },
{ 3, 0, 6 },
-- variants
{ 0, 5, 14 },
-- last resort ranges
-{ 0, 4, 12 },
+ { 0, 4, 12 },
{ 3, 10, 13 },
}
--- local sequence = {
--- { 0, 1, 4 },
--- { 0, 4, 12 },
--- { 0, 3, 4 },
--- { 3, 1, 4 },
--- { 3, 10, 12 },
--- { 0, 0, 6 },
--- { 3, 0, 6 },
--- -- variants
--- { 0, 5, 14 },
--- }
-
local supported = { }
for i=1,#sequence do
@@ -1398,7 +1382,7 @@ formatreaders[4] = function(f,fontdata,offset)
elseif offset == 0xFFFF then
-- bad encoding
elseif offset == 0 then
- if trace_cmap_detail then
+ if trace_cmap_details then
report("format 4.%i segment %2i from %C upto %C at index %H",1,segment,startchar,endchar,(startchar + delta) % 65536)
end
for unicode=startchar,endchar do
@@ -1431,8 +1415,8 @@ formatreaders[4] = function(f,fontdata,offset)
end
else
local shift = (segment-nofsegments+offset/2) - startchar
- if trace_cmap_detail then
- report("format 4.%i segment %2i from %C upto %C at index %H",0,segment,startchar,endchar,(startchar + delta) % 65536)
+ if trace_cmap_details then
+ report_cmap("format 4.%i segment %2i from %C upto %C at index %H",0,segment,startchar,endchar,(startchar + delta) % 65536)
end
for unicode=startchar,endchar do
local slot = shift + unicode
@@ -1481,8 +1465,8 @@ formatreaders[6] = function(f,fontdata,offset)
local count = readushort(f)
local stop = start+count-1
local nofdone = 0
- if trace_cmap_detail then
- report("format 6 from %C to %C",2,start,stop)
+ if trace_cmap_details then
+ report_cmap("format 6 from %C to %C",2,start,stop)
end
for unicode=start,stop do
local index = readushort(f)
@@ -1518,8 +1502,8 @@ formatreaders[12] = function(f,fontdata,offset)
local first = readulong(f)
local last = readulong(f)
local index = readulong(f)
- if trace_cmap_detail then
- report("format 12 from %C to %C starts at index %i",first,last,index)
+ if trace_cmap_details then
+ report_cmap("format 12 from %C to %C starts at index %i",first,last,index)
end
for unicode=first,last do
local glyph = glyphs[index]
@@ -1562,8 +1546,8 @@ formatreaders[13] = function(f,fontdata,offset)
local last = readulong(f)
local index = readulong(f)
if first < privateoffset then
- if trace_cmap_detail then
- report("format 13 from %C to %C get index %i",first,last,index)
+ if trace_cmap_details then
+ report_cmap("format 13 from %C to %C get index %i",first,last,index)
end
local glyph = glyphs[index]
local unicode = glyph.unicode
@@ -1651,10 +1635,16 @@ end
local function checkcmap(f,fontdata,records,platform,encoding,format)
local data = records[platform]
if not data then
+ if trace_cmap_details then
+ report_cmap("skipped, %s, p=%i e=%i f=%i","no platform",platform,encoding,format)
+ end
return 0
end
data = data[encoding]
if not data then
+ if trace_cmap_details then
+ report_cmap("skipped, %s, p=%i e=%i f=%i","no encoding",platform,encoding,format)
+ end
return 0
end
data = data[format]
@@ -1663,13 +1653,17 @@ local function checkcmap(f,fontdata,records,platform,encoding,format)
end
local reader = formatreaders[format]
if not reader then
+ if trace_cmap_details then
+ report_cmap("skipped, %s, p=%i e=%i f=%i","unsupported format",platform,encoding,format)
+ end
return 0
end
- local p = platforms[platform]
- local e = encodings[p]
local n = reader(f,fontdata,data) or 0
if trace_cmap then
- report("cmap checked: platform %i (%s), encoding %i (%s), format %i, new unicodes %i",platform,p,encoding,e and e[encoding] or "?",format,n)
+ local p = platforms[platform]
+ local e = encodings[p]
+ report_cmap("checked, platform %i (%s), encoding %i (%s), format %i, new unicodes %i",
+ platform,p,encoding,e and e[encoding] or "?",format,n)
end
return n
end
@@ -1904,6 +1898,7 @@ local function getinfo(maindata,sub,platformnames,rawfamilynames,metricstoo,inst
local postscript = fontdata.postscript or { }
local fontheader = fontdata.fontheader or { }
local cffinfo = fontdata.cffinfo or { }
+ local verticalheader = fontdata.verticalheader or { }
local filename = fontdata.filename
local weight = getname(fontdata,"weight") or (cffinfo and cffinfo.weight) or (metrics and metrics.weight)
local width = getname(fontdata,"width") or (cffinfo and cffinfo.width ) or (metrics and metrics.width )
@@ -1973,6 +1968,7 @@ local function getinfo(maindata,sub,platformnames,rawfamilynames,metricstoo,inst
platformnames = platformnames or nil,
instancenames = instancenames or nil,
tableoffsets = fontdata.tableoffsets,
+ defaultvheight = (verticalheader.ascender or 0) - (verticalheader.descender or 0)
}
if metricstoo then
local keys = {
diff --git a/tex/context/base/mkiv/l-table.lua b/tex/context/base/mkiv/l-table.lua
index 192347b06..cffdcc23e 100644
--- a/tex/context/base/mkiv/l-table.lua
+++ b/tex/context/base/mkiv/l-table.lua
@@ -1261,10 +1261,12 @@ function table.reverse(t) -- check with 5.3 ?
end
end
+-- This one is for really simple cases where need a hash from a table.
+
local function sequenced(t,sep,simple)
if not t then
return ""
- elseif type(t) == "string" then
+ elseif type(t) ~= "table" then
return t -- handy fallback
end
local n = #t
@@ -1305,7 +1307,11 @@ local function sequenced(t,sep,simple)
end
end
end
- return concat(s,sep or " | ")
+ if sep == true then
+ return "{ " .. concat(s,", ") .. " }"
+ else
+ return concat(s,sep or " | ")
+ end
end
table.sequenced = sequenced
diff --git a/tex/context/base/mkiv/lang-rep.lua b/tex/context/base/mkiv/lang-rep.lua
index 93509d82a..d0f6f6d5f 100644
--- a/tex/context/base/mkiv/lang-rep.lua
+++ b/tex/context/base/mkiv/lang-rep.lua
@@ -34,8 +34,8 @@ local splitter = Ct((
local stripper = P("{") * Cs((1-P(-2))^0) * P("}") * P(-1)
-local trace_replacements = false trackers.register("languages.replacements", function(v) trace_replacements = v end)
-local trace_detail = false trackers.register("languages.replacements.detail", function(v) trace_detail = v end)
+local trace_replacements = false trackers.register("languages.replacements", function(v) trace_replacements = v end)
+local trace_details = false trackers.register("languages.replacements.details", function(v) trace_details = v end)
local report_replacement = logs.reporter("languages","replacements")
@@ -179,7 +179,7 @@ local function hit(a,head)
else
local final = newroot.final
if final then
- if trace_detail then
+ if trace_details then
report_replacement("hitting word %a, replacement %a",final.word,final.replacement)
end
lastrun = current
diff --git a/tex/context/base/mkiv/lpdf-emb.lua b/tex/context/base/mkiv/lpdf-emb.lua
index 88b323a3f..2ab852a60 100644
--- a/tex/context/base/mkiv/lpdf-emb.lua
+++ b/tex/context/base/mkiv/lpdf-emb.lua
@@ -42,7 +42,7 @@ local fontstreams = fonts.hashes.streams
local report_fonts = logs.reporter("backend","fonts")
local trace_fonts = false
-local trace_detail = false
+local trace_details = false
trackers.register("backend.pdf.fonts",function(v) trace_fonts = v end)
@@ -889,7 +889,7 @@ do
pdfflushobject(reserved,descriptor)
pdfflushobject(object,parent)
--
- -- if trace_detail then
+ -- if trace_details then
-- local name = "temp.ttf"
-- report_fonts("saving %a",name)
-- io.savedata(name,fontdata)
@@ -1314,7 +1314,7 @@ do
target[dictof] = topdict .. topvars
--
target = concat(target)
- -- if trace_detail then
+ -- if trace_details then
-- local name = "temp.cff"
-- report_fonts("saving %a",name)
-- io.savedata(name,target)
diff --git a/tex/context/base/mkiv/lpdf-ini.lua b/tex/context/base/mkiv/lpdf-ini.lua
index e39548ca6..4bb72be1f 100644
--- a/tex/context/base/mkiv/lpdf-ini.lua
+++ b/tex/context/base/mkiv/lpdf-ini.lua
@@ -58,7 +58,7 @@ lpdf.flags = lpdf.flags or { } -- will be filled later
local trace_finalizers = false trackers.register("backend.finalizers", function(v) trace_finalizers = v end)
local trace_resources = false trackers.register("backend.resources", function(v) trace_resources = v end)
local trace_objects = false trackers.register("backend.objects", function(v) trace_objects = v end)
-local trace_detail = false trackers.register("backend.detail", function(v) trace_detail = v end)
+local trace_details = false trackers.register("backend.details", function(v) trace_details = v end)
do
@@ -906,7 +906,7 @@ function lpdf.flushobject(name,data)
local named = names[name]
if named then
if not trace_objects then
- elseif trace_detail then
+ elseif trace_details then
report_objects("flushing data to reserved object with name %a, data: %S",name,data)
else
report_objects("flushing data to reserved object with name %a",name)
@@ -914,7 +914,7 @@ function lpdf.flushobject(name,data)
return pdfimmediateobject(named,tostring(data))
else
if not trace_objects then
- elseif trace_detail then
+ elseif trace_details then
report_objects("flushing data to reserved object with number %s, data: %S",name,data)
else
report_objects("flushing data to reserved object with number %s",name)
@@ -922,7 +922,7 @@ function lpdf.flushobject(name,data)
return pdfimmediateobject(name,tostring(data))
end
else
- if trace_objects and trace_detail then
+ if trace_objects and trace_details then
report_objects("flushing data: %S",name)
end
return pdfimmediateobject(tostring(name))
diff --git a/tex/context/base/mkiv/luat-mac.lua b/tex/context/base/mkiv/luat-mac.lua
index d13b69c42..cc1ee67f2 100644
--- a/tex/context/base/mkiv/luat-mac.lua
+++ b/tex/context/base/mkiv/luat-mac.lua
@@ -268,8 +268,8 @@ function processors.mkxi(str,filename)
return str
end
-processors.mkli = processors.mkvi
-processors.mkil = processors.mkiv
+processors.mklx = processors.mkvi
+processors.mkxl = processors.mkiv
function macros.processmk(str,filename)
if filename then
@@ -284,11 +284,11 @@ end
local function validvi(filename,str)
local suffix = filesuffix(filename)
- if suffix == "mkvi" or suffix == "mkli" then
+ if suffix == "mkvi" or suffix == "mklx" then
return true
else
local check = lpegmatch(checker,str)
- return check == "mkvi" or check == "mkli"
+ return check == "mkvi" or check == "mklx"
end
end
@@ -303,7 +303,7 @@ function macros.processmkvi(str,filename)
return str
end
-macros.processmkli = macros.processmkvi
+macros.processmklx = macros.processmkvi
local sequencers = utilities.sequencers
@@ -338,7 +338,7 @@ if resolvers.schemes then
end
resolvers.schemes.install('mkvi',handler,1) -- this will cache !
- resolvers.schemes.install('mkli',handler,1) -- bonus, best use just mkvi
+ resolvers.schemes.install('mklx',handler,1) -- bonus, best use just mkvi
end
diff --git a/tex/context/base/mkiv/math-noa.lua b/tex/context/base/mkiv/math-noa.lua
index 29b5cbd7e..fda27222e 100644
--- a/tex/context/base/mkiv/math-noa.lua
+++ b/tex/context/base/mkiv/math-noa.lua
@@ -197,6 +197,7 @@ local mathchar_code = nodecodes.mathchar -- attr fam char
local mathtextchar_code = nodecodes.mathtextchar -- attr fam char
local delim_code = nodecodes.delim -- attr small_fam small_char large_fam large_char
----- style_code = nodecodes.style -- attr style
+----- parameter_code = nodecodes.parameter -- attr style
local math_choice = nodecodes.choice -- attr display text script scriptscript
local fence_code = nodecodes.fence -- attr subtype
@@ -299,6 +300,8 @@ local function process(start,what,n,parent)
noad = getfield(start,"bot_accent") if noad then process(noad,what,n,start) end -- list
-- elseif id == style_code then
-- -- has a next
+ -- elseif id == parameter_code then
+ -- -- has a next
-- else
-- -- glue, penalty, etc
end
diff --git a/tex/context/base/mkiv/meta-imp-dum.mkiv b/tex/context/base/mkiv/meta-imp-dum.mkiv
index 481afe82a..b84d4ac7a 100644
--- a/tex/context/base/mkiv/meta-imp-dum.mkiv
+++ b/tex/context/base/mkiv/meta-imp-dum.mkiv
@@ -66,7 +66,7 @@
if cmykcolor \MPvar{color} :
cmykcolor c, b ; b := (0,0,0,0)
else :
- color c, b ; ; b := (1,1,1)
+ color c, b ; b := (1,1,1)
fi ;
c := \MPvar{color} ;
w := \MPvar{width} ;
@@ -92,7 +92,7 @@
{width=\figurewidth,%
height=\figureheight,%
reduction=\externalfigureparameter\c!reduction,%
- color=placeholder:\the\c_grph_replacement_n}]
+ color=placeholder:\the\c_grph_replacement_n}] % weird, why do we need to prefix the palette
\definepalet
[placeholder]
@@ -108,6 +108,7 @@
\unexpanded\def\grph_include_replacement#1#2#3%
{\begingroup
+% \setuppalet[placeholder]%
\getpaletsize[placeholder]%
\ifnum\c_grph_replacement_n=\zerocount
\getrandomnumber \m_grph_replacement_n\plusone\paletsize
diff --git a/tex/context/base/mkiv/meta-ini.mkiv b/tex/context/base/mkiv/meta-ini.mkiv
index 09d7b2c06..65811a8ff 100644
--- a/tex/context/base/mkiv/meta-ini.mkiv
+++ b/tex/context/base/mkiv/meta-ini.mkiv
@@ -570,7 +570,7 @@
\def\meta_prepare_variable_nop
{\expandafter \let\csname\m_meta_current_variable_template\endcsname\meta_prepare_variable_default}
-\def\meta_prepare_variable_color
+\def\meta_prepare_variable_color % we use the attribute so we dont' go through namedcolor (why not)
{\expandafter\edef\csname\m_meta_current_variable_template\endcsname{\MPcolor\m_meta_current_variable}}
\def\meta_prepare_variable_number
diff --git a/tex/context/base/mkiv/mlib-ctx.mkiv b/tex/context/base/mkiv/mlib-ctx.mkiv
index 21d211c1b..cb925ec9b 100644
--- a/tex/context/base/mkiv/mlib-ctx.mkiv
+++ b/tex/context/base/mkiv/mlib-ctx.mkiv
@@ -20,11 +20,13 @@
\registerctxluafile{mlib-ctx}{}
\registerctxluafile{mlib-lua}{}
-\doifelsefileexists{mlib-scn.lua} {
- \registerctxluafile{mlib-scn}{}
-} {
- % experimental code for Alan and me
-}
+\startlmtxmode
+ \doifelsefileexists{mlib-scn.lua} {
+ \registerctxluafile{mlib-scn}{}
+ } {
+ % experimental code for Alan and me
+ }
+\stoplmtxmode
\registerctxluafile{mlib-lmp}{}
\registerctxluafile{mlib-int}{}
diff --git a/tex/context/base/mkiv/mlib-lua.lua b/tex/context/base/mkiv/mlib-lua.lua
index 3b08eb79a..8310a2925 100644
--- a/tex/context/base/mkiv/mlib-lua.lua
+++ b/tex/context/base/mkiv/mlib-lua.lua
@@ -922,12 +922,7 @@ do
end
function mp.positionpage(name)
- local p = getpage(name)
- if p then
- fprint("%p",p)
- else
- mprint("0")
- end
+ fprint("%i",getpage(name) or 0)
end
function mp.positionregion(name)
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index 5cd5fb373..76c357e2e 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -25,6 +25,8 @@ return {
"fontcharht",
"fontcharic",
"fontcharwd",
+ "futureexpand",
+ "futureexpandis",
"glueexpr",
"glueshrink",
"glueshrinkorder",
@@ -76,6 +78,7 @@ return {
"Udelimiterover",
"Udelimiterunder",
"Uhextensible",
+ "Uleft",
"Umathaccent",
"Umathaxis",
"Umathbinbinspacing",
@@ -199,10 +202,12 @@ return {
"Umathunderbarvgap",
"Umathunderdelimiterbgap",
"Umathunderdelimitervgap",
+ "Umiddle",
"Unosubscript",
"Unosuperscript",
"Uoverdelimiter",
"Uradical",
+ "Uright",
"Uroot",
"Uskewed",
"Uskewedwithdelims",
@@ -224,69 +229,70 @@ return {
"automatichyphenmode",
"automatichyphenpenalty",
"begincsname",
- "bodydir",
- "bodydirection",
- "boxdir",
+ "boundary",
"boxdirection",
+ "boxorientation",
+ "boxxmove",
+ "boxxoffset",
+ "boxymove",
+ "boxyoffset",
"breakafterdirmode",
"catcodetable",
"clearmarks",
"compoundhyphenmode",
- "copyfont",
"crampeddisplaystyle",
"crampedscriptscriptstyle",
"crampedscriptstyle",
"crampedtextstyle",
"csstring",
- "draftmode",
- "dviextension",
- "dvifeedback",
- "dvivariable",
"efcode",
"endlocalcontrol",
"etoksapp",
"etokspre",
"exceptionpenalty",
"expanded",
- "expandglyphsinfont",
"explicitdiscretionary",
"explicithyphenpenalty",
+ "firstvalidlanguage",
"fixupboxesmode",
"fontid",
"formatname",
"frozen",
- "futureexpand",
- "futureexpandis",
"gleaders",
+ "glet",
+ "glyphdatafield",
"gtoksapp",
"gtokspre",
"hjcode",
+ "hpack",
"hyphenationbounds",
"hyphenationmin",
"hyphenpenaltymode",
"ifabsdim",
"ifabsnum",
+ "ifchkdim",
+ "ifchknum",
+ "ifcmpdim",
+ "ifcmpnum",
"ifcondition",
+ "ifcstok",
+ "ifdimval",
+ "iffrozen",
"ifincsname",
- "ifprimitive",
- "ignoreligaturesinfont",
+ "ifnumval",
+ "ifprotected",
+ "iftok",
+ "ifusercmd",
"immediateassigned",
"immediateassignment",
"initcatcodetable",
"insertht",
+ "internalcodesmode",
"lastnamedcs",
- "lastsavedboxresourceindex",
- "lastsavedimageresourceindex",
- "lastsavedimageresourcepages",
- "lastxpos",
- "lastypos",
- "latelua",
- "lateluafunction",
+ "lastnodesubtype",
"leftghost",
"leftmarginkern",
"letcharcode",
- "letterspacefont",
- "linedir",
"linedirection",
"localbrokenpenalty",
"localinterlinepenalty",
@@ -304,14 +310,13 @@ return {
"luatexrevision",
"luatexversion",
"mathdelimitersmode",
- "mathdir",
"mathdirection",
"mathdisplayskipmode",
"matheqnogapstep",
"mathflattenmode",
"mathitalicsmode",
"mathnolimitsmode",
- "mathoption",
+ "matholdmode",
"mathpenaltiesmode",
"mathrulesfam",
"mathrulesmode",
@@ -322,27 +327,15 @@ return {
"mathstyle",
"mathsurroundmode",
"mathsurroundskip",
+ "noboundary",
+ "noexpand",
"nohrule",
"nokerns",
"noligs",
- "normaldeviate",
"nospaces",
"novrule",
"outputbox",
- "outputmode",
- "pagebottomoffset",
- "pagedir",
- "pagedirection",
- "pageheight",
- "pageleftoffset",
- "pagerightoffset",
- "pagetopoffset",
- "pagewidth",
- "pardir",
"pardirection",
- "pdfextension",
- "pdffeedback",
- "pdfvariable",
"postexhyphenchar",
"posthyphenchar",
"prebinoppenalty",
@@ -350,38 +343,24 @@ return {
"preexhyphenchar",
"prehyphenchar",
"prerelpenalty",
- "primitive",
"protrudechars",
+ "protrusionboundary",
"pxdimen",
"quitvmode",
- "randomseed",
"rightghost",
"rightmarginkern",
"rpcode",
- "saveboxresource",
"savecatcodetable",
- "saveimageresource",
- "savepos",
"scantextokens",
"setfontid",
- "setrandomseed",
"shapemode",
- "suppressfontnotfounderror",
- "suppressifcsnameerror",
- "suppresslongerror",
- "suppressmathparerror",
- "suppressoutererror",
- "suppressprimitiveerror",
- "synctex",
- "tagcode",
- "textdir",
"textdirection",
"toksapp",
"tokspre",
+ "tpack",
"tracingfonts",
- "uniformdeviate",
- "useboxresource",
- "useimageresource",
+ "vpack",
+ "wordboundary",
"xtoksapp",
"xtokspre",
},
@@ -508,9 +487,6 @@ return {
" ",
"-",
"/",
- "Uleft",
- "Umiddle",
- "Uright",
"above",
"abovedisplayshortskip",
"abovedisplayskip",
@@ -530,7 +506,6 @@ return {
"belowdisplayskip",
"binoppenalty",
"botmark",
- "boundary",
"box",
"boxmaxdepth",
"brokenpenalty",
@@ -539,7 +514,6 @@ return {
"chardef",
"cleaders",
"closein",
- "closeout",
"clubpenalty",
"copy",
"count",
@@ -597,14 +571,12 @@ return {
"fi",
"finalhyphendemerits",
"firstmark",
- "firstvalidlanguage",
"floatingpenalty",
"font",
"fontdimen",
"fontname",
"futurelet",
"gdef",
- "glet",
"global",
"globaldefs",
"halign",
@@ -618,7 +590,6 @@ return {
"hfuzz",
"hoffset",
"holdinginserts",
- "hpack",
"hrule",
"hsize",
"hskip",
@@ -645,7 +616,6 @@ return {
"ifvoid",
"ifx",
"ignorespaces",
- "immediate",
"indent",
"input",
"inputlineno",
@@ -706,8 +676,6 @@ return {
"muskipdef",
"newlinechar",
"noalign",
- "noboundary",
- "noexpand",
"noindent",
"nolimits",
"nonscript",
@@ -717,8 +685,8 @@ return {
"number",
"omit",
"openin",
- "openout",
"or",
+ "orelse",
"outer",
"output",
"outputpenalty",
@@ -748,7 +716,6 @@ return {
"pretolerance",
"prevdepth",
"prevgraf",
- "protrusionboundary",
"radical",
"raise",
"read",
@@ -780,7 +747,6 @@ return {
"spacefactor",
"spaceskip",
"span",
- "special",
"splitbotmark",
"splitfirstmark",
"splitmaxdepth",
@@ -798,7 +764,6 @@ return {
"tolerance",
"topmark",
"topskip",
- "tpack",
"tracingcommands",
"tracinglostchars",
"tracingmacros",
@@ -829,7 +794,6 @@ return {
"vfilneg",
"vfuzz",
"voffset",
- "vpack",
"vrule",
"vsize",
"vskip",
@@ -838,8 +802,6 @@ return {
"vtop",
"wd",
"widowpenalty",
- "wordboundary",
- "write",
"xdef",
"xleaders",
"xspaceskip",
@@ -848,4 +810,4 @@ return {
["xetex"]={
"XeTeXversion",
},
-}
+} \ No newline at end of file
diff --git a/tex/context/base/mkiv/node-aux.lua b/tex/context/base/mkiv/node-aux.lua
index d6a9950fe..45db8807a 100644
--- a/tex/context/base/mkiv/node-aux.lua
+++ b/tex/context/base/mkiv/node-aux.lua
@@ -380,25 +380,6 @@ function nodes.rehpack(n,...)
rehpack(tonut(n),...)
end
--- I have no use for this yet:
---
--- \skip0=10pt plus 2pt minus 2pt
--- \cldcontext{"\letterpercent p",tex.stretch_amount(tex.skip[0],1000)} -- 14.30887pt
---
--- local gluespec_code = nodes.nodecodes.gluespec
---
--- function tex.badness_to_ratio(badness)
--- return (badness/100)^(1/3)
--- end
---
--- function tex.stretch_amount(skip,badness) -- node no nut
--- if skip.id == gluespec_code then
--- return skip.width + (badness and (badness/100)^(1/3) or 1) * skip.stretch
--- else
--- return 0
--- end
--- end
-
-- nodemode helper: the next and prev pointers are untouched
function nuts.copy_no_components(g,copyinjection)
diff --git a/tex/context/base/mkiv/node-ini.lua b/tex/context/base/mkiv/node-ini.lua
index 8579ce18b..02c2c6f6e 100644
--- a/tex/context/base/mkiv/node-ini.lua
+++ b/tex/context/base/mkiv/node-ini.lua
@@ -523,3 +523,19 @@ end
if node.fix_node_lists then
node.fix_node_lists(false)
end
+
+-- We use the real node code numbers.
+
+if CONTEXTLMTXMODE > 0 then
+
+ local texchardef = tex.chardef
+
+ if texchardef then
+ for i=0,nodecodes.glyph do
+ texchardef(nodecodes[i] .. "nodecode",i)
+ end
+ tex.set("internalcodesmode",1)
+ end
+
+end
+
diff --git a/tex/context/base/mkiv/node-met.lua b/tex/context/base/mkiv/node-met.lua
index 574c71f60..f472d31a9 100644
--- a/tex/context/base/mkiv/node-met.lua
+++ b/tex/context/base/mkiv/node-met.lua
@@ -322,19 +322,6 @@ function nodes.concat(list) -- consider tail instead of slide
return head, tail
end
---[[
-<p>At some point we ran into a problem that the glue specification
-of the zeropoint dimension was overwritten when adapting a glue spec
-node. This is a side effect of glue specs being shared. After a
-couple of hours tracing and debugging Taco and I came to the
-conclusion that it made no sense to complicate the spec allocator
-and settled on a writable flag. This all is a side effect of the
-fact that some glues use reserved memory slots (with the zeropoint
-glue being a noticeable one). So, next we wrap this into a function
-and hide it for the user. And yes, LuaTeX now gives a warning as
-well.</p>
-]]--
-
function nodes.reference(n)
return n and tonut(n) or "<none>"
end
@@ -601,8 +588,7 @@ local keys = { whatsit = whatsitkeys }
local messyhack = table.tohash { -- temporary solution
nodecodes.attributelist,
nodecodes.attribute,
- nodecodes.gluespec,
- nodecodes.action,
+ nodecodes.action, -- hm
}
setmetatableindex(keys,function(t,k)
diff --git a/tex/context/base/mkiv/node-nut.lua b/tex/context/base/mkiv/node-nut.lua
index f3877d5c9..0764ee7e3 100644
--- a/tex/context/base/mkiv/node-nut.lua
+++ b/tex/context/base/mkiv/node-nut.lua
@@ -423,8 +423,6 @@ end
nuts.getsurround = nuts.getkern
nuts.setsurround = nuts.setkern
--- bad: we can have prev's being glue_spec
-
nuts.remove = remove
function nuts.delete(head,current)
diff --git a/tex/context/base/mkiv/node-res.lua b/tex/context/base/mkiv/node-res.lua
index 5012e771a..1a3605410 100644
--- a/tex/context/base/mkiv/node-res.lua
+++ b/tex/context/base/mkiv/node-res.lua
@@ -162,8 +162,7 @@ local kern = register_nut(new_nut(kern_code,kerncodes.userkern))
local fontkern = register_nut(new_nut(kern_code,kerncodes.fontkern))
local italickern = register_nut(new_nut(kern_code,kerncodes.italiccorrection))
local penalty = register_nut(new_nut(nodecodes.penalty))
-local glue = register_nut(new_nut(glue_code)) -- glue.spec = nil
-local glue_spec = register_nut(new_nut(nodecodes.gluespec))
+local glue = register_nut(new_nut(glue_code))
local glyph = register_nut(new_nut(glyph_code,0))
local textdir = register_nut(new_nut(nodecodes.dir))
@@ -273,15 +272,6 @@ function nutpool.italickern(k)
return n
end
-function nutpool.gluespec(width,stretch,shrink,stretch_order,shrink_order)
- -- maybe setglue
- local s = copy_nut(glue_spec)
- if width or stretch or shrink or stretch_order or shrink_order then
- setglue(s,width,stretch,shrink,stretch_order,shrink_order)
- end
- return s
-end
-
local function someskip(skip,width,stretch,shrink,stretch_order,shrink_order)
-- maybe setglue
local n = copy_nut(skip)
diff --git a/tex/context/base/mkiv/node-rul.lua b/tex/context/base/mkiv/node-rul.lua
index 1b86c9716..7d95f8c4c 100644
--- a/tex/context/base/mkiv/node-rul.lua
+++ b/tex/context/base/mkiv/node-rul.lua
@@ -22,7 +22,7 @@ local tonumber = tonumber
local context = context
local attributes = attributes
local nodes = nodes
-local properties = nodes.properties
+local properties = nodes.properties.data
local enableaction = nodes.tasks.enableaction
@@ -186,6 +186,8 @@ local function mathrule(n,h,v)
mathaction(n,h,v,"hruleaction")
end
+local x
+
local function useraction(n,h,v)
local p = properties[n]
if p then
diff --git a/tex/context/base/mkiv/node-syn.lua b/tex/context/base/mkiv/node-syn.lua
index 9f333315b..9096809c4 100644
--- a/tex/context/base/mkiv/node-syn.lua
+++ b/tex/context/base/mkiv/node-syn.lua
@@ -225,8 +225,8 @@ local blockedsuffixes = {
mkii = true,
mkiv = true,
mkvi = true,
- mkil = true,
- mkli = true,
+ mkxl = true,
+ mklx = true,
mkix = true,
mkxi = true,
-- lfg = true,
diff --git a/tex/context/base/mkiv/page-cst.lua b/tex/context/base/mkiv/page-cst.lua
index 49a60c903..583e6af0c 100644
--- a/tex/context/base/mkiv/page-cst.lua
+++ b/tex/context/base/mkiv/page-cst.lua
@@ -13,15 +13,15 @@ local ceil, odd, round = math.ceil, math.odd, math.round
local lower = string.lower
local copy = table.copy
-local trace_state = false trackers.register("columnsets.trace", function(v) trace_state = v end)
-local trace_detail = false trackers.register("columnsets.detail", function(v) trace_detail = v end)
-local trace_cells = false trackers.register("columnsets.cells", function(v) trace_cells = v end)
+local trace_state = false trackers.register("columnsets.trace", function(v) trace_state = v end)
+local trace_details = false trackers.register("columnsets.details", function(v) trace_details = v end)
+local trace_cells = false trackers.register("columnsets.cells", function(v) trace_cells = v end)
local report = logs.reporter("column sets")
local setmetatableindex = table.setmetatableindex
-local properties = nodes.properties
+local properties = nodes.properties.data
local nodecodes = nodes.nodecodes
@@ -927,7 +927,7 @@ local function findslice(dataset,head,available,column,row)
local used = getheight(done)
local rest = takebox("scratchbox")
if used > (usedsize+slack) then
- if trace_detail then
+ if trace_details then
report("at (%i,%i) available %p, used %p, overflow %p",column,row,usedsize,used,used-usedsize)
end
-- flush copy
diff --git a/tex/context/base/mkiv/page-lin.lua b/tex/context/base/mkiv/page-lin.lua
index 3689c7f8d..5ad660460 100644
--- a/tex/context/base/mkiv/page-lin.lua
+++ b/tex/context/base/mkiv/page-lin.lua
@@ -40,7 +40,7 @@ local v_next = variables.next
local v_page = variables.page
local v_no = variables.no
-local properties = nodes.properties
+local properties = nodes.properties.data
local nodecodes = nodes.nodecodes
local listcodes = nodes.listcodes
diff --git a/tex/context/base/mkiv/page-mix.lua b/tex/context/base/mkiv/page-mix.lua
index 701b2e4ca..51a12429e 100644
--- a/tex/context/base/mkiv/page-mix.lua
+++ b/tex/context/base/mkiv/page-mix.lua
@@ -19,8 +19,8 @@ local next, type = next, type
local concat = table.concat
local ceil = math.ceil
-local trace_state = false trackers.register("mixedcolumns.trace", function(v) trace_state = v end)
-local trace_detail = false trackers.register("mixedcolumns.detail", function(v) trace_detail = v end)
+local trace_state = false trackers.register("mixedcolumns.trace", function(v) trace_state = v end)
+local trace_details = false trackers.register("mixedcolumns.details", function(v) trace_details = v end)
local report_state = logs.reporter("mixed columns")
@@ -124,7 +124,7 @@ local function collectinserts(result,nxt,nxtid)
inserttotal = inserttotal + getheight(nxt) -- height includes depth (hm, still? needs checking)
local s = getsubtype(nxt)
local c = inserts[s]
- if trace_detail then
+ if trace_details then
report_state("insert of class %s found",s)
end
if not c then
@@ -138,7 +138,7 @@ local function collectinserts(result,nxt,nxtid)
end
c[#c+1] = nxt
elseif nxtid == mark_code then
- if trace_detail then
+ if trace_details then
report_state("mark found")
end
else
@@ -445,7 +445,7 @@ local function preparesplit(specification) -- a rather large function
report_state("setting collector to column %s",column)
end
current, skipped = discardtopglue(current,discarded)
- if trace_detail and skipped ~= 0 then
+ if trace_details and skipped ~= 0 then
report_state("check > column 1, discarded %p",skipped)
end
head = current
@@ -469,7 +469,7 @@ local function preparesplit(specification) -- a rather large function
state = "quit"
end
end
- if trace_detail then
+ if trace_details then
report_state("%-8s > column %s, delta %p, threshold %p, advance %p, total %p, target %p => %a (height %p, depth %p, skip %p)",
where,curcol,delta,threshold,advance,total,target,state,height,depth,skip)
end
@@ -477,7 +477,7 @@ local function preparesplit(specification) -- a rather large function
end
current, skipped = discardtopglue(current,discarded)
- if trace_detail and skipped ~= 0 then
+ if trace_details and skipped ~= 0 then
report_state("check > column 1, discarded %p",skipped)
end
diff --git a/tex/context/base/mkiv/publ-ini.lua b/tex/context/base/mkiv/publ-ini.lua
index aa55b40e9..5a3a4ea21 100644
--- a/tex/context/base/mkiv/publ-ini.lua
+++ b/tex/context/base/mkiv/publ-ini.lua
@@ -43,7 +43,7 @@ local trace = false trackers.register("publications",
local trace_cite = false trackers.register("publications.cite", function(v) trace_cite = v end)
local trace_missing = false trackers.register("publications.cite.missing", function(v) trace_missing = v end)
local trace_references = false trackers.register("publications.cite.references", function(v) trace_references = v end)
-local trace_detail = false trackers.register("publications.detail", function(v) trace_detail = v end)
+local trace_details = false trackers.register("publications.details", function(v) trace_details = v end)
local trace_suffixes = false trackers.register("publications.suffixes", function(v) trace_suffixes = v end)
publications = publications or { }
@@ -456,7 +456,7 @@ do
end
end
end
- if trace_detail then
+ if trace_details then
report("%s unique references, %s reused entries",nofunique,nofreused)
end
initialize = nil
@@ -695,7 +695,7 @@ end
local function unknowncite(reference)
ctx_btxsettag(reference)
- if trace_detail then
+ if trace_details then
report("expanding %a cite setup %a","unknown","unknown")
end
ctx_btxcitesetup("unknown")
@@ -718,7 +718,7 @@ local function marknocite(dataset,tag,nofcitations,setup)
ctx_btxsetdataset(dataset)
ctx_btxsettag(tag)
ctx_btxsetbacklink(nofcitations)
- if trace_detail then
+ if trace_details then
report("expanding cite setup %a",setup)
end
ctx_btxcitesetup(setup)
@@ -1478,10 +1478,10 @@ do
local name, value = found(dataset,tag,field,valid,fields)
if value then
typesetters[currentspecification.types[name]](field,value,manipulator)
- elseif trace_detail then
+ elseif trace_details then
report("%s %s %a in category %a for tag %a in dataset %a","unknown","entry",field,category,tag,name)
end
- elseif trace_detail then
+ elseif trace_details then
report("%s %s %a in category %a for tag %a in dataset %a","invalid","entry",field,category,tag,name)
end
else
@@ -1503,10 +1503,10 @@ do
local value = fields[field]
if value then
typesetters[currentspecification.types[field]](field,value,manipulator)
- elseif trace_detail then
+ elseif trace_details then
report("%s %s %a in category %a for tag %a in dataset %a","unknown","field",field,category,tag,name)
end
- elseif trace_detail then
+ elseif trace_details then
report("%s %s %a in category %a for tag %a in dataset %a","invalid","field",field,category,tag,name)
end
else
@@ -1530,10 +1530,10 @@ do
local value = details[field]
if value then
typesetters[currentspecification.types[field]](field,value,manipulator)
- elseif trace_detail then
+ elseif trace_details then
report("%s %s %a in category %a for tag %a in dataset %a","unknown","detail",field,category,tag,name)
end
- elseif trace_detail then
+ elseif trace_details then
report("%s %s %a in category %a for tag %a in dataset %a","invalid","detail",field,category,tag,name)
end
else
@@ -1556,7 +1556,7 @@ do
local value = fields[field]
if value then
context(typesetters.default(field,value,manipulator))
- elseif trace_detail then
+ elseif trace_details then
report("field %a of tag %a in dataset %a has no value",field,tag,name)
end
else
@@ -2058,7 +2058,7 @@ do
ctx_btxsetlastinternal(last[2].internal)
ctx_btxsetlastpage(last[1])
end
- if trace_detail then
+ if trace_details then
report("expanding page setup")
end
ctx_btxpagesetup("") -- nothing yet
@@ -2124,12 +2124,12 @@ do
local prealpage = plist.references.realpage
if crealpage ~= prealpage then
if method == v_always or not conditionals.layoutisdoublesided then
- if trace_detail then
+ if trace_details then
report("previous %a, current %a, different page",previous,current)
end
return false
elseif crealpage % 2 == 0 then
- if trace_detail then
+ if trace_details then
report("previous %a, current %a, different page",previous,current)
end
return false
@@ -2149,7 +2149,7 @@ do
sameentry = identical(c_casted,p_casted)
end
end
- if trace_detail then
+ if trace_details then
if sameentry then
report("previous %a, current %a, same entry",previous,current)
else
@@ -2760,7 +2760,7 @@ do
ctx_btxsetfirst("") -- (f_missing(tag))
end
ctx_btxsetconcat(concatstate(i,n))
- if trace_detail then
+ if trace_details then
report("expanding cite setup %a",setup)
end
ctx_btxcitesetup(setup)
@@ -3217,7 +3217,7 @@ do
end
end
ctx_btxsetconcat(concatstate(i,nofcollected))
- if trace_detail then
+ if trace_details then
report("expanding %a cite setup %a","multiple author",setup)
end
ctx_btxsubcitesetup(setup)
@@ -3236,7 +3236,7 @@ do
if suffix then
ctx_btxsetsuffix(entry.suffix)
end
- if trace_detail then
+ if trace_details then
report("expanding %a cite setup %a","single author",setup)
end
ctx_btxcitesetup(setup)
@@ -3408,7 +3408,7 @@ do
function listvariants.default(dataset,block,tag,variant)
ctx_btxsetfirst("?")
- if trace_detail then
+ if trace_details then
report("expanding %a list setup %a","default",variant)
end
ctx_btxnumberingsetup("default")
@@ -3416,7 +3416,7 @@ do
function listvariants.num(dataset,block,tag,variant,listindex)
ctx_btxsetfirst(listindex)
- if trace_detail then
+ if trace_details then
report("expanding %a list setup %a","num",variant)
end
ctx_btxnumberingsetup(variant or "num")
@@ -3427,7 +3427,7 @@ do
function listvariants.index(dataset,block,tag,variant,listindex)
local index = getdetail(dataset,tag,"index")
ctx_btxsetfirst(index or "?")
- if trace_detail then
+ if trace_details then
report("expanding %a list setup %a","index",variant)
end
ctx_btxnumberingsetup(variant or "index")
@@ -3435,7 +3435,7 @@ do
function listvariants.tag(dataset,block,tag,variant,listindex)
ctx_btxsetfirst(tag)
- if trace_detail then
+ if trace_details then
report("expanding %a list setup %a","tag",variant)
end
ctx_btxnumberingsetup(variant or "tag")
@@ -3450,7 +3450,7 @@ do
if suffix then
ctx_btxsetsuffix(suffix)
end
- if trace_detail then
+ if trace_details then
report("expanding %a list setup %a","short",variant)
end
ctx_btxnumberingsetup(variant or "short")
diff --git a/tex/context/base/mkiv/scrp-ini.lua b/tex/context/base/mkiv/scrp-ini.lua
index d76b64133..3d3aa4406 100644
--- a/tex/context/base/mkiv/scrp-ini.lua
+++ b/tex/context/base/mkiv/scrp-ini.lua
@@ -11,10 +11,10 @@ if not modules then modules = { } end modules ['scrp-ini'] = {
local tonumber, next = tonumber, next
-local trace_analyzing = false trackers.register("scripts.analyzing", function(v) trace_analyzing = v end)
-local trace_injections = false trackers.register("scripts.injections", function(v) trace_injections = v end)
-local trace_splitting = false trackers.register("scripts.splitting", function(v) trace_splitting = v end)
-local trace_splitdetail = false trackers.register("scripts.splitting.detail", function(v) trace_splitdetail = v end)
+local trace_analyzing = false trackers.register("scripts.analyzing", function(v) trace_analyzing = v end)
+local trace_injections = false trackers.register("scripts.injections", function(v) trace_injections = v end)
+local trace_splitting = false trackers.register("scripts.splitting", function(v) trace_splitting = v end)
+local trace_splitdetails = false trackers.register("scripts.splitting.details", function(v) trace_splitdetails = v end)
local report_preprocessing = logs.reporter("scripts","preprocessing")
local report_splitting = logs.reporter("scripts","splitting")
@@ -770,7 +770,7 @@ function splitters.handler(head) -- todo: also first_glyph test
if not nextchar then
-- we're done
elseif tree[nextchar] then
- if trace_splitdetail then
+ if trace_splitdetails then
if type(final) == "string" then
report_splitting("advance %s processing between <%s> and <%c>","with",final,nextchar)
else
@@ -779,7 +779,7 @@ function splitters.handler(head) -- todo: also first_glyph test
end
head, current = proc(handler,head,current,last,1)
else
- if trace_splitdetail then
+ if trace_splitdetails then
-- could be punctuation
if type(final) == "string" then
report_splitting("advance %s processing between <%s> and <%c>","without",final,nextchar)
diff --git a/tex/context/base/mkiv/spac-ali.mkiv b/tex/context/base/mkiv/spac-ali.mkiv
index 4362ff250..ae3bff87d 100644
--- a/tex/context/base/mkiv/spac-ali.mkiv
+++ b/tex/context/base/mkiv/spac-ali.mkiv
@@ -702,7 +702,6 @@
\setvalue{\??aligncommand\v!end }{\c_spac_align_state_horizontal\pluseight}
\setvalue{\??aligncommand\v!paragraph }{\c_spac_align_state_horizontal\plusnine}
-
\setvalue{\??aligncommand\v!lefttoright }{\c_spac_align_state_direction \plusone }
\setvalue{\??aligncommand\v!righttoleft }{\c_spac_align_state_direction \plustwo }
\setvalue{\??aligncommand l2r}{\c_spac_align_state_direction \plusone }
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index aa20128db..d65f4089b 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 3e5df5ff2..2db709d41 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-doc.lua b/tex/context/base/mkiv/strc-doc.lua
index aa5fe352e..c38dc2f4d 100644
--- a/tex/context/base/mkiv/strc-doc.lua
+++ b/tex/context/base/mkiv/strc-doc.lua
@@ -41,7 +41,7 @@ local v_positive = variables.positive
local v_current = variables.current
local trace_sectioning = false trackers.register("structures.sectioning", function(v) trace_sectioning = v end)
-local trace_detail = false trackers.register("structures.detail", function(v) trace_detail = v end)
+local trace_details = false trackers.register("structures.details", function(v) trace_details = v end)
local report_structure = logs.reporter("structure","sectioning")
local report_used = logs.reporter("structure")
@@ -335,7 +335,7 @@ function sections.setentry(given)
-- a trick to permit userdata to overload title, ownnumber and reference
-- normally these are passed as argument but nowadays we provide several
-- interfaces (we need this because we want to be compatible)
- if trace_detail then
+ if trace_details then
report_structure("name %a, mapped level %a, old depth %a, new depth %a, reset set %a",
givenname,mappedlevel,olddepth,newdepth,resetset)
end
@@ -354,7 +354,7 @@ function sections.setentry(given)
if newdepth > olddepth then
for i=olddepth+1,newdepth do
local s = tonumber(sets.get("structure:resets",data.block,saveset and saveset[i] or resetset,i))
- if trace_detail then
+ if trace_details then
report_structure("new depth %s, old depth %s, reset set %a, reset value %a, current %a",olddepth,newdepth,resetset,s,numbers[i])
end
if not s or s == 0 then
@@ -369,7 +369,7 @@ function sections.setentry(given)
elseif newdepth < olddepth then
for i=olddepth,newdepth+1,-1 do
local s = tonumber(sets.get("structure:resets",data.block,saveset and saveset[i] or resetset,i))
- if trace_detail then
+ if trace_details then
report_structure("new depth %s, old depth %s, reset set %a, reset value %a, current %a",olddepth,newdepth,resetset,s,numbers[i])
end
if not s or s == 0 then
@@ -402,12 +402,12 @@ function sections.setentry(given)
newn = 1 -- maybe zero is nicer
end
forced[newdepth] = nil
- if trace_detail then
+ if trace_details then
report_structure("old depth %a, new depth %a, old n %a, new n %a, forced %t",olddepth,newdepth,oldn,newn,fd)
end
else
newn = oldn + 1
- if trace_detail then
+ if trace_details then
report_structure("old depth %a, new depth %a, old n %a, new n %a, increment",olddepth,newdepth,oldn,newn)
end
end
@@ -426,7 +426,7 @@ function sections.setentry(given)
if #ownnumbers > 0 then
numberdata.ownnumbers = fastcopy(ownnumbers) -- { unpack(ownnumbers) }
end
- if trace_detail then
+ if trace_details then
report_structure("name %a, numbers % a, own numbers % a",givenname,numberdata.numbers,numberdata.ownnumbers)
end
if not references.block then
diff --git a/tex/context/base/mkiv/strc-mar.lua b/tex/context/base/mkiv/strc-mar.lua
index 0221b9b8f..b5fd2667b 100644
--- a/tex/context/base/mkiv/strc-mar.lua
+++ b/tex/context/base/mkiv/strc-mar.lua
@@ -45,9 +45,9 @@ local texsetattribute = tex.setattribute
local a_marks = attributes.private("structure","marks")
-local trace_marks_set = false trackers.register("marks.set", function(v) trace_marks_set = v end)
-local trace_marks_get = false trackers.register("marks.get", function(v) trace_marks_get = v end)
-local trace_marks_all = false trackers.register("marks.detail", function(v) trace_marks_all = v end)
+local trace_set = false trackers.register("marks.set", function(v) trace_set = v end)
+local trace_get = false trackers.register("marks.get", function(v) trace_get = v end)
+local trace_details = false trackers.register("marks.details", function(v) trace_details = v end)
local report_marks = logs.reporter("structure","marks")
@@ -100,7 +100,7 @@ local ranges = {
local function resolve(t,k)
if k then
- if trace_marks_set or trace_marks_get then
+ if trace_set or trace_get then
report_marks("undefined mark, name %a",k)
end
local crap = { autodefined = true } -- maybe set = 0 and reset = 0
@@ -162,7 +162,7 @@ function marks.synchronize(class,n,option)
if box then
local first, last = sweep(getlist(box),0,0)
if option == v_keep and first == 0 and last == 0 then
- if trace_marks_get or trace_marks_set then
+ if trace_get or trace_set then
report_marks("action %a, class %a, box %a","retain at synchronize",class,n)
end
-- todo: check if still valid firts/last in range
@@ -184,12 +184,12 @@ function marks.synchronize(class,n,option)
}
ranges[class] = range
end
- if trace_marks_get or trace_marks_set then
+ if trace_get or trace_set then
report_marks("action %a, class %a, first %a, last %a","synchronize",class,range.first,range.last)
end
end
end
- elseif trace_marks_get or trace_marks_set then
+ elseif trace_get or trace_set then
report_marks("action %s, class %a, box %a","synchronize without content",class,n)
end
end
@@ -262,7 +262,7 @@ function marks.relate(name,chain)
end
children[#children+1] = name
end
- elseif trace_marks_set then
+ elseif trace_set then
report_marks("error: invalid relation, name %a, chain %a",name,chain)
end
end
@@ -276,7 +276,7 @@ local function resetchildren(new,name)
for i=1,#children do
local ci = children[i]
new[ci] = false
- if trace_marks_set then
+ if trace_set then
report_marks("action %a, parent %a, child %a","reset",name,ci)
end
resetchildren(new,ci)
@@ -316,7 +316,7 @@ function marks.set(name,value)
new[name] = value
topofstack = topofstack + 1
stack[topofstack] = new
- if trace_marks_set then
+ if trace_set then
if name == child then
report_marks("action %a, name %a, index %a, value %a","set",name,topofstack,value)
else
@@ -329,7 +329,7 @@ end
local function reset(name)
if v_all then
- if trace_marks_set then
+ if trace_set then
report_marks("action %a","reset all")
end
stack = { }
@@ -348,7 +348,7 @@ local function reset(name)
name = parent
dn = data[name]
end
- if trace_marks_set then
+ if trace_set then
report_marks("action %a, name %a, index %a","reset",name,topofstack)
end
dn.reset = topofstack
@@ -404,24 +404,24 @@ local function resolve(name,first,last,strict,quitonfalse,notrace)
else
step, method = 1, "top-down"
end
- if trace_marks_get and not notrace then
+ if trace_get and not notrace then
report_marks("action %a, strategy %a, name %a, parent %a, strict %a","request",method,child,parent,strict or false)
end
- if trace_marks_all and not notrace then
+ if trace_details and not notrace then
marks.show(first,last)
end
local r = dn.reset
local s = dn.set
if first <= last and first <= r then
- if trace_marks_get and not notrace then
+ if trace_get and not notrace then
report_marks("action %a, name %a, first %a, last %a, reset %a, index %a","reset first",name,first,last,r,first)
end
elseif first >= last and last <= r then
- if trace_marks_get and not notrace then
+ if trace_get and not notrace then
report_marks("action %a, name %a, first %a, last %a, reset %a, index %a","reset last",name,first,last,r,last)
end
elseif not stack[first] or not stack[last] then
- if trace_marks_get and not notrace then
+ if trace_get and not notrace then
-- a previous or next method can give an out of range, which is valid
report_marks("error: out of range, name %a, reset %a, index %a",name,r,first)
end
@@ -429,12 +429,12 @@ local function resolve(name,first,last,strict,quitonfalse,notrace)
local top = stack[first]
local fullchain = dn.fullchain
if not fullchain or #fullchain == 0 then
- if trace_marks_get and not notrace then
+ if trace_get and not notrace then
report_marks("warning: no full chain, trying again, name %a, first %a, last %a",name,first,last)
end
return resolve(name,first,last)
else
- if trace_marks_get and not notrace then
+ if trace_get and not notrace then
report_marks("found chain [ % => T ]",fullchain)
end
local chaindata = { }
@@ -444,7 +444,7 @@ local function resolve(name,first,last,strict,quitonfalse,notrace)
if data[cname].set > 0 then
local value = resolve(cname,first,last,false,false,true)
if value == "" then
- if trace_marks_get and not notrace then
+ if trace_get and not notrace then
report_marks("quitting chain, name %a, reset %a, start %a",name,r,first)
end
return ""
@@ -453,28 +453,28 @@ local function resolve(name,first,last,strict,quitonfalse,notrace)
end
end
end
- if trace_marks_get and not notrace then
+ if trace_get and not notrace then
report_marks("using chain [ % => T ]",chaindata)
end
local value, index, found = resolve(name,first,last,false,false,true)
if value ~= "" then
- if trace_marks_get and not notrace then
+ if trace_get and not notrace then
report_marks("following chain [ % => T ]",chaindata)
end
for i=1,chainlength do
local cname = fullchain[i]
if data[cname].set > 0 and chaindata[i] ~= found[cname] then
- if trace_marks_get and not notrace then
+ if trace_get and not notrace then
report_marks("quiting chain, name %a, reset %a, index %a",name,r,first)
end
return ""
end
end
- if trace_marks_get and not notrace then
+ if trace_get and not notrace then
report_marks("found in chain, name %a, reset %a, start %a, index %a, value %a",name,r,first,index,value)
end
return value, index, found
- elseif trace_marks_get and not notrace then
+ elseif trace_get and not notrace then
report_marks("not found, name %a, reset %a",name,r)
end
end
@@ -489,18 +489,18 @@ local function resolve(name,first,last,strict,quitonfalse,notrace)
return ""
end
elseif value == true then
- if trace_marks_get and not notrace then
+ if trace_get and not notrace then
report_marks("quitting steps, name %a, reset %a, start %a, index %a",name,r,first,i)
end
return ""
elseif value ~= "" then
- if trace_marks_get and not notrace then
+ if trace_get and not notrace then
report_marks("found in steps, name %a, reset %a, start %a, index %a, value %a",name,r,first,i,value)
end
return value, i, current
end
end
- if trace_marks_get and not notrace then
+ if trace_get and not notrace then
report_marks("not found in steps, name %a, reset %a",name,r)
end
end
@@ -516,7 +516,7 @@ local function doresolve(name,rangename,swap,df,dl,strict)
local range = ranges[rangename] or ranges[v_page]
local first = range.first
local last = range.last
- if trace_marks_get then
+ if trace_get then
report_marks("action %a, name %a, range %a, swap %a, first %a, last %a, df %a, dl %a, strict %a",
"resolving",name,rangename,swap or false,first,last,df,dl,strict or false)
end
@@ -550,12 +550,12 @@ methods[v_bottom_nocheck] = function(name,range) return doresolve(name,range,t
methods[v_next_nocheck] = function(name,range) return doresolve(name,range,true , 0,1,false) end
local function do_first(name,range,check)
- if trace_marks_get then
+ if trace_get then
report_marks("action %a, name %a, range %a","resolving first",name,range)
end
local f_value, f_index, f_found = doresolve(name,range,false,0,0,check)
if f_found then
- if trace_marks_get then
+ if trace_get then
report_marks("action %a, name %a, range %a","resolving last",name,range)
end
local l_value, l_index, l_found = doresolve(name,range,true ,0,0,check)
@@ -565,7 +565,7 @@ local function do_first(name,range,check)
local si = stack[i]
local sn = si[name]
if sn and sn ~= false and sn ~= true and sn ~= "" and sn ~= f_value then
- if trace_marks_get then
+ if trace_get then
report_marks("action %a, name %a, range %a, index %a, value %a","resolving",name,range,i,sn)
end
return sn, i, si
@@ -573,19 +573,19 @@ local function do_first(name,range,check)
end
end
end
- if trace_marks_get then
+ if trace_get then
report_marks("resolved, name %a, range %a, using first",name,range)
end
return f_value, f_index, f_found
end
local function do_last(name,range,check)
- if trace_marks_get then
+ if trace_get then
report_marks("action %a, name %a, range %a","resolving last",name,range)
end
local l_value, l_index, l_found = doresolve(name,range,true ,0,0,check)
if l_found then
- if trace_marks_get then
+ if trace_get then
report_marks("action %a, name %a, range %a","resolving first",name,range)
end
local f_value, f_index, f_found = doresolve(name,range,false,0,0,check)
@@ -595,7 +595,7 @@ local function do_last(name,range,check)
local si = stack[i]
local sn = si[name]
if sn and sn ~= false and sn ~= true and sn ~= "" and sn ~= l_value then
- if trace_marks_get then
+ if trace_get then
report_marks("action %a, name %a, range %a, index %a, value %a","resolving",name,range,i,sn)
end
return sn, i, si
@@ -603,7 +603,7 @@ local function do_last(name,range,check)
end
end
end
- if trace_marks_get then
+ if trace_get then
report_marks("resolved, name %a, range %a, using first",name,range)
end
return l_value, l_index, l_found
@@ -621,7 +621,7 @@ end
local function fetched(name,range,method)
local value = (methods[method] or methods[v_first])(name,range) or ""
- if not trace_marks_get then
+ if not trace_get then
-- no report
elseif value == "" then
report_marks("nothing fetched, name %a, range %a, method %a",name,range,method)
@@ -701,7 +701,7 @@ end
end
function marks.fetch(name,range,method) -- chapter page first | chapter column:1 first
- if trace_marks_get then
+ if trace_get then
report_marks("marking requested, name %a, range %a, method %a",name,range,method)
end
if method == "" or method == v_default then
diff --git a/tex/context/base/mkiv/supp-ran.lua b/tex/context/base/mkiv/supp-ran.lua
index 1ad9293ee..1a2d10bea 100644
--- a/tex/context/base/mkiv/supp-ran.lua
+++ b/tex/context/base/mkiv/supp-ran.lua
@@ -10,8 +10,8 @@ if not modules then modules = { } end modules ['supp-ran'] = {
local report_system = logs.reporter("system","randomizer")
-local trace_random = false trackers.register("system.randomizer", function(v) trace_random = v end)
-local trace_detail = false trackers.register("system.randomizer.detail",function(v) trace_detail = v end)
+local trace_random = false trackers.register("system.randomizer", function(v) trace_random = v end)
+local trace_details = false trackers.register("system.randomizer.details", function(v) trace_details = v end)
local insert, remove = table.insert, table.remove
@@ -28,7 +28,7 @@ local maxcount = 0x3FFFFFFF -- 2^30-1
math.random = function(...)
local n = random(...)
- if trace_detail then
+ if trace_details then
report_system("math %s",n)
end
return n
@@ -43,7 +43,7 @@ local function setrandomseedi(n)
n = round(n)
randomseed(n)
last = random(0,maxcount) -- we need an initial value
- if trace_detail then
+ if trace_details then
report_system("seed %s from %s",last,n)
elseif trace_random then
report_system("setting seed %s",n)
@@ -54,7 +54,7 @@ math.setrandomseedi = setrandomseedi
local function getrandomnumber(min,max)
last = random(min,max)
- if trace_detail then
+ if trace_details then
report_system("number %s",last)
end
return last
@@ -71,7 +71,7 @@ end
-- local function getmprandomnumber()
-- last = random(0,4095)
--- if trace_detail then
+-- if trace_details then
-- report_system("mp number %s",last)
-- end
-- return last
@@ -81,7 +81,7 @@ end
local function pushrandomseed()
insert(stack,last)
- if trace_random or trace_detail then
+ if trace_random or trace_details then
report_system("pushing seed %s",last)
end
end
@@ -89,7 +89,7 @@ end
local function reuserandomseed(n)
local seed = stack[#stack]
if seed then
- if trace_random or trace_detail then
+ if trace_random or trace_details then
report_system("reusing seed %s",last)
end
randomseed(seed)
@@ -99,7 +99,7 @@ end
local function poprandomseed()
local seed = remove(stack)
if seed then
- if trace_random or trace_detail then
+ if trace_random or trace_details then
report_system("popping seed %s",seed)
end
randomseed(seed)
@@ -109,13 +109,13 @@ end
local function getrandom(where,...)
if type(where) == "string" then
local n = random(...)
- if trace_detail then
+ if trace_details then
report_system("%s %s",where,n)
end
return n
else
local n = random(where,...)
- if trace_detail then
+ if trace_details then
report_system("utilities %s",n)
end
return n
diff --git a/tex/context/base/mkiv/syst-ini.mkiv b/tex/context/base/mkiv/syst-ini.mkiv
index 281c4a218..4be622d48 100644
--- a/tex/context/base/mkiv/syst-ini.mkiv
+++ b/tex/context/base/mkiv/syst-ini.mkiv
@@ -619,48 +619,64 @@
%D have number 0 (used to be char node) and ligature nodes are mapped to 7. That way
%D macro packages can use the same symbolic names as in traditional \ETEX. Keep in
%D mind that the internal node numbers are different and that there are more node
-%D types that 15.
-
-\chardef\charnodecode = 0
-\chardef\hlistnodecode = 1
-\chardef\vlistnodecode = 2
-\chardef\rulenodecode = 3
-\chardef\insertnodecode = 4
-\chardef\marknodecode = 5
-\chardef\adjustnodecode = 6
-\chardef\ligaturenodecode = 7
-\chardef\discretionarynodecode = 8
-\chardef\whatsitnodecode = 9
-\chardef\mathnodecode = 10
-\chardef\gluenodecode = 11
-\chardef\kernnodecode = 12
-\chardef\penaltynodecode = 13
-\chardef\unsetnodecode = 14
-\chardef\mathsnodecode = 15
+%D types that 15. The mode parameter forces \LUAMETATEX\ to use the real node
+%D numbers.
+
+\ifdefined\internalcodesmode
+
+ \internalcodesmode\plusone
+
+ % \chardef\gluenodecode = 12
+ % \chardef\kernnodecode = 13
+ % \chardef\penaltynodecode = 14
+
+\else
+
+ % \chardef\charnodecode = 0
+ % \chardef\hlistnodecode = 1
+ % \chardef\vlistnodecode = 2
+ % \chardef\rulenodecode = 3
+ % \chardef\insertnodecode = 4
+ % \chardef\marknodecode = 5
+ % \chardef\adjustnodecode = 6
+ % \chardef\ligaturenodecode = 7
+ % \chardef\discretionarynodecode = 8
+ % \chardef\whatsitnodecode = 9
+ % \chardef\mathnodecode = 10
+ \chardef\gluenodecode = 11
+ \chardef\kernnodecode = 12
+ \chardef\penaltynodecode = 13
+ % \chardef\unsetnodecode = 14
+ % \chardef\mathsnodecode = 15
+
+\fi
%D Constants to be used with \type {\currentiftype}. I wonder if we will ever
-%D use these in \CONTEXT.
-
-\chardef\charifcode = 1
-\chardef\catifcode = 2
-\chardef\numifcode = 3
-\chardef\dimifcode = 4
-\chardef\oddifcode = 5
-\chardef\vmodeifcode = 6
-\chardef\hmodeifcode = 7
-\chardef\mmodeifcode = 8
-\chardef\innerifcode = 9
-\chardef\voidifcode = 10
-\chardef\hboxifcode = 11
-\chardef\vboxifcode = 12
-\chardef\xifcode = 13
-\chardef\eofifcode = 14
-\chardef\trueifcode = 15
-\chardef\falseifcode = 16
-\chardef\caseifcode = 17
-\chardef\definedifcode = 18
-\chardef\csnameifcode = 19
-\chardef\fontcharifcode = 20
+%D use these in \CONTEXT. We have a few more anyway and in \LUAMETATEX\ we
+%D have different numbers. So for now let's just not define them. The
+%D previously mentioned mode parameters enables the real numbers (we have
+%D some more and they are therefore ordered differently).
+
+% \chardef\charifcode = 1
+% \chardef\catifcode = 2
+% \chardef\numifcode = 3
+% \chardef\dimifcode = 4
+% \chardef\oddifcode = 5
+% \chardef\vmodeifcode = 6
+% \chardef\hmodeifcode = 7
+% \chardef\mmodeifcode = 8
+% \chardef\innerifcode = 9
+% \chardef\voidifcode = 10
+% \chardef\hboxifcode = 11
+% \chardef\vboxifcode = 12
+% \chardef\xifcode = 13
+% \chardef\eofifcode = 14
+% \chardef\trueifcode = 15
+% \chardef\falseifcode = 16
+% \chardef\caseifcode = 17
+% \chardef\definedifcode = 18
+% \chardef\csnameifcode = 19
+% \chardef\fontcharifcode = 20
%D Of course we want even bigger log files, so we copied this from the \ETEX\
%D source files.
diff --git a/tex/context/base/mkiv/tabl-ltb.mkiv b/tex/context/base/mkiv/tabl-ltb.mkiv
index ae9ff9151..de90d6585 100644
--- a/tex/context/base/mkiv/tabl-ltb.mkiv
+++ b/tex/context/base/mkiv/tabl-ltb.mkiv
@@ -125,7 +125,8 @@
\c!width=5\emwidth,
\c!height=\v!fit, % \v!line = faster
\c!background=,
- \c!backgroundcolor=]
+ \c!backgroundcolor=,
+ \c!rulethickness=\linewidth]
\def\linetableparameter#1%
{\begincsname\??linetable#1\endcsname}
@@ -290,30 +291,70 @@
\box\scratchbox
\fi}
+% \startuseMPgraphic{one}
+% path p, q ;
+% numeric r ;
+% r := RuleThickness ;
+% p := unitsquare xysized(RuleWidth,RuleHeight+RuleDepth) ;
+% q := p topenlarged -r bottomenlarged -r ;
+% draw q ;
+% setbounds currentpicture to p;
+% \stopuseMPgraphic
+%
+% \setuplinetable[r][odd] [type=mp,mp=one,backgroundcolor=gray,rulethickness=1pt]
+% \setuplinetable[r][even][type=mp,mp=one,backgroundcolor=green,rulethickness=1pt]
+%
+% \startlinetable
+% \dorecurse{10}{\NC aaa \NC bb \NC c \NC ddddd \NC eeee \NC ff \NC \NR}
+% \stoplinetable
+
\def\tabl_lines_wrap_up_auto
{\edef\p_height{\linetablerparameter{x\c!height}}%
\edef\p_depth {\linetablerparameter{x\c!depth }}%
\hpack
{\blackrule
[ \c!color=\linetablecparameter\c!backgroundcolor,
+ \c!type=\linetablecparameter\c!type,
+ \c!mp=\linetablecparameter\c!mp,
+ \c!rulethickness=\linetablecparameter\c!rulethickness,
\c!height=\ifx\p_height\empty\ht\scratchbox\else\p_height\fi,
\c!depth=\ifx\p_depth \empty\dp\scratchbox\else\p_depth \fi,
\c!width=\wd\scratchbox]%
\hskip-\wd\scratchbox\box\scratchbox}}
+\def\tabl_lines_wrap_up_auto_r
+ {\hpack
+ {\blackrule
+ [ \c!color=\linetablerparameter\c!backgroundcolor,
+ \c!type=\linetablerparameter\c!type,
+ \c!mp=\linetablerparameter\c!mp,
+ \c!rulethickness=\linetablerparameter\c!rulethickness,
+ \c!height=\ht\scratchbox,
+ \c!depth=\dp\scratchbox,
+ \c!width=\wd\scratchbox]%
+ \hskip-\wd\scratchbox\box\scratchbox}}
+
\def\tabl_lines_wrap_up_line
{\backgroundline[\linetablecparameter\c!backgroundcolor]{\box\scratchbox}}
\def\tabl_lines_save_part
{\global\setbox\tablebox\c_tabl_lines_part
- \ifnum\c_tabl_lines_part=\zerocount
+ \ifcase\c_tabl_lines_part\relax
\box\scratchbox % just storing
\else
\vbox
{\ifvoid\tablebox\c_tabl_lines_part\else\unvbox\tablebox\c_tabl_lines_part\fi
- \doif{\linetablerparameter\c!background}\v!color
- {\backgroundline[\linetablerparameter\c!backgroundcolor]}%
- {\box\scratchbox}% is also arg to \backgroundline
+ \edef\p_background{\linetablerparameter\c!background}%
+ \ifx\p_background\v!color
+ \backgroundline[\linetablerparameter\c!backgroundcolor]{\box\scratchbox}%
+ \else
+ \edef\p_type{\linetablerparameter\c!type}%
+ \ifx\p_type\empty
+ \box\scratchbox
+ \else
+ \tabl_lines_wrap_up_auto_r
+ \fi
+ \fi
\endgraf
\linetablerparameter\c!after}%
\fi}
diff --git a/tex/context/base/mkiv/tabl-tbl.mkiv b/tex/context/base/mkiv/tabl-tbl.mkiv
index ab4fef64a..b6f8a684c 100644
--- a/tex/context/base/mkiv/tabl-tbl.mkiv
+++ b/tex/context/base/mkiv/tabl-tbl.mkiv
@@ -17,17 +17,15 @@
\registerctxluafile{tabl-tbl}{} % experiment
-%D I can probably reimplement this using a \LUATEX\ combination
-%D but it does not pay of in development time. If I need something
-%D else I will write it from scratch anyway. This module looks
-%D a bit complex which is a consequence of it dealing with paragraphs
-%D being split over pages and that there are several passes over the
-%D data set. We can probably do some cleanup (combine/split).
+%D I can probably reimplement this using a \LUATEX\ combination but it does not pay
+%D of in development time. If I need something else I will write it from scratch
+%D anyway. This module looks a bit complex which is a consequence of it dealing with
+%D paragraphs being split over pages and that there are several passes over the data
+%D set. We can probably do some cleanup (combine/split).
%D
-%D Caching the preamble does not save much (compared to other
-%D bits and pieces of \CONTEXT). There are not that many ways to
-%D deal with preambles and this is just one of them. The keys are
-%D somewhat similar to those of the \TABLE\ package.
+%D Caching the preamble does not save much (compared to other bits and pieces of
+%D \CONTEXT). There are not that many ways to deal with preambles and this is just
+%D one of them. The keys are somewhat similar to those of the \TABLE\ package.
% |p2|p3| 2:3 -> spanning (maybe)
%
@@ -579,15 +577,17 @@
\installtabulatepreambleoption{ }{\tabl_tabulate_set_preamble}
\installtabulatepreambleoption{A}{\tabl_tabulate_set_alignment}
-% We no longer deal with '~' here but map it onto 'd' instead. Of course
-% we could prefix a key with \type {\meaning} instead, which works ok (and
-% is needed in order to pseudo expand \type {\next}, but is ugly at the
-% same time. The 'd' stands for digitspace.
-%
-% \installtabulatepreambleoption{~}{...} % see 'd'
-%
-% Also, as there is always a key, we no longer do some after assigment or
-% future let but just pick up the key.
+%D We no longer deal with \type {~} here but map it onto \type {d} instead. Of
+%D course we could prefix a key with \type {\meaning} instead, which works ok (and
+%D is needed in order to pseudo expand \type {\next}, but is ugly at the same time.
+%D The type {d} stands for digitspace.
+
+%D \starttyping
+%D \installtabulatepreambleoption{~}{...} % see 'd'
+%D \stoptyping
+%D
+%D Also, as there is always a key, we no longer do some after assigment or future
+%D let but just pick up the key.
% \installtabulatepreambleoption \s!unknown %
% {\writestatus{tabulate}{unknown preamble key [\normalmeaning\next]}%
@@ -976,9 +976,8 @@
%D
%D \typebuffer {\tracetabulatetrue\getbuffer}
-%D As we want to be compatible we use an indirect way to
-%D implement the definers. The next examples demonstrate
-%D the difference:
+%D Because we want to be compatible we use an indirect way to implement the
+%D definers. The next examples demonstrate the difference:
%D
%D \starttyping
%D \definetabulate[test][|l|c|r|]
@@ -1151,15 +1150,6 @@
\def\tabl_tabulate_start_head_nop{\tabl_tabulate_start_head_yes[\v!tabulate]}
\def\tabl_tabulate_start_foot_nop{\tabl_tabulate_start_foot_yes[\v!tabulate]}
-% \def\tabl_tabulate_start_head_nop{\tabl_tabulate_start_head_yes[]}
-% \def\tabl_tabulate_start_foot_nop{\tabl_tabulate_start_foot_yes[]}
-
-% \unexpanded\def\tabl_start_defined[#1]%
-% {\bgroup
-% \edef\currenttabulationparent{#1}%
-% \let\currenttabulation\currenttabulationparent
-% \dodoubleargument\tabl_start_defined_indeed}
-
\unexpanded\def\tabl_start_defined[#1]%
{\bgroup
\edef\currenttabulationparent{#1}%
@@ -1184,12 +1174,6 @@
\singleexpandafter\tabl_start_defined_zero
\fi}
-% \def\tabl_start_defined_one[#1][#2]%
-% {\doifelseassignment{#1}
-% {\setuptabulation[\currenttabulation][#1]}%
-% {\edef\currenttabulation{\currenttabulation:#1}}%
-% \tabl_tabulate_start_building}
-
\def\tabl_start_defined_one[#1][#2]%
{\ifcondition\validassignment{#1}%
\setuptabulation[\currenttabulation][#1]%
@@ -1223,17 +1207,6 @@
\def\tabl_default_format{|l|p|}
-% \def\tabl_start_regular_one[#1][#2]%
-% {\doifelseassignment{#1}
-% {\lettabulationparameter\c!format\tabl_default_format
-% \setupcurrenttabulation[#1]}
-% {\def\p_format{#1}%
-% \ifx\p_format\empty
-% \def\p_format{|l|p|}%
-% \fi
-% \lettabulationparameter\c!format\p_format}%
-% \tabl_tabulate_start_building}
-
\def\tabl_start_regular_one[#1][#2]%
{\ifcondition\validassignment{#1}%
\lettabulationparameter\c!format\tabl_default_format
@@ -1500,15 +1473,6 @@
% normal columns:
-% \def\tabl_tabulate_column_normal#1#2%
-% {\unskip
-% \aligntab
-% \ifconditional\c_tabl_tabulate_equal\tabulateequalpos\else\tabulatenormalpos\fi
-% \aligntab
-% \global\c_tabl_tabulate_kind#1%
-% \global\c_tabl_tabulate_type#2%
-% \aligntab}
-
\def\tabl_tabulate_column_normal#1#2%
{\unskip
\aligntab
@@ -1855,9 +1819,8 @@
\def\tabl_tabulate_digits{\digits}
-%D Beware, we cannot use \type {\unexpanded} on \type {\HL}
-%D cum suis, since \TEX's hard coded noalign lookahead fails
-%D on it! I mistakenly added this for a while.
+%D Beware, we cannot use \type {\unexpanded} on \type {\HL} cum suis, since \TEX's
+%D hard coded noalign lookahead fails on it! I mistakenly added this for a while.
\setvalue{\??tabulatealigning\v!normal}{0}
\setvalue{\??tabulatealigning\v!right }{1}
@@ -1898,27 +1861,6 @@
\installcorenamespace{tabulatenobreak}
-% \def\tabl_tabulate_break_state_set
-% {%\writestatus{SET}{\the\c_tabl_tabulate_noflines}%
-% \expandafter\glet\csname\??tabulatenobreak\the\c_tabl_tabulate_noflines\endcsname\conditionaltrue}
-%
-% \def\tabl_tabulate_break_state_reset
-% {\ifcsname\??tabulatenobreak\the\c_tabl_tabulate_noflines\endcsname
-% %\writestatus{RESET}{\the\c_tabl_tabulate_noflines}%
-% \expandafter\glet\csname\??tabulatenobreak\the\c_tabl_tabulate_noflines\endcsname\undefined
-% \fi}
-%
-% \def\tabl_tabulate_break_state_allowbreak
-% {\ifcsname\??tabulatenobreak\the\c_tabl_tabulate_noflines\endcsname
-% %\writestatus{TRUE}{\the\c_tabl_tabulate_noflines}%
-% \else
-% %\writestatus{FALSE}{\the\c_tabl_tabulate_noflines}%
-% \tabl_tabulate_break_allow % needed with pbreak prevention
-% \fi}
-%
-% \let\tabl_tabulate_break_allow\allowbreak
-% \let\tabl_tabulate_break_no \nobreak
-
\def\tabl_tabulate_break_allow{\directvpenalty\zerocount}
\def\tabl_tabulate_break_maybe{\directvpenalty\zerocount}
\def\tabl_tabulate_break_no {\directvpenalty\plustenthousand} % ,order:2}}
@@ -1937,11 +1879,6 @@
\unexpanded\def\tabl_tabulate_RQ_first{\tabl_tabulate_column_equal \zerocount\plusone}
\unexpanded\def\tabl_tabulate_HQ_first{\tabl_tabulate_column_equal \zerocount\plustwo}
-%unexpanded\def\tabl_tabulate_NG_first{\NC\tabl_tabulate_charalign}
-%unexpanded\def\tabl_tabulate_NG_first{\NC}
-%unexpanded\def\tabl_tabulate_NN_first{\NC\tabl_tabulate_digits} % new, undocumented, test first
-%unexpanded\def\tabl_tabulate_ND_first{\NC\tabl_tabulate_digits} % same, for old times sake
-
\unexpanded\def\tabl_tabulate_NG_first{\tabl_tabulate_column_normal\zerocount\zerocount}
\unexpanded\def\tabl_tabulate_NN_first{\tabl_tabulate_column_normal\zerocount\zerocount\tabl_tabulate_digits} % new, undocumented, test first
\unexpanded\def\tabl_tabulate_ND_first{\tabl_tabulate_column_normal\zerocount\zerocount\tabl_tabulate_digits} % same, for old times sake
@@ -1988,8 +1925,6 @@
%D The following shortcut is handy for tables where one needs bold headers:
-%unexpanded\def\tabl_tabulate_BC_first{\NC\let\fontstyle\globalfontstyle\bf}
-
\unexpanded\def\tabl_tabulate_BC_first
{\tabl_tabulate_column_normal\plusone\zerocount
\let\fontstyle\globalfontstyle
@@ -2176,15 +2111,6 @@
\tabl_tabulate_nobreak_inject
\stoptabulatenoalign}
-% \unexpanded\def\tabl_tabulate_ML_second_indeed
-% {\tabl_tabulate_column_rule_separator_inject
-% \tabl_tabulate_hrule_inject
-% \vskip-\p_rulethickness\relax
-% \tabl_tabulate_hrule_inject
-% \tabl_tabulate_break_no
-% \tabl_tabulate_column_rule_separator_inject
-% \stoptabulatenoalign}
-
\def\spac_vspacing_no_topskip % use grouped
{\attribute\skipcategoryattribute\plusten}
@@ -2307,13 +2233,12 @@
\def\tabulateautorule{\HR}%
\def\tabulateautoline{\HL} % no longer different (to be looked into)
-% When support for vertical rules we needed a way to pick up the
-% specification for the final rule and a \type {|{}} interface was
-% chosen. As a result parsing had to become more complex and I was
-% not in the mood for messing up the code too much. Therefore from
-% now on the preamble is split by \LUA. There are definitely more
-% places where we can use \LUA\ code (for instance in alignment of
-% numbers. The repeat parser is replace at the \LUA\ end as well.
+%D When support for vertical rules we needed a way to pick up the specification for
+%D the final rule and a \type {|{}} interface was chosen. As a result parsing had to
+%D become more complex and I was not in the mood for messing up the code too much.
+%D Therefore from now on the preamble is split by \LUA. There are definitely more
+%D places where we can use \LUA\ code (for instance in alignment of numbers. The
+%D repeat parser is replace at the \LUA\ end as well.
\let\tabl_tabulate_flush_collected \empty
\let\tabl_tabulate_flush_collected_indeed\empty
@@ -2757,9 +2682,9 @@
%D \stopwhatever
%D \stoptyping
-%D This is needed because we sometimes use the english command in
-%D tracing macros. In fact, most detailed tracing macros that
-%D are done with \LUA\ only work in the english interface anyway.
+%D This is needed because we sometimes use the english command in tracing macros. In
+%D fact, most detailed tracing macros that are done with \LUA\ only work in the
+%D english interface anyway.
% \definetabulate[tabulate] \setuptabulate[tabulate][\c!format=\v!none] % so no \v! here
@@ -3069,16 +2994,16 @@
\ignorespaces}
\appendtoks
- \let\NL\tabl_tabulate_NL_first % NC with Line
- \let\ND\tabl_tabulate_ND_first % NC with Default Line
- \let\LB\tabl_tabulate_LB_first % BC with Line
- \let\DB\tabl_tabulate_DB_first % BC with Default Line
- \let\NF\tabl_tabulate_NF_first % NC with Filler
- \let\NP\tabl_tabulate_NP_first % NC with Predefined Filler
- \let\FB\tabl_tabulate_FB_first % BC with Filler
- \let\PB\tabl_tabulate_PB_first % BC with Predefined Filler
- \let\NA\tabl_tabulate_NA_first % NC with Auto Line
- \let\BA\tabl_tabulate_BA_first % NC with Auto Line
+ \let\NL\tabl_tabulate_NL_first % NC with Line
+ \let\ND\tabl_tabulate_ND_first % NC with Default Line
+ \let\LB\tabl_tabulate_LB_first % BC with Line
+ \let\DB\tabl_tabulate_DB_first % BC with Default Line
+ \let\NF\tabl_tabulate_NF_first % NC with Filler
+ \let\NP\tabl_tabulate_NP_first % NC with Predefined Filler
+ \let\FB\tabl_tabulate_FB_first % BC with Filler
+ \let\PB\tabl_tabulate_PB_first % BC with Predefined Filler
+ \let\NA\tabl_tabulate_NA_first % NC with Auto Line
+ \let\BA\tabl_tabulate_BA_first % NC with Auto Line
\to \t_tabl_tabulate_initializers_first
\appendtoks
diff --git a/tex/context/base/mkiv/trac-vis.lua b/tex/context/base/mkiv/trac-vis.lua
index 8a7132be0..cb18d4499 100644
--- a/tex/context/base/mkiv/trac-vis.lua
+++ b/tex/context/base/mkiv/trac-vis.lua
@@ -779,12 +779,7 @@ local ruledbox do
setlink(info,next)
end
if prev and prev > 0 then
- -- if getid(prev) == gluespec_code then
- -- report_visualize("ignoring invalid prev")
- -- -- weird, how can this happen, an inline glue-spec, probably math
- -- else
- setlink(prev,info)
- -- end
+ setlink(prev,info)
end
if head == current then
return info, info
diff --git a/tex/context/base/mkiv/typo-bld.lua b/tex/context/base/mkiv/typo-bld.lua
index d6a4fd9fd..6874d385a 100644
--- a/tex/context/base/mkiv/typo-bld.lua
+++ b/tex/context/base/mkiv/typo-bld.lua
@@ -36,6 +36,11 @@ local texsetattribute = tex.setattribute
local texnest = tex.nest
local texlists = tex.lists
+local texget = tex.get
+local texset = tex.set
+
+local texgetdimen = tex.getdimen
+
local nodes = nodes
local nodeidstostring = nodes.idstostring
local nodepool = nodes.pool
@@ -148,11 +153,11 @@ function parbuilders.constructors.methods.oneline(head,followed_by_display)
-- when needed we will turn this into a helper
local t = texnest[texnest.ptr]
local h = hpack_node(head)
- local d = tex.baselineskip.width - t.prevdepth - h.height
+ local d = texget("baselineskip",false) - t.prevdepth - h.height
t.prevdepth = h.depth
t.prevgraf = 1
- if d < tex.lineskiplimit then
- return insert_node_before(h,h,new_lineskip(tex.lineskip))
+ if d < texget("lineskiplimit") then
+ return insert_node_before(h,h,new_lineskip(texget("lineskip",false))) -- no stretch etc
else
return insert_node_before(h,h,new_baselineskip(d))
end
@@ -225,14 +230,12 @@ local pageactions = nodes.tasks.actions("mvlbuilders")
local function report(groupcode,head)
report_page_builder("trigger: %s",groupcode)
- report_page_builder(" vsize : %p",tex.vsize)
- report_page_builder(" pagegoal : %p",tex.pagegoal)
- report_page_builder(" pagetotal: %p",tex.pagetotal)
+ report_page_builder(" vsize : %p",texget("vsize"))
+ report_page_builder(" pagegoal : %p",texget("pagegoal"))
+ report_page_builder(" pagetotal: %p",texget("pagetotal"))
report_page_builder(" list : %s",head and nodeidstostring(head) or "<empty>")
end
--- use tex.[sg]etlist
-
-- check why box is called before after_linebreak .. maybe make categories and
-- call 'm less
@@ -252,7 +255,7 @@ function builders.buildpage_filter(groupcode)
head, done = pageactions(head,groupcode)
stoptiming(builders)
-- -- doesn't work here (not passed on?)
- -- tex.pagegoal = tex.vsize - tex.dimen.d_page_floats_inserted_top - tex.dimen.d_page_floats_inserted_bottom
+ -- texset("pagegoal,texget("vsize") - texgetdimen("d_page_floats_inserted_top") - texgetdimen("d_page_floats_inserted_bottom")
texlists.contrib_head = head or nil -- needs checking
-- tex.setlist("contrib_head",head,head and nodes.tail(head))
return done and head or true -- no return value needed
@@ -374,34 +377,3 @@ trackers.register("builders.hpack.overflow",function(v)
show = v
registercallback("hpack_quality",(report or show) and hpack_quality or nil,"check hpack quality")
end)
-
--- local ignoredepth = - 65536000
---
--- registercallback(
--- "append_to_vlist_filter",
--- function(box,location,prevdepth,mirrored),
--- if prevdepth > ignoredepth then
--- local b = tex.baselineskip
--- local d = b.width - prevdepth
--- local g = nil
--- if mirrored then
--- d = d - box.depth
--- else
--- d = d - box.height
--- end
--- if d < tex.lineskiplimit then
--- g = nodes.pool.glue()
--- g.spec = tex.lineskip
--- else
--- g = nodes.pool.baselineskip(d)
--- end
--- g.next = box
--- box.prev = g
--- return g, mirrored and box.height or box.depth
--- else
--- return box, mirrored and box.height or box.depth
--- end
--- end,
--- "experimental prevdepth checking"
--- )
-
diff --git a/tex/context/base/mkiv/typo-fln.lua b/tex/context/base/mkiv/typo-fln.lua
index 13a990e26..7ed70296f 100644
--- a/tex/context/base/mkiv/typo-fln.lua
+++ b/tex/context/base/mkiv/typo-fln.lua
@@ -82,6 +82,8 @@ local a_color = attributes.private('color')
local a_transparency = attributes.private('transparency')
local a_colormodel = attributes.private('colormodel')
+local texget = tex.get
+
local texsetattribute = tex.setattribute
local unsetvalue = attributes.unsetvalue
@@ -128,9 +130,9 @@ actions[v_line] = function(head,setting)
local ma = setting.ma or 0
local ca = setting.ca
local ta = setting.ta
- local hangafter = tex.hangafter
- local hangindent = tex.hangindent
- local parindent = tex.parindent
+ local hangafter = texget("hangafter")
+ local hangindent = texget("hangindent")
+ local parindent = texget("parindent")
local nofchars = 0
local n = 0
local temp = copy_node_list(head)
@@ -164,7 +166,7 @@ actions[v_line] = function(head,setting)
local list = temp
local prev = temp
for i=1,noflines do
- local hsize = tex.hsize - tex.leftskip.width - tex.rightskip.width
+ local hsize = texget("hsize") - texget("leftskip",false) - texget("rightskip",false)
if i == 1 then
hsize = hsize - parindent
end
diff --git a/tex/context/base/mkiv/typo-krn.lua b/tex/context/base/mkiv/typo-krn.lua
index c7edf4055..f4f1215e1 100644
--- a/tex/context/base/mkiv/typo-krn.lua
+++ b/tex/context/base/mkiv/typo-krn.lua
@@ -110,8 +110,8 @@ local kerns = typesetters.kerns or { }
typesetters.kerns = kerns
local report = logs.reporter("kerns")
-local trace_ligatures = false trackers.register("typesetters.kerns.ligatures", function(v) trace_ligatures = v end)
-local trace_ligatures_d = false trackers.register("typesetters.kerns.ligatures.detail",function(v) trace_ligatures_d = v end)
+local trace_ligatures = false trackers.register("typesetters.kerns.ligatures", function(v) trace_ligatures = v end)
+local trace_ligatures_d = false trackers.register("typesetters.kerns.ligatures.details", function(v) trace_ligatures_d = v end)
kerns.mapping = kerns.mapping or { }
kerns.factors = kerns.factors or { }
diff --git a/tex/context/base/mkiv/util-sci.lua b/tex/context/base/mkiv/util-sci.lua
index 4565e089d..d58b3387f 100644
--- a/tex/context/base/mkiv/util-sci.lua
+++ b/tex/context/base/mkiv/util-sci.lua
@@ -35,7 +35,7 @@ end
local knownlexers = {
tex = "tex",
mkiv = "tex", mkvi = "tex",
- mkil = "tex", mkli = "tex",
+ mkxl = "tex", mklx = "tex",
mkxi = "tex", mkix = "tex",
mkii = "tex",
bib = "bibtex",
@@ -44,6 +44,7 @@ local knownlexers = {
lfg = "lua", lus = "lua", luv = "lua",
mp = "mps",
mpiv = "mps",
+ mpxl = "mps",
mpii = "mps",
w = "web", ww = "web",
c = "cpp", h = "cpp",
diff --git a/tex/context/base/mkiv/util-seq.lua b/tex/context/base/mkiv/util-seq.lua
index 8f719e0d5..35839f230 100644
--- a/tex/context/base/mkiv/util-seq.lua
+++ b/tex/context/base/mkiv/util-seq.lua
@@ -29,13 +29,13 @@ local formatters = string.formatters
local replacer = utilities.templates.replacer
local trace_used = false
-local trace_detail = false
+local trace_details = false
local report = logs.reporter("sequencer")
local usedcount = 0
local usednames = { }
-trackers.register("sequencers.used", function(v) trace_used = v end)
-trackers.register("sequencers.detail",function(v) trace_detail = v end)
+trackers.register("sequencers.used", function(v) trace_used = v end)
+trackers.register("sequencers.details", function(v) trace_details = v end)
local sequencers = { }
utilities.sequencers = sequencers
@@ -369,7 +369,7 @@ function sequencers.nodeprocessor(t,nofarguments)
local steps = 0
usedcount = usedcount + 1
--
- if trace_detail then
+ if trace_details then
naliases = naliases + 1
aliases[naliases] = formatters["local report = logs.reporter('sequencer',%q)"](name)
ncalls = ncalls + 1
@@ -383,12 +383,12 @@ function sequencers.nodeprocessor(t,nofarguments)
local action = actions[i]
if not askip[action] then
steps = steps + 1
- if trace_used or trace_detail then
+ if trace_used or trace_details then
local action = tostring(action)
report("%02i: category %a, group %a, action %a",usedcount,name,group,action)
usednames[action] = true
end
- if trace_detail then
+ if trace_details then
ncalls = ncalls + 1
calls[ncalls] = formatters[ [[report(" step %a, action %a")]] ](steps,tostring(action))
end
@@ -407,7 +407,7 @@ function sequencers.nodeprocessor(t,nofarguments)
if steps == 0 then
processor = templates.default or construct { }
else
- if trace_detail then
+ if trace_details then
ncalls = ncalls + 1
calls[ncalls] = [[report("stop")]]
end
diff --git a/tex/context/interface/mkii/keys-en.xml b/tex/context/interface/mkii/keys-en.xml
index 2dd29cfd9..3b554fabd 100644
--- a/tex/context/interface/mkii/keys-en.xml
+++ b/tex/context/interface/mkii/keys-en.xml
@@ -150,6 +150,7 @@
<cd:variable name='comment' value='comment'/>
<cd:variable name='component' value='component'/>
<cd:variable name='compressseparator' value='compressseparator'/>
+ <cd:variable name='compressstopper' value='compressstopper'/>
<cd:variable name='concept' value='concept'/>
<cd:variable name='construction' value='construction'/>
<cd:variable name='content' value='content'/>
@@ -480,6 +481,7 @@
<cd:variable name='sectionnumber' value='sectionnumber'/>
<cd:variable name='see' value='see'/>
<cd:variable name='selectfont' value='selectfont'/>
+ <cd:variable name='separator' value='separator'/>
<cd:variable name='september' value='september'/>
<cd:variable name='serif' value='serif'/>
<cd:variable name='serifbold' value='serifbold'/>
@@ -573,6 +575,7 @@
<cd:variable name='temporary' value='temporary'/>
<cd:variable name='test' value='test'/>
<cd:variable name='text' value='text'/>
+ <cd:variable name='textnote' value='textnote'/>
<cd:variable name='three' value='three'/>
<cd:variable name='thursday' value='thursday'/>
<cd:variable name='tight' value='tight'/>
@@ -736,7 +739,10 @@
<cd:constant name='component' value='component'/>
<cd:constant name='compoundhyphen' value='compoundhyphen'/>
<cd:constant name='compress' value='compress'/>
+ <cd:constant name='compressdistance' value='compressdistance'/>
+ <cd:constant name='compressmethod' value='compressmethod'/>
<cd:constant name='compressseparator' value='compressseparator'/>
+ <cd:constant name='compressstopper' value='compressstopper'/>
<cd:constant name='concerns' value='concerns'/>
<cd:constant name='connector' value='connector'/>
<cd:constant name='continue' value='continue'/>
diff --git a/tex/context/interface/mkii/keys-fr.xml b/tex/context/interface/mkii/keys-fr.xml
index cc820098b..3fab361da 100644
--- a/tex/context/interface/mkii/keys-fr.xml
+++ b/tex/context/interface/mkii/keys-fr.xml
@@ -150,6 +150,7 @@
<cd:variable name='comment' value='commentaire'/>
<cd:variable name='component' value='composant'/>
<cd:variable name='compressseparator' value='compressseparator'/>
+ <cd:variable name='compressstopper' value='compressstopper'/>
<cd:variable name='concept' value='concept'/>
<cd:variable name='construction' value='construction'/>
<cd:variable name='content' value='contenu'/>
@@ -480,6 +481,7 @@
<cd:variable name='sectionnumber' value='numerosection'/>
<cd:variable name='see' value='voit'/>
<cd:variable name='selectfont' value='selectfont'/>
+ <cd:variable name='separator' value='separator'/>
<cd:variable name='september' value='septembre'/>
<cd:variable name='serif' value='serif'/>
<cd:variable name='serifbold' value='serifbold'/>
@@ -737,7 +739,10 @@
<cd:constant name='component' value='composant'/>
<cd:constant name='compoundhyphen' value='compoundhyphen'/>
<cd:constant name='compress' value='compress'/>
+ <cd:constant name='compressdistance' value='compressdistance'/>
+ <cd:constant name='compressmethod' value='compressmethod'/>
<cd:constant name='compressseparator' value='compressseparator'/>
+ <cd:constant name='compressstopper' value='compressstopper'/>
<cd:constant name='concerns' value='concerns'/>
<cd:constant name='connector' value='connector'/>
<cd:constant name='continue' value='continue'/>
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 7d7f5f10e..237b4ec2b 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index b1bf55d2e..3822e876e 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/context/modules/common/s-abbreviations-logos.tex b/tex/context/modules/common/s-abbreviations-logos.tex
index 410aa1824..5d8735b5d 100644
--- a/tex/context/modules/common/s-abbreviations-logos.tex
+++ b/tex/context/modules/common/s-abbreviations-logos.tex
@@ -20,10 +20,13 @@
\logo [MKVI] {MkVI}
\logo [MKIX] {MkIX}
\logo [MKXI] {MkXI}
-\logo [MKIC] {MkIC}
-\logo [MKCI] {MkCI}
+\logo [MKXL] {MkXL}
+\logo [MKLX] {MkLX}
\logo [MPII] {MpII}
\logo [MPIV] {MpIV}
+\logo [MPVI] {MpVI}
+\logo [MPLX] {MpLX}
+\logo [MPXL] {MpXL}
\logo [LMTX] {lmtx}
\logo [ACROBAT] {Acro\-bat}
diff --git a/tex/context/modules/mkiv/x-asciimath.lua b/tex/context/modules/mkiv/x-asciimath.lua
index 677ab0ce5..6a4755483 100644
--- a/tex/context/modules/mkiv/x-asciimath.lua
+++ b/tex/context/modules/mkiv/x-asciimath.lua
@@ -20,7 +20,7 @@ ugly and unsatisfying code mess down here. Don't take this as an example.</p>
-- todo: filter from files listed in tuc file
local trace_mapping = false if trackers then trackers.register("modules.asciimath.mapping", function(v) trace_mapping = v end) end
-local trace_detail = false if trackers then trackers.register("modules.asciimath.detail", function(v) trace_detail = v end) end
+local trace_details = false if trackers then trackers.register("modules.asciimath.details", function(v) trace_details = v end) end
local trace_digits = false if trackers then trackers.register("modules.asciimath.digits", function(v) trace_digits = v end) end
local report_asciimath = logs.reporter("mathematics","asciimath")
@@ -1775,7 +1775,7 @@ collapse = function(t,level)
return ""
end
-- tracing
- if trace_detail then
+ if trace_details then
if level then
level = level + 1
else
@@ -1784,19 +1784,19 @@ collapse = function(t,level)
show_state(t,level,"parsed")
end
-- steps
- t = collapse_matrices (t) if trace_detail then show_state(t,level,"matrices") end
- t = collapse_bars (t) if trace_detail then show_state(t,level,"bars") end
- t = collapse_stupids (t) if trace_detail then show_state(t,level,"stupids") end
- t = collapse_pairs (t) if trace_detail then show_state(t,level,"pairs") end
- t = collapse_parentheses(t) if trace_detail then show_state(t,level,"parentheses") end
- t = collapse_signs (t) if trace_detail then show_state(t,level,"signs") end
- t = collapse_binaries (t) if trace_detail then show_state(t,level,"binaries") end
- t = collapse_infixes_1 (t) if trace_detail then show_state(t,level,"infixes (1)") end
- t = collapse_limits (t) if trace_detail then show_state(t,level,"limits") end
- t = collapse_tables (t) if trace_detail then show_state(t,level,"tables") end
- t = collapse_infixes_2 (t) if trace_detail then show_state(t,level,"infixes (2)") end
- t = collapse_fractions_1(t) if trace_detail then show_state(t,level,"fractions (1)") end
- t = collapse_fractions_2(t) if trace_detail then show_state(t,level,"fractions (2)") end
+ t = collapse_matrices (t) if trace_details then show_state(t,level,"matrices") end
+ t = collapse_bars (t) if trace_details then show_state(t,level,"bars") end
+ t = collapse_stupids (t) if trace_details then show_state(t,level,"stupids") end
+ t = collapse_pairs (t) if trace_details then show_state(t,level,"pairs") end
+ t = collapse_parentheses(t) if trace_details then show_state(t,level,"parentheses") end
+ t = collapse_signs (t) if trace_details then show_state(t,level,"signs") end
+ t = collapse_binaries (t) if trace_details then show_state(t,level,"binaries") end
+ t = collapse_infixes_1 (t) if trace_details then show_state(t,level,"infixes (1)") end
+ t = collapse_limits (t) if trace_details then show_state(t,level,"limits") end
+ t = collapse_tables (t) if trace_details then show_state(t,level,"tables") end
+ t = collapse_infixes_2 (t) if trace_details then show_state(t,level,"infixes (2)") end
+ t = collapse_fractions_1(t) if trace_details then show_state(t,level,"fractions (1)") end
+ t = collapse_fractions_2(t) if trace_details then show_state(t,level,"fractions (2)") end
-- done
return collapse_result(t)
end
@@ -2009,7 +2009,7 @@ local context = context
if not context then
-- trace_mapping = true
--- trace_detail = true
+-- trace_details = true
-- report_asciimath(cleanedup([[ac+sinx+xsqrtx+sinsqrtx+sinsqrt(x)]]))
-- report_asciimath(cleanedup([[a "Îħsinsqrtx" b]]))
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 49621663d..65c823a66 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 : 07/16/19 18:23:09
+-- merge date : 07/24/19 11:17:48
do -- begin closure to overcome local limits and interference
@@ -1988,7 +1988,7 @@ end
local function sequenced(t,sep,simple)
if not t then
return ""
- elseif type(t)=="string" then
+ elseif type(t)~="table" then
return t
end
local n=#t
@@ -2027,7 +2027,11 @@ local function sequenced(t,sep,simple)
end
end
end
- return concat(s,sep or " | ")
+ if sep==true then
+ return "{ "..concat(s,", ").." }"
+ else
+ return concat(s,sep or " | ")
+ end
end
table.sequenced=sequenced
function table.print(t,...)
@@ -10830,8 +10834,9 @@ local sortedhash=table.sortedhash
local stripstring=string.nospaces
local utf16_to_utf8_be=utf.utf16_to_utf8_be
local report=logs.reporter("otf reader")
-local trace_cmap=false
-local trace_cmap_detail=false
+local report_cmap=logs.reporter("otf reader","cmap")
+local trace_cmap=false trackers.register("otf.cmap",function(v) trace_cmap=v end)
+local trace_cmap_details=false trackers.register("otf.cmap.details",function(v) trace_cmap_details=v end)
fonts=fonts or {}
local handlers=fonts.handlers or {}
fonts.handlers=handlers
@@ -11493,7 +11498,7 @@ readers.vmtx=function(f,fontdata,specification)
local glyphs=fontdata.glyphs
local nofglyphs=fontdata.nofglyphs
local vheight=0
- local vdefault=verticalheader.ascender+verticalheader.descender
+ local vdefault=verticalheader.ascender-verticalheader.descender
local topsidebearing=0
for i=0,nofmetrics-1 do
local glyph=glyphs[i]
@@ -11502,6 +11507,9 @@ readers.vmtx=function(f,fontdata,specification)
if vheight~=0 and vheight~=vdefault then
glyph.vheight=vheight
end
+ if topsidebearing~=0 then
+ glyph.tsb=topsidebearing
+ end
end
for i=nofmetrics,nofglyphs-1 do
local glyph=glyphs[i]
@@ -11583,7 +11591,7 @@ local sequence={
{ 0,0,6 },
{ 3,0,6 },
{ 0,5,14 },
-{ 0,4,12 },
+ { 0,4,12 },
{ 3,10,13 },
}
local supported={}
@@ -11628,7 +11636,7 @@ formatreaders[4]=function(f,fontdata,offset)
elseif startchar==0xFFFF and offset==0 then
elseif offset==0xFFFF then
elseif offset==0 then
- if trace_cmap_detail then
+ if trace_cmap_details then
report("format 4.%i segment %2i from %C upto %C at index %H",1,segment,startchar,endchar,(startchar+delta)%65536)
end
for unicode=startchar,endchar do
@@ -11660,8 +11668,8 @@ formatreaders[4]=function(f,fontdata,offset)
end
else
local shift=(segment-nofsegments+offset/2)-startchar
- if trace_cmap_detail then
- report("format 4.%i segment %2i from %C upto %C at index %H",0,segment,startchar,endchar,(startchar+delta)%65536)
+ if trace_cmap_details then
+ report_cmap("format 4.%i segment %2i from %C upto %C at index %H",0,segment,startchar,endchar,(startchar+delta)%65536)
end
for unicode=startchar,endchar do
local slot=shift+unicode
@@ -11708,8 +11716,8 @@ formatreaders[6]=function(f,fontdata,offset)
local count=readushort(f)
local stop=start+count-1
local nofdone=0
- if trace_cmap_detail then
- report("format 6 from %C to %C",2,start,stop)
+ if trace_cmap_details then
+ report_cmap("format 6 from %C to %C",2,start,stop)
end
for unicode=start,stop do
local index=readushort(f)
@@ -11741,8 +11749,8 @@ formatreaders[12]=function(f,fontdata,offset)
local first=readulong(f)
local last=readulong(f)
local index=readulong(f)
- if trace_cmap_detail then
- report("format 12 from %C to %C starts at index %i",first,last,index)
+ if trace_cmap_details then
+ report_cmap("format 12 from %C to %C starts at index %i",first,last,index)
end
for unicode=first,last do
local glyph=glyphs[index]
@@ -11780,8 +11788,8 @@ formatreaders[13]=function(f,fontdata,offset)
local last=readulong(f)
local index=readulong(f)
if first<privateoffset then
- if trace_cmap_detail then
- report("format 13 from %C to %C get index %i",first,last,index)
+ if trace_cmap_details then
+ report_cmap("format 13 from %C to %C get index %i",first,last,index)
end
local glyph=glyphs[index]
local unicode=glyph.unicode
@@ -11853,10 +11861,16 @@ end
local function checkcmap(f,fontdata,records,platform,encoding,format)
local data=records[platform]
if not data then
+ if trace_cmap_details then
+ report_cmap("skipped, %s, p=%i e=%i f=%i","no platform",platform,encoding,format)
+ end
return 0
end
data=data[encoding]
if not data then
+ if trace_cmap_details then
+ report_cmap("skipped, %s, p=%i e=%i f=%i","no encoding",platform,encoding,format)
+ end
return 0
end
data=data[format]
@@ -11865,13 +11879,17 @@ local function checkcmap(f,fontdata,records,platform,encoding,format)
end
local reader=formatreaders[format]
if not reader then
+ if trace_cmap_details then
+ report_cmap("skipped, %s, p=%i e=%i f=%i","unsupported format",platform,encoding,format)
+ end
return 0
end
- local p=platforms[platform]
- local e=encodings[p]
local n=reader(f,fontdata,data) or 0
if trace_cmap then
- report("cmap checked: platform %i (%s), encoding %i (%s), format %i, new unicodes %i",platform,p,encoding,e and e[encoding] or "?",format,n)
+ local p=platforms[platform]
+ local e=encodings[p]
+ report_cmap("checked, platform %i (%s), encoding %i (%s), format %i, new unicodes %i",
+ platform,p,encoding,e and e[encoding] or "?",format,n)
end
return n
end
@@ -12066,6 +12084,7 @@ local function getinfo(maindata,sub,platformnames,rawfamilynames,metricstoo,inst
local postscript=fontdata.postscript or {}
local fontheader=fontdata.fontheader or {}
local cffinfo=fontdata.cffinfo or {}
+ local verticalheader=fontdata.verticalheader or {}
local filename=fontdata.filename
local weight=getname(fontdata,"weight") or (cffinfo and cffinfo.weight) or (metrics and metrics.weight)
local width=getname(fontdata,"width") or (cffinfo and cffinfo.width ) or (metrics and metrics.width )
@@ -12131,6 +12150,7 @@ local function getinfo(maindata,sub,platformnames,rawfamilynames,metricstoo,inst
platformnames=platformnames or nil,
instancenames=instancenames or nil,
tableoffsets=fontdata.tableoffsets,
+ defaultvheight=(verticalheader.ascender or 0)-(verticalheader.descender or 0)
}
if metricstoo then
local keys={
@@ -22995,7 +23015,7 @@ local trace_defining=false registertracker("fonts.defining",function(v) trace_d
local report_otf=logs.reporter("fonts","otf loading")
local fonts=fonts
local otf=fonts.handlers.otf
-otf.version=3.108
+otf.version=3.109
otf.cache=containers.define("fonts","otl",otf.version,true)
otf.svgcache=containers.define("fonts","svg",otf.version,true)
otf.pngcache=containers.define("fonts","png",otf.version,true)
@@ -23357,6 +23377,7 @@ local function copytotfm(data,cache_id)
parameters.ascender=abs(metadata.ascender or 0)
parameters.descender=abs(metadata.descender or 0)
parameters.units=units
+ parameters.vheight=metadata.defaultvheight
properties.space=spacer
properties.encodingbytes=2
properties.format=data.format or formats.otf