summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/context-version.pdfbin4249 -> 4248 bytes
-rw-r--r--tex/context/base/mkii/mult-de.mkii6
-rw-r--r--tex/context/base/mkii/mult-en.mkii4
-rw-r--r--tex/context/base/mkii/mult-fr.mkii6
-rw-r--r--tex/context/base/mkii/mult-it.mkii6
-rw-r--r--tex/context/base/mkii/mult-nl.mkii6
-rw-r--r--tex/context/base/mkii/mult-pe.mkii6
-rw-r--r--tex/context/base/mkii/mult-ro.mkii6
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context-todo.tex7
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/font-afm.lua4
-rw-r--r--tex/context/base/mkiv/font-otj.lua6
-rw-r--r--tex/context/base/mkiv/font-otr.lua10
-rw-r--r--tex/context/base/mkiv/font-ots.lua20
-rw-r--r--tex/context/base/mkiv/mtx-context-xml.tex2
-rw-r--r--tex/context/base/mkiv/mult-def.lua40
-rw-r--r--tex/context/base/mkiv/scrn-but.lua6
-rw-r--r--tex/context/base/mkiv/scrn-but.mkvi17
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin9126 -> 9233 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin267905 -> 268039 bytes
-rw-r--r--tex/context/base/mkiv/strc-lev.lua39
-rw-r--r--tex/context/base/mkiv/strc-lev.mkvi31
-rw-r--r--tex/context/base/mkiv/strc-lst.mkvi1
-rw-r--r--tex/context/base/mkiv/strc-pag.lua25
-rw-r--r--tex/context/base/mkiv/strc-ref.lua6
-rw-r--r--tex/context/base/mkiv/strc-ref.mkvi2
-rw-r--r--tex/context/base/mkiv/strc-reg.lua105
-rw-r--r--tex/context/base/mkiv/strc-reg.mkiv81
-rw-r--r--tex/context/base/mkiv/strc-sec.mkiv26
-rw-r--r--tex/context/interface/mkii/keys-cs.xml6
-rw-r--r--tex/context/interface/mkii/keys-de.xml6
-rw-r--r--tex/context/interface/mkii/keys-en.xml4
-rw-r--r--tex/context/interface/mkii/keys-fr.xml6
-rw-r--r--tex/context/interface/mkii/keys-it.xml6
-rw-r--r--tex/context/interface/mkii/keys-nl.xml6
-rw-r--r--tex/context/interface/mkii/keys-pe.xml6
-rw-r--r--tex/context/interface/mkii/keys-ro.xml6
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin819870 -> 820429 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin60792 -> 60792 bytes
-rw-r--r--tex/context/interface/mkiv/i-section.xml10
-rw-r--r--tex/context/modules/mkiv/m-nodechart.lua10
-rw-r--r--tex/context/modules/mkiv/s-xml-analyzers.lua28
-rw-r--r--tex/context/modules/mkiv/s-xml-analyzers.mkiv1
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua36
45 files changed, 406 insertions, 197 deletions
diff --git a/tex/context/base/context-version.pdf b/tex/context/base/context-version.pdf
index d381b5c2b..d716e9f20 100644
--- a/tex/context/base/context-version.pdf
+++ b/tex/context/base/context-version.pdf
Binary files differ
diff --git a/tex/context/base/mkii/mult-de.mkii b/tex/context/base/mkii/mult-de.mkii
index e0099f4e7..f3bdc0740 100644
--- a/tex/context/base/mkii/mult-de.mkii
+++ b/tex/context/base/mkii/mult-de.mkii
@@ -205,7 +205,6 @@
\setinterfacevariable{footnote}{fussnote}
\setinterfacevariable{force}{zwinge}
\setinterfacevariable{foreground}{vordergrund}
-\setinterfacevariable{formeel}{formeel}
\setinterfacevariable{formula}{formel}
\setinterfacevariable{formulae}{formeln}
\setinterfacevariable{forward}{vorwaerts}
@@ -242,7 +241,6 @@
\setinterfacevariable{inbetween}{zwischen}
\setinterfacevariable{index}{index}
\setinterfacevariable{indices}{indizies}
-\setinterfacevariable{informeel}{informeel}
\setinterfacevariable{inherit}{inherit}
\setinterfacevariable{ininner}{ininner}
\setinterfacevariable{ininneredge}{ininneredge}
@@ -303,6 +301,7 @@
\setinterfacevariable{line}{zeile}
\setinterfacevariable{linenote}{linenote}
\setinterfacevariable{lines}{zeilen}
+\setinterfacevariable{linked}{linked}
\setinterfacevariable{list}{liste}
\setinterfacevariable{local}{lokal}
\setinterfacevariable{localenvironment}{lokaleumgebung}
@@ -438,7 +437,6 @@
\setinterfacevariable{referral}{merkmal}
\setinterfacevariable{register}{register}
\setinterfacevariable{regular}{regular}
-\setinterfacevariable{rekening}{rekening}
\setinterfacevariable{relative}{relativ}
\setinterfacevariable{repeat}{wiederholen}
\setinterfacevariable{required}{obligatorisch}
@@ -790,7 +788,7 @@
\setinterfaceconstant{finalnamesep}{finalnamesep}
\setinterfaceconstant{finalpagesep}{finalpagesep}
\setinterfaceconstant{finalpubsep}{finalpubsep}
-\setinterfaceconstant{first}{first}
+\setinterfaceconstant{first}{erste}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{ersteseite}
\setinterfaceconstant{focus}{focus}
diff --git a/tex/context/base/mkii/mult-en.mkii b/tex/context/base/mkii/mult-en.mkii
index 116868cc9..262b4fde5 100644
--- a/tex/context/base/mkii/mult-en.mkii
+++ b/tex/context/base/mkii/mult-en.mkii
@@ -205,7 +205,6 @@
\setinterfacevariable{footnote}{footnote}
\setinterfacevariable{force}{force}
\setinterfacevariable{foreground}{foreground}
-\setinterfacevariable{formeel}{formeel}
\setinterfacevariable{formula}{formula}
\setinterfacevariable{formulae}{formulae}
\setinterfacevariable{forward}{forward}
@@ -242,7 +241,6 @@
\setinterfacevariable{inbetween}{inbetween}
\setinterfacevariable{index}{index}
\setinterfacevariable{indices}{indices}
-\setinterfacevariable{informeel}{informeel}
\setinterfacevariable{inherit}{inherit}
\setinterfacevariable{ininner}{ininner}
\setinterfacevariable{ininneredge}{ininneredge}
@@ -303,6 +301,7 @@
\setinterfacevariable{line}{line}
\setinterfacevariable{linenote}{linenote}
\setinterfacevariable{lines}{lines}
+\setinterfacevariable{linked}{linked}
\setinterfacevariable{list}{list}
\setinterfacevariable{local}{local}
\setinterfacevariable{localenvironment}{localenvironment}
@@ -438,7 +437,6 @@
\setinterfacevariable{referral}{referral}
\setinterfacevariable{register}{register}
\setinterfacevariable{regular}{regular}
-\setinterfacevariable{rekening}{rekening}
\setinterfacevariable{relative}{relative}
\setinterfacevariable{repeat}{repeat}
\setinterfacevariable{required}{required}
diff --git a/tex/context/base/mkii/mult-fr.mkii b/tex/context/base/mkii/mult-fr.mkii
index 44251d727..6d9bf8982 100644
--- a/tex/context/base/mkii/mult-fr.mkii
+++ b/tex/context/base/mkii/mult-fr.mkii
@@ -205,7 +205,6 @@
\setinterfacevariable{footnote}{notepdp}
\setinterfacevariable{force}{force}
\setinterfacevariable{foreground}{premierplan}
-\setinterfacevariable{formeel}{formeel}
\setinterfacevariable{formula}{formule}
\setinterfacevariable{formulae}{formules}
\setinterfacevariable{forward}{avance}
@@ -242,7 +241,6 @@
\setinterfacevariable{inbetween}{entre}
\setinterfacevariable{index}{index}
\setinterfacevariable{indices}{indices}
-\setinterfacevariable{informeel}{informeel}
\setinterfacevariable{inherit}{herite}
\setinterfacevariable{ininner}{ininner}
\setinterfacevariable{ininneredge}{ininneredge}
@@ -303,6 +301,7 @@
\setinterfacevariable{line}{ligne}
\setinterfacevariable{linenote}{noteligne}
\setinterfacevariable{lines}{lignes}
+\setinterfacevariable{linked}{linked}
\setinterfacevariable{list}{liste}
\setinterfacevariable{local}{local}
\setinterfacevariable{localenvironment}{environementlocal}
@@ -438,7 +437,6 @@
\setinterfacevariable{referral}{referral}
\setinterfacevariable{register}{registre}
\setinterfacevariable{regular}{regulier}
-\setinterfacevariable{rekening}{rekening}
\setinterfacevariable{relative}{relatif}
\setinterfacevariable{repeat}{repete}
\setinterfacevariable{required}{recquis}
@@ -790,7 +788,7 @@
\setinterfaceconstant{finalnamesep}{finalnamesep}
\setinterfaceconstant{finalpagesep}{finalpagesep}
\setinterfaceconstant{finalpubsep}{finalpubsep}
-\setinterfaceconstant{first}{first}
+\setinterfaceconstant{first}{premier}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{premierepage}
\setinterfaceconstant{focus}{focus}
diff --git a/tex/context/base/mkii/mult-it.mkii b/tex/context/base/mkii/mult-it.mkii
index e6de935e6..a5367dfbb 100644
--- a/tex/context/base/mkii/mult-it.mkii
+++ b/tex/context/base/mkii/mult-it.mkii
@@ -205,7 +205,6 @@
\setinterfacevariable{footnote}{notapdp}
\setinterfacevariable{force}{forza}
\setinterfacevariable{foreground}{foreground}
-\setinterfacevariable{formeel}{formeel}
\setinterfacevariable{formula}{formula}
\setinterfacevariable{formulae}{formule}
\setinterfacevariable{forward}{avanti}
@@ -242,7 +241,6 @@
\setinterfacevariable{inbetween}{tra}
\setinterfacevariable{index}{indiceanalitico}
\setinterfacevariable{indices}{indicianalitici}
-\setinterfacevariable{informeel}{informeel}
\setinterfacevariable{inherit}{inherit}
\setinterfacevariable{ininner}{ininner}
\setinterfacevariable{ininneredge}{ininneredge}
@@ -303,6 +301,7 @@
\setinterfacevariable{line}{riga}
\setinterfacevariable{linenote}{linenote}
\setinterfacevariable{lines}{righe}
+\setinterfacevariable{linked}{linked}
\setinterfacevariable{list}{elenco}
\setinterfacevariable{local}{locale}
\setinterfacevariable{localenvironment}{ambientelocale}
@@ -438,7 +437,6 @@
\setinterfacevariable{referral}{referral}
\setinterfacevariable{register}{registro}
\setinterfacevariable{regular}{regolare}
-\setinterfacevariable{rekening}{rekening}
\setinterfacevariable{relative}{relativo}
\setinterfacevariable{repeat}{ripeti}
\setinterfacevariable{required}{richiestp}
@@ -790,7 +788,7 @@
\setinterfaceconstant{finalnamesep}{finalnamesep}
\setinterfaceconstant{finalpagesep}{finalpagesep}
\setinterfaceconstant{finalpubsep}{finalpubsep}
-\setinterfaceconstant{first}{first}
+\setinterfaceconstant{first}{primo}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{primapagina}
\setinterfaceconstant{focus}{focus}
diff --git a/tex/context/base/mkii/mult-nl.mkii b/tex/context/base/mkii/mult-nl.mkii
index 8c2063ea8..6cd6a7b5d 100644
--- a/tex/context/base/mkii/mult-nl.mkii
+++ b/tex/context/base/mkii/mult-nl.mkii
@@ -205,7 +205,6 @@
\setinterfacevariable{footnote}{voetnoot}
\setinterfacevariable{force}{forceer}
\setinterfacevariable{foreground}{voorgrond}
-\setinterfacevariable{formeel}{formeel}
\setinterfacevariable{formula}{formule}
\setinterfacevariable{formulae}{formules}
\setinterfacevariable{forward}{vooruit}
@@ -242,7 +241,6 @@
\setinterfacevariable{inbetween}{tussen}
\setinterfacevariable{index}{index}
\setinterfacevariable{indices}{indices}
-\setinterfacevariable{informeel}{informeel}
\setinterfacevariable{inherit}{erf}
\setinterfacevariable{ininner}{inbinnen}
\setinterfacevariable{ininneredge}{ininneredge}
@@ -303,6 +301,7 @@
\setinterfacevariable{line}{regel}
\setinterfacevariable{linenote}{regelnoot}
\setinterfacevariable{lines}{regels}
+\setinterfacevariable{linked}{linked}
\setinterfacevariable{list}{lijst}
\setinterfacevariable{local}{lokaal}
\setinterfacevariable{localenvironment}{deelomgeving}
@@ -438,7 +437,6 @@
\setinterfacevariable{referral}{kenmerk}
\setinterfacevariable{register}{register}
\setinterfacevariable{regular}{regular}
-\setinterfacevariable{rekening}{rekening}
\setinterfacevariable{relative}{relatief}
\setinterfacevariable{repeat}{herhaal}
\setinterfacevariable{required}{verplicht}
@@ -790,7 +788,7 @@
\setinterfaceconstant{finalnamesep}{finalnamesep}
\setinterfaceconstant{finalpagesep}{finalpagesep}
\setinterfaceconstant{finalpubsep}{finalpubsep}
-\setinterfaceconstant{first}{first}
+\setinterfaceconstant{first}{eerste}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{eerstepagina}
\setinterfaceconstant{focus}{focus}
diff --git a/tex/context/base/mkii/mult-pe.mkii b/tex/context/base/mkii/mult-pe.mkii
index a058f9ad3..371b64074 100644
--- a/tex/context/base/mkii/mult-pe.mkii
+++ b/tex/context/base/mkii/mult-pe.mkii
@@ -205,7 +205,6 @@
\setinterfacevariable{footnote}{پانوشت}
\setinterfacevariable{force}{اجبار}
\setinterfacevariable{foreground}{پیش‌زمینه}
-\setinterfacevariable{formeel}{formeel}
\setinterfacevariable{formula}{فرمول}
\setinterfacevariable{formulae}{فرمولها}
\setinterfacevariable{forward}{به‌جلو}
@@ -242,7 +241,6 @@
\setinterfacevariable{inbetween}{دربین}
\setinterfacevariable{index}{نمایه}
\setinterfacevariable{indices}{نمایه‌ها}
-\setinterfacevariable{informeel}{informeel}
\setinterfacevariable{inherit}{ارث‌بردن}
\setinterfacevariable{ininner}{درداخلی}
\setinterfacevariable{ininneredge}{ininneredge}
@@ -303,6 +301,7 @@
\setinterfacevariable{line}{خط}
\setinterfacevariable{linenote}{خط‌نوشت}
\setinterfacevariable{lines}{خطها}
+\setinterfacevariable{linked}{linked}
\setinterfacevariable{list}{لیست}
\setinterfacevariable{local}{موضعی}
\setinterfacevariable{localenvironment}{محیط‌موضعی}
@@ -438,7 +437,6 @@
\setinterfacevariable{referral}{مراجعه}
\setinterfacevariable{register}{ثبت}
\setinterfacevariable{regular}{منظم}
-\setinterfacevariable{rekening}{rekening}
\setinterfacevariable{relative}{نسبی}
\setinterfacevariable{repeat}{تکرار}
\setinterfacevariable{required}{موردنیاز}
@@ -790,7 +788,7 @@
\setinterfaceconstant{finalnamesep}{finalnamesep}
\setinterfaceconstant{finalpagesep}{finalpagesep}
\setinterfaceconstant{finalpubsep}{finalpubsep}
-\setinterfaceconstant{first}{first}
+\setinterfaceconstant{first}{اولی}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{صفحه‌اول}
\setinterfaceconstant{focus}{تمرکز}
diff --git a/tex/context/base/mkii/mult-ro.mkii b/tex/context/base/mkii/mult-ro.mkii
index 062230226..00e2f30cc 100644
--- a/tex/context/base/mkii/mult-ro.mkii
+++ b/tex/context/base/mkii/mult-ro.mkii
@@ -205,7 +205,6 @@
\setinterfacevariable{footnote}{notasubsol}
\setinterfacevariable{force}{fortat}
\setinterfacevariable{foreground}{primplan}
-\setinterfacevariable{formeel}{formeel}
\setinterfacevariable{formula}{formula}
\setinterfacevariable{formulae}{formule}
\setinterfacevariable{forward}{avans}
@@ -242,7 +241,6 @@
\setinterfacevariable{inbetween}{intre}
\setinterfacevariable{index}{index}
\setinterfacevariable{indices}{indexuri}
-\setinterfacevariable{informeel}{informeel}
\setinterfacevariable{inherit}{inherit}
\setinterfacevariable{ininner}{ininner}
\setinterfacevariable{ininneredge}{ininneredge}
@@ -303,6 +301,7 @@
\setinterfacevariable{line}{linie}
\setinterfacevariable{linenote}{linenote}
\setinterfacevariable{lines}{linii}
+\setinterfacevariable{linked}{linked}
\setinterfacevariable{list}{lista}
\setinterfacevariable{local}{local}
\setinterfacevariable{localenvironment}{mediulocal}
@@ -438,7 +437,6 @@
\setinterfacevariable{referral}{referinta}
\setinterfacevariable{register}{registru}
\setinterfacevariable{regular}{regular}
-\setinterfacevariable{rekening}{rekening}
\setinterfacevariable{relative}{relativ}
\setinterfacevariable{repeat}{repetat}
\setinterfacevariable{required}{obligatoriu}
@@ -790,7 +788,7 @@
\setinterfaceconstant{finalnamesep}{finalnamesep}
\setinterfaceconstant{finalpagesep}{finalpagesep}
\setinterfaceconstant{finalpubsep}{finalpubsep}
-\setinterfaceconstant{first}{first}
+\setinterfaceconstant{first}{primul}
\setinterfaceconstant{firstnamesep}{firstnamesep}
\setinterfaceconstant{firstpage}{primapagina}
\setinterfaceconstant{focus}{focus}
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 4dc765daa..b9f7c3413 100644
--- a/tex/context/base/mkiv/cont-new.mkiv
+++ b/tex/context/base/mkiv/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2016.04.22 09:10}
+\newcontextversion{2016.04.25 13:30}
%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-todo.tex b/tex/context/base/mkiv/context-todo.tex
index b9591e8e0..67204ac89 100644
--- a/tex/context/base/mkiv/context-todo.tex
+++ b/tex/context/base/mkiv/context-todo.tex
@@ -27,6 +27,9 @@
play with par callback and properties
\stopitem
\startitem
+ get rid of components
+ \stopitem
+ \startitem
play with box attributes
\stopitem
\startitem
@@ -42,6 +45,10 @@
\stoptext
+% also
+
+check components and pre|post|replace in math-tag
+
% new:
<cd:command name="showgrid" file="page-grd.mkiv">
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 83e7b46b1..472f5632e 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -39,7 +39,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2016.04.22 09:10}
+\edef\contextversion{2016.04.25 13:30}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/font-afm.lua b/tex/context/base/mkiv/font-afm.lua
index 700330408..99b857747 100644
--- a/tex/context/base/mkiv/font-afm.lua
+++ b/tex/context/base/mkiv/font-afm.lua
@@ -30,7 +30,7 @@ local fonts, logs, trackers, containers, resolvers = fonts, logs, trackers, cont
local next, type, tonumber = next, type, tonumber
local match, gmatch, lower, gsub, strip, find = string.match, string.gmatch, string.lower, string.gsub, string.strip, string.find
local char, byte, sub = string.char, string.byte, string.sub
-local abs, mod = math.abs, math.mod
+local abs = math.abs
local bxor, rshift = bit32.bxor, bit32.rshift
local P, S, R, Cmt, C, Ct, Cs, lpegmatch, patterns = lpeg.P, lpeg.S, lpeg.R, lpeg.Cmt, lpeg.C, lpeg.Ct, lpeg.Cs, lpeg.match, lpeg.patterns
local derivetable = table.derive
@@ -317,7 +317,7 @@ do
local function step(c)
local cipher = byte(c)
local plain = bxor(cipher,rshift(r,8))
- r = mod((cipher + r) * c1 + c2,65536)
+ r = ((cipher + r) * c1 + c2) % 65536
return char(plain)
end
diff --git a/tex/context/base/mkiv/font-otj.lua b/tex/context/base/mkiv/font-otj.lua
index aae70d1f3..ebda723d5 100644
--- a/tex/context/base/mkiv/font-otj.lua
+++ b/tex/context/base/mkiv/font-otj.lua
@@ -49,8 +49,8 @@ local attributes, nodes, node = attributes, nodes, node
fonts = fonts
local hashes = fonts.hashes
local fontdata = hashes.identifiers
-local parameters = fonts.hashes.parameters
-local resources = fonts.hashes.resources
+----- parameters = fonts.hashes.parameters -- not in generic
+----- resources = fonts.hashes.resources -- not in generic
nodes.injections = nodes.injections or { }
local injections = nodes.injections
@@ -1444,7 +1444,7 @@ local function injectspaces(head)
-- end
leftkerns = trig.left
rightkerns = trig.right
- local par = parameters[font]
+ local par = fontdata[font].parameters -- fallback for generic
factor = par.factor
threshold = par.spacing.width - 1 -- get rid of rounding errors
lastfont = font
diff --git a/tex/context/base/mkiv/font-otr.lua b/tex/context/base/mkiv/font-otr.lua
index a9ad73906..24f68543e 100644
--- a/tex/context/base/mkiv/font-otr.lua
+++ b/tex/context/base/mkiv/font-otr.lua
@@ -69,7 +69,7 @@ local next, type, unpack = next, type, unpack
local byte, lower, char, strip, gsub = string.byte, string.lower, string.char, string.strip, string.gsub
local bittest = bit32.btest
local concat, remove, unpack, fastcopy = table.concat, table.remov, table.unpack, table.fastcopy
-local floor, mod, abs, sqrt, round = math.floor, math.mod, math.abs, math.sqrt, math.round
+local floor, abs, sqrt, round = math.floor, math.abs, math.sqrt, math.round
local P, R, S, C, Cs, Cc, Ct, Carg, Cmt = lpeg.P, lpeg.R, lpeg.S, lpeg.C, lpeg.Cs, lpeg.Cc, lpeg.Ct, lpeg.Carg, lpeg.Cmt
local lpegmatch = lpeg.match
@@ -1270,10 +1270,10 @@ formatreaders[4] = function(f,fontdata,offset)
-- bad encoding
elseif offset == 0 then
if trace_cmap then
- report("format 4.%i segment %2i from %C upto %C at index %H",1,segment,startchar,endchar,mod(startchar + delta,65536))
+ 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
- local index = mod(unicode + delta,65536)
+ local index = (unicode + delta) % 65536
if index and index > 0 then
local glyph = glyphs[index]
if glyph then
@@ -1303,13 +1303,13 @@ formatreaders[4] = function(f,fontdata,offset)
else
local shift = (segment-nofsegments+offset/2) - startchar
if trace_cmap then
- report("format 4.%i segment %2i from %C upto %C at index %H",0,segment,startchar,endchar,mod(startchar + delta,65536))
+ report("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
local index = indices[slot]
if index and index > 0 then
- index = mod(index + delta,65536)
+ index = (index + delta) % 65536
local glyph = glyphs[index]
if glyph then
local gu = glyph.unicode
diff --git a/tex/context/base/mkiv/font-ots.lua b/tex/context/base/mkiv/font-ots.lua
index 691187258..ac8198971 100644
--- a/tex/context/base/mkiv/font-ots.lua
+++ b/tex/context/base/mkiv/font-ots.lua
@@ -9,6 +9,9 @@ if not modules then modules = { } end modules ['font-ots'] = { -- sequences
-- to be checked: discrun doesn't seem to do something useful now (except run the
-- check again) so if we need it again we'll do a zwnjrun or so
+-- components will go away and be replaced by a property table which simplifies
+-- code (also more efficient)
+
-- beware, on my development machine we test a slightly a more optimized version
-- assumptions:
@@ -566,7 +569,22 @@ local function toligature(head,start,stop,char,dataset,sequence,markflag,discfou
local pre, post, replace, pretail, posttail, replacetail = getdisc(discfound,true)
if not replace then -- todo: signal simple hyphen
local prev = getprev(base)
- local copied = copy_node_list(comp)
+-- local copied = copy_node_list(comp)
+local current = comp
+local previous = nil
+local copied = nil
+while current do
+ if getid(current) == glyph_code then
+ local n = copy_node(current)
+ if copied then
+ setlink(previous,n)
+ else
+ copied = n
+ end
+ previous = n
+ end
+ current = getnext(current)
+end
setprev(discnext,nil) -- also blocks funny assignments
setnext(discprev,nil) -- also blocks funny assignments
if pre then
diff --git a/tex/context/base/mkiv/mtx-context-xml.tex b/tex/context/base/mkiv/mtx-context-xml.tex
index eeaca3213..9d0680e2a 100644
--- a/tex/context/base/mkiv/mtx-context-xml.tex
+++ b/tex/context/base/mkiv/mtx-context-xml.tex
@@ -65,6 +65,8 @@
moduledata.xml.analyzers.structure (files)
context.page()
moduledata.xml.analyzers.characters(files)
+ context.page()
+ moduledata.xml.analyzers.entities(files)
else
context("no action given")
end
diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua
index 5dbfed038..99e0eb604 100644
--- a/tex/context/base/mkiv/mult-def.lua
+++ b/tex/context/base/mkiv/mult-def.lua
@@ -7814,7 +7814,14 @@ return {
["en"]="finalpubsep",
},
["first"]={
+ ["cs"]="prvni",
+ ["de"]="erste",
["en"]="first",
+ ["fr"]="premier",
+ ["it"]="primo",
+ ["nl"]="eerste",
+ ["pe"]="اولی",
+ ["ro"]="primul",
},
["firstnamesep"]={
["en"]="firstnamesep",
@@ -13507,16 +13514,6 @@ return {
["pe"]="پیش‌زمینه",
["ro"]="primplan",
},
- ["formeel"]={
- ["cs"]="formeel",
- ["de"]="formeel",
- ["en"]="formeel",
- ["fr"]="formeel",
- ["it"]="formeel",
- ["nl"]="formeel",
- ["pe"]="formeel",
- ["ro"]="formeel",
- },
["formula"]={
["cs"]="rovnice",
["de"]="formel",
@@ -13877,16 +13874,6 @@ return {
["pe"]="نمایه‌ها",
["ro"]="indexuri",
},
- ["informeel"]={
- ["cs"]="informeel",
- ["de"]="informeel",
- ["en"]="informeel",
- ["fr"]="informeel",
- ["it"]="informeel",
- ["nl"]="informeel",
- ["pe"]="informeel",
- ["ro"]="informeel",
- },
["inherit"]={
["cs"]="inherit",
["de"]="inherit",
@@ -14418,6 +14405,9 @@ return {
["pe"]="خطها",
["ro"]="linii",
},
+ ["linked"]={
+ ["en"]="linked",
+ },
["list"]={
["cs"]="seznam",
["de"]="liste",
@@ -15623,16 +15613,6 @@ return {
["pe"]="منظم",
["ro"]="regular",
},
- ["rekening"]={
- ["cs"]="rekening",
- ["de"]="rekening",
- ["en"]="rekening",
- ["fr"]="rekening",
- ["it"]="rekening",
- ["nl"]="rekening",
- ["pe"]="rekening",
- ["ro"]="rekening",
- },
["relative"]={
["cs"]="relativni",
["de"]="relativ",
diff --git a/tex/context/base/mkiv/scrn-but.lua b/tex/context/base/mkiv/scrn-but.lua
index 85cbf0b39..c791f9718 100644
--- a/tex/context/base/mkiv/scrn-but.lua
+++ b/tex/context/base/mkiv/scrn-but.lua
@@ -7,15 +7,15 @@ if not modules then modules = { } end modules ['scrn-but'] = {
}
local context = context
-local f_two_colon = string.formatters["%s:%s"]
+local f_two_colon = string.formatters["%s:%s:%s"]
+local v_section = interfaces.variables.section
local function registerbuttons(tag,register,language)
local data = sorters.definitions[language]
local orders = data and data.orders or sorters.definitions.default.orders
- local tag = tag == "" and { "" } or { tag }
for i=1,#orders do
local order = orders[i]
- context.menubutton(tag,f_two_colon(register,order),order)
+ context.doregistermenubutton(tag, order, f_two_colon(register,v_section,order) )
end
end
diff --git a/tex/context/base/mkiv/scrn-but.mkvi b/tex/context/base/mkiv/scrn-but.mkvi
index 1d5ffe6f3..98d9f2daa 100644
--- a/tex/context/base/mkiv/scrn-but.mkvi
+++ b/tex/context/base/mkiv/scrn-but.mkvi
@@ -150,7 +150,7 @@
\expandafter\let\csname\??buttonlocation\v!none \endcsname\plusthree
\expandafter\let\csname\??buttonlocation\v!normal \endcsname\plusone % default
\expandafter\let\csname\??buttonlocation\s!default\endcsname\plusone % default
-\expandafter\let\csname\??buttonlocation\s!empty \endcsname\plusone % default
+\expandafter\let\csname\??buttonlocation \endcsname\plusone % default
\newconditional\c_scrn_button_skipped
@@ -1022,15 +1022,22 @@
{\dodoubleempty\scrn_menu_register_menu_buttons}
\def\scrn_menu_register_menu_buttons[#menu][#register]%
- {\ifsecondargument
- \clf_registerbuttons{menu}{#register}{\currentlanguage}%
+ {\begingroup
+ \ifsecondargument
+ \clf_registerbuttons{#menu}{#register}{\currentlanguage}%
\else
\clf_registerbuttons{}{#menu}{\currentlanguage}%
- \fi}
+ \fi
+ \removeunwantedspaces
+ \endgroup}
+
+\def\doregistermenubutton#1#2#3% used at lua end
+ {\scrn_menu_menu_button_c{#1}{#2}{#3}%
+ \space}
% or less readable:
%
% \def\scrn_menu_register_menu_buttons[#menu][#register]%
-% {\clf_registerbuttons\ifsecondargument{menu}{#register}\else{}{#menu}\fi{\currentlanguage}}
+% {\clf_registerbuttons\ifsecondargument{#menu}{#register}\else{}{#menu}\fi{\currentlanguage}}
\protect \endinput
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index e82c04d33..061919207 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 81020316e..ff140b349 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-lev.lua b/tex/context/base/mkiv/strc-lev.lua
index d7ffd6af4..ec5dcf6f0 100644
--- a/tex/context/base/mkiv/strc-lev.lua
+++ b/tex/context/base/mkiv/strc-lev.lua
@@ -7,6 +7,7 @@ if not modules then modules = { } end modules ['strc-lev'] = {
}
local insert, remove = table.insert, table.remove
+local settings_to_array = utilities.parsers.settings_to_array
local context = context
local interfaces = interfaces
@@ -15,6 +16,7 @@ local sections = structures.sections
local implement = interfaces.implement
local v_default = interfaces.variables.default
+local v_auto = interfaces.variables.auto
sections.levels = sections.levels or { }
@@ -27,29 +29,46 @@ local f_two_colon = string.formatters["%s:%s"]
storage.register("structures/sections/levels", levels, "structures.sections.levels")
local function definesectionlevels(category,list)
- levels[category] = utilities.parsers.settings_to_array(list)
+ list = settings_to_array(list)
+ for i=1,#list do
+ list[i] = settings_to_array(list[i])
+ end
+ levels[category] = list
end
-local function startsectionlevel(category)
+local function startsectionlevel(n,category,current)
category = category ~= "" and category or v_default
- level = level + 1
local lc = levels[category]
+ for i=1,#lc do
+ local lcl = lc[i]
+ if (lcl[n] or lcl[1]) == current then
+ level = i
+ break
+ end
+ end
+ level = level + 1
if not lc or level > #lc then
context.nostarthead { f_two_colon(category,level) }
else
- context.dostarthead { lc[level] }
+ local lcl = lc[level]
+ if n > #lcl then
+ n = #lcl
+ end
+ context.dostarthead { lc[level][n] }
end
- insert(categories,category)
+ insert(categories,{ category, n })
end
local function stopsectionlevel()
- local category = remove(categories)
- if category then
+ local top = remove(categories)
+ if top then
+ local category = top[1]
+ local n = top[2]
local lc = levels[category]
if not lc or level > #lc then
context.nostophead { f_two_colon(category,level) }
else
- context.dostophead { lc[level] }
+ context.dostophead { lc[level][n] }
end
level = level - 1
else
@@ -60,13 +79,13 @@ end
implement {
name = "definesectionlevels",
actions = definesectionlevels,
- arguments = { "string", "string" }
+ arguments = { "string", "string" },
}
implement {
name = "startsectionlevel",
actions = startsectionlevel,
- arguments = "string"
+ arguments = { "integer", "string", "string" },
}
implement {
diff --git a/tex/context/base/mkiv/strc-lev.mkvi b/tex/context/base/mkiv/strc-lev.mkvi
index dae3f28e3..ac106f999 100644
--- a/tex/context/base/mkiv/strc-lev.mkvi
+++ b/tex/context/base/mkiv/strc-lev.mkvi
@@ -24,19 +24,25 @@
\unprotect
\unexpanded\def\definesectionlevels{\dodoubleargument\strc_levels_define}
-\unexpanded\def\startsectionlevel {\dosingleempty \strc_levels_start }
+\unexpanded\def\startsectionlevel {\dosingleempty \strc_levels_start_section}
+\unexpanded\def\startsubjectlevel {\dosingleempty \strc_levels_start_subject}
\unexpanded\def\strc_levels_define[#category][#list]{\clf_definesectionlevels{#category}{#list}}
-\unexpanded\def\strc_levels_start [#category]{\clf_startsectionlevel{#category}}
\unexpanded\def\stopsectionlevel {\clf_stopsectionlevel}
+\unexpanded\def\stopsubjectlevel {\clf_stopsectionlevel}
\unexpanded\def\nostarthead{\dotripleargument\strc_levels_start_nop} % used at the lua end
\unexpanded\def\nostophead {\dosingleargument\strc_levels_stop_nop } % used at the lua end
-\unexpanded\def\strc_levels_start[#category]%
- {\doifelseassignment{#category}
- {\clf_startsectionlevel{\v!default}[#category]}
- {\clf_startsectionlevel{#category}}}
+\unexpanded\def\strc_levels_start_section[#category]%
+ {\doifelseassignment{#category}%
+ {\clf_startsectionlevel\plusone{\v!default}{\currentnamedsection}[#category]}%
+ {\clf_startsectionlevel\plusone {}{\currentnamedsection}{#category}}}
+
+\unexpanded\def\strc_levels_start_subject[#category]%
+ {\doifelseassignment{#category}%
+ {\clf_startsectionlevel\plustwo{\v!default}{\currentnamedsection}[#category]}%
+ {\clf_startsectionlevel\plustwo {#category}{\currentnamedsection}}}
\unexpanded\def\strc_levels_start_nop[#category][#settings][#userdata]%
{\blank
@@ -50,13 +56,12 @@
\definesectionlevels
[\v!default]
- [\v!chapter,
- \v!section,
- \v!subsection,
- \v!subsubsection,
- \v!subsubsubsection,
- \v!subsubsubsubsection]
-
+ [{\v!chapter,\v!title},
+ {\v!section,\v!subject},
+ {\v!subsection,\v!subsubject},
+ {\v!subsubsection,\v!subsubsubject},
+ {\v!subsubsubsection,\v!subsubsubject},
+ {\v!subsubsubsubsection,\v!subsubsubject}]
\let\definestructurelevels\definesectionlevels
\let\startstructurelevel \startsectionlevel
diff --git a/tex/context/base/mkiv/strc-lst.mkvi b/tex/context/base/mkiv/strc-lst.mkvi
index e7ed0f1f2..5c2bd74e5 100644
--- a/tex/context/base/mkiv/strc-lst.mkvi
+++ b/tex/context/base/mkiv/strc-lst.mkvi
@@ -82,6 +82,7 @@
\unexpanded\def\usenestedliststyleandcolor#style#color% will change
{\useliststyleandcolor#style#color%
+ % how about style
\ifx\currentcolorparameter\empty \else
\resetinteractionparameter\c!color
\resetinteractionparameter\c!contrastcolor
diff --git a/tex/context/base/mkiv/strc-pag.lua b/tex/context/base/mkiv/strc-pag.lua
index 96d26e6f6..dcd35fc20 100644
--- a/tex/context/base/mkiv/strc-pag.lua
+++ b/tex/context/base/mkiv/strc-pag.lua
@@ -263,12 +263,23 @@ function helpers.prefix(data,prefixspec)
end
end
+function helpers.pageofinternal(n,prefixspec,pagespec)
+ local data = structures.references.internals[n]
+ if not data then
+ -- error
+ elseif prefixspec then
+ helpers.prefixpage(data,prefixspec,pagespec)
+ else
+ helpers.prefix(data,pagespec)
+ end
+end
+
function pages.is_odd(n)
n = n or texgetcount("realpageno")
if texgetcount("pagenoshift") % 2 == 0 then
- return n % 2 == 0
- else
return n % 2 ~= 0
+ else
+ return n % 2 == 0
end
end
@@ -277,9 +288,9 @@ function pages.on_right(n)
if pagemode == 2 or pagemode == 1 then
n = n or texgetcount("realpageno")
if texgetcount("pagenoshift") % 2 == 0 then
- return n % 2 == 0
- else
return n % 2 ~= 0
+ else
+ return n % 2 == 0
end
else
return true
@@ -399,3 +410,9 @@ implement { -- weird place
}
}
}
+
+interfaces.implement {
+ name = "pageofinternal",
+ arguments = { "integer" },
+ actions = helpers.pageofinternal,
+}
diff --git a/tex/context/base/mkiv/strc-ref.lua b/tex/context/base/mkiv/strc-ref.lua
index c3b852e89..de0577423 100644
--- a/tex/context/base/mkiv/strc-ref.lua
+++ b/tex/context/base/mkiv/strc-ref.lua
@@ -2421,9 +2421,7 @@ local function setreferencerealpage(actions)
if not actions then
actions = references.currentset
end
- if not actions then
- return 0
- else
+ if type(actions) == "table" then
local realpage = actions.realpage
if realpage then
return realpage
@@ -2443,8 +2441,8 @@ local function setreferencerealpage(actions)
end
end
actions.realpage = 0
- return 0
end
+ return 0
end
references.setreferencerealpage = setreferencerealpage
diff --git a/tex/context/base/mkiv/strc-ref.mkvi b/tex/context/base/mkiv/strc-ref.mkvi
index 177abd835..96cb61b4a 100644
--- a/tex/context/base/mkiv/strc-ref.mkvi
+++ b/tex/context/base/mkiv/strc-ref.mkvi
@@ -1593,7 +1593,7 @@
\attribute\referenceattribute\attributeunsetvalue
\iflocation
\setstrut % can be option
- \strc_references_get_simple_reference{internal(#internal)}%
+ \strc_references_get_simple_reference{#internal}%
\global\lastsavedreferenceattribute\currentreferenceattribute
\attribute\referenceattribute\currentreferenceattribute
\setlocationattributes
diff --git a/tex/context/base/mkiv/strc-reg.lua b/tex/context/base/mkiv/strc-reg.lua
index 4efbe038b..66c264a49 100644
--- a/tex/context/base/mkiv/strc-reg.lua
+++ b/tex/context/base/mkiv/strc-reg.lua
@@ -40,8 +40,12 @@ local variables = interfaces.variables
local v_forward = variables.forward
local v_all = variables.all
local v_yes = variables.yes
+local v_packed = variables.packed
local v_current = variables.current
local v_previous = variables.previous
+local v_next = variables.next
+local v_first = variables.first
+local v_last = variables.last
local v_text = variables.text
local context = context
@@ -86,6 +90,7 @@ local ctx_registerentry = context.registerentry
local ctx_registerseeword = context.registerseeword
local ctx_registerpagerange = context.registerpagerange
local ctx_registeronepage = context.registeronepage
+local ctx_registerpacked = context.registerpacked
-- possible export, but ugly code (overloads)
--
@@ -995,6 +1000,14 @@ local function pagenumber(entry,prefixspec,pagespec)
)
end
+local function packed(f_entry,t_entry)
+ local fer, ter = f_entry.references, t_entry.references
+ ctx_registerpacked(
+ fer.internal or 0,
+ ter.internal or 0
+ )
+end
+
local function collapsedpage(pages)
for i=2,#pages do
local first, second = pages[i-1], pages[i]
@@ -1059,8 +1072,10 @@ local function collapsepages(pages)
end
function registers.flush(data,options,prefixspec,pagespec)
- local collapse_singles = options.compress == v_yes
- local collapse_ranges = options.compress == v_all
+ local compress = options.compress
+ local collapse_singles = compress == v_yes
+ local collapse_ranges = compress == v_all
+ local collapse_packed = compress == v_packed
local show_page_number = options.pagenumber ~= false -- true or false
local result = data.result
local maxlevel = 0
@@ -1237,6 +1252,28 @@ function registers.flush(data,options,prefixspec,pagespec)
else
pagenumber(entry,prefixspec,pagespec)
end
+ elseif collapse_packed then
+ local first = nil
+ local last = nil
+ while true do
+ if not first then
+ first = entry
+ end
+ last = entry
+ if d == #data then
+ break
+ else
+ d = d + 1
+ local next = data[d]
+ if next.metadata.kind == "see" or not equal(entry.list,next.list) then
+ d = d - 1
+ break
+ else
+ entry = next
+ end
+ end
+ end
+ packed(first,last) -- returns internals
else
while true do
if entry.references.lastrealpage then
@@ -1352,3 +1389,67 @@ implement {
}
}
}
+
+-- linked registers
+
+function registers.findinternal(tag,where,n)
+ -- local collected = registers.collected
+ local current = collected[tag]
+ if not current then
+ return 0
+ end
+ local entries = current.entries
+ if not entries then
+ return 0
+ end
+ local entry = entries[n]
+ if not entry then
+ return 0
+ end
+ local list = entry.list
+ local size = #list
+ --
+ local start, stop, step
+ if where == v_previous then
+ start = n - 1
+ stop = 1
+ step = -1
+ elseif where == v_first then
+ start = 1
+ stop = #entries
+ step = 1
+ elseif where == v_last then
+ start = #entries
+ stop = 1
+ step = -1
+ else
+ start = n + 1
+ stop = #entries
+ step = 1
+ end
+ --
+ for i=start,stop,step do
+ local r = entries[i]
+ local l = r.list
+ local s = #l
+ if s == size then
+ local ok = true
+ for i=1,size do
+ if list[i][1] ~= l[i][1] then
+ ok = false
+ break
+ end
+ end
+ if ok then
+ return r.references.internal or 0
+ end
+ end
+ end
+ return 0
+end
+
+interfaces.implement {
+ name = "findregisterinternal",
+ arguments = { "string", "string", "integer" },
+ actions = { registers.findinternal, context },
+}
diff --git a/tex/context/base/mkiv/strc-reg.mkiv b/tex/context/base/mkiv/strc-reg.mkiv
index 1d28db8df..5b32c6fc8 100644
--- a/tex/context/base/mkiv/strc-reg.mkiv
+++ b/tex/context/base/mkiv/strc-reg.mkiv
@@ -159,6 +159,9 @@
%D Registering:
+\global\let\currentregistername \empty
+\global\let\currentregisternumber\!!zerocount
+
\def\strc_registers_register_page_entry
{\iftrialtypesetting
\expandafter\gobblethreearguments
@@ -250,6 +253,7 @@
\setnextinternalreference
% we could consider storing register entries in a list which we
% could then sort
+ \glet\currentregistername\currentregister
\xdef\currentregisternumber{\clf_storeregister % 'own' should not be in metadata
metadata {%
name {\currentregister}%
@@ -315,6 +319,7 @@
{\begingroup
\edef\currentregister{#1}%
\setnextinternalreference
+ \glet\currentregistername\currentregister
\xdef\currentregisternumber{\clf_storeregister
{%
metadata {%
@@ -771,6 +776,16 @@
\newdimen\d_strc_registers_hangindent
\newcount\c_strc_registers_hangafter
+\unexpanded\def\usenestedregisterstyleandcolor#1#2% will change
+ {\useregisterstyleandcolor#1#2%
+ % how about style
+ \ifconditional\c_strc_registers_text_interaction
+ \ifx\currentcolorparameter\empty \else
+ \resetinteractionparameter\c!color
+ \resetinteractionparameter\c!contrastcolor
+ \fi
+ \fi}
+
\unexpanded\def\startregisterentries#1% depth
{\endgraf
\begingroup
@@ -778,7 +793,7 @@
\dostarttagged\t!registerentries\empty
\let\savedcurrentregister\currentregister
\edef\currentregister{\currentregister:\number\scratchcounter}%
- \useregisterstyleandcolor\c!textstyle\c!textcolor
+ \usenestedregisterstyleandcolor\c!textstyle\c!textcolor
\ifnum\scratchcounter>\plusone
\advance\leftskip\d_strc_registers_distance\relax
\fi
@@ -863,7 +878,7 @@
\unexpanded\def\withregisterpagecommand#1#2#3#4%
{\def\currentregisterpageindex{#2}%
\iflocation
- \strc_references_goto_internal{\applyprocessor{#1}{\registerparameter\c!pagecommand{#4}}}[#2]%
+ \strc_references_goto_internal{\applyprocessor{#1}{\registerparameter\c!pagecommand{#4}}}[internal(#2)]%
\else
\applyprocessor{#1}{\registerparameter\c!pagecommand{#4}}%
\fi}
@@ -888,18 +903,6 @@
\dostoptagged
\dostoptagged}
-% \unexpanded\def\defaultregisterentry#1#2#3#4% #1:processor #2:internal #3:seeindex #4:word
-% {\def\currentregisterpageindex{#2}%
-% \iflocation
-% \def\currentregisterseeindex{#3}%
-% \doifelse{\registerparameter\c!interaction}\v!text
-% {\directgoto{\setlocationcolor\doapplyregisterentrycommand{#1}{#4}}[internal(#2)]}
-% {\doapplyregisterentrycommand{#1}{#4}}%
-% \else
-% \let\currentregisterseeindex\empty
-% \doapplyregisterentrycommand{#1}{#4}%
-% \fi}
-
\unexpanded\def\defaultregisterentry#1#2#3#4% #1:processor #2:internal #3:seeindex #4:word
{\def\currentregisterpageindex{#2}%
\iflocation
@@ -923,14 +926,6 @@
\applyprocessor{#1}{\registerparameter\c!textcommand{\limitedregisterentry{\registerparameter\c!deeptextcommand{#2}}}}%
\dostoptagged}
-% \unexpanded\def\doapplyregisterseecommand#1#2%
-% {\ifx\currentregisterseeindex\empty
-% % \dontleavehmode
-% \applyprocessor{#1}{#2}%
-% \else
-% \goto{\applyprocessor{#1}{#2}}[seeindex:\currentregisterseeindex]%
-% \fi}
-
\unexpanded\def\doapplyregisterseecommand#1#2%
{\ifx\currentregisterseeindex\empty
\applyprocessor{#1}{#2}%
@@ -1032,6 +1027,48 @@
%D The linked register code will be reimplemented (not that hard) when it's needed
%D again and/or when I'm bored.
+ \def\findregisterinternal#1#2#3{\clf_findregisterinternal{#1}{#2}#3\relax}
+\unexpanded\def\pageofinternal #1{\clf_pageofinternal#1\relax}
+
+\unexpanded\def\linkedregisterentrylink#1#2#3#4% tag where before after
+ {\iflocation
+ \scratchcounter\findregisterinternal{#1}{#2}\currentregisternumber\relax\relax
+ \ifcase\scratchcounter\else
+ #3\relax
+ \goto{\symbol[#2]}[internal(\the\scratchcounter)]%
+ #4\relax
+ \fi
+ \else
+ % \scratchcounter\findregisterinternal{#1}{#2}\currentregisternumber\relax\relax
+ % \ifcase\scratchcounter\else
+ % #3\relax
+ % \pageofinternal\scratchcounter
+ % #4\relax
+ % \fi
+ \fi}
+
+\unexpanded\def\linkedregisterentry#1%
+ {\dontleavehmode
+ \begingroup
+ \setbox\scratchbox\hbox{#1}%
+ \linkedregisterentrylink\currentregistername\v!previous\relax\nobreakspace
+ \unhbox\scratchbox
+ \linkedregisterentrylink\currentregistername\v!next\nobreakspace\relax
+ \endgroup}
+
+\unexpanded\def\registerpacked#1#2%
+ {\iflocation
+ \hskip\d_strc_registers_distance\relax
+ \nobreak
+ \ifnum#1=#2\relax
+ \goto{\symbol[\v!somewhere]}[internal(#1)]%
+ \else
+ \goto{\symbol[\v!first]}[internal(#1)]%
+ \nobreakspace
+ \goto{\symbol[\v!last]}[internal(#2)]%
+ \fi
+ \fi}
+
%D Default index:
\defineregister
diff --git a/tex/context/base/mkiv/strc-sec.mkiv b/tex/context/base/mkiv/strc-sec.mkiv
index c78cffbff..657e6c866 100644
--- a/tex/context/base/mkiv/strc-sec.mkiv
+++ b/tex/context/base/mkiv/strc-sec.mkiv
@@ -11,6 +11,9 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
+%D In retrospect I should have gone futher and move more to the
+%D \LUA\ end but here we are now. Maybe some day.
+
\writestatus{loading}{ConTeXt Structure Macros / Sectioning}
\unprotect
@@ -480,14 +483,8 @@
% todo: add grouping but where: before/after trickery .. probably inside because one can always add
% grouping to the before/after settings
-\unexpanded\def\strc_sectioning_start_named_section[#1]% [#2][#3]
- {\pushmacro\currentnamedsection
- \edef\currentnamedsection{#1}%
- \normalexpanded{\strc_sectioning_start_named_section_indeed[\currentnamedsection]}} % [#2][#3]
-
\unexpanded\def\stopnamedsection
- {\normalexpanded{\strc_sectioning_stop[\currentnamedsection]}%
- \popmacro\currentnamedsection}
+ {\normalexpanded{\strc_sectioning_stop[\currentnamedsection]}}
% structure sections (the parents of chapter etc)
@@ -603,9 +600,9 @@
% head construction
-\unexpanded\def\strc_sectioning_handle_own{\dodoubleempty\strc_sectioning_handle_own_indeed} % [ref] {nr} {title}
-\unexpanded\def\strc_sectioning_handle_nop{\dodoubleempty\strc_sectioning_handle_nop_indeed} % [ref] {title}
-\unexpanded\def\strc_sectioning_start {\dotripleempty\strc_sectioning_start_named_section_indeed} % [settings] [userdata] !!! also used at lua end
+\unexpanded\def\strc_sectioning_handle_own{\dodoubleempty\strc_sectioning_handle_own_indeed} % [ref] {nr} {title}
+\unexpanded\def\strc_sectioning_handle_nop{\dodoubleempty\strc_sectioning_handle_nop_indeed} % [ref] {title}
+\unexpanded\def\strc_sectioning_start {\dotripleempty\strc_sectioning_start_named_section} % [settings] [userdata] !!! also used at lua end
\newconditional\currentstructureown
@@ -628,8 +625,10 @@
\unexpanded\def\strc_sectioning_handle_nop_indeed_nop#1#2#3%
{\strc_sectioning_handle{#1}{\c!reference={#2},\c!title={#3}}{}} % name ref nr title --
-\unexpanded\def\strc_sectioning_start_named_section_indeed[#1][#2][#3]% for the moment no grouping, too annoying with page breaks
- {\setfalse\currentstructureown
+\unexpanded\def\strc_sectioning_start_named_section[#1][#2][#3]% for the moment no grouping, too annoying with page breaks
+ {\pushmacro\currentnamedsection
+ \edef\currentnamedsection{#1}%
+ \setfalse\currentstructureown
%\globalpushmacro\currenthead % this does not work out well
\xdef\currenthead{#1}%
\setsystemmode\currenthead % new, also here now
@@ -647,7 +646,8 @@
\xdef\currenthead{#1}% recover
\headparameter\c!aftersection
\the\everyafterhead
- \resetsystemmode\currenthead} % new, also here now
+ \resetsystemmode\currenthead
+ \popmacro\currentnamedsection} % new, also here now
\let\dostarthead\strc_sectioning_start % used at lua end
\let\dostophead \strc_sectioning_stop % used at lua end
diff --git a/tex/context/interface/mkii/keys-cs.xml b/tex/context/interface/mkii/keys-cs.xml
index 01504609a..e8df8ee30 100644
--- a/tex/context/interface/mkii/keys-cs.xml
+++ b/tex/context/interface/mkii/keys-cs.xml
@@ -208,7 +208,6 @@
<cd:variable name='footnote' value='poznamkapodcarou'/>
<cd:variable name='force' value='sila'/>
<cd:variable name='foreground' value='popredi'/>
- <cd:variable name='formeel' value='formeel'/>
<cd:variable name='formula' value='rovnice'/>
<cd:variable name='formulae' value='rovnice'/>
<cd:variable name='forward' value='vpred'/>
@@ -245,7 +244,6 @@
<cd:variable name='inbetween' value='mezi'/>
<cd:variable name='index' value='rejstrik'/>
<cd:variable name='indices' value='rejstriky'/>
- <cd:variable name='informeel' value='informeel'/>
<cd:variable name='inherit' value='inherit'/>
<cd:variable name='ininner' value='ininner'/>
<cd:variable name='ininneredge' value='ininneredge'/>
@@ -306,6 +304,7 @@
<cd:variable name='line' value='radek'/>
<cd:variable name='linenote' value='linenote'/>
<cd:variable name='lines' value='radky'/>
+ <cd:variable name='linked' value='linked'/>
<cd:variable name='list' value='seznam'/>
<cd:variable name='local' value='lokalne'/>
<cd:variable name='localenvironment' value='lokalnihoprostredi'/>
@@ -441,7 +440,6 @@
<cd:variable name='referral' value='znacka'/>
<cd:variable name='register' value='rejstrik'/>
<cd:variable name='regular' value='pravidelne'/>
- <cd:variable name='rekening' value='rekening'/>
<cd:variable name='relative' value='relativni'/>
<cd:variable name='repeat' value='opakovat'/>
<cd:variable name='required' value='pozadovane'/>
@@ -796,7 +794,7 @@
<cd:constant name='finalnamesep' value='finalnamesep'/>
<cd:constant name='finalpagesep' value='finalpagesep'/>
<cd:constant name='finalpubsep' value='finalpubsep'/>
- <cd:constant name='first' value='first'/>
+ <cd:constant name='first' value='prvni'/>
<cd:constant name='firstnamesep' value='firstnamesep'/>
<cd:constant name='firstpage' value='prvnistranka'/>
<cd:constant name='focus' value='zaostreni'/>
diff --git a/tex/context/interface/mkii/keys-de.xml b/tex/context/interface/mkii/keys-de.xml
index 97a8ef09b..94314bf61 100644
--- a/tex/context/interface/mkii/keys-de.xml
+++ b/tex/context/interface/mkii/keys-de.xml
@@ -208,7 +208,6 @@
<cd:variable name='footnote' value='fussnote'/>
<cd:variable name='force' value='zwinge'/>
<cd:variable name='foreground' value='vordergrund'/>
- <cd:variable name='formeel' value='formeel'/>
<cd:variable name='formula' value='formel'/>
<cd:variable name='formulae' value='formeln'/>
<cd:variable name='forward' value='vorwaerts'/>
@@ -245,7 +244,6 @@
<cd:variable name='inbetween' value='zwischen'/>
<cd:variable name='index' value='index'/>
<cd:variable name='indices' value='indizies'/>
- <cd:variable name='informeel' value='informeel'/>
<cd:variable name='inherit' value='inherit'/>
<cd:variable name='ininner' value='ininner'/>
<cd:variable name='ininneredge' value='ininneredge'/>
@@ -306,6 +304,7 @@
<cd:variable name='line' value='zeile'/>
<cd:variable name='linenote' value='linenote'/>
<cd:variable name='lines' value='zeilen'/>
+ <cd:variable name='linked' value='linked'/>
<cd:variable name='list' value='liste'/>
<cd:variable name='local' value='lokal'/>
<cd:variable name='localenvironment' value='lokaleumgebung'/>
@@ -441,7 +440,6 @@
<cd:variable name='referral' value='merkmal'/>
<cd:variable name='register' value='register'/>
<cd:variable name='regular' value='regular'/>
- <cd:variable name='rekening' value='rekening'/>
<cd:variable name='relative' value='relativ'/>
<cd:variable name='repeat' value='wiederholen'/>
<cd:variable name='required' value='obligatorisch'/>
@@ -796,7 +794,7 @@
<cd:constant name='finalnamesep' value='finalnamesep'/>
<cd:constant name='finalpagesep' value='finalpagesep'/>
<cd:constant name='finalpubsep' value='finalpubsep'/>
- <cd:constant name='first' value='first'/>
+ <cd:constant name='first' value='erste'/>
<cd:constant name='firstnamesep' value='firstnamesep'/>
<cd:constant name='firstpage' value='ersteseite'/>
<cd:constant name='focus' value='focus'/>
diff --git a/tex/context/interface/mkii/keys-en.xml b/tex/context/interface/mkii/keys-en.xml
index c22ee2820..b0cb6fa2c 100644
--- a/tex/context/interface/mkii/keys-en.xml
+++ b/tex/context/interface/mkii/keys-en.xml
@@ -208,7 +208,6 @@
<cd:variable name='footnote' value='footnote'/>
<cd:variable name='force' value='force'/>
<cd:variable name='foreground' value='foreground'/>
- <cd:variable name='formeel' value='formeel'/>
<cd:variable name='formula' value='formula'/>
<cd:variable name='formulae' value='formulae'/>
<cd:variable name='forward' value='forward'/>
@@ -245,7 +244,6 @@
<cd:variable name='inbetween' value='inbetween'/>
<cd:variable name='index' value='index'/>
<cd:variable name='indices' value='indices'/>
- <cd:variable name='informeel' value='informeel'/>
<cd:variable name='inherit' value='inherit'/>
<cd:variable name='ininner' value='ininner'/>
<cd:variable name='ininneredge' value='ininneredge'/>
@@ -306,6 +304,7 @@
<cd:variable name='line' value='line'/>
<cd:variable name='linenote' value='linenote'/>
<cd:variable name='lines' value='lines'/>
+ <cd:variable name='linked' value='linked'/>
<cd:variable name='list' value='list'/>
<cd:variable name='local' value='local'/>
<cd:variable name='localenvironment' value='localenvironment'/>
@@ -441,7 +440,6 @@
<cd:variable name='referral' value='referral'/>
<cd:variable name='register' value='register'/>
<cd:variable name='regular' value='regular'/>
- <cd:variable name='rekening' value='rekening'/>
<cd:variable name='relative' value='relative'/>
<cd:variable name='repeat' value='repeat'/>
<cd:variable name='required' value='required'/>
diff --git a/tex/context/interface/mkii/keys-fr.xml b/tex/context/interface/mkii/keys-fr.xml
index b03d55d6d..dae2ecfe0 100644
--- a/tex/context/interface/mkii/keys-fr.xml
+++ b/tex/context/interface/mkii/keys-fr.xml
@@ -208,7 +208,6 @@
<cd:variable name='footnote' value='notepdp'/>
<cd:variable name='force' value='force'/>
<cd:variable name='foreground' value='premierplan'/>
- <cd:variable name='formeel' value='formeel'/>
<cd:variable name='formula' value='formule'/>
<cd:variable name='formulae' value='formules'/>
<cd:variable name='forward' value='avance'/>
@@ -245,7 +244,6 @@
<cd:variable name='inbetween' value='entre'/>
<cd:variable name='index' value='index'/>
<cd:variable name='indices' value='indices'/>
- <cd:variable name='informeel' value='informeel'/>
<cd:variable name='inherit' value='herite'/>
<cd:variable name='ininner' value='ininner'/>
<cd:variable name='ininneredge' value='ininneredge'/>
@@ -306,6 +304,7 @@
<cd:variable name='line' value='ligne'/>
<cd:variable name='linenote' value='noteligne'/>
<cd:variable name='lines' value='lignes'/>
+ <cd:variable name='linked' value='linked'/>
<cd:variable name='list' value='liste'/>
<cd:variable name='local' value='local'/>
<cd:variable name='localenvironment' value='environementlocal'/>
@@ -441,7 +440,6 @@
<cd:variable name='referral' value='referral'/>
<cd:variable name='register' value='registre'/>
<cd:variable name='regular' value='regulier'/>
- <cd:variable name='rekening' value='rekening'/>
<cd:variable name='relative' value='relatif'/>
<cd:variable name='repeat' value='repete'/>
<cd:variable name='required' value='recquis'/>
@@ -796,7 +794,7 @@
<cd:constant name='finalnamesep' value='finalnamesep'/>
<cd:constant name='finalpagesep' value='finalpagesep'/>
<cd:constant name='finalpubsep' value='finalpubsep'/>
- <cd:constant name='first' value='first'/>
+ <cd:constant name='first' value='premier'/>
<cd:constant name='firstnamesep' value='firstnamesep'/>
<cd:constant name='firstpage' value='premierepage'/>
<cd:constant name='focus' value='focus'/>
diff --git a/tex/context/interface/mkii/keys-it.xml b/tex/context/interface/mkii/keys-it.xml
index 622e73f4a..0d661c5e1 100644
--- a/tex/context/interface/mkii/keys-it.xml
+++ b/tex/context/interface/mkii/keys-it.xml
@@ -208,7 +208,6 @@
<cd:variable name='footnote' value='notapdp'/>
<cd:variable name='force' value='forza'/>
<cd:variable name='foreground' value='foreground'/>
- <cd:variable name='formeel' value='formeel'/>
<cd:variable name='formula' value='formula'/>
<cd:variable name='formulae' value='formule'/>
<cd:variable name='forward' value='avanti'/>
@@ -245,7 +244,6 @@
<cd:variable name='inbetween' value='tra'/>
<cd:variable name='index' value='indiceanalitico'/>
<cd:variable name='indices' value='indicianalitici'/>
- <cd:variable name='informeel' value='informeel'/>
<cd:variable name='inherit' value='inherit'/>
<cd:variable name='ininner' value='ininner'/>
<cd:variable name='ininneredge' value='ininneredge'/>
@@ -306,6 +304,7 @@
<cd:variable name='line' value='riga'/>
<cd:variable name='linenote' value='linenote'/>
<cd:variable name='lines' value='righe'/>
+ <cd:variable name='linked' value='linked'/>
<cd:variable name='list' value='elenco'/>
<cd:variable name='local' value='locale'/>
<cd:variable name='localenvironment' value='ambientelocale'/>
@@ -441,7 +440,6 @@
<cd:variable name='referral' value='referral'/>
<cd:variable name='register' value='registro'/>
<cd:variable name='regular' value='regolare'/>
- <cd:variable name='rekening' value='rekening'/>
<cd:variable name='relative' value='relativo'/>
<cd:variable name='repeat' value='ripeti'/>
<cd:variable name='required' value='richiestp'/>
@@ -796,7 +794,7 @@
<cd:constant name='finalnamesep' value='finalnamesep'/>
<cd:constant name='finalpagesep' value='finalpagesep'/>
<cd:constant name='finalpubsep' value='finalpubsep'/>
- <cd:constant name='first' value='first'/>
+ <cd:constant name='first' value='primo'/>
<cd:constant name='firstnamesep' value='firstnamesep'/>
<cd:constant name='firstpage' value='primapagina'/>
<cd:constant name='focus' value='focus'/>
diff --git a/tex/context/interface/mkii/keys-nl.xml b/tex/context/interface/mkii/keys-nl.xml
index 21040d080..d9f192ec5 100644
--- a/tex/context/interface/mkii/keys-nl.xml
+++ b/tex/context/interface/mkii/keys-nl.xml
@@ -208,7 +208,6 @@
<cd:variable name='footnote' value='voetnoot'/>
<cd:variable name='force' value='forceer'/>
<cd:variable name='foreground' value='voorgrond'/>
- <cd:variable name='formeel' value='formeel'/>
<cd:variable name='formula' value='formule'/>
<cd:variable name='formulae' value='formules'/>
<cd:variable name='forward' value='vooruit'/>
@@ -245,7 +244,6 @@
<cd:variable name='inbetween' value='tussen'/>
<cd:variable name='index' value='index'/>
<cd:variable name='indices' value='indices'/>
- <cd:variable name='informeel' value='informeel'/>
<cd:variable name='inherit' value='erf'/>
<cd:variable name='ininner' value='inbinnen'/>
<cd:variable name='ininneredge' value='ininneredge'/>
@@ -306,6 +304,7 @@
<cd:variable name='line' value='regel'/>
<cd:variable name='linenote' value='regelnoot'/>
<cd:variable name='lines' value='regels'/>
+ <cd:variable name='linked' value='linked'/>
<cd:variable name='list' value='lijst'/>
<cd:variable name='local' value='lokaal'/>
<cd:variable name='localenvironment' value='deelomgeving'/>
@@ -441,7 +440,6 @@
<cd:variable name='referral' value='kenmerk'/>
<cd:variable name='register' value='register'/>
<cd:variable name='regular' value='regular'/>
- <cd:variable name='rekening' value='rekening'/>
<cd:variable name='relative' value='relatief'/>
<cd:variable name='repeat' value='herhaal'/>
<cd:variable name='required' value='verplicht'/>
@@ -796,7 +794,7 @@
<cd:constant name='finalnamesep' value='finalnamesep'/>
<cd:constant name='finalpagesep' value='finalpagesep'/>
<cd:constant name='finalpubsep' value='finalpubsep'/>
- <cd:constant name='first' value='first'/>
+ <cd:constant name='first' value='eerste'/>
<cd:constant name='firstnamesep' value='firstnamesep'/>
<cd:constant name='firstpage' value='eerstepagina'/>
<cd:constant name='focus' value='focus'/>
diff --git a/tex/context/interface/mkii/keys-pe.xml b/tex/context/interface/mkii/keys-pe.xml
index adf7c3e23..ec120ee06 100644
--- a/tex/context/interface/mkii/keys-pe.xml
+++ b/tex/context/interface/mkii/keys-pe.xml
@@ -208,7 +208,6 @@
<cd:variable name='footnote' value='پانوشت'/>
<cd:variable name='force' value='اجبار'/>
<cd:variable name='foreground' value='پیش‌زمینه'/>
- <cd:variable name='formeel' value='formeel'/>
<cd:variable name='formula' value='فرمول'/>
<cd:variable name='formulae' value='فرمولها'/>
<cd:variable name='forward' value='به‌جلو'/>
@@ -245,7 +244,6 @@
<cd:variable name='inbetween' value='دربین'/>
<cd:variable name='index' value='نمایه'/>
<cd:variable name='indices' value='نمایه‌ها'/>
- <cd:variable name='informeel' value='informeel'/>
<cd:variable name='inherit' value='ارث‌بردن'/>
<cd:variable name='ininner' value='درداخلی'/>
<cd:variable name='ininneredge' value='ininneredge'/>
@@ -306,6 +304,7 @@
<cd:variable name='line' value='خط'/>
<cd:variable name='linenote' value='خط‌نوشت'/>
<cd:variable name='lines' value='خطها'/>
+ <cd:variable name='linked' value='linked'/>
<cd:variable name='list' value='لیست'/>
<cd:variable name='local' value='موضعی'/>
<cd:variable name='localenvironment' value='محیط‌موضعی'/>
@@ -441,7 +440,6 @@
<cd:variable name='referral' value='مراجعه'/>
<cd:variable name='register' value='ثبت'/>
<cd:variable name='regular' value='منظم'/>
- <cd:variable name='rekening' value='rekening'/>
<cd:variable name='relative' value='نسبی'/>
<cd:variable name='repeat' value='تکرار'/>
<cd:variable name='required' value='موردنیاز'/>
@@ -796,7 +794,7 @@
<cd:constant name='finalnamesep' value='finalnamesep'/>
<cd:constant name='finalpagesep' value='finalpagesep'/>
<cd:constant name='finalpubsep' value='finalpubsep'/>
- <cd:constant name='first' value='first'/>
+ <cd:constant name='first' value='اولی'/>
<cd:constant name='firstnamesep' value='firstnamesep'/>
<cd:constant name='firstpage' value='صفحه‌اول'/>
<cd:constant name='focus' value='تمرکز'/>
diff --git a/tex/context/interface/mkii/keys-ro.xml b/tex/context/interface/mkii/keys-ro.xml
index 474a2ade5..71fa22e92 100644
--- a/tex/context/interface/mkii/keys-ro.xml
+++ b/tex/context/interface/mkii/keys-ro.xml
@@ -208,7 +208,6 @@
<cd:variable name='footnote' value='notasubsol'/>
<cd:variable name='force' value='fortat'/>
<cd:variable name='foreground' value='primplan'/>
- <cd:variable name='formeel' value='formeel'/>
<cd:variable name='formula' value='formula'/>
<cd:variable name='formulae' value='formule'/>
<cd:variable name='forward' value='avans'/>
@@ -245,7 +244,6 @@
<cd:variable name='inbetween' value='intre'/>
<cd:variable name='index' value='index'/>
<cd:variable name='indices' value='indexuri'/>
- <cd:variable name='informeel' value='informeel'/>
<cd:variable name='inherit' value='inherit'/>
<cd:variable name='ininner' value='ininner'/>
<cd:variable name='ininneredge' value='ininneredge'/>
@@ -306,6 +304,7 @@
<cd:variable name='line' value='linie'/>
<cd:variable name='linenote' value='linenote'/>
<cd:variable name='lines' value='linii'/>
+ <cd:variable name='linked' value='linked'/>
<cd:variable name='list' value='lista'/>
<cd:variable name='local' value='local'/>
<cd:variable name='localenvironment' value='mediulocal'/>
@@ -441,7 +440,6 @@
<cd:variable name='referral' value='referinta'/>
<cd:variable name='register' value='registru'/>
<cd:variable name='regular' value='regular'/>
- <cd:variable name='rekening' value='rekening'/>
<cd:variable name='relative' value='relativ'/>
<cd:variable name='repeat' value='repetat'/>
<cd:variable name='required' value='obligatoriu'/>
@@ -796,7 +794,7 @@
<cd:constant name='finalnamesep' value='finalnamesep'/>
<cd:constant name='finalpagesep' value='finalpagesep'/>
<cd:constant name='finalpubsep' value='finalpubsep'/>
- <cd:constant name='first' value='first'/>
+ <cd:constant name='first' value='primul'/>
<cd:constant name='firstnamesep' value='firstnamesep'/>
<cd:constant name='firstpage' value='primapagina'/>
<cd:constant name='focus' value='focus'/>
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 1618b88cb..8aec86795 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 2ad52535e..51ca820cd 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-section.xml b/tex/context/interface/mkiv/i-section.xml
index 05368f93f..32b79323d 100644
--- a/tex/context/interface/mkiv/i-section.xml
+++ b/tex/context/interface/mkiv/i-section.xml
@@ -613,6 +613,14 @@
</cd:arguments>
</cd:command>
+ <cd:command name="subjectlevel" type="environment" file="strc-lev.mkvi">
+ <cd:arguments>
+ <cd:resolve name="keyword-name-optional"/>
+ <cd:resolve name="assignment-sectiondata-list-optional"/>
+ <cd:resolve name="assignment-userdata-list-optional"/>
+ </cd:arguments>
+ </cd:command>
+
<cd:command name="defineheadalternative" file="strc-ren.mkiv">
<cd:arguments>
<cd:resolve name="keyword-name"/>
@@ -668,4 +676,4 @@
<cd:command name="headnumberdistance" file="strc-ren.mkiv"/>
-</cd:interface> \ No newline at end of file
+</cd:interface>
diff --git a/tex/context/modules/mkiv/m-nodechart.lua b/tex/context/modules/mkiv/m-nodechart.lua
index da80faed9..8273f365a 100644
--- a/tex/context/modules/mkiv/m-nodechart.lua
+++ b/tex/context/modules/mkiv/m-nodechart.lua
@@ -133,23 +133,23 @@ local function flow_nodes_to_chart(specification)
end
else
if pre then
- commands.flow_set_connection("+rl","",tostring(pre))
+ commands.flow_set_connection("rl","",tostring(pre))
end
if rep then
- commands.flow_set_connection("rl","",tostring(rep))
+ commands.flow_set_connection("+rl","",tostring(rep))
end
if pos then
commands.flow_set_connection("-rl","",tostring(pos))
end
commands.flow_stop_cell()
if pre then
- n = flow_nodes_to_chart{ head = pre, comment = "prebreak", x = x+1, y = y-2 }
+ n = flow_nodes_to_chart{ head = pre, comment = "prebreak", x = x+1, y = y-1 }
end
if rep then
- n = flow_nodes_to_chart{ head = rep, comment = "replacement", x = x+1, y = y-1 }
+ n = flow_nodes_to_chart{ head = rep, comment = "replacement", x = x+3, y = y-1 }
end
if pos then
- n = flow_nodes_to_chart{ head = pos, comment = "postbreak", x = x+1, y = y }
+ n = flow_nodes_to_chart{ head = pos, comment = "postbreak", x = x+2, y = y-1 }
end
end
elseif nodecode == "hlist" then
diff --git a/tex/context/modules/mkiv/s-xml-analyzers.lua b/tex/context/modules/mkiv/s-xml-analyzers.lua
index 9de6471d1..c356d4c37 100644
--- a/tex/context/modules/mkiv/s-xml-analyzers.lua
+++ b/tex/context/modules/mkiv/s-xml-analyzers.lua
@@ -20,6 +20,7 @@ local chardata = characters.data
local tags = { }
local char = { }
local attr = { }
+local ents = { }
local name = nil
local function analyze(filename)
@@ -40,6 +41,7 @@ local function analyze(filename)
tags = { }
char = { }
attr = { }
+ ents = { }
table.setmetatableindex(tags,function(t,k)
local v = {
@@ -62,6 +64,11 @@ local function analyze(filename)
return 0
end)
+ table.setmetatableindex(ents,function(t,k)
+ t[k] = 0
+ return 0
+ end)
+
local function collect(e,parent)
local dt = e.dt
if e.special then
@@ -112,12 +119,19 @@ local function analyze(filename)
end
for i=1,#filename do
- collect(xml.load(filename[i]))
+ local root = xml.load(filename[i])
+ collect(root)
+ --
+ local names = root.statistics.entities.names
+ for n in next, names do
+ ents[n] = ents[n] + 1
+ end
end
table.setmetatableindex(tags,nil)
table.setmetatableindex(char,nil)
table.setmetatableindex(attr,nil)
+ table.setmetatableindex(ents,nil)
end
@@ -170,3 +184,15 @@ function moduledata.xml.analyzers.characters(filename)
context.stoptabulate()
end
+function moduledata.xml.analyzers.entities(filename)
+ analyze(filename)
+ context.starttabulate { "|l|r|" }
+ for e, n in table.sortedhash(ents) do
+ NC() context(e)
+ NC() context(n)
+ NC() NR()
+ end
+ context.stoptabulate()
+end
+
+
diff --git a/tex/context/modules/mkiv/s-xml-analyzers.mkiv b/tex/context/modules/mkiv/s-xml-analyzers.mkiv
index ed033bcfa..af11fc984 100644
--- a/tex/context/modules/mkiv/s-xml-analyzers.mkiv
+++ b/tex/context/modules/mkiv/s-xml-analyzers.mkiv
@@ -17,6 +17,7 @@
\installmodulecommandluasingle \showxmlstructure {moduledata.xml.analyzers.structure}
\installmodulecommandluasingle \showxmlcharacters {moduledata.xml.analyzers.characters}
+\installmodulecommandluasingle \showxmlentities {moduledata.xml.analyzers.entities}
\stopmodule
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 09a24b922..ab81bc6c5 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 : 04/22/16 09:10:04
+-- merge date : 04/25/16 13:30:09
do -- begin closure to overcome local limits and interference
@@ -6984,7 +6984,7 @@ local fonts,logs,trackers,containers,resolvers=fonts,logs,trackers,containers,re
local next,type,tonumber=next,type,tonumber
local match,gmatch,lower,gsub,strip,find=string.match,string.gmatch,string.lower,string.gsub,string.strip,string.find
local char,byte,sub=string.char,string.byte,string.sub
-local abs,mod=math.abs,math.mod
+local abs=math.abs
local bxor,rshift=bit32.bxor,bit32.rshift
local P,S,R,Cmt,C,Ct,Cs,lpegmatch,patterns=lpeg.P,lpeg.S,lpeg.R,lpeg.Cmt,lpeg.C,lpeg.Ct,lpeg.Cs,lpeg.match,lpeg.patterns
local derivetable=table.derive
@@ -7183,7 +7183,7 @@ do
local function step(c)
local cipher=byte(c)
local plain=bxor(cipher,rshift(r,8))
- r=mod((cipher+r)*c1+c2,65536)
+ r=((cipher+r)*c1+c2)%65536
return char(plain)
end
decrypt=function(binary)
@@ -8249,7 +8249,7 @@ local next,type,unpack=next,type,unpack
local byte,lower,char,strip,gsub=string.byte,string.lower,string.char,string.strip,string.gsub
local bittest=bit32.btest
local concat,remove,unpack,fastcopy=table.concat,table.remov,table.unpack,table.fastcopy
-local floor,mod,abs,sqrt,round=math.floor,math.mod,math.abs,math.sqrt,math.round
+local floor,abs,sqrt,round=math.floor,math.abs,math.sqrt,math.round
local P,R,S,C,Cs,Cc,Ct,Carg,Cmt=lpeg.P,lpeg.R,lpeg.S,lpeg.C,lpeg.Cs,lpeg.Cc,lpeg.Ct,lpeg.Carg,lpeg.Cmt
local lpegmatch=lpeg.match
local setmetatableindex=table.setmetatableindex
@@ -8952,10 +8952,10 @@ formatreaders[4]=function(f,fontdata,offset)
elseif offset==0xFFFF then
elseif offset==0 then
if trace_cmap then
- report("format 4.%i segment %2i from %C upto %C at index %H",1,segment,startchar,endchar,mod(startchar+delta,65536))
+ 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
- local index=mod(unicode+delta,65536)
+ local index=(unicode+delta)%65536
if index and index>0 then
local glyph=glyphs[index]
if glyph then
@@ -8984,13 +8984,13 @@ formatreaders[4]=function(f,fontdata,offset)
else
local shift=(segment-nofsegments+offset/2)-startchar
if trace_cmap then
- report("format 4.%i segment %2i from %C upto %C at index %H",0,segment,startchar,endchar,mod(startchar+delta,65536))
+ report("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
local index=indices[slot]
if index and index>0 then
- index=mod(index+delta,65536)
+ index=(index+delta)%65536
local glyph=glyphs[index]
if glyph then
local gu=glyph.unicode
@@ -16680,8 +16680,6 @@ local attributes,nodes,node=attributes,nodes,node
fonts=fonts
local hashes=fonts.hashes
local fontdata=hashes.identifiers
-local parameters=fonts.hashes.parameters
-local resources=fonts.hashes.resources
nodes.injections=nodes.injections or {}
local injections=nodes.injections
local tracers=nodes.tracers
@@ -17871,7 +17869,7 @@ local function injectspaces(head)
local function updatefont(font,trig)
leftkerns=trig.left
rightkerns=trig.right
- local par=parameters[font]
+ local par=fontdata[font].parameters
factor=par.factor
threshold=par.spacing.width-1
lastfont=font
@@ -18719,7 +18717,21 @@ local function toligature(head,start,stop,char,dataset,sequence,markflag,discfou
local pre,post,replace,pretail,posttail,replacetail=getdisc(discfound,true)
if not replace then
local prev=getprev(base)
- local copied=copy_node_list(comp)
+local current=comp
+local previous=nil
+local copied=nil
+while current do
+ if getid(current)==glyph_code then
+ local n=copy_node(current)
+ if copied then
+ setlink(previous,n)
+ else
+ copied=n
+ end
+ previous=n
+ end
+ current=getnext(current)
+end
setprev(discnext,nil)
setnext(discprev,nil)
if pre then