summaryrefslogtreecommitdiff
path: root/tex/context/base/mkiv
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/mkiv')
-rw-r--r--tex/context/base/mkiv/char-def.lua55
-rw-r--r--tex/context/base/mkiv/char-ini.lua12
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/cont-run.mkiv4
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/core-dat.lua35
-rw-r--r--tex/context/base/mkiv/data-env.lua4
-rw-r--r--tex/context/base/mkiv/font-dsp.lua7
-rw-r--r--tex/context/base/mkiv/font-osd.lua18
-rw-r--r--tex/context/base/mkiv/l-math.lua14
-rw-r--r--tex/context/base/mkiv/lxml-aux.lua31
-rw-r--r--tex/context/base/mkiv/lxml-tab.lua2
-rw-r--r--tex/context/base/mkiv/mult-def.lua26
-rw-r--r--tex/context/base/mkiv/mult-fun.lua9
-rw-r--r--tex/context/base/mkiv/mult-low.lua19
-rw-r--r--tex/context/base/mkiv/mult-mps.lua16
-rw-r--r--tex/context/base/mkiv/mult-prm.lua25
-rw-r--r--tex/context/base/mkiv/page-pcl.mkiv4
-rw-r--r--tex/context/base/mkiv/publ-dat.lua31
-rw-r--r--tex/context/base/mkiv/publ-imp-cite.mkvi3
-rw-r--r--tex/context/base/mkiv/publ-ini.lua78
-rw-r--r--tex/context/base/mkiv/publ-sor.lua20
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin24628 -> 24614 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin257246 -> 258249 bytes
-rw-r--r--tex/context/base/mkiv/strc-lst.lua30
-rw-r--r--tex/context/base/mkiv/strc-num.lua32
-rw-r--r--tex/context/base/mkiv/strc-ref.lua2
-rw-r--r--tex/context/base/mkiv/type-set.mkiv3
-rw-r--r--tex/context/base/mkiv/typo-fkr.lua4
-rw-r--r--tex/context/base/mkiv/util-deb.lua22
-rw-r--r--tex/context/base/mkiv/util-jsn.lua9
31 files changed, 396 insertions, 123 deletions
diff --git a/tex/context/base/mkiv/char-def.lua b/tex/context/base/mkiv/char-def.lua
index b4f07a529..3b057b674 100644
--- a/tex/context/base/mkiv/char-def.lua
+++ b/tex/context/base/mkiv/char-def.lua
@@ -62534,11 +62534,11 @@ characters.data={
linebreak="in",
mathspec={
{
- class="inner",
+ class="ellipsis",
name="ldots",
},
{
- class="inner",
+ class="ellipsis",
name="dots",
},
},
@@ -66828,6 +66828,8 @@ characters.data={
description="INCREMENT",
direction="on",
linebreak="al",
+ mathclass="differential",
+ mathname="laplace",
synonyms={ "forward difference", "laplace operator" },
unicodeslot=0x2206,
},
@@ -69460,7 +69462,7 @@ characters.data={
description="VERTICAL ELLIPSIS",
direction="on",
linebreak="al",
- mathclass="inner",
+ mathclass="ellipsis",
mathname="vdots",
unicodeslot=0x22EE,
},
@@ -69469,7 +69471,7 @@ characters.data={
description="MIDLINE HORIZONTAL ELLIPSIS",
direction="on",
linebreak="in",
- mathclass="inner",
+ mathclass="ellipsis",
mathname="cdots",
unicodeslot=0x22EF,
},
@@ -69478,7 +69480,7 @@ characters.data={
description="UP RIGHT DIAGONAL ELLIPSIS",
direction="on",
linebreak="al",
- mathclass="inner",
+ mathclass="ellipsis",
mathname="udots",
mirror=0x22F1,
unicodeslot=0x22F0,
@@ -69488,7 +69490,7 @@ characters.data={
description="DOWN RIGHT DIAGONAL ELLIPSIS",
direction="on",
linebreak="al",
- mathclass="inner",
+ mathclass="ellipsis",
mathname="ddots",
mirror=0x22F0,
unicodeslot=0x22F1,
@@ -137215,6 +137217,7 @@ characters.data={
description="PRESENTATION FORM FOR VERTICAL HORIZONTAL ELLIPSIS",
direction="on",
linebreak="in",
+ mathclass="ellipsis",
specials={ "vertical", 0x2026 },
unicodeslot=0xFE19,
},
@@ -227368,10 +227371,10 @@ characters.data={
linebreak="al",
mathclass="ordinary",
mathspec={
- {
- name="Dd",
- class="differential",
- },
+ {
+ class="differential",
+ name="Dd",
+ },
},
specials={ "font", 0x44 },
unicodeslot=0x1D437,
@@ -227609,10 +227612,10 @@ characters.data={
linebreak="al",
mathclass="ordinary",
mathspec={
- {
- name="dd",
- class="differential",
- },
+ {
+ class="differential",
+ name="dd",
+ },
},
specials={ "font", 0x64 },
unicodeslot=0x1D451,
@@ -227625,10 +227628,10 @@ characters.data={
linebreak="al",
mathclass="ordinary",
mathspec={
- {
- name="ee",
- class="exponential",
- },
+ {
+ class="exponential",
+ name="ee",
+ },
},
specials={ "font", 0x65 },
unicodeslot=0x1D452,
@@ -227659,10 +227662,10 @@ characters.data={
linebreak="al",
mathclass="ordinary",
mathspec={
- {
- name="ii",
- class="imaginary",
- },
+ {
+ class="imaginary",
+ name="ii",
+ },
},
specials={ "font", 0x69 },
unicodeslot=0x1D456,
@@ -227675,10 +227678,10 @@ characters.data={
linebreak="al",
mathclass="ordinary",
mathspec={
- {
- name="ji",
- class="imaginary",
- },
+ {
+ class="imaginary",
+ name="ji",
+ },
},
specials={ "font", 0x6A },
unicodeslot=0x1D457,
diff --git a/tex/context/base/mkiv/char-ini.lua b/tex/context/base/mkiv/char-ini.lua
index 3543b01ef..09c7994a9 100644
--- a/tex/context/base/mkiv/char-ini.lua
+++ b/tex/context/base/mkiv/char-ini.lua
@@ -285,9 +285,9 @@ local blocks = allocate {
["devanagariextended"] = { first = 0x0A8E0, last = 0x0A8FF, description = "Devanagari Extended" },
["digitsarabicindic"] = { first = 0x00660, last = 0x00669, math = true },
-- ["digitsbengali"] = { first = 0x009E6, last = 0x009EF, math = true },
- ["digitsbold"] = { first = 0x1D7CE, last = 0x1D7D8, math = true },
+ ["digitsbold"] = { first = 0x1D7CE, last = 0x1D7D7, math = true },
-- ["digitsdevanagari"] = { first = 0x00966, last = 0x0096F, math = true },
- ["digitsdoublestruck"] = { first = 0x1D7D8, last = 0x1D7E2, math = true },
+ ["digitsdoublestruck"] = { first = 0x1D7D8, last = 0x1D7E1, math = true },
-- ["digitsethiopic"] = { first = 0x01369, last = 0x01371, math = true },
["digitsextendedarabicindic"] = { first = 0x006F0, last = 0x006F9, math = true },
-- ["digitsgujarati"] = { first = 0x00AE6, last = 0x00AEF, math = true },
@@ -298,12 +298,12 @@ local blocks = allocate {
["digitslatin"] = { first = 0x00030, last = 0x00039, math = true },
-- ["digitsmalayalam"] = { first = 0x00D66, last = 0x00D6F, math = true },
-- ["digitsmongolian"] = { first = 0x01810, last = 0x01809, math = true },
- ["digitsmonospace"] = { first = 0x1D7F6, last = 0x1D80F, math = true },
+ ["digitsmonospace"] = { first = 0x1D7F6, last = 0x1D7FF, math = true },
-- ["digitsmyanmar"] = { first = 0x01040, last = 0x01049, math = true },
["digitsnormal"] = { first = 0x00030, last = 0x00039, math = true },
-- ["digitsoriya"] = { first = 0x00B66, last = 0x00B6F, math = true },
- ["digitssansserifbold"] = { first = 0x1D7EC, last = 0x1D805, math = true },
- ["digitssansserifnormal"] = { first = 0x1D7E2, last = 0x1D7EC, math = true },
+ ["digitssansserifbold"] = { first = 0x1D7EC, last = 0x1D7F5, math = true },
+ ["digitssansserifnormal"] = { first = 0x1D7E2, last = 0x1D7EB, math = true },
-- ["digitstamil"] = { first = 0x00030, last = 0x00039, math = true }, -- no zero
-- ["digitstelugu"] = { first = 0x00C66, last = 0x00C6F, math = true },
-- ["digitsthai"] = { first = 0x00E50, last = 0x00E59, math = true },
@@ -407,7 +407,7 @@ local blocks = allocate {
["lowercasegreekbold"] = { first = 0x1D6C2, last = 0x1D6DB, math = true },
["lowercasegreekbolditalic"] = { first = 0x1D736, last = 0x1D74F, math = true },
["lowercasegreekitalic"] = { first = 0x1D6FC, last = 0x1D715, math = true },
- ["lowercasegreeknormal"] = { first = 0x003B1, last = 0x003CA, math = true },
+ ["lowercasegreeknormal"] = { first = 0x003B1, last = 0x003C9, math = true },
["lowercasegreeksansserifbold"] = { first = 0x1D770, last = 0x1D789, math = true },
["lowercasegreeksansserifbolditalic"] = { first = 0x1D7AA, last = 0x1D7C3, math = true },
["lowercaseitalic"] = { first = 0x1D44E, last = 0x1D467, math = true },
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 19f0f51a2..34002f06d 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -13,7 +13,7 @@
% \normalend % uncomment this to get the real base runtime
-\newcontextversion{2022.05.11 11:34}
+\newcontextversion{2022.07.06 21:34}
%D This file is loaded at runtime, thereby providing an excellent place for hacks,
%D patches, extensions and new features. There can be local overloads in cont-loc
diff --git a/tex/context/base/mkiv/cont-run.mkiv b/tex/context/base/mkiv/cont-run.mkiv
index 12c12e0d9..764866a9e 100644
--- a/tex/context/base/mkiv/cont-run.mkiv
+++ b/tex/context/base/mkiv/cont-run.mkiv
@@ -53,7 +53,9 @@
\unexpanded\def\blocksynctexfile[#1]%
{\processcommacommand{#1}\synctexblockfilename}
-\def\continuewhenlmtxmode
+\let\continuewhenmkivmode\relax
+
+\unexpanded\def\continuewhenlmtxmode
{\starttext
\startTEXpage[\c!offset=2ex,\c!foregroundstyle=\tttf]%
This file needs \LuaMetaTeX\ and \ConTeXt\ \LMTX.%
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 6c37e0f35..40b49d386 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -49,7 +49,7 @@
%D {YYYY.MM.DD HH:MM} format.
\edef\contextformat {\jobname}
-\edef\contextversion{2022.05.11 11:34}
+\edef\contextversion{2022.07.06 21:34}
%D Kind of special:
diff --git a/tex/context/base/mkiv/core-dat.lua b/tex/context/base/mkiv/core-dat.lua
index b49750159..b58a801d9 100644
--- a/tex/context/base/mkiv/core-dat.lua
+++ b/tex/context/base/mkiv/core-dat.lua
@@ -156,8 +156,29 @@ local function setdataset(settings)
end
end
-local function datasetvariable(name,tag,key)
- local t = collected[name]
+local cache = table.setmetatableindex(function(t,k)
+ local v = table.load(k..".tuc")
+ if v then
+ v = v.job
+ if v then
+ v = v.datasets
+ if v then
+ v = v.collected
+ end
+ end
+ end
+ if not v then
+ v = { }
+ if trace_datasets then
+ report_dataset("error: unknown dataset job %a",k)
+ end
+ end
+ t[k] = v
+ return v
+end)
+
+local function datasetvariable(name,tag,key,cache)
+ local t = (cache or collected)[name]
if t == nil then
if trace_datasets then
report_dataset("error: unknown dataset, name %a, tag %a, not passed to tex",name) -- no tag
@@ -181,6 +202,10 @@ local function datasetvariable(name,tag,key)
end
end
+local function datasetvariablefromjob(jobnname,name,tag,key)
+ datasetvariable(name,tag,key,cache[jobnname])
+end
+
implement {
name = "setdataset",
actions = setdataset,
@@ -200,6 +225,12 @@ implement {
arguments = "3 strings",
}
+implement {
+ name = "datasetvariablefromjob",
+ arguments = { "string", "string", "string", "string" },
+ actions = datasetvariablefromjob
+}
+
--[[ldx--
<p>We also provide an efficient variant for page states.</p>
--ldx]]--
diff --git a/tex/context/base/mkiv/data-env.lua b/tex/context/base/mkiv/data-env.lua
index 3b10d89b8..c9c11e49c 100644
--- a/tex/context/base/mkiv/data-env.lua
+++ b/tex/context/base/mkiv/data-env.lua
@@ -95,8 +95,8 @@ local relations = allocate { -- todo: handlers also here
names = { "mp" },
variable = 'MPINPUTS',
suffixes = CONTEXTLMTXMODE > 0
- and { 'mp', 'mpxl', 'mpvi', 'mpiv', 'mpii' }
- or { 'mp', 'mpvi', 'mpiv', 'mpii' },
+ and { 'mpxl', 'mpvi', 'mpiv', 'mpii', 'mp' }
+ or { 'mpvi', 'mpiv', 'mpii', 'mp' },
usertype = true,
},
tex = {
diff --git a/tex/context/base/mkiv/font-dsp.lua b/tex/context/base/mkiv/font-dsp.lua
index 74a0a1f38..8f65ed9d9 100644
--- a/tex/context/base/mkiv/font-dsp.lua
+++ b/tex/context/base/mkiv/font-dsp.lua
@@ -2515,7 +2515,9 @@ do
local scriptoffset = tableoffset + readushort(f)
local featureoffset = tableoffset + readushort(f)
local lookupoffset = tableoffset + readushort(f)
- local variationsoffset = version > 0x00010000 and (tableoffset + readulong(f)) or 0
+ -- MFK : Rubik-Regular.ttf : we need to delay adding the offset
+ -- local variationsoffset = version > 0x00010000 and (tableoffset + readulong(f)) or 0
+ local variationsoffset = version > 0x00010000 and readulong(f) or 0
if not scriptoffset then
return
end
@@ -2541,7 +2543,8 @@ do
end
--
if variationsoffset > 0 then
- loadvariations(f,fontdata,variationsoffset,lookuptypes,featurehash,featureorder)
+ -- loadvariations(f,fontdata,variationsoffset,lookuptypes,featurehash,featureorder)
+ loadvariations(f,fontdata,tableoffset + variationsoffset,lookuptypes,featurehash,featureorder)
end
end
end
diff --git a/tex/context/base/mkiv/font-osd.lua b/tex/context/base/mkiv/font-osd.lua
index d169faf64..ecf8009f9 100644
--- a/tex/context/base/mkiv/font-osd.lua
+++ b/tex/context/base/mkiv/font-osd.lua
@@ -6,15 +6,15 @@ if not modules then modules = { } end modules ['font-osd'] = { -- script devanag
license = "see context related readme files"
}
-local experiment1 = false
-local experiment2 = false
-local experiment2b1 = false
-local experiment2b2 = false
-
-experiments.register("fonts.indic.experiment1", function(v) experiment1 = v end)
-experiments.register("fonts.indic.experiment2", function(v) experiment2 = v end)
-experiments.register("fonts.indic.experiment2b1", function(v) experiment2b1 = v end)
-experiments.register("fonts.indic.experiment2b2", function(v) experiment2b2 = v end)
+-- local experiment1 = false
+-- local experiment2 = false
+-- local experiment2b1 = false
+-- local experiment2b2 = false
+
+-- experiments.register("fonts.indic.experiment1", function(v) experiment1 = v end)
+-- experiments.register("fonts.indic.experiment2", function(v) experiment2 = v end)
+-- experiments.register("fonts.indic.experiment2b1", function(v) experiment2b1 = v end)
+-- experiments.register("fonts.indic.experiment2b2", function(v) experiment2b2 = v end)
-- we need to check nbsphash (context only)
diff --git a/tex/context/base/mkiv/l-math.lua b/tex/context/base/mkiv/l-math.lua
index 69f0a19e9..6105bc3c2 100644
--- a/tex/context/base/mkiv/l-math.lua
+++ b/tex/context/base/mkiv/l-math.lua
@@ -14,9 +14,19 @@ end
if not math.round then
- local floor = math.floor
+ if xmath then
+
+ math.round = xmath.round
+
+ else
- function math.round(x) return floor(x + 0.5) end
+ local floor = math.floor
+
+ function math.round(x)
+ return x < 0 and -floor(-x + 0.5) or floor(x + 0.5)
+ end
+
+ end
end
diff --git a/tex/context/base/mkiv/lxml-aux.lua b/tex/context/base/mkiv/lxml-aux.lua
index 126df4d82..fc17371e5 100644
--- a/tex/context/base/mkiv/lxml-aux.lua
+++ b/tex/context/base/mkiv/lxml-aux.lua
@@ -316,6 +316,37 @@ function xml.replace(root,pattern,whatever)
end
end
+function xml.expand(root,pattern,whatever)
+ local collected = root and xmlapplylpath(root,pattern)
+ if collected then
+ for c=1,#collected do
+ local e = collected[c]
+ local p = e.__p__
+ if p then
+ if trace_manipulations then
+ report('expanding',pattern,c,e)
+ end
+ local d = p.dt
+ local n = e.ni
+ local t = whatever(e,p)
+ if t then
+ if type(t) == "table" then
+ t = xmlcopy(t)
+ d[n] = t[1]
+ for i=2,#t do
+ n = n + 1
+ insert(d,n,t[i])
+ end
+ else
+ d[n] = t
+ end
+ redo_ni(d) -- probably not needed
+ end
+ end
+ end
+ end
+end
+
local function wrap(e,wrapper)
local t = {
rn = e.rn,
diff --git a/tex/context/base/mkiv/lxml-tab.lua b/tex/context/base/mkiv/lxml-tab.lua
index 1f0ec33b1..e18362bd8 100644
--- a/tex/context/base/mkiv/lxml-tab.lua
+++ b/tex/context/base/mkiv/lxml-tab.lua
@@ -1424,7 +1424,7 @@ can speed up things a bit. The second argument is not to be used!</p>
-- end
-- end
--
--- We need to prevent __p__ recursio, so:
+-- We need to prevent __p__ recursion, so:
local function copy(old,p)
if old then
diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua
index dee5de585..56c7944f4 100644
--- a/tex/context/base/mkiv/mult-def.lua
+++ b/tex/context/base/mkiv/mult-def.lua
@@ -7346,6 +7346,9 @@ return {
["adaptive"]={
["en"]="adaptive",
},
+ ["freezespacing"]={
+ ["en"]="freezespacing",
+ },
["address"]={
["cs"]="adresa",
["de"]="adresse",
@@ -10051,6 +10054,15 @@ return {
["en"]="mathclass",
["fr"]="classemath",
},
+ ["leftclass"]={
+ ["en"]="leftclass",
+ },
+ ["rightclass"]={
+ ["en"]="rightclass",
+ },
+ ["middleclass"]={
+ ["en"]="middleclass",
+ },
["mathlimits"]={
["en"]="mathlimits",
["fr"]="limitesmath",
@@ -10466,6 +10478,9 @@ return {
["pe"]="فاصله‌شماره",
["ro"]="numberdistance",
},
+ ["numberthreshold"]={
+ ["en"]="numberthreshold",
+ },
["numbering"]={
["cs"]="cislovani",
["de"]="nummerierung",
@@ -10480,6 +10495,10 @@ return {
["en"]="numberorder",
["fr"]="ordrenumero",
},
+ ["numberlocation"]=
+ {
+ ["en"]="numberlocation",
+ },
["numberprefix"]={
["en"]="numberprefix",
["fr"]="prefixenumero",
@@ -10890,6 +10909,9 @@ return {
["pe"]="پاراگراف",
["ro"]="paragraf",
},
+ ["penalties"]={
+ ["en"]="penalties",
+ },
["period"]={
["en"]="period",
["fr"]="periode",
@@ -12261,6 +12283,10 @@ return {
["pe"]="حاشیه‌متن",
["ro"]="textmargin",
},
+ ["numbermethod"]={
+ ["en"]="numbermethod",
+ ["nl"]="nummermethode",
+ },
["textmethod"]={
["cs"]="textmethod",
["de"]="textmethod",
diff --git a/tex/context/base/mkiv/mult-fun.lua b/tex/context/base/mkiv/mult-fun.lua
index 128e5b51e..5a3725b32 100644
--- a/tex/context/base/mkiv/mult-fun.lua
+++ b/tex/context/base/mkiv/mult-fun.lua
@@ -117,7 +117,8 @@ return {
"grayscale", "greyscale", "withgray", "withgrey",
"colorpart", "colorlike",
"readfile",
- "clearxy", "unitvector", "center", -- redefined
+ "clearxy", "unitvector",
+ "center", -- redefined
"epsed", "anchored",
"originpath", "infinite",
"break",
@@ -171,7 +172,7 @@ return {
"passvariable", "passarrayvariable", "tostring", "topair", "format", "formatted", "quotation", "quote",
"startpassingvariable", "stoppassingvariable",
--
- "eofill", "eoclip", "nofill", "dofill", "fillup", "eofillup", "nodraw", "dodraw",
+ "eofill", "eoclip", "nofill", "dofill", "fillup", "eofillup", "nodraw", "dodraw", "enfill",
"area",
--
"addbackground",
@@ -232,5 +233,9 @@ return {
"processpath", "pencilled",
"sortedintersectiontimes", "intersectionpath", "firstintersectionpath", "secondintersectionpath",
"intersectionsfound", "cutbeforefirst", "cutafterfirst", "cutbeforelast", "cutafterlast",
+ --
+ "xnormalized", "ynormalized", "xynormalized",
+ "phantom",
+ "scrutinized",
},
}
diff --git a/tex/context/base/mkiv/mult-low.lua b/tex/context/base/mkiv/mult-low.lua
index 7fb7e3fa8..ae31c547e 100644
--- a/tex/context/base/mkiv/mult-low.lua
+++ b/tex/context/base/mkiv/mult-low.lua
@@ -17,7 +17,8 @@ return {
"plusthousand", "plustenthousand", "plustwentythousand", "medcard", "maxcard", "maxcardminusone",
"zeropoint", "onepoint", "halfapoint", "onebasepoint", "maxcount", "maxdimen", "scaledpoint", "thousandpoint",
"points", "halfpoint",
- "zeroskip",
+ "zeroskip", "centeringskip", "stretchingskip", "shrinkingskip",
+ "centeringfillskip", "stretchingfillskip", "shrinkingfillskip",
"zeromuskip", "onemuskip",
"pluscxxvii", "pluscxxviii", "pluscclv", "pluscclvi",
"normalpagebox",
@@ -166,16 +167,14 @@ return {
"mathfractioncode", "mathmiddlecode", "mathaccentcode", "mathfencedcode", "mathghostcode",
"mathvariablecode", "mathactivecode", "mathvcentercode", "mathconstructcode", "mathwrappedcode",
"mathbegincode", "mathendcode", "mathexplicitcode", "mathdivisioncode", "mathfactorialcode",
- "mathdimensioncode",
- --
- "mathimaginarycode", "mathdifferentialcode", "mathexponentialcode", "mathfunctioncode", "mathdigitcode",
+ "mathdimensioncode", "mathexperimentalcode", "mathtextpunctuationcode",
+ "mathimaginarycode", "mathdifferentialcode", "mathexponentialcode", "mathellipsiscode", "mathfunctioncode", "mathdigitcode",
-- "mathtopaccentcode", "mathbottomaccentcode", "mathdelimitercode", "mathrootcode", "mathprintcode", --
"mathalphacode", "mathboxcode", "mathchoicecode", "mathnothingcode", "mathlimopcode", "mathnolopcode",
+ "mathunsetcode", "mathunspacedcode", "mathallcode", "mathfakecode",
--
"constantnumber", "constantnumberargument", "constantdimen", "constantdimenargument", "constantemptyargument",
--
- "continueifinputfile",
- --
"luastringsep", "!!bs", "!!es",
--
"lefttorightmark", "righttoleftmark", "lrm", "rlm",
@@ -210,7 +209,9 @@ return {
--
"nopreslackclassoptioncode", "nopostslackclassoptioncode",
"lefttopkernclassoptioncode", "righttopkernclassoptioncode", "leftbottomkernclassoptioncode", "rightbottomkernclassoptioncode",
- "lookaheadforendclassoptioncode", "defaultmathclassoptions",
+ "lookaheadforendclassoptioncode", "noitaliccorrectionclassoptioncode", "defaultmathclassoptions",
+ -- "openfenceclassoptioncode", "closefenceclassoptioncode", "middlefenceclassoptioncode",
+ "checkligatureclassoptioncode", "flattenclassoptioncode", "omitpenaltyclassoptioncode",
--
"noligaturingglyphoptioncode", "nokerningglyphoptioncode", "noleftligatureglyphoptioncode",
"noleftkernglyphoptioncode", "norightligatureglyphoptioncode", "norightkernglyphoptioncode",
@@ -225,7 +226,7 @@ return {
--
"normalworddiscoptioncode", "preworddiscoptioncode", "postworddiscoptioncode",
--
- "continuewhenlmtxmode",
+ "continueifinputfile", "continuewhenlmtxmode", "continuewhenmkivmode",
},
["helpers"] = {
--
@@ -338,7 +339,7 @@ return {
--
"givenwidth", "givenheight", "givendepth", "scangivendimensions",
--
- "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchtotal",
+ "scratchwidth", "scratchheight", "scratchdepth", "scratchoffset", "scratchdistance", "scratchtotal", "scratchitalic",
"scratchhsize", "scratchvsize",
"scratchxoffset", "scratchyoffset", "scratchhoffset", "scratchvoffset",
"scratchxposition", "scratchyposition",
diff --git a/tex/context/base/mkiv/mult-mps.lua b/tex/context/base/mkiv/mult-mps.lua
index 9807902f8..008bcbb9f 100644
--- a/tex/context/base/mkiv/mult-mps.lua
+++ b/tex/context/base/mkiv/mult-mps.lua
@@ -3,7 +3,7 @@ return {
"btex", "etex", "verbatimtex",
},
shortcuts = {
- "..", "...", "--", "---", "&", "\\",
+ "..", "...", "--", "---", "&", "&&", "\\",
},
primitives = { -- to be checked
"charcode", "day", "linecap", "linejoin", "miterlimit", "stacking", "month", "pausing",
@@ -50,7 +50,7 @@ return {
"message", "delimiters", "turningnumber", "errmessage",
"scantokens", "end", "outer", "inner", "write", "to", "readfrom", "closefrom",
"withprescript", "withpostscript",
- "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt",
+ -- "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt",
--
"redpart", "greenpart", "bluepart",
"cyanpart", "magentapart", "yellowpart",
@@ -70,6 +70,13 @@ return {
"overloadmode", "setproperty",
--
"intersectiontimeslist", "arcpoint", "arcpointlist", "subarclength", "maxknotpool", "nocycle",
+ "pathpoint", "pathprecontrol", "pathpostcontrol", "pathdirection",
+ "deltapoint", "deltaprecontrol", "deltapostcontrol", "deltadirection",
+ "corner", "xrange", "yrange",
+ "convexed", "uncontrolled",
+ "nep", "makenep",
+ "withmiterlimit", "withlinejoin", "withlinecap",
+ "centerof", "centerofmass",
},
commands = {
"on", "off",
@@ -86,7 +93,8 @@ return {
"pensquare", "penrazor", "penspec",
"origin", "quartercircle", "right",
"unitsquare", "up", "withdots",
- "abs", "bbox", "ceiling", "center", "cutafter", "cutbefore", "dir",
+ "abs", "bbox", "ceiling", "cutafter", "cutbefore", "dir",
+ -- "center",
"directionpoint", "div", "dotprod", "intersectionpoint", "inverse", "mod",
"round", "unitvector", "whatever",
"cutdraw", "draw", "drawarrow", "drawdblarrow", "fill", "filldraw", "drawdot",
@@ -126,6 +134,8 @@ return {
"primitive", "permanent", "immutable", "mutable", "frozen",
--
"showproperty", "showhashentry",
+ --
+ "top", "bot", "lft", "rt", "ulft", "urt", "llft", "lrt",
},
internals = { -- we need to remove duplicates above
--
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index 2a6cd60cc..43e9515db 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -76,10 +76,16 @@ return {
"Udelimiterunder",
"Uhextensible",
"Uleft",
+ "UmathDelimiterPercent",
+ "UmathDelimiterShortfall",
"Umathaccent",
"Umathaccentbasedepth",
"Umathaccentbaseheight",
+ "Umathaccentbottomoverschoot",
"Umathaccentbottomshiftdown",
+ "Umathaccentsuperscriptdrop",
+ "Umathaccentsuperscriptpercent",
+ "Umathaccenttopovershoot",
"Umathaccenttopshiftup",
"Umathaccentvariant",
"Umathadapttoleft",
@@ -262,10 +268,12 @@ return {
"beginmathgroup",
"beginsimplegroup",
"boundary",
+ "boxadapt",
"boxanchor",
"boxanchors",
"boxattribute",
"boxdirection",
+ "boxfreeze",
"boxgeometry",
"boxorientation",
"boxshift",
@@ -303,6 +311,7 @@ return {
"etoksapp",
"etokspre",
"everybeforepar",
+ "everymathatom",
"everytab",
"exceptionpenalty",
"expand",
@@ -317,6 +326,7 @@ return {
"explicithyphenpenalty",
"firstvalidlanguage",
"flushmarks",
+ "fontcharta",
"fontid",
"fontmathcontrol",
"fontspecdef",
@@ -349,8 +359,10 @@ return {
"glyphtextscale",
"glyphxoffset",
"glyphxscale",
+ "glyphxscaled",
"glyphyoffset",
"glyphyscale",
+ "glyphyscaled",
"gtoksapp",
"gtokspre",
"hccode",
@@ -431,6 +443,7 @@ return {
"letmathspacing",
"letprotected",
"lettonothing",
+ "linebreakcriterium",
"linedirection",
"localbrokenpenalty",
"localcontrol",
@@ -462,7 +475,9 @@ return {
"mathbeginclass",
"mathdelimitersmode",
"mathdirection",
+ "mathdisplaymode",
"mathdisplayskipmode",
+ "mathdoublescriptmode",
"mathendclass",
"matheqnogapstep",
"mathfenced",
@@ -471,6 +486,8 @@ return {
"mathforwardpenalties",
"mathfrac",
"mathghost",
+ "mathgluemode",
+ "mathgroupingmode",
"mathleftclass",
"mathlimitsmode",
"mathmiddle",
@@ -521,6 +538,7 @@ return {
"parattribute",
"pardirection",
"permanent",
+ "pettymuskip",
"postexhyphenchar",
"posthyphenchar",
"postinlinepenalty",
@@ -568,7 +586,9 @@ return {
"tabsize",
"textdirection",
"thewithoutunit",
+ "tinymuskip",
"todimension",
+ "tohexadecimal",
"tointeger",
"tokenized",
"toksapp",
@@ -576,6 +596,8 @@ return {
"tolerant",
"tomathstyle",
"toscaled",
+ "tosparsedimension",
+ "tosparsescaled",
"tpack",
"tracingadjusts",
"tracingalignments",
@@ -587,6 +609,7 @@ return {
"tracingmarks",
"tracingmath",
"tracingnodes",
+ "tracingpenalties",
"uleaders",
"undent",
"unexpandedloop",
@@ -827,6 +850,7 @@ return {
"hfilneg",
"hfuzz",
"holdinginserts",
+ "holdingmigrations",
"hrule",
"hsize",
"hskip",
@@ -1001,7 +1025,6 @@ return {
"thickmuskip",
"thinmuskip",
"time",
- "tinymuskip",
"toks",
"toksdef",
"tolerance",
diff --git a/tex/context/base/mkiv/page-pcl.mkiv b/tex/context/base/mkiv/page-pcl.mkiv
index 43ba4feb3..262ee71ab 100644
--- a/tex/context/base/mkiv/page-pcl.mkiv
+++ b/tex/context/base/mkiv/page-pcl.mkiv
@@ -246,8 +246,8 @@
\page_marks_synchronize_column\plusone\c_page_col_n_of_columns\recurselevel\scratchbox
% backgrounds
\anch_mark_column_box\scratchbox\recurselevel
- \mixedcolumnseparatorheight\ht\scratchbox
- \mixedcolumnseparatordepth \dp\scratchbox
+ \pagecolumnseparatorheight\ht\scratchbox
+ \pagecolumnseparatordepth \dp\scratchbox
\inheritedpagecolumnsframedbox\recurselevel\scratchbox}
\def\page_col_routine_package
diff --git a/tex/context/base/mkiv/publ-dat.lua b/tex/context/base/mkiv/publ-dat.lua
index 382f70471..64aaaf460 100644
--- a/tex/context/base/mkiv/publ-dat.lua
+++ b/tex/context/base/mkiv/publ-dat.lua
@@ -379,6 +379,7 @@ function publications.new(name)
suffixes = { },
xmldata = xmlconvert(xmlplaceholder),
details = { },
+ missing = { },
ordered = { },
nofbytes = 0,
entries = nil, -- empty == all
@@ -732,6 +733,7 @@ do
end
end
end
+-- inspect(luadata)
statistics.stoptiming(publications)
end
@@ -1172,18 +1174,31 @@ do
end
end
- function savers.lua(dataset,filename,tobesaved)
- local list = { }
- local n = 0
- for tag, data in next, tobesaved do
+ function savers.lua(dataset,filename,tobesaved,options)
+ local list = { }
+ local n = 0
+
+ local function totable(data,category)
local t = { }
for key, value in next, data do
if not privates[key] then
- d[key] = value
+ t[key] = value
end
end
- list[tag] = t
+ t.category = category
n = n + 1
+ return t
+ end
+
+ if options.category then
+ setmetatableindex(list,"table")
+ for tag, data in next, tobesaved do
+ list[data.category or "unknown"][tag] = totable(data)
+ end
+ else
+ for tag, data in next, tobesaved do
+ list[tag] = totable(data,data.category)
+ end
end
report("%s entries from dataset %a saved in %a",n,dataset,filename)
table.save(filename,list)
@@ -1200,6 +1215,7 @@ do
local filename = specification.filename
local filetype = specification.filetype
local criterium = specification.criterium
+ local options = settings_to_hash(specification.options or "")
statistics.starttiming(publications)
if not filename or filename == "" then
report("no filename for saving given")
@@ -1229,7 +1245,7 @@ do
end
end
end
- saver(dataset,filename,tobesaved)
+ saver(dataset,filename,tobesaved,options)
else
report("unknown format %a for saving %a",filetype,dataset)
end
@@ -1250,6 +1266,7 @@ do
{ "filename" },
{ "filetype" },
{ "criterium" },
+ { "options" },
}
}
}
diff --git a/tex/context/base/mkiv/publ-imp-cite.mkvi b/tex/context/base/mkiv/publ-imp-cite.mkvi
index 721985499..c9afdbf42 100644
--- a/tex/context/base/mkiv/publ-imp-cite.mkvi
+++ b/tex/context/base/mkiv/publ-imp-cite.mkvi
@@ -85,7 +85,8 @@
\startsetups btx:cite:invalid
\btxcitereference
- {\tt <\currentbtxreference>}
+ % {\tt <\currentbtxreference>}
+ {\tt <\currentbtxmissingreference>}
\stopsetups
\startsetups btx:cite:concat
diff --git a/tex/context/base/mkiv/publ-ini.lua b/tex/context/base/mkiv/publ-ini.lua
index 210a14deb..dac0ab441 100644
--- a/tex/context/base/mkiv/publ-ini.lua
+++ b/tex/context/base/mkiv/publ-ini.lua
@@ -22,7 +22,7 @@ if not modules then modules = { } end modules ['publ-ini'] = {
-- gain is not that large anyway because not much publication stuff is flushed.
local next, rawget, type, tostring, tonumber = next, rawget, type, tostring, tonumber
-local match, find, gsub, lower = string.match, string.find, string.gsub, string.lower
+local match, find, gsub = string.match, string.find, string.gsub
local concat, sort, tohash = table.concat, table.sort, table.tohash
local mod = math.mod
local formatters = string.formatters
@@ -32,7 +32,7 @@ local sortedkeys, sortedhash = table.sortedkeys, table.sortedhash
local setmetatableindex = table.setmetatableindex
local lpegmatch = lpeg.match
local P, S, C, Ct, Cs, R, Carg = lpeg.P, lpeg.S, lpeg.C, lpeg.Ct, lpeg.Cs, lpeg.R, lpeg.Carg
-local upper = characters.upper
+local upper, lower = characters.upper, characters.lower
local report = logs.reporter("publications")
local report_cite = logs.reporter("publications","cite")
@@ -693,6 +693,49 @@ local findallused do
end
}
+ implement {
+ name = "btxmissing",
+ arguments = "2 strings",
+ actions = function(dataset,tag)
+ local dataset = datasets[dataset]
+ if dataset then
+ local missing = dataset.missing
+ local message = missing[tag]
+ if message == nil then
+ local luadata = dataset.luadata
+ local entry = luadata[tag]
+ if not entry then
+ local t = lower(tag)
+ if luadata[t] then
+ message = t
+ else
+ t = upper(tag)
+ if luadata[t] then
+ message = t
+ else
+ for k, v in next, luadata do
+ if t == upper(k) then
+ message = k
+ break
+ end
+ end
+ end
+ end
+ end
+ if not message then
+ message = false
+ end
+ missing[tag] = message
+ end
+ if message then
+ context("%s vs %s",tag,message)
+ return
+ end
+ end
+ context(tag)
+ end
+ }
+
end
local function unknowncite(reference)
@@ -1316,12 +1359,6 @@ do
local typesetters = { }
publications.typesetters = typesetters
- local lowered = setmetatableindex(function(t,k)
- k = lower(k)
- t[k] = k
- return k
- end)
-
local function defaulttypesetter(field,value,manipulator)
if value and value ~= "" then
value = tostring(value)
@@ -1428,8 +1465,6 @@ do
local function get(dataset,tag,field,what,check,catspec) -- somewhat more extensive
local current = rawget(datasets,dataset)
if current then
- tag = lowered[tag]
- field = lowered[field]
local data = current.luadata[tag]
if data then
local category = data.category
@@ -1479,8 +1514,6 @@ do
local function btxflush(name,tag,field)
local dataset = rawget(datasets,name)
if dataset then
- tag = lowered[tag]
- field = lowered[field]
local fields = dataset.luadata[tag]
if fields then
local manipulator, field = splitmanipulation(field)
@@ -1507,8 +1540,6 @@ do
local function btxfield(name,tag,field)
local dataset = rawget(datasets,name)
if dataset then
- tag = lowered[tag]
- field = lowered[field]
local fields = dataset.luadata[tag]
if fields then
local category = fields.category
@@ -1534,8 +1565,6 @@ do
local function btxdetail(name,tag,field)
local dataset = rawget(datasets,name)
if dataset then
- tag = lowered[tag]
- field = lowered[field]
local fields = dataset.luadata[tag]
if fields then
local details = dataset.details[tag]
@@ -1566,11 +1595,8 @@ do
local function btxdirect(name,tag,field)
local dataset = rawget(datasets,name)
if dataset then
- tag = lowered[tag]
- field = lowered[field]
local fields = dataset.luadata[tag]
if fields then
- field = lowered[field]
local manipulator, field = splitmanipulation(field)
local value = fields[field]
if value then
@@ -1589,8 +1615,6 @@ do
local function okay(name,tag,field)
local dataset = rawget(datasets,name)
if dataset then
- tag = lowered[tag]
- field = lowered[field]
local fields = dataset.luadata[tag]
if fields then
local category = fields.category
@@ -2675,6 +2699,8 @@ do
-- a bit redundant access to datasets
+ local creported = setmetatableindex("table")
+
local function processcite(presets,specification)
--
if specification then
@@ -2701,9 +2727,15 @@ do
--
if not found or #found == 0 then
-- if not list or #list == 0 then
- report("no entry %a found in dataset %a",reference,dataset)
+ if not creported[dataset][reference] then
+ report("no entry %a found in dataset %a",reference,dataset)
+ creported[dataset][reference] = true
+ end
elseif not setup then
- report("invalid reference for %a",reference)
+ if not creported[""][reference] then
+ report("invalid reference for %a",reference)
+ creported[""][reference] = true
+ end
else
if trace_cite then
report("processing reference %a",reference)
diff --git a/tex/context/base/mkiv/publ-sor.lua b/tex/context/base/mkiv/publ-sor.lua
index 30a0d9bdd..ed944ed9d 100644
--- a/tex/context/base/mkiv/publ-sor.lua
+++ b/tex/context/base/mkiv/publ-sor.lua
@@ -370,9 +370,17 @@ table.setmetatableindex(sorters,function(t,k) return anything end)
publications.lists.sorters = sorters
--- publications.sortmethods.key = {
--- sequence = {
--- { field = "key", default = "", unknown = "" },
--- { field = "index", default = "", unknown = "" },
--- },
--- }
+publications.sortmethods.key = {
+ sequence = {
+ { field = "key", default = "", unknown = "" },
+ { field = "index", default = 0, unknown = 0 },
+ },
+}
+
+publications.sortmethods.index = {
+ sequence = {
+ { field = "index", default = 0, unknown = 0 },
+ },
+}
+
+publications.sortmethods.dataset = publications.sortmethods.index
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index e45d119cd..42bb6d94a 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 0015ece2b..983543d0f 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-lst.lua b/tex/context/base/mkiv/strc-lst.lua
index 96ad7c8ed..2e8eb15d9 100644
--- a/tex/context/base/mkiv/strc-lst.lua
+++ b/tex/context/base/mkiv/strc-lst.lua
@@ -37,6 +37,8 @@ local conditionals = tex.conditionals
local ctx_latelua = context.latelua
+local cheat = true
+
local structures = structures
local lists = structures.lists
local sections = structures.sections
@@ -193,8 +195,13 @@ local function finalizer()
if r then
local i = r.internal
local f = flaginternals[i]
+ local v = usedviews[i]
+ if cheat and v then
+ -- this permits runs=2 with interactivity
+ r.view = v
+ end
if f then
- r.used = usedviews[i] or true
+ r.used = v or true
end
end
end
@@ -232,7 +239,7 @@ function lists.addto(t) -- maybe more more here (saves parsing at the tex end)
if numberdata then
local numbers = numberdata.numbers
if type(numbers) == "string" then
- numberdata.numbers = counters.compact(numbers,nil,true)
+ counters.compact(numberdata,numbers,numberdata.level)
end
end
local group = numberdata and numberdata.group
@@ -869,13 +876,23 @@ function lists.process(specification)
local total = #result
lists.result = result
if total > 0 then
+ local usedinternals = references.usedinternals
+ local usedviews = references.usedviews
local specials = settings_to_set(specification.extras or "")
specials = next(specials) and specials or nil
for i=1,total do
- local r = result[i]
- local m = r.metadata
- local s = specials and r.numberdata and specials[zerostrippedconcat(r.numberdata.numbers,".")] or ""
- context.strclistsentryprocess(m.name,m.kind,i,s)
+ local listentry = result[i]
+ local metadata = listentry.metadata
+ local numberdata = listentry.numberdata
+ local references = listentry.references
+ local special = specials and numberdata and specials[zerostrippedconcat(numberdata.numbers,".")] or ""
+ if cheat and references then
+ -- this permits runs=2 with interactivity
+ local internal = references.internal
+ usedinternals[internal] = true
+ usedviews [internal] = references.view
+ end
+ context.strclistsentryprocess(metadata.name,metadata.kind,i,special)
end
end
end
@@ -1098,6 +1115,7 @@ implement {
}
},
{ "numberdata", {
+ { "level", "integer" },
{ "numbers" },
{ "groupsuffix" },
{ "group" },
diff --git a/tex/context/base/mkiv/strc-num.lua b/tex/context/base/mkiv/strc-num.lua
index 5d00fcca9..3339819a2 100644
--- a/tex/context/base/mkiv/strc-num.lua
+++ b/tex/context/base/mkiv/strc-num.lua
@@ -270,18 +270,36 @@ function counters.raw(name)
return counterdata[name]
end
-function counters.compact(name,level,onlynumbers)
+function counters.compact(target,name,level)
local cd = counterdata[name]
if cd then
- local data = cd.data
- local compact = { }
- for i=1,level or #data do
+ local data = cd.data
+ local numbers = { }
+ local ownnumbers = { }
+ local depth = #data
+ if not level or level == 0 then
+ level = depth
+ elseif level > depth then
+ level = depth
+ end
+
+ for i=1,level do
local d = data[i]
- if d.number ~= 0 then
- compact[i] = (onlynumbers and d.number) or d
+ if d then
+ local n = d.number
+ local o = d.own
+ if n ~= 0 then
+ numbers[i] = n
+ end
+ if o ~= "" then
+ ownnumbers[i] = o
+ end
end
end
- return compact
+ target.numbers = numbers
+ if next(ownnumbers) then
+ target.ownnumbers = ownnumbers
+ end
end
end
diff --git a/tex/context/base/mkiv/strc-ref.lua b/tex/context/base/mkiv/strc-ref.lua
index 2dee95b40..87fea6b68 100644
--- a/tex/context/base/mkiv/strc-ref.lua
+++ b/tex/context/base/mkiv/strc-ref.lua
@@ -2096,7 +2096,7 @@ function references.setandgetattribute(data) -- maybe do internal automatically
if ndat then
local numbers = ndat.numbers
if type(numbers) == "string" then
- ndat.numbers = counters.compact(numbers,nil,true)
+ counters.compact(ndat,numbers)
end
data.numberdata = helpers.simplify(ndat)
end
diff --git a/tex/context/base/mkiv/type-set.mkiv b/tex/context/base/mkiv/type-set.mkiv
index 25186b290..3447c4e6e 100644
--- a/tex/context/base/mkiv/type-set.mkiv
+++ b/tex/context/base/mkiv/type-set.mkiv
@@ -142,4 +142,7 @@
\definefilesynonym [type-imp-kpfonts-bold.mkiv] [type-imp-kpfonts.mkiv]
\definefilesynonym [type-imp-kpfonts-sans.mkiv] [type-imp-kpfonts.mkiv]
+\definefilesynonym [type-imp-gentiumplus.mkiv] [type-imp-gentium.mkiv]
+\definefilesynonym [type-imp-gentiumbook.mkiv] [type-imp-gentium.mkiv]
+
\protect \endinput
diff --git a/tex/context/base/mkiv/typo-fkr.lua b/tex/context/base/mkiv/typo-fkr.lua
index 628818b6a..faaa09891 100644
--- a/tex/context/base/mkiv/typo-fkr.lua
+++ b/tex/context/base/mkiv/typo-fkr.lua
@@ -56,7 +56,7 @@ function typesetters.fontkerns.handler(head)
kern = (kern1 + kern2)/2 -- mixed
end
if kern ~= 0 then
- head, current = insertbefore(head,current,new_kern(kern))
+ head = insertbefore(head,current,new_kern(kern))
end
lastdata = data
else
@@ -68,7 +68,7 @@ function typesetters.fontkerns.handler(head)
end
local kern = getkernpair(lastdata,lastchar,char)
if kern ~= 0 then
- head, current = insertbefore(head,current,new_kern(kern))
+ head = insertbefore(head,current,new_kern(kern))
end
end
lastchar = char
diff --git a/tex/context/base/mkiv/util-deb.lua b/tex/context/base/mkiv/util-deb.lua
index bd94b6d01..10e5731b0 100644
--- a/tex/context/base/mkiv/util-deb.lua
+++ b/tex/context/base/mkiv/util-deb.lua
@@ -346,3 +346,25 @@ debugger.showtraceback = showtraceback
-- debug.showtraceback = showtraceback
-- showtraceback()
+
+-- For now also here because we want it in mtxrun (taken from lmt file):
+
+if luac then
+
+ local show, dump = luac.print, string.dump
+
+ function luac.inspect(v)
+ if type(v) == "function" then
+ local ok, str = xpcall(dump,function() end,v)
+ if ok then
+ v = str
+ end
+ end
+ if type(v) == "string" then
+ show(v,true)
+ else
+ print(v)
+ end
+ end
+
+end
diff --git a/tex/context/base/mkiv/util-jsn.lua b/tex/context/base/mkiv/util-jsn.lua
index c1048b00a..6d12c520a 100644
--- a/tex/context/base/mkiv/util-jsn.lua
+++ b/tex/context/base/mkiv/util-jsn.lua
@@ -269,6 +269,8 @@ do
k = lpegmatch(escaper,k) or k
v = lpegmatch(escaper,v) or v
n = n + 1 t[n] = f_key_val_str(depth,k,v)
+ elseif i > 1 then
+ n = n - 1
end
elseif tv == "table" then
local l = #v
@@ -284,6 +286,9 @@ do
end
elseif next(v) then
tojsonpp(v,k,depth,level+1,0)
+ elseif i > 1 then
+ n = n - 1
+ -- we don't know if we have a hash or string
end
elseif tv == "boolean" then
if tk == "number" then
@@ -301,6 +306,8 @@ do
else
t[n] = f_key_val_nop(depth,k)
end
+ elseif i > 1 then
+ n = n - 1
end
else
if tk == "number" then
@@ -310,6 +317,8 @@ do
k = lpegmatch(escaper,k) or k
n = n + 1
t[n] = f_key_val_null(depth,k)
+ elseif i > 1 then
+ n = n - 1
end
end
end