summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2018-02-06 20:42:35 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2018-02-06 20:42:35 +0100
commit1687077b0a63417ad4dce58f6c869a6e115d9b72 (patch)
treeec1d4ac5ea55b732c13c12c0c0e67739afa93ef8 /tex
parent7ce2f30f31421eb46d07ff65cbf9fcbda1d6612a (diff)
downloadcontext-1687077b0a63417ad4dce58f6c869a6e115d9b72.tar.gz
2018-02-06 18:19:00
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkii/mult-de.mkii5
-rw-r--r--tex/context/base/mkii/mult-it.mkii3
-rw-r--r--tex/context/base/mkii/mult-pe.mkii6
-rw-r--r--tex/context/base/mkiv/back-pdf.mkiv22
-rw-r--r--tex/context/base/mkiv/buff-imp-lua.lua25
-rw-r--r--tex/context/base/mkiv/buff-imp-lua.mkiv4
-rw-r--r--tex/context/base/mkiv/buff-imp-mp.lua6
-rw-r--r--tex/context/base/mkiv/buff-imp-mp.mkiv4
-rw-r--r--tex/context/base/mkiv/buff-imp-tex.lua34
-rw-r--r--tex/context/base/mkiv/buff-imp-tex.mkiv4
-rw-r--r--tex/context/base/mkiv/char-def.lua134
-rw-r--r--tex/context/base/mkiv/cldf-stp.lua51
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv2
-rw-r--r--tex/context/base/mkiv/font-ctx.lua2
-rw-r--r--tex/context/base/mkiv/font-ots.lua51
-rw-r--r--tex/context/base/mkiv/font-tra.mkiv2
-rw-r--r--tex/context/base/mkiv/grph-epd.lua23
-rw-r--r--tex/context/base/mkiv/grph-epd.mkiv28
-rw-r--r--tex/context/base/mkiv/grph-trf.mkiv315
-rw-r--r--tex/context/base/mkiv/lpdf-ano.lua8
-rw-r--r--tex/context/base/mkiv/lpdf-epd.lua110
-rw-r--r--tex/context/base/mkiv/lpdf-fld.lua5
-rw-r--r--tex/context/base/mkiv/lpdf-ini.lua62
-rw-r--r--tex/context/base/mkiv/lpdf-wid.lua39
-rw-r--r--tex/context/base/mkiv/math-arr.mkiv4
-rw-r--r--tex/context/base/mkiv/math-del.mkiv47
-rw-r--r--tex/context/base/mkiv/math-fbk.lua40
-rw-r--r--tex/context/base/mkiv/math-ini.mkiv36
-rw-r--r--tex/context/base/mkiv/math-rad.mkvi9
-rw-r--r--tex/context/base/mkiv/math-stc.mkvi115
-rw-r--r--tex/context/base/mkiv/meta-imp-mat.mkiv90
-rw-r--r--tex/context/base/mkiv/mlib-int.lua7
-rw-r--r--tex/context/base/mkiv/mult-def.lua5
-rw-r--r--tex/context/base/mkiv/mult-prm.lua8
-rw-r--r--tex/context/base/mkiv/pack-box.mkiv17
-rw-r--r--tex/context/base/mkiv/scrn-but.mkvi18
-rw-r--r--tex/context/base/mkiv/spac-ali.mkiv106
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin25561 -> 25617 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin250934 -> 252285 bytes
-rw-r--r--tex/context/base/mkiv/supp-box.mkiv19
-rw-r--r--tex/context/base/mkiv/supp-dir.mkiv4
-rw-r--r--tex/context/base/mkiv/syst-ini.mkiv26
-rw-r--r--tex/context/base/mkiv/toks-ini.lua54
-rw-r--r--tex/context/base/mkiv/toks-scn.lua14
-rw-r--r--tex/context/base/mkiv/util-evo-imp-server.lua2
-rw-r--r--tex/context/base/mkiv/util-evo.lua13
-rw-r--r--tex/context/interface/mkii/keys-de.xml5
-rw-r--r--tex/context/interface/mkii/keys-it.xml3
-rw-r--r--tex/context/interface/mkii/keys-pe.xml6
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin846988 -> 835942 bytes
-rw-r--r--tex/context/interface/mkiv/i-mathstackers.xml4
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin60776 -> 60772 bytes
-rw-r--r--tex/context/modules/mkiv/s-evohome.mkiv12
-rw-r--r--tex/context/modules/mkiv/s-fonts-coverage.lua52
-rw-r--r--tex/context/modules/mkiv/s-fonts-coverage.mkiv1
-rw-r--r--tex/context/modules/mkiv/s-present-original.mkiv2
-rw-r--r--tex/context/modules/mkiv/x-asciimath.lua5
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua2
-rw-r--r--tex/generic/context/luatex/luatex-pdf.tex40
62 files changed, 1066 insertions, 651 deletions
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index ca0154089..12dc6435b 100644
--- a/tex/context/base/mkii/cont-new.mkii
+++ b/tex/context/base/mkii/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2018.01.24 10:47}
+\newcontextversion{2018.02.06 18:11}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index f9a9e1c6c..3e021b819 100644
--- a/tex/context/base/mkii/context.mkii
+++ b/tex/context/base/mkii/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2018.01.24 10:47}
+\edef\contextversion{2018.02.06 18:11}
%D For those who want to use this:
diff --git a/tex/context/base/mkii/mult-de.mkii b/tex/context/base/mkii/mult-de.mkii
index e26ceb851..8e79e3856 100644
--- a/tex/context/base/mkii/mult-de.mkii
+++ b/tex/context/base/mkii/mult-de.mkii
@@ -185,6 +185,7 @@
\setinterfacevariable{extremestretch}{extremestretch}
\setinterfacevariable{fact}{gegeben}
\setinterfacevariable{february}{februar}
+\setinterfacevariable{field}{field}
\setinterfacevariable{figure}{abbildung}
\setinterfacevariable{figures}{abbildungen}
\setinterfacevariable{file}{datei}
@@ -849,6 +850,7 @@
\setinterfaceconstant{headerstate}{kopfzeilenstatus}
\setinterfaceconstant{headlabel}{headlabel}
\setinterfaceconstant{headnumber}{kopfnummer}
+\setinterfaceconstant{headseparator}{headseparator}
\setinterfaceconstant{headstyle}{kopfstil}
\setinterfaceconstant{height}{hoehe}
\setinterfaceconstant{hfactor}{hfaktor}
@@ -1005,6 +1007,7 @@
\setinterfaceconstant{numberset}{numberset}
\setinterfaceconstant{numberstarter}{numberstarter}
\setinterfaceconstant{numberstopper}{numberstopper}
+\setinterfaceconstant{numberstrut}{numberstrut}
\setinterfaceconstant{numberstyle}{nummernstil}
\setinterfaceconstant{numberwidth}{numberwidth}
\setinterfaceconstant{nx}{nx}
@@ -1161,6 +1164,7 @@
\setinterfaceconstant{sidespacebefore}{nebenvorspatium}
\setinterfaceconstant{sidethreshold}{sidethreshold}
\setinterfaceconstant{sign}{zeichen}
+\setinterfaceconstant{simplecommand}{simplecommand}
\setinterfaceconstant{size}{groesse}
\setinterfaceconstant{slantedfeatures}{slantedfeatures}
\setinterfaceconstant{slantedfont}{slantedfont}
@@ -1240,6 +1244,7 @@
\setinterfaceconstant{titledistance}{titelabstand}
\setinterfaceconstant{titleleft}{titleleft}
\setinterfaceconstant{titleright}{titleright}
+\setinterfaceconstant{titlestrut}{titlestrut}
\setinterfaceconstant{titlestyle}{titelstil}
\setinterfaceconstant{to}{zu}
\setinterfaceconstant{toffset}{toffset}
diff --git a/tex/context/base/mkii/mult-it.mkii b/tex/context/base/mkii/mult-it.mkii
index 79cb6de4e..ba47f624b 100644
--- a/tex/context/base/mkii/mult-it.mkii
+++ b/tex/context/base/mkii/mult-it.mkii
@@ -185,6 +185,7 @@
\setinterfacevariable{extremestretch}{extremestretch}
\setinterfacevariable{fact}{fatto}
\setinterfacevariable{february}{febbraio}
+\setinterfacevariable{field}{field}
\setinterfacevariable{figure}{figura}
\setinterfacevariable{figures}{figure}
\setinterfacevariable{file}{file}
@@ -849,6 +850,7 @@
\setinterfaceconstant{headerstate}{statointestazione}
\setinterfaceconstant{headlabel}{etichettatesta}
\setinterfaceconstant{headnumber}{numerotesta}
+\setinterfaceconstant{headseparator}{headseparator}
\setinterfaceconstant{headstyle}{stiletesta}
\setinterfaceconstant{height}{altezza}
\setinterfaceconstant{hfactor}{hfactor}
@@ -1162,6 +1164,7 @@
\setinterfaceconstant{sidespacebefore}{spaziolateraleprima}
\setinterfaceconstant{sidethreshold}{sidethreshold}
\setinterfaceconstant{sign}{segno}
+\setinterfaceconstant{simplecommand}{simplecommand}
\setinterfaceconstant{size}{dimensione}
\setinterfaceconstant{slantedfeatures}{slantedfeatures}
\setinterfaceconstant{slantedfont}{slantedfont}
diff --git a/tex/context/base/mkii/mult-pe.mkii b/tex/context/base/mkii/mult-pe.mkii
index 02007f158..60a772815 100644
--- a/tex/context/base/mkii/mult-pe.mkii
+++ b/tex/context/base/mkii/mult-pe.mkii
@@ -185,6 +185,7 @@
\setinterfacevariable{extremestretch}{extremestretch}
\setinterfacevariable{fact}{fact}
\setinterfacevariable{february}{فوریه}
+\setinterfacevariable{field}{field}
\setinterfacevariable{figure}{شکل}
\setinterfacevariable{figures}{شکلها}
\setinterfacevariable{file}{پرونده}
@@ -376,6 +377,7 @@
\setinterfacevariable{norepeat}{norepeat}
\setinterfacevariable{normal}{نرمال}
\setinterfacevariable{nospacing}{بدون‌فضاگذاری}
+\setinterfacevariable{nostopper}{nostopper}
\setinterfacevariable{not}{بدون}
\setinterfacevariable{notation}{notation}
\setinterfacevariable{note}{note}
@@ -848,6 +850,7 @@
\setinterfaceconstant{headerstate}{وضعیت‌سربرگ}
\setinterfaceconstant{headlabel}{برچسب‌سر}
\setinterfaceconstant{headnumber}{شماره‌سر}
+\setinterfaceconstant{headseparator}{headseparator}
\setinterfaceconstant{headstyle}{سبک‌سر}
\setinterfaceconstant{height}{ارتفاع}
\setinterfaceconstant{hfactor}{عامل‌ارتفاع}
@@ -1004,6 +1007,7 @@
\setinterfaceconstant{numberset}{numberset}
\setinterfaceconstant{numberstarter}{numberstarter}
\setinterfaceconstant{numberstopper}{numberstopper}
+\setinterfaceconstant{numberstrut}{numberstrut}
\setinterfaceconstant{numberstyle}{سبک‌شماره}
\setinterfaceconstant{numberwidth}{عرض‌شماره}
\setinterfaceconstant{nx}{nx}
@@ -1160,6 +1164,7 @@
\setinterfaceconstant{sidespacebefore}{فضای‌کناری‌قبل}
\setinterfaceconstant{sidethreshold}{sidethreshold}
\setinterfaceconstant{sign}{علامت}
+\setinterfaceconstant{simplecommand}{simplecommand}
\setinterfaceconstant{size}{اندازه}
\setinterfaceconstant{slantedfeatures}{slantedfeatures}
\setinterfaceconstant{slantedfont}{slantedfont}
@@ -1239,6 +1244,7 @@
\setinterfaceconstant{titledistance}{فاصله‌عنوان}
\setinterfaceconstant{titleleft}{عنوان‌چپ}
\setinterfaceconstant{titleright}{عنوان‌راست}
+\setinterfaceconstant{titlestrut}{titlestrut}
\setinterfaceconstant{titlestyle}{سبک‌عنوان}
\setinterfaceconstant{to}{به}
\setinterfaceconstant{toffset}{toffset}
diff --git a/tex/context/base/mkiv/back-pdf.mkiv b/tex/context/base/mkiv/back-pdf.mkiv
index af5fcecd5..00416e2dc 100644
--- a/tex/context/base/mkiv/back-pdf.mkiv
+++ b/tex/context/base/mkiv/back-pdf.mkiv
@@ -109,11 +109,11 @@
%D We don't support these directives, at least not this way. If they are needed
%D by third party modules we can provide some interface.
-\let\pdfcreationdate \relax \newtoks \pdfcreationdate
+% \pdfcreationdate
\let\pdfdecimaldigits \relax \newcount\pdfdecimaldigits
\let\pdfdestmargin \relax \newdimen\pdfdestmargin
-\let\pdffontname \relax \newcount\pdffontname
-\let\pdffontobjnum \relax \newcount\pdffontobjnum
+% \pdffontname
+% \pdffontobjnum
\let\pdffontsize \relax \newcount\pdffontsize
\let\pdfgamma \relax \newcount\pdfgamma
\let\pdfgentounicode \relax \newcount\pdfgentounicode
@@ -128,27 +128,27 @@
\let\pdfinclusioncopyfonts \relax \newcount\pdfinclusioncopyfonts
\let\pdfinclusionerrorlevel \relax \newcount\pdfinclusionerrorlevel
\let\pdfinfoomitdate \relax \newcount\pdfinfoomitdate
-\let\pdflastannot \relax \newcount\pdflastannot
-\let\pdflastlink \relax \newcount\pdflastlink
+% \pdflastannot
+% \pdflastlink
\let\pdflinkmargin \relax \newdimen\pdflinkmargin
\let\pdfmajorversion \relax \newcount\pdfmajorversion
\let\pdfminorversion \relax \newcount\pdfminorversion
\let\pdfpagebox \relax \newcount\pdfpagebox
-\let\pdfpageref \relax \newcount\pdfpageref
+% \pdfpageref
\let\pdfpkfixeddpi \relax \newcount\pdfpkfixeddpi
\let\pdfpkmode \relax \newtoks \pdfpkmode
\let\pdfpkresolution \relax \newcount\pdfpkresolution
-\let\pdfretval \relax \newcount\pdfretval
+% \pdfretval
\let\pdfsuppressoptionalinfo \relax \newcount\pdfsuppressoptionalinfo
\let\pdfsuppressptexinfo \relax \newcount\pdfsuppressptexinfo
-\let\pdftexrevision \relax \newcount\pdftexrevision
-\let\pdftexversion \relax \newcount\pdftexversion
+% \pdftexrevision
+% \pdftexversion
\let\pdfthreadmargin \relax \newdimen\pdfthreadmargin
\let\pdftrailerid \relax \newtoks \pdftrailerid
\let\pdfuniqueresname \relax \newcount\pdfuniqueresname
\let\pdfvorigin \relax \newcount\pdfvorigin
\let\pdfxformmargin \relax \newdimen\pdfxformmargin
-\let\pdfxformname \relax \newcount\pdfxformname
+% \pdfxformname
%D These are still accepted but are normally not needed.
@@ -168,7 +168,7 @@
\normalprotected\def\pdfliteral {\pdfextension literal }
\normalprotected\def\pdfobj {\pdfextension obj }
- \def\pdflastobj {\numexpr\pdffeedback lastobj\relax}
+ \def\pdflastobj {\pdffeedback lastobj}
\normalprotected\def\pdfrefobj {\pdfextension refobj }
\normalprotected\def\pdfrestore {\pdfextension restore\relax}
\normalprotected\def\pdfsave {\pdfextension save\relax}
diff --git a/tex/context/base/mkiv/buff-imp-lua.lua b/tex/context/base/mkiv/buff-imp-lua.lua
index e873a34d1..b4e9342ed 100644
--- a/tex/context/base/mkiv/buff-imp-lua.lua
+++ b/tex/context/base/mkiv/buff-imp-lua.lua
@@ -9,7 +9,7 @@ if not modules then modules = { } end modules ['buff-imp-lua'] = {
-- borrowed from ctx scite lexers
-- add goto/label scanning
--
--- depricated:
+-- deprecated:
--
-- gcinfo unpack getfenv setfenv loadlib
-- table.maxn table.getn table.setn
@@ -82,6 +82,7 @@ local LuaSnippetQuote = verbatim.LuaSnippetQuote
local LuaSnippetString = verbatim.LuaSnippetString
local LuaSnippetSpecial = verbatim.LuaSnippetSpecial
local LuaSnippetComment = verbatim.LuaSnippetComment
+local LuaSnippetCommentText = verbatim.LuaSnippetCommentText
local LuaSnippetNameCore = verbatim.LuaSnippetNameCore
local LuaSnippetNameBase = verbatim.LuaSnippetNameBase
local LuaSnippetNameLibraries = verbatim.LuaSnippetNameLibraries
@@ -127,6 +128,7 @@ local handler = visualizers.newhandler {
boundary = function(s) LuaSnippetBoundary(s) end,
special = function(s) LuaSnippetSpecial(s) end,
comment = function(s) LuaSnippetComment(s) end,
+ commenttext = function(s) LuaSnippetCommentText(s) end,
quote = function(s) LuaSnippetQuote(s) end,
string = function(s) LuaSnippetString(s) end,
period = function(s) verbatim(s) end,
@@ -135,7 +137,12 @@ local handler = visualizers.newhandler {
name_c = visualizename_c,
}
-local comment = P("--")
+----- comment = P("--")
+local comment = P("--") * (patterns.anything - patterns.newline)^0
+local comment_lb = P("--[[")
+local comment_le = P("--]]")
+local comment_lt = patterns.utf8char - comment_le - patterns.newline
+
local name = (patterns.letter + patterns.underscore)
* (patterns.letter + patterns.underscore + patterns.digit)^0
local boundary = S('()[]{}')
@@ -168,11 +175,12 @@ local grammar = visualizers.newgrammar("default", { "visualizer",
longstring =
longstring / long,
comment =
- makepattern(handler,"comment",comment)
- * (V("space") + V("content"))^0,
- longcomment =
- makepattern(handler,"comment",comment)
- * longstring / long,
+ makepattern(handler, "comment", comment_lb)
+ * ( makepattern(handler, "commenttext", comment_lt)
+ + V("whitespace")
+ )^0
+ * makepattern(handler, "comment", comment_le)
+ + makepattern(handler,"comment",comment),
name =
makepattern(handler,"name_a",name)
* ( V("optionalwhitespace")
@@ -187,8 +195,7 @@ local grammar = visualizers.newgrammar("default", { "visualizer",
)^0,
pattern =
- V("longcomment")
- + V("comment")
+ V("comment")
+ V("longstring")
+ V("dstring")
+ V("sstring")
diff --git a/tex/context/base/mkiv/buff-imp-lua.mkiv b/tex/context/base/mkiv/buff-imp-lua.mkiv
index 186d94b33..9d1f459ab 100644
--- a/tex/context/base/mkiv/buff-imp-lua.mkiv
+++ b/tex/context/base/mkiv/buff-imp-lua.mkiv
@@ -62,6 +62,10 @@
[\c!color=darkyellow,
\c!style=boldface]
+\definestartstop
+ [LuaSnippetCommentText]
+ [\c!color=darkyellow]
+
\definetyping
[LUA]
[\c!option=lua]
diff --git a/tex/context/base/mkiv/buff-imp-mp.lua b/tex/context/base/mkiv/buff-imp-mp.lua
index bcd18dd47..daf8187ae 100644
--- a/tex/context/base/mkiv/buff-imp-mp.lua
+++ b/tex/context/base/mkiv/buff-imp-mp.lua
@@ -36,6 +36,7 @@ local MetapostSnippetConstructor = verbatim.MetapostSnippetConstructor
local MetapostSnippetBoundary = verbatim.MetapostSnippetBoundary
local MetapostSnippetSpecial = verbatim.MetapostSnippetSpecial
local MetapostSnippetComment = verbatim.MetapostSnippetComment
+local MetapostSnippetCommentText = verbatim.MetapostSnippetCommentText
local MetapostSnippetQuote = verbatim.MetapostSnippetQuote
local MetapostSnippetString = verbatim.MetapostSnippetString
local MetapostSnippetNamePrimitive = verbatim.MetapostSnippetNamePrimitive
@@ -80,12 +81,13 @@ local handler = visualizers.newhandler {
boundary = function(s) MetapostSnippetBoundary(s) end,
special = function(s) MetapostSnippetSpecial(s) end,
comment = function(s) MetapostSnippetComment(s) end,
+ commenttext = function(s) MetapostSnippetCommentText(s) end,
string = function(s) MetapostSnippetString(s) end,
quote = function(s) MetapostSnippetQuote(s) end,
name = visualizename,
}
-local comment = S("%")
+local comment = P("%")
local name = (patterns.letter + S("_"))^1
local constructor = S("$@#")
local boundary = S('()[]:=<>;"')
@@ -94,7 +96,7 @@ local special = S("-+/*|`!?^&%.,")
local grammar = visualizers.newgrammar("default", { "visualizer",
comment = makepattern(handler,"comment",comment)
- * (V("space") + V("content"))^0,
+ * makepattern(handler,"commenttext",(patterns.anything - patterns.newline)^0),
dstring = makepattern(handler,"quote",patterns.dquote)
* makepattern(handler,"string",patterns.nodquote)
* makepattern(handler,"quote",patterns.dquote),
diff --git a/tex/context/base/mkiv/buff-imp-mp.mkiv b/tex/context/base/mkiv/buff-imp-mp.mkiv
index 95ca9b978..d535dad54 100644
--- a/tex/context/base/mkiv/buff-imp-mp.mkiv
+++ b/tex/context/base/mkiv/buff-imp-mp.mkiv
@@ -69,6 +69,10 @@
[\c!color=darkyellow,
\c!style=boldface]
+\definestartstop
+ [MetapostSnippetCommentText]
+ [\c!color=darkyellow]
+
\definetyping
[MP]
[\c!option=mp]
diff --git a/tex/context/base/mkiv/buff-imp-tex.lua b/tex/context/base/mkiv/buff-imp-tex.lua
index 097dff212..13ecdf27f 100644
--- a/tex/context/base/mkiv/buff-imp-tex.lua
+++ b/tex/context/base/mkiv/buff-imp-tex.lua
@@ -10,21 +10,22 @@ if not modules then modules = { } end modules ['buff-imp-tex'] = {
local P, S, V, patterns = lpeg.P, lpeg.S, lpeg.V, lpeg.patterns
-local context = context
-local verbatim = context.verbatim
-local makepattern = visualizers.makepattern
-local makenested = visualizers.makenested
-local getvisualizer = visualizers.getvisualizer
-
-local TexSnippet = context.TexSnippet
-local startTexSnippet = context.startTexSnippet
-local stopTexSnippet = context.stopTexSnippet
-
-local TexSnippetName = verbatim.TexSnippetName
-local TexSnippetGroup = verbatim.TexSnippetGroup
-local TexSnippetBoundary = verbatim.TexSnippetBoundary
-local TexSnippetSpecial = verbatim.TexSnippetSpecial
-local TexSnippetComment = verbatim.TexSnippetComment
+local context = context
+local verbatim = context.verbatim
+local makepattern = visualizers.makepattern
+local makenested = visualizers.makenested
+local getvisualizer = visualizers.getvisualizer
+
+local TexSnippet = context.TexSnippet
+local startTexSnippet = context.startTexSnippet
+local stopTexSnippet = context.stopTexSnippet
+
+local TexSnippetName = verbatim.TexSnippetName
+local TexSnippetGroup = verbatim.TexSnippetGroup
+local TexSnippetBoundary = verbatim.TexSnippetBoundary
+local TexSnippetSpecial = verbatim.TexSnippetSpecial
+local TexSnippetComment = verbatim.TexSnippetComment
+local TexSnippetCommentText = verbatim.TexSnippetCommentText
local handler = visualizers.newhandler {
startinline = function() TexSnippet(false,"{") end,
@@ -36,6 +37,7 @@ local handler = visualizers.newhandler {
boundary = function(s) TexSnippetBoundary(s) end,
special = function(s) TexSnippetSpecial(s) end,
comment = function(s) TexSnippetComment(s) end,
+ commenttext = function(s) TexSnippetCommentText(s) end,
}
-- todo: unicode letters in control sequences (slow as we need to test the nature)
@@ -48,7 +50,7 @@ local boundary = S('[]()<>#="')
local special = S("/^_-&+'`|")
local p_comment = makepattern(handler,"comment",comment)
- * (V("space") + V("content"))^0
+ * makepattern(handler,"commenttext",(patterns.anything - patterns.newline)^0)
local p_name = makepattern(handler,"name",name)
local p_escape = makepattern(handler,"name",escape)
local p_group = makepattern(handler,"group",group)
diff --git a/tex/context/base/mkiv/buff-imp-tex.mkiv b/tex/context/base/mkiv/buff-imp-tex.mkiv
index b768c9fd5..c4b3df735 100644
--- a/tex/context/base/mkiv/buff-imp-tex.mkiv
+++ b/tex/context/base/mkiv/buff-imp-tex.mkiv
@@ -44,6 +44,10 @@
[\c!color=darkyellow,
\c!style=boldface]
+\definestartstop
+ [TexSnippetCommentText]
+ [\c!color=darkyellow]
+
\definetyping
[TEX]
[\c!option=tex]
diff --git a/tex/context/base/mkiv/char-def.lua b/tex/context/base/mkiv/char-def.lua
index d501d73b6..7e8011cb7 100644
--- a/tex/context/base/mkiv/char-def.lua
+++ b/tex/context/base/mkiv/char-def.lua
@@ -15323,6 +15323,7 @@ characters.data={
[0x600]={
arabic="u",
category="cf",
+ contextname="arabicnumber",
description="ARABIC NUMBER SIGN",
direction="an",
linebreak="al",
@@ -15332,6 +15333,7 @@ characters.data={
[0x601]={
arabic="u",
category="cf",
+ contextname="arabicsanah",
description="ARABIC SIGN SANAH",
direction="an",
linebreak="al",
@@ -15341,6 +15343,7 @@ characters.data={
[0x602]={
arabic="u",
category="cf",
+ contextname="arabicfootnotemarker",
description="ARABIC FOOTNOTE MARKER",
direction="an",
linebreak="al",
@@ -15350,6 +15353,7 @@ characters.data={
[0x603]={
arabic="u",
category="cf",
+ contextname="arabicsafha",
description="ARABIC SIGN SAFHA",
direction="an",
linebreak="al",
@@ -15359,6 +15363,7 @@ characters.data={
[0x604]={
arabic="u",
category="cf",
+ contextname="arabicsamvat",
description="ARABIC SIGN SAMVAT",
direction="an",
linebreak="al",
@@ -15367,6 +15372,7 @@ characters.data={
[0x605]={
arabic="u",
category="cf",
+ contextname="arabicnumberabove",
description="ARABIC NUMBER MARK ABOVE",
direction="an",
linebreak="al",
@@ -15374,6 +15380,7 @@ characters.data={
},
[0x606]={
category="sm",
+ contextname="arabiccuberoot",
description="ARABIC-INDIC CUBE ROOT",
direction="on",
linebreak="al",
@@ -15381,6 +15388,7 @@ characters.data={
},
[0x607]={
category="sm",
+ contextname="arabicfourthroot",
description="ARABIC-INDIC FOURTH ROOT",
direction="on",
linebreak="al",
@@ -15389,6 +15397,7 @@ characters.data={
[0x608]={
arabic="u",
category="sm",
+ contextname="arabicray",
description="ARABIC RAY",
direction="al",
linebreak="al",
@@ -15396,6 +15405,7 @@ characters.data={
},
[0x609]={
category="po",
+ contextname="arabicpermille",
description="ARABIC-INDIC PER MILLE SIGN",
direction="et",
linebreak="po",
@@ -15403,6 +15413,7 @@ characters.data={
},
[0x60A]={
category="po",
+ contextname="arabicpertenthousand",
description="ARABIC-INDIC PER TEN THOUSAND SIGN",
direction="et",
linebreak="po",
@@ -15411,6 +15422,7 @@ characters.data={
[0x60B]={
arabic="u",
category="sc",
+ contextname="afghanicurrency",
description="AFGHANI SIGN",
direction="al",
linebreak="po",
@@ -15418,6 +15430,7 @@ characters.data={
},
[0x60C]={
adobename="commaarabic",
+ contextname="arabiccomma",
category="po",
description="ARABIC COMMA",
direction="cs",
@@ -15426,6 +15439,7 @@ characters.data={
},
[0x60D]={
category="po",
+ contextname="arabicdateseparator",
description="ARABIC DATE SEPARATOR",
direction="al",
linebreak="is",
@@ -15433,6 +15447,7 @@ characters.data={
},
[0x60E]={
category="so",
+ contextname="arabicpoeticverse",
description="ARABIC POETIC VERSE SIGN",
direction="on",
linebreak="al",
@@ -15440,6 +15455,7 @@ characters.data={
},
[0x60F]={
category="so",
+ contextname="arabicmisra",
description="ARABIC SIGN MISRA",
direction="on",
linebreak="al",
@@ -15448,6 +15464,7 @@ characters.data={
[0x610]={
category="mn",
combining=0xE6,
+ contextname="arabichighsallallahou",
description="ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM",
direction="nsm",
linebreak="cm",
@@ -15456,6 +15473,7 @@ characters.data={
[0x611]={
category="mn",
combining=0xE6,
+ contextname="arabichighalayheassallam",
description="ARABIC SIGN ALAYHE ASSALLAM",
direction="nsm",
linebreak="cm",
@@ -15464,6 +15482,7 @@ characters.data={
[0x612]={
category="mn",
combining=0xE6,
+ contextname="arabichighrahmatullahalayhe",
description="ARABIC SIGN RAHMATULLAH ALAYHE",
direction="nsm",
linebreak="cm",
@@ -15472,6 +15491,7 @@ characters.data={
[0x613]={
category="mn",
combining=0xE6,
+ contextname="arabichighradiallahouanhu",
description="ARABIC SIGN RADI ALLAHOU ANHU",
direction="nsm",
linebreak="cm",
@@ -15480,6 +15500,7 @@ characters.data={
[0x614]={
category="mn",
combining=0xE6,
+ contextname="arabichightakhallus",
description="ARABIC SIGN TAKHALLUS",
direction="nsm",
linebreak="cm",
@@ -15488,6 +15509,7 @@ characters.data={
[0x615]={
category="mn",
combining=0xE6,
+ contextname="arabichightah",
description="ARABIC SMALL HIGH TAH",
direction="nsm",
linebreak="cm",
@@ -15504,6 +15526,7 @@ characters.data={
[0x617]={
category="mn",
combining=0xE6,
+ contextname="arabichighzain",
description="ARABIC SMALL HIGH ZAIN",
direction="nsm",
linebreak="cm",
@@ -15536,6 +15559,7 @@ characters.data={
[0x61B]={
adobename="semicolonarabic",
category="po",
+ contextname="arabicsemicolon",
description="ARABIC SEMICOLON",
direction="al",
linebreak="ex",
@@ -15543,6 +15567,7 @@ characters.data={
},
[0x61C]={
category="cf",
+ contextname="arabiclettermark",
description="ARABIC LETTER MARK",
direction="al",
linebreak="cm",
@@ -15550,6 +15575,7 @@ characters.data={
},
[0x61E]={
category="po",
+ contextname="arabictripledot",
description="ARABIC TRIPLE DOT PUNCTUATION MARK",
direction="al",
linebreak="ex",
@@ -15558,6 +15584,7 @@ characters.data={
[0x61F]={
adobename="questionarabic",
category="po",
+ contextname="arabicquestion",
description="ARABIC QUESTION MARK",
direction="al",
linebreak="ex",
@@ -16214,6 +16241,7 @@ characters.data={
[0x66A]={
adobename="percentarabic",
category="po",
+ contextname="arabicpercent",
description="ARABIC PERCENT SIGN",
direction="et",
linebreak="po",
@@ -16222,6 +16250,7 @@ characters.data={
[0x66B]={
adobename="decimalseparatorpersian",
category="po",
+ contextname="persiandecimalseparator",
description="ARABIC DECIMAL SEPARATOR",
direction="an",
linebreak="nu",
@@ -16230,6 +16259,7 @@ characters.data={
[0x66C]={
adobename="thousandsseparatorpersian",
category="po",
+ contextname="persianthousandsseparator",
description="ARABIC THOUSANDS SEPARATOR",
direction="an",
linebreak="nu",
@@ -16239,6 +16269,7 @@ characters.data={
[0x66D]={
adobename="asteriskarabic",
category="po",
+ contextname="arabicasterisk",
description="ARABIC FIVE POINTED STAR",
direction="al",
linebreak="al",
@@ -17135,6 +17166,7 @@ characters.data={
},
[0x6D4]={
category="po",
+ contextname="arabicperiod",
description="ARABIC FULL STOP",
direction="al",
linebreak="ex",
@@ -17152,6 +17184,7 @@ characters.data={
[0x6D6]={
category="mn",
combining=0xE6,
+ contextname="arabichighesala",
description="ARABIC SMALL HIGH LIGATURE SAD WITH LAM WITH ALEF MAKSURA",
direction="nsm",
linebreak="cm",
@@ -17160,6 +17193,7 @@ characters.data={
[0x6D7]={
category="mn",
combining=0xE6,
+ contextname="arabichigheqala",
description="ARABIC SMALL HIGH LIGATURE QAF WITH LAM WITH ALEF MAKSURA",
direction="nsm",
linebreak="cm",
@@ -17168,6 +17202,7 @@ characters.data={
[0x6D8]={
category="mn",
combining=0xE6,
+ contextname="arabichighmeemshort",
description="ARABIC SMALL HIGH MEEM INITIAL FORM",
direction="nsm",
linebreak="cm",
@@ -17176,6 +17211,7 @@ characters.data={
[0x6D9]={
category="mn",
combining=0xE6,
+ contextname="arabichighlamalef",
description="ARABIC SMALL HIGH LAM ALEF",
direction="nsm",
linebreak="cm",
@@ -17184,6 +17220,7 @@ characters.data={
[0x6DA]={
category="mn",
combining=0xE6,
+ contextname="arabichighjeem",
description="ARABIC SMALL HIGH JEEM",
direction="nsm",
linebreak="cm",
@@ -17192,6 +17229,7 @@ characters.data={
[0x6DB]={
category="mn",
combining=0xE6,
+ contextname="arabicshighthreedots",
description="ARABIC SMALL HIGH THREE DOTS",
direction="nsm",
linebreak="cm",
@@ -17200,6 +17238,7 @@ characters.data={
[0x6DC]={
category="mn",
combining=0xE6,
+ contextname="arabichighseen",
description="ARABIC SMALL HIGH SEEN",
direction="nsm",
linebreak="cm",
@@ -17208,6 +17247,7 @@ characters.data={
[0x6DD]={
arabic="u",
category="cf",
+ contextname="arabicendofayah",
description="ARABIC END OF AYAH",
direction="an",
linebreak="al",
@@ -17216,6 +17256,7 @@ characters.data={
},
[0x6DE]={
category="me",
+ contextname="arabicstartofrubc",
description="ARABIC START OF RUB EL HIZB",
direction="on",
linebreak="al",
@@ -17248,6 +17289,7 @@ characters.data={
[0x6E2]={
category="mn",
combining=0xE6,
+ contextname="arabichighmeemlong",
description="ARABIC SMALL HIGH MEEM ISOLATED FORM",
direction="nsm",
linebreak="cm",
@@ -17256,6 +17298,7 @@ characters.data={
[0x6E3]={
category="mn",
combining=0xDC,
+ contextname="arabiclowseen",
description="ARABIC SMALL LOW SEEN",
direction="nsm",
linebreak="cm",
@@ -17264,6 +17307,7 @@ characters.data={
[0x6E4]={
category="mn",
combining=0xE6,
+ contextname="arabichighmadda",
description="ARABIC SMALL HIGH MADDA",
direction="nsm",
linebreak="cm",
@@ -17271,6 +17315,7 @@ characters.data={
},
[0x6E5]={
category="lm",
+ contextname="arabicvowelwaw",
description="ARABIC SMALL WAW",
direction="al",
linebreak="al",
@@ -17278,6 +17323,7 @@ characters.data={
},
[0x6E6]={
category="lm",
+ contextname="arabicvowelyeh",
description="ARABIC SMALL YEH",
direction="al",
linebreak="al",
@@ -17286,6 +17332,7 @@ characters.data={
[0x6E7]={
category="mn",
combining=0xE6,
+ contextname="arabichighyeh",
description="ARABIC SMALL HIGH YEH",
direction="nsm",
linebreak="cm",
@@ -17294,6 +17341,7 @@ characters.data={
[0x6E8]={
category="mn",
combining=0xE6,
+ contextname="arabichighnoon",
description="ARABIC SMALL HIGH NOON",
direction="nsm",
linebreak="cm",
@@ -17301,6 +17349,7 @@ characters.data={
},
[0x6E9]={
category="so",
+ contextname="arabicsajdah",
description="ARABIC PLACE OF SAJDAH",
direction="on",
linebreak="al",
@@ -17333,6 +17382,7 @@ characters.data={
[0x6ED]={
category="mn",
combining=0xDC,
+ contextname="arabiclowmeemlong",
description="ARABIC SMALL LOW MEEM",
direction="nsm",
linebreak="cm",
@@ -20311,6 +20361,7 @@ characters.data={
[0x8D4]={
category="mn",
combining=0xE6,
+ contextname="arabichighrubc",
description="ARABIC SMALL HIGH WORD AR-RUB",
direction="nsm",
linebreak="cm",
@@ -20319,6 +20370,7 @@ characters.data={
[0x8D5]={
category="mn",
combining=0xE6,
+ contextname="arabichighsad",
description="ARABIC SMALL HIGH SAD",
direction="nsm",
linebreak="cm",
@@ -20327,6 +20379,7 @@ characters.data={
[0x8D6]={
category="mn",
combining=0xE6,
+ contextname="arabichighain",
description="ARABIC SMALL HIGH AIN",
direction="nsm",
linebreak="cm",
@@ -20335,6 +20388,7 @@ characters.data={
[0x8D7]={
category="mn",
combining=0xE6,
+ contextname="arabichighqaf",
description="ARABIC SMALL HIGH QAF",
direction="nsm",
linebreak="cm",
@@ -20343,6 +20397,7 @@ characters.data={
[0x8D8]={
category="mn",
combining=0xE6,
+ contextname="arabichighnoonkasra",
description="ARABIC SMALL HIGH NOON WITH KASRA",
direction="nsm",
linebreak="cm",
@@ -20351,6 +20406,7 @@ characters.data={
[0x8D9]={
category="mn",
combining=0xE6,
+ contextname="arabiclownoonkasra",
description="ARABIC SMALL LOW NOON WITH KASRA",
direction="nsm",
linebreak="cm",
@@ -20359,6 +20415,7 @@ characters.data={
[0x8DA]={
category="mn",
combining=0xE6,
+ contextname="arabichighthalatha",
description="ARABIC SMALL HIGH WORD ATH-THALATHA",
direction="nsm",
linebreak="cm",
@@ -20367,6 +20424,7 @@ characters.data={
[0x8DB]={
category="mn",
combining=0xE6,
+ contextname="arabichighsajda",
description="ARABIC SMALL HIGH WORD AS-SAJDA",
direction="nsm",
linebreak="cm",
@@ -20375,6 +20433,7 @@ characters.data={
[0x8DC]={
category="mn",
combining=0xE6,
+ contextname="arabichighnisf",
description="ARABIC SMALL HIGH WORD AN-NISF",
direction="nsm",
linebreak="cm",
@@ -20383,6 +20442,7 @@ characters.data={
[0x8DD]={
category="mn",
combining=0xE6,
+ contextname="arabichighsakta",
description="ARABIC SMALL HIGH WORD SAKTA",
direction="nsm",
linebreak="cm",
@@ -20391,6 +20451,7 @@ characters.data={
[0x8DE]={
category="mn",
combining=0xE6,
+ contextname="arabichighqif",
description="ARABIC SMALL HIGH WORD QIF",
direction="nsm",
linebreak="cm",
@@ -20399,6 +20460,7 @@ characters.data={
[0x8DF]={
category="mn",
combining=0xE6,
+ contextname="arabichighwaqf",
description="ARABIC SMALL HIGH WORD WAQFA",
direction="nsm",
linebreak="cm",
@@ -20407,6 +20469,7 @@ characters.data={
[0x8E0]={
category="mn",
combining=0xE6,
+ contextname="arabichighfootnotemarker",
description="ARABIC SMALL HIGH FOOTNOTE MARKER",
direction="nsm",
linebreak="cm",
@@ -20415,6 +20478,7 @@ characters.data={
[0x8E1]={
category="mn",
combining=0xE6,
+ contextname="arabichighsmallsafha",
description="ARABIC SMALL HIGH SIGN SAFHA",
direction="nsm",
linebreak="cm",
@@ -20423,6 +20487,7 @@ characters.data={
[0x8E2]={
arabic="u",
category="cf",
+ contextname="arabicdisputedendofayah",
description="ARABIC DISPUTED END OF AYAH",
direction="an",
linebreak="al",
@@ -62581,8 +62646,8 @@ characters.data={
linebreak="ai",
mathclass="relation",
mathextensible="h",
- mathname="leftrightarrow",
mathlist={ 0x3C, 0x2212, 0x3E },
+ mathname="leftrightarrow",
synonyms={ "relation" },
unicodeslot=0x2194,
variants=variants_emoji,
@@ -63254,8 +63319,8 @@ characters.data={
linebreak="al",
mathclass="relation",
mathextensible="l",
- mathname="Leftarrow",
mathlist={ 0x3C, 0x3D, 0x3D },
+ mathname="Leftarrow",
unicodeslot=0x21D0,
},
[0x21D1]={
@@ -63310,8 +63375,8 @@ characters.data={
linebreak="ai",
mathclass="relation",
mathextensible="h",
- mathname="Leftrightarrow",
mathlist={ 0x3C, 0x3D, 0x3D, 0x3E },
+ mathname="Leftrightarrow",
unicodeslot=0x21D4,
},
[0x21D5]={
@@ -64455,8 +64520,8 @@ characters.data={
direction="on",
linebreak="ai",
mathclass="relation",
- mathname="squaredots",
mathlist={ 0x3A, 0x3A },
+ mathname="squaredots",
unicodeslot=0x2237,
},
[0x2238]={
@@ -64475,8 +64540,8 @@ characters.data={
direction="on",
linebreak="al",
mathclass="relation",
- mathname="minuscolon",
mathlist={ 0x2212, 0x3A },
+ mathname="minuscolon",
unicodeslot=0x2239,
},
[0x223A]={
@@ -64760,8 +64825,8 @@ characters.data={
direction="on",
linebreak="al",
mathclass="relation",
- mathname="colonequals",
mathlist={ 0x3A, 0x3D },
+ mathname="colonequals",
mirror=0x2255,
unicodeslot=0x2254,
},
@@ -64771,8 +64836,8 @@ characters.data={
direction="on",
linebreak="al",
mathclass="relation",
- mathname="equalscolon",
mathlist={ 0x3D, 0x3A },
+ mathname="equalscolon",
mirror=0x2254,
unicodeslot=0x2255,
},
@@ -64897,8 +64962,8 @@ characters.data={
linebreak="ai",
mathclass="relation",
mathextensible="h",
- mathname="equiv",
mathlist={ 0x3D, 0x3D },
+ mathname="equiv",
unicodeslot=0x2261,
},
[0x2262]={
@@ -64910,8 +64975,8 @@ characters.data={
mathclass="relation",
mathextensible="h",
mathfiller="triplerelfill",
- mathname="nequiv",
mathlist={ 0x2F, 0x3D, 0x3D },
+ mathname="nequiv",
specials={ "char", 0x2261, 0x338 },
unicodeslot=0x2262,
},
@@ -65024,8 +65089,8 @@ characters.data={
direction="on",
linebreak="ai",
mathclass="relation",
- mathname="ll",
mathlist={ 0x3C, 0x3C },
+ mathname="ll",
mirror=0x226B,
unicodeslot=0x226A,
},
@@ -65037,8 +65102,8 @@ characters.data={
direction="on",
linebreak="ai",
mathclass="relation",
- mathname="gg",
mathlist={ 0x3E, 0x3E },
+ mathname="gg",
mirror=0x226A,
unicodeslot=0x226B,
},
@@ -65058,8 +65123,8 @@ characters.data={
direction="on",
linebreak="al",
mathclass="relation",
- mathname="nasymp",
mathlist={ 0x2F, 0x224D },
+ mathname="nasymp",
specials={ "char", 0x224D, 0x338 },
unicodeslot=0x226D,
},
@@ -65071,9 +65136,9 @@ characters.data={
direction="on",
linebreak="ai",
mathclass="relation",
+ mathlist={ 0x2F, 0x3C },
mathname="nless",
mirror=0x226F,
- mathlist={ 0x2F, 0x3C },
specials={ "char", 0x3C, 0x338 },
unicodeslot=0x226E,
},
@@ -65085,9 +65150,9 @@ characters.data={
direction="on",
linebreak="ai",
mathclass="relation",
+ mathlist={ 0x2F, 0x3E },
mathname="ngtr",
mirror=0x226E,
- mathlist={ 0x2F, 0x3E },
specials={ "char", 0x3E, 0x338 },
unicodeslot=0x226F,
},
@@ -65098,9 +65163,9 @@ characters.data={
direction="on",
linebreak="al",
mathclass="relation",
+ mathlist={ 0x2F, 0x3C, 0x3D },
mathname="nleq",
mirror=0x2271,
- mathlist={ 0x2F, 0x3C, 0x3D },
specials={ "char", 0x2264, 0x338 },
unicodeslot=0x2270,
},
@@ -65111,8 +65176,8 @@ characters.data={
direction="on",
linebreak="al",
mathclass="relation",
- mathname="ngeq",
mathlist={ 0x2F, 0x3E, 0x3D },
+ mathname="ngeq",
mirror=0x2270,
specials={ "char", 0x2265, 0x338 },
unicodeslot=0x2271,
@@ -66266,8 +66331,8 @@ characters.data={
direction="on",
linebreak="al",
mathclass="relation",
- mathname="eqless",
mathlist={ 0x3D, 0x3C },
+ mathname="eqless",
mirror=0x22DD,
unicodeslot=0x22DC,
},
@@ -66277,8 +66342,8 @@ characters.data={
direction="on",
linebreak="al",
mathclass="relation",
- mathname="eqgtr",
mathlist={ 0x3D, 0x3E },
+ mathname="eqgtr",
mirror=0x22DC,
unicodeslot=0x22DD,
},
@@ -76553,8 +76618,8 @@ characters.data={
linebreak="al",
mathclass="relation",
mathextensible="l",
- mathname="longleftarrow",
mathlist={ 0x3C, 0x2212, 0x2212 },
+ mathname="longleftarrow",
unicodeslot=0x27F5,
},
[0x27F6]={
@@ -76566,8 +76631,8 @@ characters.data={
mathclass="relation",
mathextensible="r",
mathfiller="rightarrowfill",
- mathname="longrightarrow",
mathlist={ 0x2212, 0x2212, 0x3E },
+ mathname="longrightarrow",
mathparent=0x2192,
unicodeslot=0x27F6,
},
@@ -76580,8 +76645,8 @@ characters.data={
mathclass="relation",
mathextensible="h",
mathfiller="leftrightarrowfill",
- mathname="longleftrightarrow",
mathlist={ 0x3C, 0x2212, 0x2212, 0x3E },
+ mathname="longleftrightarrow",
mathparent=0x2190,
unicodeslot=0x27F7,
},
@@ -76593,8 +76658,8 @@ characters.data={
mathclass="relation",
mathextensible="l",
mathfiller="Leftarrowfill",
- mathname="Longleftarrow",
mathlist={ 0x3C, 0x3D, 0x3D, 0x3D },
+ mathname="Longleftarrow",
unicodeslot=0x27F8,
},
[0x27F9]={
@@ -76605,10 +76670,9 @@ characters.data={
linebreak="al",
mathclass="relation",
mathextensible="r",
- mathextensible="r",
mathfiller="Rightarrowfill",
- mathname="Longrightarrow",
mathlist={ 0x3D, 0x3D, 0x3D, 0x3E },
+ mathname="Longrightarrow",
unicodeslot=0x27F9,
},
[0x27FA]={
@@ -76619,8 +76683,8 @@ characters.data={
mathclass="relation",
mathextensible="h",
mathfiller="Leftrightarrowfill",
- mathname="Longleftrightarrow",
mathlist={ 0x3C, 0x3D, 0x3D, 0x3D, 0x3E },
+ mathname="Longleftrightarrow",
unicodeslot=0x27FA,
},
[0x27FB]={
@@ -81511,8 +81575,8 @@ characters.data={
direction="on",
linebreak="al",
mathclass="relation",
- mathname="lesseqqgtr",
mathlist={ 0x3C, 0x3D, 0x3E },
+ mathname="lesseqqgtr",
mirror=0x2A8C,
unicodeslot=0x2A8B,
},
@@ -81522,8 +81586,8 @@ characters.data={
direction="on",
linebreak="al",
mathclass="relation",
- mathname="gtreqqless",
mathlist={ 0x3E, 0x3D, 0x3C },
+ mathname="gtreqqless",
mirror=0x2A8B,
unicodeslot=0x2A8C,
},
@@ -131667,6 +131731,7 @@ characters.data={
[0xFD3E]={
adobename="parenleftaltonearabic",
category="ps",
+ contextname="arabicparenleft",
description="ORNATE LEFT PARENTHESIS",
direction="on",
linebreak="cl",
@@ -131675,6 +131740,7 @@ characters.data={
[0xFD3F]={
adobename="parenrightaltonearabic",
category="pe",
+ contextname="arabicparenright",
description="ORNATE RIGHT PARENTHESIS",
direction="on",
linebreak="op",
@@ -132627,6 +132693,7 @@ characters.data={
},
[0xFDF0]={
category="lo",
+ contextname="arabicsalla",
description="ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM",
direction="al",
linebreak="al",
@@ -132635,6 +132702,7 @@ characters.data={
},
[0xFDF1]={
category="lo",
+ contextname="arabicqala",
description="ARABIC LIGATURE QALA USED AS KORANIC STOP SIGN ISOLATED FORM",
direction="al",
linebreak="al",
@@ -132644,6 +132712,7 @@ characters.data={
[0xFDF2]={
adobename="lamlamhehisolatedarabic",
category="lo",
+ contextname="arabicallah",
description="ARABIC LIGATURE ALLAH ISOLATED FORM",
direction="al",
linebreak="al",
@@ -132652,6 +132721,7 @@ characters.data={
},
[0xFDF3]={
category="lo",
+ contextname="arabicakbar",
description="ARABIC LIGATURE AKBAR ISOLATED FORM",
direction="al",
linebreak="al",
@@ -132660,6 +132730,7 @@ characters.data={
},
[0xFDF4]={
category="lo",
+ contextname="arabicmuhammad",
description="ARABIC LIGATURE MOHAMMAD ISOLATED FORM",
direction="al",
linebreak="al",
@@ -132668,6 +132739,7 @@ characters.data={
},
[0xFDF5]={
category="lo",
+ contextname="arabicslcm",
description="ARABIC LIGATURE SALAM ISOLATED FORM",
direction="al",
linebreak="al",
@@ -132676,6 +132748,7 @@ characters.data={
},
[0xFDF6]={
category="lo",
+ contextname="arabicrasoul",
description="ARABIC LIGATURE RASOUL ISOLATED FORM",
direction="al",
linebreak="al",
@@ -132684,6 +132757,7 @@ characters.data={
},
[0xFDF7]={
category="lo",
+ contextname="arabicalayhe",
description="ARABIC LIGATURE ALAYHE ISOLATED FORM",
direction="al",
linebreak="al",
@@ -132692,6 +132766,7 @@ characters.data={
},
[0xFDF8]={
category="lo",
+ contextname="arabicwasallam",
description="ARABIC LIGATURE WASALLAM ISOLATED FORM",
direction="al",
linebreak="al",
@@ -132700,6 +132775,7 @@ characters.data={
},
[0xFDF9]={
category="lo",
+ contextname="arabicsalla",
description="ARABIC LIGATURE SALLA ISOLATED FORM",
direction="al",
linebreak="al",
@@ -132709,6 +132785,7 @@ characters.data={
[0xFDFA]={
adobename="sallallahoualayhewasallamarabic",
category="lo",
+ contextname="arabicallallahou",
description="ARABIC LIGATURE SALLALLAHOU ALAYHE WASALLAM",
direction="al",
linebreak="al",
@@ -132717,6 +132794,7 @@ characters.data={
},
[0xFDFB]={
category="lo",
+ contextname="arabicjallajalalouhou",
description="ARABIC LIGATURE JALLAJALALOUHOU",
direction="al",
linebreak="al",
@@ -132725,6 +132803,7 @@ characters.data={
},
[0xFDFC]={
category="sc",
+ contextname="arabicrialsign",
description="RIAL SIGN",
direction="al",
linebreak="po",
@@ -132734,6 +132813,7 @@ characters.data={
},
[0xFDFD]={
category="so",
+ contextname="arabicbasmalah",
description="ARABIC LIGATURE BISMILLAH AR-RAHMAN AR-RAHEEM",
direction="on",
linebreak="al",
diff --git a/tex/context/base/mkiv/cldf-stp.lua b/tex/context/base/mkiv/cldf-stp.lua
index 389cfb7f7..2ce6341b3 100644
--- a/tex/context/base/mkiv/cldf-stp.lua
+++ b/tex/context/base/mkiv/cldf-stp.lua
@@ -55,17 +55,50 @@ interfaces.implement {
local ctx_resume = context.protected.cs.clf_step
-function context.step(first,...)
- if first ~= nil then
- context(first,...)
+local closeinput = texio.closeinput -- experiment
+local closeindeed = true
+local stepsindeed = true
+
+directives.register("context.steps.nosteps",function(v) stepsindeed = not v end)
+directives.register("context.steps.noclose",function(v) closeindeed = not v end)
+
+if closeinput then
+
+ function context.step(first,...)
+ if first ~= nil then
+ context(first,...)
+ end
+if stepper then
+ ctx_resume()
+ yield()
+ if closeindeed then
+ closeinput()
+ end
+end
+ end
+
+else
+
+ function context.step(first,...)
+ if first ~= nil then
+ context(first,...)
+ end
+if stepper then
+ ctx_resume()
+ yield()
+end
end
- ctx_resume()
- yield()
+
end
function context.stepwise(f)
- depth = depth + 1
- stack[depth] = stepper
- stepper = create(f)
- ctx_resume(stepper)
+ if stepsindeed then
+ depth = depth + 1
+ stack[depth] = stepper
+ stepper = create(f)
+ -- ctx_resume(stepper)
+ ctx_resume()
+ else
+ f()
+ end
end
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 175a90c27..e471eff11 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{2018.01.24 10:47}
+\newcontextversion{2018.02.06 18:11}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 90b424dc9..2fde8b961 100644
--- a/tex/context/base/mkiv/context.mkiv
+++ b/tex/context/base/mkiv/context.mkiv
@@ -41,7 +41,7 @@
%D up and the dependencies are more consistent.
\edef\contextformat {\jobname}
-\edef\contextversion{2018.01.24 10:47}
+\edef\contextversion{2018.02.06 18:11}
\edef\contextkind {beta}
%D For those who want to use this:
diff --git a/tex/context/base/mkiv/font-ctx.lua b/tex/context/base/mkiv/font-ctx.lua
index 638cd9b3a..bc562d0d0 100644
--- a/tex/context/base/mkiv/font-ctx.lua
+++ b/tex/context/base/mkiv/font-ctx.lua
@@ -1797,7 +1797,7 @@ function definers.resolve(specification) -- overload function in font-con.lua
end
-- so far for goodie hacks
local hash = hashfeatures(specification)
- local name = specification.name
+ local name = specification.name or "badfont"
local sub = specification.sub
if sub and sub ~= "" then
specification.hash = lower(name .. " @ " .. sub .. ' @ ' .. hash)
diff --git a/tex/context/base/mkiv/font-ots.lua b/tex/context/base/mkiv/font-ots.lua
index 75b99e999..faed8ec1e 100644
--- a/tex/context/base/mkiv/font-ots.lua
+++ b/tex/context/base/mkiv/font-ots.lua
@@ -2404,7 +2404,6 @@ local function handle_contextchain(head,start,dataset,sequence,contexts,rlmode,s
local startchar = nofcontext == 1 or ischar(start,currentfont) -- only needed in a chain
-
for k=1,nofcontexts do -- does this disc mess work well with n > 1
local ck = contexts[k]
@@ -3654,6 +3653,56 @@ local function pardirstate(start)
return getnext(start), new, new
end
+-- -- some day we move to this:
+--
+-- local function txtdirstate1(start,stack,top,rlparmode)
+-- local dir, sub = getdirection(start)
+-- local new
+-- if sub then
+-- if top == 1 then
+-- top = 0
+-- new = rlparmode
+-- elseif dir < 2 then
+-- top = top - 1
+-- if stack[top] == 1 then
+-- new = -1
+-- else
+-- new = 1
+-- end
+-- else
+-- new = rlparmode
+-- end
+-- elseif dir == 1 then
+-- top = top + 1
+-- stack[top] = 1
+-- new = -1
+-- elseif dir == 0 then
+-- top = top + 1
+-- stack[top] = 0
+-- new = 1
+-- else
+-- new = rlparmode
+-- end
+-- if trace_directions then
+-- report_process("directions after txtdir %a: parmode %a, txtmode %a, level %a",dir,mref(rlparmode),mref(new),top)
+-- end
+-- return getnext(start), top, new
+-- end
+--
+-- local function pardirstate(start)
+-- local dir = getdirection(start)
+-- local new = 0
+-- if dir == 0 then
+-- new = 1
+-- elseif dir == 1 then
+-- new = -1
+-- end
+-- if trace_directions then
+-- report_process("directions after pardir %a: parmode %a",dir,mref(new))
+-- end
+-- return getnext(start), new, new
+-- end
+
otf.helpers = otf.helpers or { }
otf.helpers.txtdirstate = txtdirstate
otf.helpers.pardirstate = pardirstate
diff --git a/tex/context/base/mkiv/font-tra.mkiv b/tex/context/base/mkiv/font-tra.mkiv
index 1f50c4a45..566897240 100644
--- a/tex/context/base/mkiv/font-tra.mkiv
+++ b/tex/context/base/mkiv/font-tra.mkiv
@@ -218,7 +218,7 @@
\vtop \bgroup
\hsize\dimexpr\hsize-6\emwidth\relax
\resetallattributes
- \pardir TLT\textdir TLT\relax
+ \lefttoright
\dontleavehmode
\ifnum\recurselevel=\scratchcounter
\ruledhbox{\box\otfcompositionbox}%
diff --git a/tex/context/base/mkiv/grph-epd.lua b/tex/context/base/mkiv/grph-epd.lua
index 17f04d593..a189a8706 100644
--- a/tex/context/base/mkiv/grph-epd.lua
+++ b/tex/context/base/mkiv/grph-epd.lua
@@ -13,18 +13,33 @@ local settings_to_hash = utilities.parsers.settings_to_hash
local codeinjections = backends.codeinjections
-function figures.mergegoodies(optionlist)
+local function mergegoodies(optionlist)
local options = settings_to_hash(optionlist)
- local all = options[variables.all] or options[variables.yes]
+ local all = options[variables.all] or options[variables.yes]
if all or options[variables.reference] then
codeinjections.mergereferences()
end
- if all or options[variables.layer] then
- codeinjections.mergeviewerlayers()
+ if all or options[variables.comment] then
+ codeinjections.mergecomments()
end
if all or options[variables.bookmark] then
codeinjections.mergebookmarks()
end
+ if all or options[variables.field] then
+ codeinjections.mergefields()
+ end
+ if all or options[variables.layer] then
+ codeinjections.mergeviewerlayers()
+ end
+ codeinjections.flushmergelayer()
+end
+
+function figures.mergegoodies(optionlist)
+ context.stepwise(function()
+ -- we use stepwise because we might need to define symbols
+ -- for stamps that have no default appearance
+ mergegoodies(optionlist)
+ end)
end
interfaces.implement {
diff --git a/tex/context/base/mkiv/grph-epd.mkiv b/tex/context/base/mkiv/grph-epd.mkiv
index 153979fcc..45c11795b 100644
--- a/tex/context/base/mkiv/grph-epd.mkiv
+++ b/tex/context/base/mkiv/grph-epd.mkiv
@@ -43,6 +43,34 @@
\fi
\to \externalfigurepostprocessors
+\defineframed
+ [epdfstampsymbol]
+ [\c!foregroundstyle=\v!mono,
+ \c!background=\c!color,
+ \c!rulethickness=.125\exheight,
+ \c!offset=.250\exheight,
+ \c!backgroundcolor=lightgray, % can be adapted before first usage
+ \c!framecolor=darkgray, % can be adapted before first usage
+ \c!corner=\v!round]
+
+\definesymbol[Stamped] [\epdfstampsymbol{Stamped}]
+
+\definesymbol[Approved] [\epdfstampsymbol{Approved}]
+\definesymbol[Experimental] [\epdfstampsymbol{Experimental}]
+\definesymbol[NotApproved] [\epdfstampsymbol{NotApproved}]
+\definesymbol[AsIs] [\epdfstampsymbol{AsIs}]
+\definesymbol[Expired] [\epdfstampsymbol{Expired}]
+\definesymbol[NotForPublicRelease] [\epdfstampsymbol{NotForPublicRelease}]
+\definesymbol[Confidential] [\epdfstampsymbol{Confidential}]
+\definesymbol[Final] [\epdfstampsymbol{Final}]
+\definesymbol[Sold] [\epdfstampsymbol{Sold}]
+\definesymbol[Departmental] [\epdfstampsymbol{Departmental}]
+\definesymbol[ForComment] [\epdfstampsymbol{ForComment}]
+\definesymbol[TopSecret] [\epdfstampsymbol{TopSecret}]
+\definesymbol[Draft] [\epdfstampsymbol{Draft}]
+\definesymbol[ForPublicRelease] [\epdfstampsymbol{ForPublicRelease}]
+
+
\protect \endinput
% /Properties << /xxxx 22 0 R >>
diff --git a/tex/context/base/mkiv/grph-trf.mkiv b/tex/context/base/mkiv/grph-trf.mkiv
index 099efa114..6bd0e65cc 100644
--- a/tex/context/base/mkiv/grph-trf.mkiv
+++ b/tex/context/base/mkiv/grph-trf.mkiv
@@ -15,16 +15,14 @@
\unprotect
-%D We probably use too many dimens as the width calculations can
-%D go away. Some of this is an inheritance of limited backends
-%D (some supported fractions, some 1000's, some dimentions) so
-%D we calculate all of them. Nowadays scaling is always available
-%D so we could simplify the code. On the other hand, we now get
-%D some extra values for free.
+%D We probably use too many dimens as the width calculations can go away. Some of
+%D this is an inheritance of limited backends (some supported fractions, some
+%D 1000's, some dimentions) so we calculate all of them. Nowadays scaling is always
+%D available so we could simplify the code. On the other hand, we now get some extra
+%D values for free.
%D
-%D We could move the calculations to \LUA\ and clean up this
-%D lot anyway. On the other hand, there is some danger of messing
-%D up so it has a real low priority.
+%D We could move the calculations to \LUA\ and clean up this lot anyway. On the
+%D other hand, there is some danger of messing up so it has a real low priority.
% local:
@@ -40,6 +38,8 @@
\newconditional\c_grph_scale_scaling_done
\newconditional\c_grph_scale_limit_factors \settrue\c_grph_scale_limit_factors
+\newconditional\c_grph_scale_swap_factor
+
\newdimen\d_grph_scale_wd
\newdimen\d_grph_scale_ht
\newdimen\d_grph_scale_dp
@@ -75,6 +75,7 @@
\installcorenamespace{scale}
\installcorenamespace{scalegrid}
\installcorenamespace{scalenorm}
+\installcorenamespace{scalefact}
\installcommandhandler \??scale {scale} \??scale % we can have instances
@@ -99,8 +100,6 @@
\unexpanded\def\scale{\dodoubleempty\grph_scale}
-% we could have: \freezeparameter\c!scale etc (less backtracking when used multiple)
-
\def\grph_scale[#1][#2]%
{\bgroup
% this is quite common so we might make this a helper
@@ -223,42 +222,6 @@
\let\grph_scale_calculations_report\relax
-% \def\grph_scale_calculations_report
-% {\writestatus
-% {scaled}%
-% {wd:\finalscaleboxwidth,ht:\finalscaleboxheight
-% ,xscale:\finalscaleboxxscale,yscale:\finalscaleboxyscale}}
-
-% \def\grph_scale_calculations_yes
-% {\settrue\c_grph_scale_done
-% % initial values
-% \d_grph_scale_x_offset\zeropoint
-% \d_grph_scale_y_offset\zeropoint
-% \d_grph_scale_x_size \d_grph_scale_wd
-% \d_grph_scale_y_size \d_grph_scale_ht % alleen ht wordt geschaald!
-% % final values
-% \global\d_grph_scale_used_x_size \zeropoint % see note * (core-fig)
-% \global\d_grph_scale_used_y_size \zeropoint % see note * (core-fig)
-% \c_grph_scale_used_x_scale \plusone % see note * (core-fig)
-% \c_grph_scale_used_y_scale \plusone % see note * (core-fig)
-% \let\m_grph_scale_used_x_scale \!!plusone
-% \let\m_grph_scale_used_y_scale \!!plusone
-% % preparations
-% \setfalse\c_grph_scale_scaling_done
-% \grph_scale_check_parameters
-% % calculators
-% % beware, they operate in sequence, and calculate missing dimensions / messy
-% % grph_scale_by_nature % when? needed?
-% \ifconditional\c_grph_scale_scaling_done\else\grph_scale_by_factor \fi
-% \ifconditional\c_grph_scale_scaling_done\else\grph_scale_by_scale \fi
-% \ifconditional\c_grph_scale_scaling_done\else\grph_scale_by_dimension\fi
-% % used in actual scaling
-% \xdef\finalscaleboxwidth {\the\d_grph_scale_used_x_size}%
-% \xdef\finalscaleboxheight {\the\d_grph_scale_used_y_size}%
-% \xdef\finalscaleboxxscale {\luaexpr{\number\c_grph_scale_used_x_scale/1000}}%
-% \xdef\finalscaleboxyscale {\luaexpr{\number\c_grph_scale_used_y_scale/1000}}%
-% \grph_scale_calculations_report}
-
\def\grph_scale_calculations_yes
{\settrue\c_grph_scale_done
% initial values
@@ -315,7 +278,19 @@
% \placefigure{none}{\rotate[frame=on,offset=overlay]{\externalfigure[t:/sources/cow.pdf][width-6]}} \page
% \placefigure{none}{\framed[frame=on,offset=overlay]{\externalfigure[t:/sources/cow.pdf][width-7]}}
-\def\m_grph_scale_factor_set{\v!max,\v!fit,\v!broad,\v!auto} % can be an \edef
+%D The \typpe {min} option makes sure that the smallest available space determines
+%D the max size (so we can get a bleed on the other axis):
+%D
+%D \startlinecorrection
+%D \startcombination[nx=2,ny=2,distance=4cm]
+%D {\externalfigure[hacker][factor=max,maxwidth=6cm,maxheight=6cm]} {}
+%D {\externalfigure[mill] [factor=max,maxwidth=6cm,maxheight=6cm]} {}
+%D {\externalfigure[hacker][factor=min,maxwidth=6cm,maxheight=6cm]} {}
+%D {\externalfigure[mill] [factor=min,maxwidth=6cm,maxheight=6cm]} {}
+%D \stopcombination
+%D \stoplinecorrection
+
+\def\m_grph_scale_factor_set{\v!min,\v!max,\v!fit,\v!broad,\v!auto} % can be an \edef
\def\grph_scale_by_factor
{\doifelseinset\p_factor\m_grph_scale_factor_set
@@ -326,37 +301,9 @@
\grph_scale_by_factor_c
\grph_scale_by_factor_d}}}
-% \def\grph_scale_by_factor_a
-% {\grph_scale_apply_size
-% \ifdim\d_grph_scale_x_size>\d_grph_scale_y_size
-% \grph_scale_calculate_norm \d_grph_scale_used_x_size\p_factor\p_maxwidth\hsize\d_grph_scale_h_size
-% \grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size\d_grph_scale_used_y_size\d_grph_scale_y_size
-% \else
-% \grph_scale_calculate_norm \d_grph_scale_used_y_size\p_factor\p_maxheight\d_grph_scale_outer_v_size\d_grph_scale_v_size
-% \grph_scale_calculate_scales\d_grph_scale_used_y_size\d_grph_scale_y_size\d_grph_scale_used_x_size\d_grph_scale_x_size
-% \fi
-% \grph_scale_by_factor_indeed}
-%
-% \def\grph_scale_by_factor_b
-% {\grph_scale_apply_size
-% \grph_scale_calculate_norm \d_grph_scale_used_y_size\p_hfactor\p_maxheight\d_grph_scale_outer_v_size\d_grph_scale_v_size
-% \grph_scale_calculate_scales\d_grph_scale_used_y_size\d_grph_scale_y_size\d_grph_scale_used_x_size\d_grph_scale_x_size
-% \grph_scale_by_factor_indeed}
-%
-% \def\grph_scale_by_factor_c
-% {\grph_scale_apply_size
-% \grph_scale_calculate_norm \d_grph_scale_used_x_size\p_wfactor\p_maxwidth\hsize\d_grph_scale_h_size
-% \grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size\d_grph_scale_used_y_size\d_grph_scale_y_size
-% \grph_scale_by_factor_indeed}
-%
-% \def\grph_scale_by_factor_d
-% {\grph_scale_calculate_norm\d_grph_scale_used_y_size\p_factor \p_height \textheight\d_grph_scale_v_size
-% \grph_scale_calculate_norm\d_grph_scale_used_y_size\p_hfactor\p_height \textheight\d_grph_scale_v_size
-% \grph_scale_calculate_norm\d_grph_scale_used_x_size\p_wfactor\p_width \hsize \hsize}
-
\def\grph_scale_by_factor_a
{\grph_scale_apply_size
- \ifdim\d_grph_scale_x_size>\d_grph_scale_y_size
+ \ifdim\d_grph_scale_x_size >\d_grph_scale_y_size
\grph_scale_calculate_norm \d_grph_scale_used_x_size\p_factor\p_maxwidth\hsize\d_grph_scale_h_size
\grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size
\d_grph_scale_used_y_size\m_grph_scale_used_x_scale\d_grph_scale_y_size
@@ -387,39 +334,19 @@
\grph_scale_calculate_norm\d_grph_scale_used_x_size\p_wfactor\p_width \hsize \hsize}
\def\grph_scale_by_factor_indeed
- {\settrue\c_grph_scale_scaling_done
+ {\grph_scale_calculate_fact\p_factor
+ \settrue\c_grph_scale_scaling_done
\ifconditional\c_grph_scale_limit_factors
- \ifdim\d_grph_scale_used_x_size>\d_grph_scale_h_size
+ \ifdim\d_grph_scale_used_x_size\ifconditional\c_grph_scale_swap_factor<\else>\fi\d_grph_scale_h_size
\global\d_grph_scale_used_y_size\zeropoint
\global\d_grph_scale_used_x_size\d_grph_scale_h_size
- \else\ifdim\d_grph_scale_used_y_size>\d_grph_scale_v_size
+ \else\ifdim\d_grph_scale_used_y_size\ifconditional\c_grph_scale_swap_factor<\else>\fi\d_grph_scale_v_size
\global\d_grph_scale_used_x_size\zeropoint
\global\d_grph_scale_used_y_size\d_grph_scale_v_size
\fi\fi
\fi
\grph_scale_by_dimension}
-% \def\grph_scale_by_scale
-% {\edef\m_grph_scale_temp{\p_scale\p_xscale\p_yscale}%
-% \ifx\m_grph_scale_temp\empty \else
-% \grph_scale_apply_scale\d_grph_scale_used_x_size\d_grph_scale_x_size\c_grph_scale_used_x_scale\p_xscale
-% \grph_scale_apply_scale\d_grph_scale_used_y_size\d_grph_scale_y_size\c_grph_scale_used_y_scale\p_yscale
-% \global\d_grph_scale_used_x_size\zeropoint
-% \global\d_grph_scale_used_y_size\zeropoint
-% \ifx\p_maxwidth\empty
-% \ifx\p_maxheight\empty
-% \else
-% \ifdim\d_grph_scale_y_size>\p_maxheight\relax
-% \global\d_grph_scale_used_y_size\p_maxheight
-% \fi
-% \fi
-% \else
-% \ifdim\d_grph_scale_x_size>\p_maxwidth\relax
-% \global\d_grph_scale_used_x_size\p_maxwidth
-% \fi
-% \fi
-% \fi}
-
\def\grph_scale_by_scale
{\edef\m_grph_scale_temp{\p_scale\p_xscale\p_yscale}%
\ifx\m_grph_scale_temp\empty \else
@@ -460,34 +387,6 @@
\fi
\fi}
-% \def\grph_scale_by_dimension_a
-% {\grph_scale_by_dimension_indeed
-% {\grph_scale_calculate_scale\d_grph_scale_used_y_size\d_grph_scale_y_size\c_grph_scale_used_y_scale
-% \grph_scale_calculate_scale\d_grph_scale_used_x_size\d_grph_scale_x_size\c_grph_scale_used_x_scale}%
-% {\grph_scale_calculate_scale\d_grph_scale_used_y_size\d_grph_scale_y_size\c_grph_scale_used_y_scale
-% \grph_scale_calculate_scale\d_grph_scale_used_x_size\d_grph_scale_x_size\c_grph_scale_used_x_scale}%
-% {\grph_scale_calculate_scale\d_grph_scale_used_y_size\d_grph_scale_y_size\c_grph_scale_used_y_scale
-% \grph_scale_calculate_scale\d_grph_scale_used_x_size\d_grph_scale_x_size\c_grph_scale_used_x_scale}}
-%
-% \def\grph_scale_by_dimension_b
-% {\grph_scale_by_dimension_indeed
-% {\grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size\d_grph_scale_used_y_size\d_grph_scale_y_size}%
-% {\grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size\d_grph_scale_used_y_size\d_grph_scale_y_size}%
-% {\grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size\d_grph_scale_used_y_size\d_grph_scale_y_size}}
-%
-% \def\grph_scale_by_dimension_c
-% {\grph_scale_by_dimension_indeed
-% {\grph_scale_calculate_scales\d_grph_scale_used_y_size\d_grph_scale_y_size\d_grph_scale_used_x_size\d_grph_scale_x_size}%
-% {\grph_scale_calculate_scales\d_grph_scale_used_y_size\d_grph_scale_y_size\d_grph_scale_used_x_size\d_grph_scale_x_size}%
-% {\grph_scale_calculate_scales\d_grph_scale_used_y_size\d_grph_scale_y_size\d_grph_scale_used_x_size\d_grph_scale_x_size}}
-%
-% \def\grph_scale_by_dimension_d
-% {\grph_scale_by_dimension_indeed
-% {\grph_scale_apply_scale\d_grph_scale_used_x_size\d_grph_scale_x_size\c_grph_scale_used_x_scale\p_xscale
-% \grph_scale_apply_scale\d_grph_scale_used_y_size\d_grph_scale_y_size\c_grph_scale_used_y_scale\p_yscale}%
-% {\grph_scale_calculate_scales\d_grph_scale_used_x_size\d_grph_scale_x_size\d_grph_scale_used_y_size\d_grph_scale_y_size}%
-% {\grph_scale_calculate_scales\d_grph_scale_used_y_size\d_grph_scale_y_size\d_grph_scale_used_x_size\d_grph_scale_x_size}}
-
\def\grph_scale_by_dimension_a
{\grph_scale_by_dimension_indeed
{\grph_scale_calculate_scale\m_grph_scale_used_y_scale\d_grph_scale_used_y_size\d_grph_scale_y_size
@@ -544,6 +443,10 @@
\def\grph_scale_calculate_norm#1#2% todo: swap 1 and 2 and pass one less
{\csname\??scalenorm\ifcsname\??scalenorm#2\endcsname#2\else\s!unknown\fi\endcsname#1#2}
+\def\grph_scale_calculate_fact#1%
+ {\csname\??scalefact\ifcsname\??scalefact#1\endcsname#1\else\s!unknown\fi\endcsname}
+
+%setvalue{\??scalenorm\v!min }#1#2#3#4#5{\global#1#4}
\setvalue{\??scalenorm\v!max }#1#2#3#4#5{\global#1#4}
\setvalue{\??scalenorm\v!fit }#1#2#3#4#5{\global#1#5}
\setvalue{\??scalenorm\v!broad }#1#2#3#4#5{\global#1\dimexpr#5-4\externalfigureparameter\c!bodyfont\relax}
@@ -552,44 +455,30 @@
\setvalue{\??scalenorm\empty }#1#2#3#4#5{\ifx#3\empty\else\global#1#3\fi}
\setvalue{\??scalenorm\s!default}#1#2#3#4#5{\ifx#3\empty\else\global#1#3\fi}
-% \def\grph_scale_calculate_scales#1#2#3#4%
-% {\scratchdimen\dimexpr#1/\dimexpr#2/\plusthousand\relax\relax
-% \c_grph_scale_used_x_scale\scratchdimen
-% \c_grph_scale_used_y_scale\scratchdimen
-% %\writestatus{!!!!}{\the#3/\luaexpr{\number\dimexpr#1\relax/\number\dimexpr#2/1000}}%
-% #3\dimexpr\c_grph_scale_used_x_scale\dimexpr#4/\plusthousand\relax\relax}
-%
-% \def\grph_scale_calculate_scale#1#2#3%
-% {#3\dimexpr#1/\dimexpr#2/\plusthousand\relax\relax}
-%
-% \def\grph_scale_apply_scale#1#2#3#4% #4 = parameter / scale can be empty
-% {\ifcase0#4\relax
-% \ifcase0\p_scale\relax
-% #3=\plusthousand
-% \else
-% #3=\p_scale
-% \fi
+\setvalue{\??scalefact\v!min }{\global\settrue \c_grph_scale_swap_factor}
+\setvalue{\??scalefact\s!unknown}{\global\setfalse\c_grph_scale_swap_factor}
+
+% \setvalue{\??scalenorm\v!min }#1#2#3#4#5% an ugly hack
+% {\ifdim\d_grph_scale_used_x_size>\d_grph_scale_h_size
+% \d_grph_scale_used_y_size\vsize
% \else
-% #3=#4%
-% \fi
-% \relax % important ! still ?
-% \global#1\ifnum#3=\plusthousand#2\else\dimexpr#3\dimexpr#2/\plusthousand\relax\relax\fi
-% \relax}
+% \d_grph_scale_used_x_size\hsize
+% \fi}
+
+\setvalue{\??scalenorm\v!min}#1#2#3#4#5% an ugly hack
+ {\d_grph_scale_used_x_size\hsize
+ \d_grph_scale_used_y_size\vsize}
\def\grph_scale_calculate_scales#1#2%
{\edef\m_grph_scale_used_x_scale{\luaexpr{\number#1/\number#2}}%
\let\m_grph_scale_used_y_scale\m_grph_scale_used_x_scale}
-% we could inline this:
-%
-% \grph_scale_calculate_scale\m_grph_scale_used_x_scale#1#2
-% \let\m_grph_scale_used_y_scale\m_grph_scale_used_x_scale
-
\def\grph_scale_calculate_scale#1#2#3%
{\edef#1{\luaexpr{\number#2/\number#3}}}
\def\grph_scale_apply_scale#1#2% #1 = parameter / scale can be empty
- {\edef#1{\luaexpr
+ {% no overflow
+ \edef#1{\luaexpr
{\number
\ifx#2\empty
\ifx \p_scale \empty \plusthousand \else
@@ -642,31 +531,6 @@
\d_grph_scale_h_size\p_width
\fi}
-%\def\grph_scale_convert_large_scale#1#2#3#4%
-% {\scratchdimen#1\relax
-% \ifnum#3=\plusthousand
-% % == scale 1
-% \else
-% % better 1000 100 10 ranges, evt round 2sp
-% \divide\scratchdimen \plusthousand
-% \multiply\scratchdimen #3\relax
-% \fi
-% \scratchdimen-\scratchdimen % beter hier - dan in driver
-% \edef#2{\the\scratchdimen}%
-% \scratchcounter#3\relax
-% \ifnum\scratchcounter>\plustenthousand
-% \divide\scratchcounter\plusten
-% \scratchdimen\the\scratchcounter\points % \the ?
-% \else
-% \scratchdimen\the\scratchcounter\points % \the ?
-% \divide\scratchdimen\plusten
-% \fi
-% \edef#4{\withoutpt\the\scratchdimen}}
-%
-% \def\grph_scale_convert_large_scale#1#2#3#4% less overflow
-% {\edef#2{\ifnum#3=\plusthousand-\the\dimexpr#1\else\luaexpr{-\number#3*\number\dimexpr#1/1000}sp\fi}%
-% \edef#4{\luaexpr{\number#3/10}}}
-
% \startcombination
% {\externalfigure[cow.pdf] [frame=on,height=3cm,equalwidth=6cm]} {a cow}
% {\externalfigure[mill.png][frame=on,height=3cm,equalwidth=6cm]} {a mill}
@@ -722,9 +586,8 @@
%D \macros
%D {clip, setupclipping}
%D
-%D Although related to figures, clipping can be applied to
-%D arbitrary content. We can use \METAPOST\ to provide a non
-%D rectangular clipping path.
+%D Although related to figures, clipping can be applied to arbitrary content. We can
+%D use \METAPOST\ to provide a non rectangular clipping path.
%D
%D \starttyping
%D \startMPclip{fun}
@@ -739,8 +602,7 @@
%D \clip[x=2,y=1]{\externalfigure[photo]}
%D \stoptyping
%D
-%D When we want to clip to the oval we defined a few lines ago,
-%D we say:
+%D When we want to clip to the oval we defined a few lines ago, we say:
%D
%D \starttyping
%D \clip[nx=1,ny=1,x=1,y=1,mp=fun]{\externalfigure[photo]}
@@ -769,57 +631,6 @@
\grph_clip_yes_finish
\grph_clip_nop_finish}
-% \def\grph_clip_yes_finish
-% {\ifdim\@@cpwidth>\zeropoint
-% \!!dimena\@@cpwidth
-% \!!dimenc\@@cphoffset
-% \else
-% \!!dimena\wd\nextbox
-% \divide\!!dimena \@@cpnx
-% \!!dimenc\@@cpx\!!dimena
-% \advance\!!dimenc -\!!dimena
-% \!!dimena\@@cpsx\!!dimena
-% \fi
-% \relax % sure
-% \ifdim\@@cpheight>\zeropoint
-% \!!dimenb\@@cpheight
-% \!!dimend\ht\nextbox
-% \advance\!!dimend -\@@cpvoffset
-% \advance\!!dimend -\!!dimenb
-% \else
-% \!!dimenb\ht\nextbox
-% \divide\!!dimenb \@@cpny
-% \!!dimend-\@@cpy\!!dimenb
-% \advance\!!dimend -\@@cpsy\!!dimenb
-% \advance\!!dimend \!!dimenb
-% \!!dimenb\@@cpsy\!!dimenb
-% \advance\!!dimend \ht\nextbox % dimend !
-% \fi
-% \setbox\nextbox\hbox % old
-% {\advance\!!dimenc -\@@cpleftoffset % new !
-% \advance\!!dimend -\@@cpbottomoffset % new ! % - added
-% \hskip-\!!dimenc\lower\!!dimend\box\nextbox}% old
-% \wd\nextbox\zeropoint
-% \ht\nextbox\zeropoint
-% \dp\nextbox\zeropoint
-% \setbox\nextbox\hbox
-% {\advance\!!dimena \@@cpleftoffset % new !
-% \advance\!!dimena \@@cprightoffset % new !
-% \advance\!!dimenb \@@cpbottomoffset % new !
-% \advance\!!dimenb \@@cptopoffset % new !
-% \dostartclipping\@@cpmp\!!dimena\!!dimenb % old
-% \box\nextbox
-% \dostopclipping}%
-% \setbox\nextbox\hbox % new !
-% {\!!dimena-\@@cpleftoffset % new !
-% \!!dimenb \@@cpbottomoffset % new ! % - removed
-% \hskip\!!dimena\lower\!!dimenb\box\nextbox}% new !
-% \wd\nextbox\!!dimena
-% \ht\nextbox\!!dimenb
-% \dp\nextbox\zeropoint
-% \box\nextbox
-% \egroup}
-
\def\grph_clip_yes_finish
{\ifdim\clippingparameter\c!width>\zeropoint
\scratchwidth \clippingparameter\c!width
@@ -917,8 +728,7 @@
\box\nextbox
\egroup}
-%D A couple of examples, demonstrating how the depth is
-%D taken care of:
+%D A couple of examples, demonstrating how the depth is taken care of:
%D
%D \startbuffer
%D test\rotate[frame=on, rotation=0] {gans}%
@@ -929,27 +739,20 @@
%D \stopbuffer
%D
%D \typebuffer \getbuffer
-
-% When we rotate over arbitrary angles, we need to relocate the
-% resulting box because rotation brings that box onto the negative
-% axis. The calculations (mostly sin and cosine) need to be tuned for
-% the way a box is packages (i.e. the refence point). A typical example
-% of drawing, scribbling, and going back to the days of school math.
-%
-% We do a bit more calculations than needed, simply because that way
-% it's easier to debug the code.
-
-% Cleanup in progress ... todo: less boxing
+%D
+%D When we rotate over arbitrary angles, we need to relocate the resulting box
+%D because rotation brings that box onto the negative axis. The calculations (mostly
+%D sin and cosine) need to be tuned for the way a box is packages (i.e. the refence
+%D point). A typical example of drawing, scribbling, and going back to the days of
+%D school math.
+%D
+%D We do a bit more calculations than needed, simply because that way it's easier to
+%D debug the code.
\installcorenamespace {rotate}
\installcorenamespace {rotatelocation}
\installcorenamespace {rotatepreset}
-% we can alias these to \d_layers-* to save some dimens or maybe have a generic
-% set of scratch variables
-
-% maybe just \rotation_...
-
\newdimen\d_grph_rotate_x_size
\newdimen\d_grph_rotate_y_size
\newdimen\d_grph_rotate_x_offset
diff --git a/tex/context/base/mkiv/lpdf-ano.lua b/tex/context/base/mkiv/lpdf-ano.lua
index 5f378066d..01f015b72 100644
--- a/tex/context/base/mkiv/lpdf-ano.lua
+++ b/tex/context/base/mkiv/lpdf-ano.lua
@@ -13,7 +13,7 @@ if not modules then modules = { } end modules ['lpdf-ano'] = {
-- internal references are indicated by a number (and turned into <autoprefix><number>)
-- we only flush internal destinations that are referred
-local next, tostring, tonumber, rawget = next, tostring, tonumber, rawget
+local next, tostring, tonumber, rawget, type = next, tostring, tonumber, rawget, type
local rep, format, find = string.rep, string.format, string.find
local min = math.min
local lpegmatch = lpeg.match
@@ -706,6 +706,9 @@ local function finishreference(width,height,depth,prerolled) -- %0.2f looks okay
end
local function finishannotation(width,height,depth,prerolled,r)
+ if type(prerolled) == "function" then
+ prerolled = prerolled()
+ end
local annot = f_annot(prerolled,pdfrectangle(width,height,depth))
if r then
pdfdelayedobject(annot,r)
@@ -728,7 +731,8 @@ end
function nodeinjections.annotation(width,height,depth,prerolled,r)
if prerolled then
if trace_references then
- report_references("special: width %p, height %p, depth %p, prerolled %a",width,height,depth,prerolled)
+ report_references("special: width %p, height %p, depth %p, prerolled %a",width,height,depth,
+ type(prerolled) == "string" and prerolled or "-")
end
return new_latelua(function() finishannotation(width,height,depth,prerolled,r or false) end)
end
diff --git a/tex/context/base/mkiv/lpdf-epd.lua b/tex/context/base/mkiv/lpdf-epd.lua
index 185efd92b..f252e1b0b 100644
--- a/tex/context/base/mkiv/lpdf-epd.lua
+++ b/tex/context/base/mkiv/lpdf-epd.lua
@@ -59,6 +59,7 @@ lpdf.epdf = lpdf_epdf
-- --
-- getDict = object.getDict
-- getArray = object.getArray
+-- getInt = object.getInt
-- getReal = object.getReal
-- getNum = object.getNum
-- getString = object.getString
@@ -112,6 +113,7 @@ local openPDF = epdf.open
local getDict = object.getDict
local getArray = object.getArray
local getReal = object.getReal
+local getInt = object.getInt
local getNum = object.getNum
local getString = object.getString
local getBool = object.getBool
@@ -193,15 +195,50 @@ local checked_access
local frompdfdoc = lpdf.frompdfdoc
-local function get_flagged(t,f,k)
- local fk = f[k]
- if not fk then
- return t[k]
- elseif fk == "rawtext" then
- return frompdfdoc(t[k])
- else -- no other flags yet
- return t[k]
+local get_flagged
+
+if lpdf.dictionary then
+
+ local pdfdictionary = lpdf.dictionary
+ local pdfarray = lpdf.array
+ local pdfconstant = lpdf.constant
+ local pdfstring = lpdf.string
+ local pdfunicode = lpdf.unicode
+
+ get_flagged = function(t,f,k)
+ local tk = t[k] -- triggers resolve
+ local fk = f[k]
+ if not fk then
+ return tk
+ elseif fk == "name" then
+ return pdfconstant(tk)
+ elseif fk == "array" then
+ return pdfarray(tk)
+ elseif fk == "dictionary" then
+ return pdfarray(tk)
+ elseif fk == "rawtext" then
+ return pdfstring(tk)
+ elseif fk == "unicode" then
+ return pdfunicode(tk)
+ else
+ return tk
+ end
+ end
+
+else
+
+ get_flagged = function(t,f,k)
+ local tk = t[k] -- triggers resolve
+ local fk = f[k]
+ if not fk then
+ return tk
+ elseif fk == "rawtext" then
+ return frompdfdoc(tk)
+ else
+ return tk
+ end
end
+
end
local function prepare(document,d,t,n,k,mt,flags)
@@ -220,7 +257,7 @@ local function prepare(document,d,t,n,k,mt,flags)
local cached = document.__cache__[objnum]
if not cached then
cached = checked_access[kind](v,document,objnum,mt)
- if c then
+ if cached then
document.__cache__[objnum] = cached
document.__xrefs__[cached] = objnum
end
@@ -261,8 +298,11 @@ local function some_dictionary(d,document)
__call = function(t,k)
return get_flagged(t,f,k)
end,
+ -- __kind = function(k)
+ -- return f[k] or type(t[k])
+ -- end,
} )
- return t
+ return t, "dictionary"
end
end
@@ -279,8 +319,11 @@ local function get_dictionary(object,document,r,mt)
__call = function(t,k)
return get_flagged(t,f,k)
end,
+ -- __kind = function(k)
+ -- return f[k] or type(t[k])
+ -- end,
} )
- return t
+ return t, "dictionary"
end
end
@@ -314,8 +357,14 @@ local function prepare(document,a,t,n,k)
fatal_error("error: invalid value at index %a in array of %a",i,document.filename)
end
end
- getmetatable(t).__index = nil
- return t[k]
+ local m = getmetatable(t)
+ if m then
+ m.__index = nil
+ m.__len = nil
+ end
+ if k then
+ return t[k]
+ end
end
local function some_array(a,document)
@@ -324,13 +373,20 @@ local function some_array(a,document)
local t = { n = n }
setmetatable(t, {
__index = function(t,k)
- return prepare(document,a,t,n,k)
+ return prepare(document,a,t,n,k,_,_,f)
end,
__len = function(t)
+ prepare(document,a,t,n,_,_,f)
return n
end,
+ __call = function(t,k)
+ return get_flagged(t,f,k)
+ end,
+ -- __kind = function(k)
+ -- return f[k] or type(t[k])
+ -- end,
} )
- return t
+ return t, "array"
end
end
@@ -339,15 +395,23 @@ local function get_array(object,document)
local n = a and arrayGetLength(a) or 0
if n > 0 then
local t = { n = n }
+ local f = { }
setmetatable(t, {
__index = function(t,k)
- return prepare(document,a,t,n,k)
+ return prepare(document,a,t,n,k,_,_,f)
end,
__len = function(t)
+ prepare(document,a,t,n,_,_,f)
return n
end,
+ __call = function(t,k)
+ return get_flagged(t,f,k)
+ end,
+ -- __kind = function(k)
+ -- return f[k] or type(t[k])
+ -- end,
} )
- return t
+ return t, "array"
end
end
@@ -395,7 +459,7 @@ local u_pattern = lpeg.patterns.utfbom_16_be * lpeg.patterns.utf16_to_utf8_be
----- b_pattern = lpeg.patterns.hextobytes
local function get_string(v)
- -- the toutf function only converts a utf16 string and leves the original
+ -- the toutf function only converts a utf16 string and leaves the original
-- untouched otherwise; one might want to apply lpdf.frompdfdoc to a
-- non-unicode string
local s = getString(v)
@@ -404,7 +468,7 @@ local function get_string(v)
end
local u = lpegmatch(u_pattern,s)
if u then
- return u -- , "unicode"
+ return u, "unicode"
end
-- this is too tricky and fails on e.g. reload of url www.pragma-ade.com)
-- local b = lpegmatch(b_pattern,s)
@@ -414,6 +478,10 @@ local function get_string(v)
return s, "rawtext"
end
+local function get_name(v)
+ return getName(v), "name"
+end
+
local function get_null()
return nil
end
@@ -436,10 +504,10 @@ checked_access = setmetatableindex(function(t,k)
end)
checked_access[typenumbers.boolean] = getBool
-checked_access[typenumbers.integer] = getNum
+checked_access[typenumbers.integer] = getInt
checked_access[typenumbers.real] = getReal
checked_access[typenumbers.string] = get_string -- getString
-checked_access[typenumbers.name] = getName
+checked_access[typenumbers.name] = get_name
checked_access[typenumbers.null] = get_null
checked_access[typenumbers.array] = get_array -- d,document,r
checked_access[typenumbers.dictionary] = get_dictionary -- d,document,r
diff --git a/tex/context/base/mkiv/lpdf-fld.lua b/tex/context/base/mkiv/lpdf-fld.lua
index f220838de..73de5eaf6 100644
--- a/tex/context/base/mkiv/lpdf-fld.lua
+++ b/tex/context/base/mkiv/lpdf-fld.lua
@@ -171,6 +171,9 @@ plus.hidden = plus.Hidden
plus.printable = plus.Printable
plus.auto = plus.AutoView
+lpdf.flags.widgets = flag
+lpdf.flags.annotations = plus
+
-- some day .. lpeg with function or table
local function fieldflag(specification) -- /Ff
@@ -357,6 +360,8 @@ local function fieldsurrounding(specification)
return tostring(stream)
end
+codeinjections.fieldsurrounding = fieldsurrounding
+
local function registerfonts()
if next(usedfonts) then
checkpdfdocencoding() -- already done
diff --git a/tex/context/base/mkiv/lpdf-ini.lua b/tex/context/base/mkiv/lpdf-ini.lua
index e197e201f..f8cff2032 100644
--- a/tex/context/base/mkiv/lpdf-ini.lua
+++ b/tex/context/base/mkiv/lpdf-ini.lua
@@ -122,6 +122,8 @@ backends.pdf = pdfbackend
lpdf = lpdf or { }
local lpdf = lpdf
+lpdf.flags = lpdf.flags or { } -- will be filled later
+
do
local setmajorversion = pdf.setmajorversion
@@ -1336,3 +1338,63 @@ implement { name = "lpdf_adddocumentcolorspace", arguments = two_strings, action
implement { name = "lpdf_adddocumentpattern", arguments = two_strings, actions = function(a,b) lpdf.adddocumentpattern (a,pdfverbose(b)) end }
implement { name = "lpdf_adddocumentshade", arguments = two_strings, actions = function(a,b) lpdf.adddocumentshade (a,pdfverbose(b)) end }
+-- more helpers: copy from lepd to lpdf
+
+function lpdf.copyconstant(v)
+ if v ~= nil then
+ return pdfconstant(v)
+ end
+end
+
+function lpdf.copyboolean(v)
+ if v ~= nil then
+ return pdfboolean(v)
+ end
+end
+
+function lpdf.copyunicode(v)
+ if v then
+ return pdfunicode(v)
+ end
+end
+
+function lpdf.copyarray(a)
+ if a then
+ local t = pdfarray()
+ local k = a.__kind
+ for i=1,#a do
+ t[i] = a(i)
+ end
+-- inspect(t)
+ return t
+ end
+end
+
+function lpdf.copydictionary(d)
+ if d then
+ local t = pdfdictionary()
+ for k, v in next, d do
+ t[k] = d(k)
+ end
+-- inspect(t)
+ return t
+ end
+end
+
+function lpdf.copynumber(v)
+ return v
+end
+
+function lpdf.copyinteger(v)
+ return v -- maybe checking or round ?
+end
+
+function lpdf.copyfloat(v)
+ return v
+end
+
+function lpdf.copystring(v)
+ if v then
+ return pdfstring(v)
+ end
+end
diff --git a/tex/context/base/mkiv/lpdf-wid.lua b/tex/context/base/mkiv/lpdf-wid.lua
index d04af20f2..03febbf01 100644
--- a/tex/context/base/mkiv/lpdf-wid.lua
+++ b/tex/context/base/mkiv/lpdf-wid.lua
@@ -25,7 +25,7 @@ if not modules then modules = { } end modules ['lpdf-wid'] = {
-- html5 media in pdf then.
local tonumber, next = tonumber, next
-local gmatch, gsub, find, lower, format = string.gmatch, string.gsub, string.find, string.lower, string.format
+local gmatch, gsub, find, lower = string.gmatch, string.gsub, string.find, string.lower
local stripstring = string.strip
local settings_to_array = utilities.parsers.settings_to_array
local settings_to_hash = utilities.parsers.settings_to_hash
@@ -156,8 +156,8 @@ comment_symbols.Default = Note
local function analyzesymbol(symbol,collection)
if not symbol or symbol == "" then
- return collection.Default, nil
- elseif collection[symbol] then
+ return collection and collection.Default, nil
+ elseif collection and collection[symbol] then
return collection[symbol], nil
else
local setn, setr, setd
@@ -179,6 +179,17 @@ local function analyzesymbol(symbol,collection)
end
end
+local function analyzenormalsymbol(symbol)
+ local appearance = pdfdictionary {
+ N = registeredsymbol(symbol),
+ }
+ local appearanceref = pdfshareobjectreference(appearance)
+ return appearanceref
+end
+
+codeinjections.analyzesymbol = analyzesymbol
+codeinjections.analyzenormalsymbol = analyzenormalsymbol
+
local function analyzelayer(layer)
-- todo: (specification.layer ~= "" and pdfreference(specification.layer)) or nil, -- todo: ref to layer
end
@@ -383,7 +394,7 @@ function nodeinjections.attachfile(specification)
FS = aref,
Contents = pdfunicode(title),
Name = name,
- NM = pdfstring(format("attachment:%s",nofattachments)),
+ NM = pdfstring("attachment:"..nofattachments),
T = author ~= "" and pdfunicode(author) or nil,
Subj = subtitle ~= "" and pdfunicode(subtitle) or nil,
C = analyzecolor(specification.colorvalue,specification.colormodel),
@@ -391,9 +402,13 @@ function nodeinjections.attachfile(specification)
AP = appearance,
OC = analyzelayer(specification.layer),
}
- local width, height, depth = specification.width or 0, specification.height or 0, specification.depth
- local box = hpack_node(nodeinjections.annotation(width,height,depth,d()))
- box.width, box.height, box.depth = width, height, depth
+ local width = specification.width or 0
+ local height = specification.height or 0
+ local depth = specification.depth or 0
+ local box = hpack_node(nodeinjections.annotation(width,height,depth,d()))
+ box.width = width
+ box.height = height
+ box.depth = depth
return box
end
end
@@ -472,10 +487,12 @@ function nodeinjections.comment(specification) -- brrr: seems to be done twice
CA = analyzetransparency(specification.transparencyvalue),
OC = analyzelayer(specification.layer),
Name = name,
- NM = pdfstring(format("comment:%s",nofcomments)),
+ NM = pdfstring("comment:"..nofcomments),
AP = appearance,
}
- local width, height, depth = specification.width or 0, specification.height or 0, specification.depth
+ local width = specification.width or 0
+ local height = specification.height or 0
+ local depth = specification.depth or 0
local box
if usepopupcomments then
-- rather useless as we can hide/vide
@@ -493,7 +510,9 @@ function nodeinjections.comment(specification) -- brrr: seems to be done twice
else
box = hpack_node(nodeinjections.annotation(width,height,depth,d()))
end
- box.width, box.height, box.depth = width, height, depth -- redundant
+ box.width = width -- redundant
+ box.height = height -- redundant
+ box.depth = depth -- redundant
return box
end
diff --git a/tex/context/base/mkiv/math-arr.mkiv b/tex/context/base/mkiv/math-arr.mkiv
index 6a70f57b3..a0dda66b9 100644
--- a/tex/context/base/mkiv/math-arr.mkiv
+++ b/tex/context/base/mkiv/math-arr.mkiv
@@ -279,8 +279,8 @@
\unexpanded\def\specrightarrowfill {\defaultmtharrowfill \relbar \relbar \rightarrow}
\unexpanded\def\specleftarrowfill {\defaultmtharrowfill \leftarrow \relbar \relbar}
-\unexpanded\def\rightarrowfill {\specrightarrowfill \textstyle}
-\unexpanded\def\leftarrowfill {\specleftarrowfill \textstyle}
+\unexpanded\def\rightarrowfill {\specrightarrowfill\textstyle}
+\unexpanded\def\leftarrowfill {\specleftarrowfill \textstyle}
\unexpanded\def\equalfill {\defaultmtharrowfill \Relbar \Relbar \Relbar}
\unexpanded\def\Rightarrowfill {\defaultmtharrowfill \Relbar \Relbar \Rightarrow}
diff --git a/tex/context/base/mkiv/math-del.mkiv b/tex/context/base/mkiv/math-del.mkiv
index 269b6946a..dd847d2f1 100644
--- a/tex/context/base/mkiv/math-del.mkiv
+++ b/tex/context/base/mkiv/math-del.mkiv
@@ -69,13 +69,16 @@
% A new experiment:
-\installcorenamespace {mathextensible}
+% Hm, we already have \definemathextensible so we need to preserve that one. We now
+% use \definemathdelimiter.
-\installcommandhandler \??mathextensible {mathextensible} \??mathextensible
+\installcorenamespace {mathdelimiter}
-\let\setupmathextensibles\setupmathextensible
+\installcommandhandler \??mathdelimiter {mathdelimiter} \??mathdelimiter
-\setupmathextensibles
+\let\setupmathdelimiters\setupmathdelimiter
+
+\setupmathdelimiters
[\c!symbol=0,
\c!command=\v!yes,
\c!factor=1.5,
@@ -85,50 +88,50 @@
\c!depth=\exheight]
\appendtoks
- \edef\p_command{\mathextensibleparameter\c!command}%
+ \edef\p_command{\mathdelimiterparameter\c!command}%
\ifx\p_command\v!yes
- \setuevalue\currentmathextensible{\math_fenced_extensible[\currentmathextensible]}%
+ \setuevalue\currentmathdelimiter{\math_fenced_extensible[\currentmathdelimiter]}%
\fi
-\to \everydefinemathextensible
+\to \everydefinemathdelimiter
\unexpanded\def\math_fenced_extensible
{\dodoubleempty\math_fenced_extensible_indeed}
\unexpanded\def\math_fenced_extensible_indeed[#1][#2]%
{\mathop
- {\edef\currentmathextensible{#1}%
- \edef\p_factor{\mathextensibleparameter\c!factor}%
+ {\edef\currentmathdelimiter{#1}%
+ \edef\p_factor{\mathdelimiterparameter\c!factor}%
\ifsecondargument
\doifassignmentelse{#2}
- {\setupcurrentmathextensible[#2]%
- \edef\p_factor{\mathextensibleparameter\c!factor}}%
+ {\setupcurrentmathdelimiter[#2]%
+ \edef\p_factor{\mathdelimiterparameter\c!factor}}%
{\edef\p_factor{#2}}%
\else
- \edef\p_factor{\mathextensibleparameter\c!factor}%
+ \edef\p_factor{\mathdelimiterparameter\c!factor}%
\fi
- \edef\p_exact{\mathextensibleparameter\c!exact}%
- \edef\p_axis {\mathextensibleparameter\c!axis}%
- \edef\p_leftoffset{\mathextensibleparameter\c!leftoffset}%
- \edef\p_rightoffset{\mathextensibleparameter\c!rightoffset}%
+ \edef\p_exact{\mathdelimiterparameter\c!exact}%
+ \edef\p_axis {\mathdelimiterparameter\c!axis}%
+ \edef\p_leftoffset{\mathdelimiterparameter\c!leftoffset}%
+ \edef\p_rightoffset{\mathdelimiterparameter\c!rightoffset}%
\ifx\p_leftoffset\empty\else
\mskip\p_leftoffset
\fi
\Uvextensible
\ifx\p_exact\v!yes exact \fi
\ifx\p_axis \v!yes axis \fi
- height \p_factor\dimexpr\mathextensibleparameter\c!height\relax
- depth \p_factor\dimexpr\mathextensibleparameter\c!depth \relax
- \Udelimiter\zerocount\zerocount\mathextensibleparameter\c!symbol
+ height \p_factor\dimexpr\mathdelimiterparameter\c!height\relax
+ depth \p_factor\dimexpr\mathdelimiterparameter\c!depth \relax
+ \Udelimiter\zerocount\zerocount\mathdelimiterparameter\c!symbol
\relax
\ifx\p_rightoffset\empty\else
\mskip\p_rightoffset
\fi}}
-\let\mathextensible\math_fenced_extensible
+\let\mathdelimiter\math_fenced_extensible
-\definemathextensible[integral][\c!symbol="222B]
+\definemathdelimiter[integral][\c!symbol="222B]
-% \setupmathextensible[integral][rightoffset=-3mu,exact=yes,factor=2]
+% \setupmathdelimiter[integral][rightoffset=-3mu,exact=yes,factor=2]
%
% \let\inlineint \int
% \let\displayint\integral
diff --git a/tex/context/base/mkiv/math-fbk.lua b/tex/context/base/mkiv/math-fbk.lua
index c10388570..7aa8c437f 100644
--- a/tex/context/base/mkiv/math-fbk.lua
+++ b/tex/context/base/mkiv/math-fbk.lua
@@ -318,7 +318,7 @@ local function accent_to_extensible(target,newchr,original,oldchr,height,depth,s
if olddata and not olddata.commands then -- not: and olddata.width > 0
local addprivate = fonts.helpers.addprivate
if swap then
- swap = characters[swap]
+ swap = characters[swap]
height = swap.depth or 0
depth = 0
else
@@ -346,7 +346,8 @@ local function accent_to_extensible(target,newchr,original,oldchr,height,depth,s
height = height,
depth = depth,
}
- local newnextglyph = addprivate(target,formatters["M-N-%H"](nextglyph),newnextdata)
+-- local newnextglyph = addprivate(target,formatters["M-N-%H"](nextglyph),newnextdata)
+ local newnextglyph = addprivate(target,nil,newnextdata)
newdata.next = newnextglyph
local nextnextglyph = oldnextdata.next
if nextnextglyph == nextglyph then
@@ -377,7 +378,8 @@ local function accent_to_extensible(target,newchr,original,oldchr,height,depth,s
height = height,
depth = depth,
}
- hvi.glyph = addprivate(target,formatters["M-H-%H"](oldglyph),newdata)
+-- hvi.glyph = addprivate(target,formatters["M-H-%H"](oldglyph),newdata)
+ hvi.glyph = addprivate(target,nil,newdata)
else
report_fallbacks("error in fallback: no valid horiz_variants, slot %X, index %i",oldglyph,i)
end
@@ -389,22 +391,36 @@ local function accent_to_extensible(target,newchr,original,oldchr,height,depth,s
end
end
-virtualcharacters[0x203E] = function(data) -- could be FE33E instead
+virtualcharacters[0x203E] = function(data)
local target = data.target
local height, depth = 0, 0
- local mathparameters = target.mathparameters
- if mathparameters then
- height = mathparameters.OverbarVerticalGap
- depth = mathparameters.UnderbarVerticalGap
- else
+-- local mathparameters = target.mathparameters
+-- if mathparameters then
+-- height = mathparameters.OverbarVerticalGap
+-- depth = mathparameters.UnderbarVerticalGap
+-- else
height = target.parameters.xheight/4
depth = height
- end
+-- end
return accent_to_extensible(target,0x203E,data.original,0x0305,height,depth,nil,nil,0x203E)
end
-virtualcharacters[0xFE33E] = virtualcharacters[0x203E] -- convenient
-virtualcharacters[0xFE33F] = virtualcharacters[0x203E] -- convenient
+-- virtualcharacters[0xFE33E] = virtualcharacters[0x203E] -- convenient
+-- virtualcharacters[0xFE33F] = virtualcharacters[0x203E] -- convenient
+
+virtualcharacters[0xFE33E] = function(data)
+ local target = data.target
+ local height = 0
+ local depth = target.parameters.xheight/4
+ return accent_to_extensible(target,0xFE33E,data.original,0x0305,height,depth,nil,nil,0x203E)
+end
+
+virtualcharacters[0xFE33F] = function(data)
+ local target = data.target
+ local height = target.parameters.xheight/8
+ local depth = height
+ return accent_to_extensible(target,0xFE33F,data.original,0x0305,height,depth,nil,nil,0x203E)
+end
-- spacing (no need for a cache of widths)
diff --git a/tex/context/base/mkiv/math-ini.mkiv b/tex/context/base/mkiv/math-ini.mkiv
index d815e587d..cf00c6773 100644
--- a/tex/context/base/mkiv/math-ini.mkiv
+++ b/tex/context/base/mkiv/math-ini.mkiv
@@ -1788,6 +1788,19 @@
% error
\fi}
+\def\triggeredmathstyleparameter#1% to bypass the relax
+ {\ifcase\numexpr\normalmathstyle\relax
+ #1\displaystyle \or % 0
+ #1\crampeddisplaystyle \or % 1
+ #1\textstyle \or % 2
+ #1\crampedtextstyle \or % 3
+ #1\scriptstyle \or % 4
+ #1\crampedscriptstyle \or % 5
+ #1\scriptscriptstyle \or % 6
+ #1\crampedscriptscriptstyle \else
+ % error
+ \fi}
+
\def\mathstylefont#1% #1 is number (\normalmathstyle)
{\ifcase\numexpr#1\relax
\textfont \or
@@ -1799,7 +1812,20 @@
\scriptscriptfont \or
\scriptscriptfont \else
\textfont
- \fi\zerocount} % hm, can ie other value as well
+ \fi\fam} % was \zerocount
+
+\def\somemathstylefont#1% #1 is number (\normalmathstyle)
+ {\ifcase\numexpr#1\relax
+ \textfont \or
+ \textfont \or
+ \textfont \or
+ \textfont \or
+ \scriptfont \or
+ \scriptfont \or
+ \scriptscriptfont \or
+ \scriptscriptfont \else
+ \textfont
+ \fi}
\def\mathsmallstylefont#1% #1 is number (\normalmathstyle)
{\ifcase\numexpr#1\relax
@@ -1812,7 +1838,7 @@
\scriptscriptfont \or
\scriptscriptfont \else
\scriptfont
- \fi\zerocount} % hm, can ie other value as well
+ \fi\fam} % was \zerocount
\def\mathstyleface#1% #1 is number (\normalmathstyle)
{\ifcase\numexpr#1\relax
@@ -1879,6 +1905,12 @@
\unexpanded\def\showmathstyle{\verbosemathstyle\normalmathstyle}
+%D Handy too:
+
+\def\mathcharwd{\fontcharwd\mathstylefont\normalmathstyle}
+\def\mathcharht{\fontcharht\mathstylefont\normalmathstyle}
+\def\mathchardp{\fontchardp\mathstylefont\normalmathstyle}
+
%D Some dimension fun:
\def\mathexheight
diff --git a/tex/context/base/mkiv/math-rad.mkvi b/tex/context/base/mkiv/math-rad.mkvi
index 699a1a125..c0b128a61 100644
--- a/tex/context/base/mkiv/math-rad.mkvi
+++ b/tex/context/base/mkiv/math-rad.mkvi
@@ -240,13 +240,10 @@
\d_overlay_linewidth\linewidth
\edef\overlaylinecolor{\mathornamentparameter\c!color}%
\edef\p_mp{\mathornamentparameter\c!mp}%
- % thw width of the graphic determines the width of the final result
+ % the width of the graphic determines the width of the final result
\setbox\scratchbox\hpack{\uniqueMPgraphic{\p_mp}}% todo: add code key + tag
- \scratchdimen \wd\scratchbox
- % \scratchtopoffset \dimexpr\scratchoffset+\dp\nextbox\relax
- % \scratchbottomoffset\dimexpr\scratchoffset+\ht\nextbox/2\relax
- \hpack to \scratchdimen{\hss\box\nextbox\hss}%
- \hskip-\scratchdimen
+ \hpack to \wd\scratchbox{\hss\box\nextbox\hss}%
+ \hskip-\wd\scratchbox
\box\scratchbox
\endgroup}
diff --git a/tex/context/base/mkiv/math-stc.mkvi b/tex/context/base/mkiv/math-stc.mkvi
index babf29bce..c9d469d61 100644
--- a/tex/context/base/mkiv/math-stc.mkvi
+++ b/tex/context/base/mkiv/math-stc.mkvi
@@ -98,7 +98,7 @@
% $\Udelimiterunder 0 "2190{x}$ \par $\Udelimiterunder 0 "27F8{x}$\par
\setvalue{\??mathextensiblefallbacks}%
- {\hbox{\vrule\s!width\scratchwidth\s!height.1\exheight\s!depth\zeropoint}}
+ {\hpack{\vrule\s!width\scratchwidth\s!height.1\mathexheight\s!depth\zeropoint}}
% \def\math_stackers_with_fallback#codepoint%
% {\begingroup
@@ -160,17 +160,13 @@
\c!right=,
\c!mathclass=\s!rel,
\c!alternative=\v!normal,
- \c!mp=math:stacker:\number\scratchunicode,
- \c!mpheight=\exheight,
- \c!mpdepth=\exheight,
- \c!mpoffset=.25\exheight,
- \c!voffset=.25\exheight,
- \c!hoffset=.5\emwidth,
+ \c!voffset=.25\mathexheight,
+ \c!hoffset=\zeropoint,
\c!topoffset=\zeropoint, % for manual italic correction
\c!distance=\mathstackersparameter\c!voffset, % distance between symbol and base (can be different from voffset)
- \c!minheight=\exheight,
+ \c!minheight=\mathexheight,
\c!mindepth=\zeropoint,
- \c!minwidth=.5\emwidth,
+ \c!minwidth=.5\mathemwidth,
\c!order=\v!normal,
\c!strut=,
\c!color=, % todo: when I need it
@@ -230,16 +226,46 @@
\letvalue{\??mathstackersalternative\v!normal }\math_stackers_content
\letvalue{\??mathstackersalternative\v!default}\math_stackers_content
+\setupmathstackers
+ [\c!mp=math:stacker:\number\scratchunicode,
+ \c!mpheight=\mathcharht\scratchunicode,
+ \c!mpdepth=\mathchardp\scratchunicode,
+ \c!mpoffset=.25\mathexheight]
+
+% \setvalue{\??mathstackersalternative\v!mp}%
+% {\hbox\bgroup % todo: add code key + tag
+% \d_overlay_width \scratchwidth
+% \d_overlay_height \dimexpr\mathstackersparameter\c!mpheight
+% \d_overlay_depth \dimexpr\mathstackersparameter\c!mpdepth
+% \d_overlay_offset \dimexpr\mathstackersparameter\c!mpoffset
+% \d_overlay_linewidth\linewidth
+% \edef\overlaylinecolor{\mathstackersparameter\c!color}%
+% \edef\p_mp{\mathstackersparameter\c!mp}%
+% \uniqueMPgraphic{\p_mp}%
+% \egroup}
+
\setvalue{\??mathstackersalternative\v!mp}%
- {\hbox\bgroup % todo: add code key + tag
+ {\normalexpanded{\math_stackers_mp_box
+ {\the\dimexpr\mathstackersparameter\c!mpheight}%
+ {\the\dimexpr\mathstackersparameter\c!mpdepth}%
+ {\the\dimexpr\mathstackersparameter\c!mpoffset}%
+ {\the\dimexpr\triggeredmathstyleparameter\Umathfractionrule}%
+ {\the\dimexpr\triggeredmathstyleparameter\Umathaxis}%
+ {\the\mathexheight}%
+ {\the\mathemwidth}%
+ }}
+
+\unexpanded\def\math_stackers_mp_box#1#2#3#4#5#6#7%
+ {\hpack\bgroup % todo: add code key + tag
+ % we can speed up \mathexheight expansion a bit
\d_overlay_width \scratchwidth
- \d_overlay_height \dimexpr\mathstackersparameter\c!mpheight
- \d_overlay_depth \dimexpr\mathstackersparameter\c!mpdepth
- \d_overlay_offset \dimexpr\mathstackersparameter\c!mpoffset
- \d_overlay_linewidth\linewidth
+ \d_overlay_height #1\relax
+ \d_overlay_depth #2\relax
+ \d_overlay_offset #3\relax
+ \d_overlay_linewidth#4\relax
\edef\overlaylinecolor{\mathstackersparameter\c!color}%
\edef\p_mp{\mathstackersparameter\c!mp}%
- \uniqueMPgraphic{\p_mp}%
+ \uniqueMPgraphic{\p_mp}{axis=#5,ex=#6,em=#7}%
\egroup}
\def\math_stackers_check_unicode#codepoint%
@@ -251,7 +277,7 @@
% heads/tails + hoffset
\else\ifx\p_offset\v!min
% heads/tails - hoffset
- \advance\scratchleftoffset-\scratchhoffset
+ \advance\scratchleftoffset -\scratchhoffset
\advance\scratchrightoffset-\scratchhoffset
\else % \v!normal
% hoffset
@@ -298,15 +324,27 @@
\ifmmode\math_class_by_parameter\mathstackersparameter\else\dontleavehmode\fi
{\edef\p_offset {\mathstackersparameter\c!offset}%
\edef\p_location {\mathstackersparameter\c!location}%
- \edef\p_order {\mathstackersparameter\c!order}%
\edef\p_strut {\mathstackersparameter\c!strut}%
\edef\p_alternative{\mathstackersparameter\c!alternative}%
- \ifx\p_order\v!reverse
- \edef\m_math_stackers_text_top {#bottomtext}%
- \edef\m_math_stackers_text_bottom{#toptext}%
- \else
- \edef\m_math_stackers_text_top {#toptext}%
- \edef\m_math_stackers_text_bottom{#bottomtext}%
+ % \ifx\p_order\v!reverse
+ % \ifsecondargument
+ % \edef\m_math_stackers_text_top {#bottomtext}%
+ % \edef\m_math_stackers_text_bottom{#toptext}%
+ % \else
+ % \edef\m_math_stackers_text_top {#toptext}%
+ % \let\m_math_stackers_text_bottom \empty
+ % \fi
+ % \else
+ % \edef\m_math_stackers_text_top {#toptext}%
+ % \edef\m_math_stackers_text_bottom{#bottomtext}%
+ % \fi
+ \edef\m_math_stackers_text_top {#toptext}%
+ \edef\m_math_stackers_text_bottom{#bottomtext}%
+ \ifsecondargument
+ \edef\p_order{\mathstackersparameter\c!order}%
+ \ifx\p_order\v!reverse
+ \swapmacros\m_math_stackers_text_top\m_math_stackers_text_bottom
+ \fi
\fi
\scratchleftoffset \zeropoint
\scratchrightoffset\zeropoint
@@ -327,13 +365,20 @@
\fi
%
\ifcase#method\relax
- \scratchwidth\wd
- \ifdim\wd\scratchboxone>\wd\scratchboxtwo
- \scratchboxone
- \else
- \scratchboxtwo
- \fi
- \relax
+ % e.g. extensible
+ %\scratchwidth\wd
+ % \ifdim\wd\scratchboxone>\wd\scratchboxtwo
+ % \scratchboxone
+ % \else
+ % \scratchboxtwo
+ % \fi
+ %\relax
+ \scratchwidth\mathcharwd\scratchunicode
+ \ifdim\wd\scratchboxone>\scratchwidth
+ \scratchwidth\wd\scratchboxone
+ \else\ifdim\wd\scratchboxtwo>\scratchwidth
+ \scratchwidth\wd\scratchboxtwo
+ \fi\fi
\else
\ifx\m_math_stackers_text_middle\empty
\setbox\scratchboxthree\emptyhbox
@@ -1020,10 +1065,10 @@
%D Here come the new ones:
\definemathstackers [\v!none] [\v!mathematics] [\c!hoffset=\zeropoint]
-\definemathstackers [\v!normal] [\v!mathematics] [\c!hoffset=0.5\emwidth] % the default
-\definemathstackers [\v!small] [\v!mathematics] [\c!hoffset=1\emwidth]
-\definemathstackers [\v!medium] [\v!mathematics] [\c!hoffset=1.5\emwidth]
-\definemathstackers [\v!big] [\v!mathematics] [\c!hoffset=2\emwidth]
+\definemathstackers [\v!normal] [\v!mathematics] [\c!hoffset=0.5\mathemwidth] % the default
+\definemathstackers [\v!small] [\v!mathematics] [\c!hoffset=1\mathemwidth]
+\definemathstackers [\v!medium] [\v!mathematics] [\c!hoffset=1.5\mathemwidth]
+\definemathstackers [\v!big] [\v!mathematics] [\c!hoffset=2\mathemwidth]
\definemathextensible [\v!reverse] [xrel] ["002D]
\definemathextensible [\v!reverse] [xequal] ["003D]
@@ -1185,7 +1230,7 @@
[\c!offset=\v!max,
\c!left=\enspace,
\c!right=\enspace,
- \c!hoffset=.5\emwidth]
+ \c!hoffset=.5\mathemwidth]
\definemathextensible [\v!chemistry] [cleftarrow] ["2190]
\definemathextensible [\v!chemistry] [crightarrow] ["2192]
diff --git a/tex/context/base/mkiv/meta-imp-mat.mkiv b/tex/context/base/mkiv/meta-imp-mat.mkiv
index 8913845fd..7443841ed 100644
--- a/tex/context/base/mkiv/meta-imp-mat.mkiv
+++ b/tex/context/base/mkiv/meta-imp-mat.mkiv
@@ -18,6 +18,7 @@
% / for cambria
\startMPextensions
+
vardef math_stacker_overbracket_shape =
image (
draw
@@ -78,72 +79,111 @@
vardef math_stacker_underbar_shape =
math_stacker_overbar_shape rotated 180
enddef ;
- vardef math_stacker_arrow_shape =
+
+ % arrows
+
+ vardef math_stacker_arrow_shape(expr axis, ex, em) =
image (
+ interim ahlength := ex/2;
drawarrow
- (OverlayWidth,OverlayOffset) -- (0,OverlayOffset)
+ ((OverlayWidth,ex/2) -- (0,ex/2))
+ withcolor
+ OverlayLineColor ;
+ setbounds currentpicture to unitsquare xysized(OverlayWidth,ex) ;
+ )
+ enddef ;
+ vardef math_stacker_leftrightarrow_shape(expr axis, ex, em) =
+ image (
+ interim ahlength := ex/2;
+ drawdblarrow
+ ((OverlayWidth,ex/2) -- (0,ex/2))
+ withcolor
+ OverlayLineColor ;
+ setbounds currentpicture to unitsquare xysized(OverlayWidth,ex) ;
+ )
+ enddef ;
+ vardef math_stacker_rightoverleftarrow_shape(expr axis, ex, em) =
+ image (
+ interim ahlength := ex/2;
+ drawdoublearrows
+ ((OverlayWidth,ex/2) -- (0,ex/2))
withcolor
OverlayLineColor ;
- setbounds currentpicture to boundingbox currentpicture bottomenlarged (OverlayOffset/2) topenlarged (OverlayOffset/2) ;
+ setbounds currentpicture to unitsquare xysized(OverlayWidth,ex) ;
)
enddef ;
- vardef math_stacker_leftarrow_shape =
- math_stacker_arrow_shape
+ vardef math_stacker_leftarrow_shape(expr axis, ex, em) =
+ math_stacker_arrow_shape(axis,ex,em)
enddef ;
- vardef math_stacker_rightarrow_shape =
- math_stacker_arrow_shape rotated 180
+ vardef math_stacker_rightarrow_shape(expr axis, ex, em) =
+ math_stacker_arrow_shape(axis,ex,em) rotated 180
enddef ;
+
+ % main handler
+
def math_stacker_draw(expr p) =
draw
p
withpen
pencircle
- xscaled (2OverlayLineWidth)
- % yscaled (3OverlayLineWidth/4)
- yscaled (3OverlayLineWidth)
- % rotated 30 ;
- rotated 45 ;
+ % xscaled (2OverlayLineWidth)
+ % yscaled (3OverlayLineWidth)
+ % rotated 45 ;
+ scaled (OverlayLineWidth) ;
enddef ;
+
\stopMPextensions
-\startuniqueMPgraphic{math:stacker:\number"FE3B4}
+\startuniqueMPgraphic{math:stacker:\number"FE3B4}{axis,ex,em}
math_stacker_draw(math_stacker_overbracket_shape) ;
\stopuniqueMPgraphic
-\startuniqueMPgraphic{math:stacker:\number"FE3B5}
+\startuniqueMPgraphic{math:stacker:\number"FE3B5}{axis,ex,em}
math_stacker_draw(math_stacker_underbracket_shape) ;
\stopuniqueMPgraphic
-\startuniqueMPgraphic{math:stacker:\number"FE3DC}
+\startuniqueMPgraphic{math:stacker:\number"FE3DC}{axis,ex,em}
math_stacker_draw(math_stacker_overparent_shape) ;
\stopuniqueMPgraphic
-\startuniqueMPgraphic{math:stacker:\number"FE3DD}
+\startuniqueMPgraphic{math:stacker:\number"FE3DD}{axis,ex,em}
math_stacker_draw(math_stacker_underparent_shape) ;
\stopuniqueMPgraphic
-\startuniqueMPgraphic{math:stacker:\number"FE3DE}
+\startuniqueMPgraphic{math:stacker:\number"FE3DE}{axis,ex,em}
math_stacker_draw(math_stacker_overbrace_shape) ;
\stopuniqueMPgraphic
-\startuniqueMPgraphic{math:stacker:\number"FE3DF}
+\startuniqueMPgraphic{math:stacker:\number"FE3DF}{axis,ex,em}
math_stacker_draw(math_stacker_underbrace_shape) ;
\stopuniqueMPgraphic
-\startuniqueMPgraphic{math:stacker:\number"FE33E}
+\startuniqueMPgraphic{math:stacker:\number"FE33E}{axis,ex,em}
math_stacker_draw(math_stacker_overbar_shape) ;
\stopuniqueMPgraphic
-\startuniqueMPgraphic{math:stacker:\number"FE33F}
+\startuniqueMPgraphic{math:stacker:\number"FE33F}{axis,ex,em}
math_stacker_draw(math_stacker_underbar_shape) ;
\stopuniqueMPgraphic
-\startuniqueMPgraphic{math:stacker:\number"2190}
- math_stacker_draw(math_stacker_leftarrow_shape) ;
+\startuniqueMPgraphic{math:stacker:\number"2190}{axis,ex,em}
+ math_stacker_draw(math_stacker_leftarrow_shape(\MPvar{axis},\MPvar{ex},\MPvar{em})) ;
+\stopuniqueMPgraphic
+
+\startuniqueMPgraphic{math:stacker:\number"2192}{axis,ex,em}
+ math_stacker_draw(math_stacker_rightarrow_shape(\MPvar{axis},\MPvar{ex},\MPvar{em})) ;
+\stopuniqueMPgraphic
+
+\startuniqueMPgraphic{math:stacker:\number"2194}{axis,ex,em}
+ math_stacker_draw(math_stacker_leftrightarrow_shape(\MPvar{axis},\MPvar{ex},\MPvar{em})) ;
+\stopuniqueMPgraphic
+
+\startuniqueMPgraphic{math:stacker:\number"27F7}{axis,ex,em}
+ math_stacker_draw(math_stacker_leftrightarrow_shape(\MPvar{axis},\MPvar{ex},\MPvar{em})) ;
\stopuniqueMPgraphic
-\startuniqueMPgraphic{math:stacker:\number"2192}
- math_stacker_draw(math_stacker_rightarrow_shape) ;
+\startuniqueMPgraphic{math:stacker:\number"21C4}{axis,ex,em}
+ math_stacker_draw(math_stacker_rightoverleftarrow_shape(\MPvar{axis},\MPvar{ex},\MPvar{em})) ;
\stopuniqueMPgraphic
%D Radicals:
@@ -158,7 +198,7 @@
enddef ;
\stopMPextensions
-\startuniqueMPgraphic{math:radical:default}%{...}
+\startuniqueMPgraphic{math:radical:default}{axis,ex,em}
draw
math_radical_simple(OverlayWidth,OverlayHeight,OverlayDepth,OverlayOffset)
withpen pencircle xscaled (2OverlayLineWidth) yscaled (3OverlayLineWidth/4) rotated 30
diff --git a/tex/context/base/mkiv/mlib-int.lua b/tex/context/base/mkiv/mlib-int.lua
index 8db8055f9..bd3ba213f 100644
--- a/tex/context/base/mkiv/mlib-int.lua
+++ b/tex/context/base/mkiv/mlib-int.lua
@@ -63,10 +63,15 @@ function mp.LayoutColumnWidth () mpprint(getdimen("layoutcolumnwidth") *fact
function mp.SpineWidth () mpprint(getdimen("spinewidth") *factor) end
function mp.PaperBleed () mpprint(getdimen("paperbleed") *factor) end
-function mp.PageNumber () mpprint(getcount("pageno")) end
function mp.RealPageNumber () mpprint(getcount("realpageno")) end
+function mp.LastPageNumber () mpprint(getcount("lastpageno")) end
+
+function mp.PageNumber () mpprint(getcount("pageno")) end
function mp.NOfPages () mpprint(getcount("lastpageno")) end
+function mp.SubPageNumber () mpprint(getcount("subpageno")) end
+function mp.NOfSubPages () mpprint(getcount("lastsubpageno")) end
+
function mp.CurrentColumn () mpprint(getcount("mofcolumns")) end
function mp.NOfColumns () mpprint(getcount("nofcolumns")) end
diff --git a/tex/context/base/mkiv/mult-def.lua b/tex/context/base/mkiv/mult-def.lua
index 49371fee8..e9f40c87e 100644
--- a/tex/context/base/mkiv/mult-def.lua
+++ b/tex/context/base/mkiv/mult-def.lua
@@ -7829,6 +7829,7 @@ return {
},
["field"]={
["en"]="field",
+ ["nl"]="veld",
},
["fieldbackgroundcolor"]={
["cs"]="barvapozadipole",
@@ -13403,6 +13404,10 @@ return {
["pe"]="فوریه",
["ro"]="februarie",
},
+ ["field"]={
+ ["en"]="field",
+ ["nl"]="veld",
+ },
["figure"]={
["cs"]="obrazek",
["de"]="abbildung",
diff --git a/tex/context/base/mkiv/mult-prm.lua b/tex/context/base/mkiv/mult-prm.lua
index 3557bc0ff..601a615a0 100644
--- a/tex/context/base/mkiv/mult-prm.lua
+++ b/tex/context/base/mkiv/mult-prm.lua
@@ -225,11 +225,14 @@ return {
"automatichyphenpenalty",
"begincsname",
"bodydir",
+ "bodydirection",
"boxdir",
+ "boxdirection",
"breakafterdirmode",
"catcodetable",
"clearmarks",
"copyfont",
+ "compoundhyphenmode",
"crampeddisplaystyle",
"crampedscriptscriptstyle",
"crampedscriptstyle",
@@ -271,6 +274,7 @@ return {
"letcharcode",
"letterspacefont",
"linedir",
+ "linedirection",
"localbrokenpenalty",
"localinterlinepenalty",
"localleftbox",
@@ -283,6 +287,7 @@ return {
"luatexversion",
"mathdelimitersmode",
"mathdir",
+ "mathdirection",
"mathdisplayskipmode",
"matheqnogapstep",
"mathitalicsmode",
@@ -306,12 +311,14 @@ return {
"outputmode",
"pagebottomoffset",
"pagedir",
+ "pagedirection",
"pageheight",
"pageleftoffset",
"pagerightoffset",
"pagetopoffset",
"pagewidth",
"pardir",
+ "pardirection",
"pdfextension",
"pdffeedback",
"pdfvariable",
@@ -347,6 +354,7 @@ return {
"synctex",
"tagcode",
"textdir",
+ "textdirection",
"toksapp",
"tokspre",
"tracingfonts",
diff --git a/tex/context/base/mkiv/pack-box.mkiv b/tex/context/base/mkiv/pack-box.mkiv
index 8279fcd71..c53b4520c 100644
--- a/tex/context/base/mkiv/pack-box.mkiv
+++ b/tex/context/base/mkiv/pack-box.mkiv
@@ -1138,4 +1138,21 @@
\box\nextbox
\egroup}
+\unexpanded\def\overlayimage#1%
+ {\vpack to \overlayheight\bgroup
+ \vss
+ \hpack to \overlaywidth\bgroup
+ \hss
+ \externalfigure[#1][\c!factor=\v!min,\c!equalwidth=\overlaywidth,\c!equalheight=\overlayheight]%
+ \hss
+ \egroup
+ \vss
+ \egroup}
+
+\unexpanded\def\clippedoverlayimage#1%
+ {\clip
+ [\c!width=\overlaywidth,\c!height=\overlayheight]
+ {\overlayimage{#1}}}
+
+
\protect \endinput
diff --git a/tex/context/base/mkiv/scrn-but.mkvi b/tex/context/base/mkiv/scrn-but.mkvi
index fdb80e64b..7e4c705c0 100644
--- a/tex/context/base/mkiv/scrn-but.mkvi
+++ b/tex/context/base/mkiv/scrn-but.mkvi
@@ -75,13 +75,17 @@
{\iffirstargument
\setupcurrentbutton[#settings]%
\fi
- \scrn_button_make
- \buttonparameter
- \inheritedbuttonframed
- \letbuttonparameter
- \setbuttonparameter
- {#text}%
- {#action}%
+ % no \dontleavehmode as it will force a vbox to \hsize which then
+ % spoils a tight box
+ \hpack\bgroup
+ \scrn_button_make
+ \buttonparameter
+ \inheritedbuttonframed
+ \letbuttonparameter
+ \setbuttonparameter
+ {#text}%
+ {#action}%
+ \egroup
\endgroup}
\def\scrn_button_direct_ignore[#settings]#text[#destination]%
diff --git a/tex/context/base/mkiv/spac-ali.mkiv b/tex/context/base/mkiv/spac-ali.mkiv
index e5e7bd40f..850315996 100644
--- a/tex/context/base/mkiv/spac-ali.mkiv
+++ b/tex/context/base/mkiv/spac-ali.mkiv
@@ -61,17 +61,15 @@
\newtoks\everyresetalign % todo
-% We will not use bodydir and pagedir so we disable them. That way we get
-% normal hyperlink support.
+%D We will not use bodydir and pagedir so we disable them. That way we get
+%D normal hyperlink support. We back on it (too hard to fake \type {\the}).
-\let\spac_directions_normal_body_dir\normalbodydir
-\let\spac_directions_normal_page_dir\normalpagedir
+\unexpanded\def\syst_fatal_dir_error#1%
+ {\writestatus{fatal error}{\string#1\space is forbidden}%
+ \wait}
-\unexpanded\def\bodydir{\afterassignment\spac_directions_bodydir_indeed\spac_directions_normal_body_dir} \let\normalbodydir\bodydir
-\unexpanded\def\pagedir{\afterassignment\spac_directions_pagedir_indeed\spac_directions_normal_page_dir} \let\normalpagedir\pagedir
-
-\def\spac_directions_bodydir_indeed{\spac_directions_normal_body_dir TLT\relax}
-\def\spac_directions_pagedir_indeed{\spac_directions_normal_page_dir TLT\relax}
+\def\pagedir {\syst_fatal_dir_error\pagedir} \let\normalpagedir\pagedir
+\def\bodydir {\syst_fatal_dir_error\bodydir} \let\normalbodydir\bodydir
% This will become a more advanced layout controller soon:
@@ -105,59 +103,45 @@
\textdir TRT\relax
\pardir TRT\relax}
-\newconditional\c_spac_auto_line_dir \settrue\c_spac_auto_line_dir
-
-\ifdefined\linedir
-
- \unexpanded\def\spac_directions_lefttoright_hmode
- {\ifconditional\c_spac_auto_line_dir\linedir\else\textdir\fi TLT\relax % linedir keeps subtype
- \setfalse\inlinerighttoleft}
-
- \unexpanded\def\spac_directions_righttoleft_hmode
- {\ifconditional\c_spac_auto_line_dir\linedir\else\textdir\fi TRT\relax % linedir keeps subtype
- \setfalse\inlinelefttoright}
-
-\else % keep this as reference
-
- \unexpanded\def\spac_directions_lefttoright_hmode
- {\settrue\inlinelefttoright
- \textdir TLT\relax}
-
- \unexpanded\def\spac_directions_righttoleft_hmode
- {\textdir TRT\relax
- \setfalse\inlinelefttoright}
-
- \unexpanded\def\spac_directions_lefttoright_hmode
- {\ifconditional\c_spac_auto_line_dir
- \ifzeropt\lastskip
- \textdir TLT\relax
- \else
- \scratchskip\lastskip
- \unskip
- \textdir TLT\relax
- \hskip\scratchskip
- \fi
- \else
- \textdir TLT\relax
- \fi
- \setfalse\inlinerighttoleft}
-
- \unexpanded\def\spac_directions_righttoleft_hmode
- {\ifconditional\c_spac_auto_line_dir
- \ifzeropt\lastskip
- \textdir TRT\relax
- \else
- \scratchskip\lastskip
- \unskip
- \textdir TRT\relax
- \hskip\scratchskip
- \fi
- \else
- \textdir TRT\relax
- \fi
- \setfalse\inlinelefttoright}
+% % keep this as reference
+%
+% \unexpanded\def\spac_directions_lefttoright_hmode
+% {\textdir TLT\relax
+% \settrue\inlinelefttoright}
+%
+% \unexpanded\def\spac_directions_righttoleft_hmode
+% {\textdir TRT\relax
+% \setfalse\inlinelefttoright}
+%
+% \unexpanded\def\spac_directions_lefttoright_hmode
+% {\ifzeropt\lastskip
+% \textdir TLT\relax
+% \else
+% \scratchskip\lastskip
+% \unskip
+% \textdir TLT\relax
+% \hskip\scratchskip
+% \fi
+% \settrue\inlinelefttoright}
+%
+% \unexpanded\def\spac_directions_righttoleft_hmode
+% {\ifzeropt\lastskip
+% \textdir TRT\relax
+% \else
+% \scratchskip\lastskip
+% \unskip
+% \textdir TRT\relax
+% \hskip\scratchskip
+% \fi
+% \setfalse\inlinelefttoright}
+
+\unexpanded\def\spac_directions_lefttoright_hmode
+ {\linedir TLT\relax % linedir keeps subtype of skip
+ \settrue\inlinelefttoright}
-\fi
+\unexpanded\def\spac_directions_righttoleft_hmode
+ {\linedir TRT\relax % linedir keeps subtype of skip
+ \setfalse\inlinelefttoright}
% \def\currentdirectionparameters
% {\ifconditional\inlinelefttoright \else
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index 2cfc16874..e2b1f0619 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 c9db9f1d6..5a7acc5ef 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/supp-box.mkiv b/tex/context/base/mkiv/supp-box.mkiv
index b2a29b3be..1e85d3421 100644
--- a/tex/context/base/mkiv/supp-box.mkiv
+++ b/tex/context/base/mkiv/supp-box.mkiv
@@ -2747,19 +2747,12 @@
%D And even rawer:
-\let\naturalhbox \hbox
-\let\naturalvbox \vbox
-\let\naturalvtop \normalvtop
-\let\naturalvcenter\normalvtop
-
-\ifdefined\textdir
-
- \unexpanded\def\naturalhbox {\hbox dir TLT}
- \unexpanded\def\naturalvbox {\vbox dir TLT}
- \unexpanded\def\naturalhpack{\hpack dir TLT}
- \unexpanded\def\naturalvpack{\vpack dir TLT}
-
-\fi
+ \let\naturalvtop \normalvtop
+ \let\naturalvcenter\normalvtop
+\unexpanded\def\naturalhbox {\hbox dir TLT}
+\unexpanded\def\naturalvbox {\vbox dir TLT}
+\unexpanded\def\naturalhpack {\hpack dir TLT}
+\unexpanded\def\naturalvpack {\vpack dir TLT}
%D \macros
%D {vcenter}
diff --git a/tex/context/base/mkiv/supp-dir.mkiv b/tex/context/base/mkiv/supp-dir.mkiv
index 6251012b6..42a0aa37c 100644
--- a/tex/context/base/mkiv/supp-dir.mkiv
+++ b/tex/context/base/mkiv/supp-dir.mkiv
@@ -30,9 +30,7 @@
% \ifnum\thetextdir=0 L\else R\fi \textdir TRT \ifnum\thetextdir=0 L\else R\fi
\unexpanded\def\showdirsinmargin
- {\doifelse{\the\pardir}\!!TLT
- {\inleft{\normalexpanded{\noexpand\hbox dir TLT{\ttxx[\the\pardir,\the\textdir]}}}}
- {\inleft{\normalexpanded{\noexpand\hbox dir TLT{\ttxx[\the\pardir,\the\textdir]}}}}}
+ {\inleft{\normalexpanded{\noexpand\hbox dir TLT{\ttxx[\the\pardir,\the\textdir]}}}}
\bgroup
\catcode`L=\othercatcode \gdef\istltdir#1#2#3{\if#2L0\else1\fi}
diff --git a/tex/context/base/mkiv/syst-ini.mkiv b/tex/context/base/mkiv/syst-ini.mkiv
index 3480b03d1..e76a53a02 100644
--- a/tex/context/base/mkiv/syst-ini.mkiv
+++ b/tex/context/base/mkiv/syst-ini.mkiv
@@ -1016,19 +1016,19 @@
% \chardef\pdfnotrapped = 256
% \chardef\pdfnoid = 512
-\def\pdftexversion {\numexpr\pdffeedback version}
-\def\pdftexrevision {\pdffeedback revision}
-\def\pdflastlink {\numexpr\pdffeedback lastlink}
-\def\pdfretval {\numexpr\pdffeedback retval}
-\def\pdflastobj {\numexpr\pdffeedback lastobj}
-\def\pdflastannot {\numexpr\pdffeedback lastannot}
-\def\pdfxformname {\numexpr\pdffeedback xformname}
-\def\pdfcreationdate {\pdffeedback creationdate}
-\def\pdffontname {\numexpr\pdffeedback fontname}
-\def\pdffontobjnum {\numexpr\pdffeedback fontobjnum}
-\def\pdffontsize {\dimexpr\pdffeedback fontsize}
-\def\pdfpageref {\numexpr\pdffeedback pageref}
-\def\pdfcolorstackinit {\pdffeedback colorstackinit}
+\def\pdftexversion {\pdffeedback version}
+\def\pdftexrevision {\pdffeedback revision}
+\def\pdflastlink {\pdffeedback lastlink}
+\def\pdfretval {\pdffeedback retval}
+\def\pdflastobj {\pdffeedback lastobj}
+\def\pdflastannot {\pdffeedback lastannot}
+\def\pdfxformname {\pdffeedback xformname}
+\def\pdfcreationdate {\pdffeedback creationdate}
+\def\pdffontname {\pdffeedback fontname}
+\def\pdffontobjnum {\pdffeedback fontobjnum}
+\def\pdffontsize {\pdffeedback fontsize}
+\def\pdfpageref {\pdffeedback pageref}
+\def\pdfcolorstackinit {\pdffeedback colorstackinit}
\let\pdfxform \saveboxresource
\let\pdflastxform \lastsavedboxresourceindex
diff --git a/tex/context/base/mkiv/toks-ini.lua b/tex/context/base/mkiv/toks-ini.lua
index 36b47d0dd..a5d511c68 100644
--- a/tex/context/base/mkiv/toks-ini.lua
+++ b/tex/context/base/mkiv/toks-ini.lua
@@ -55,39 +55,26 @@ if setinspector then
end
-local scan_toks = token.scan_toks
-local scan_string = token.scan_string
-local scan_int = token.scan_int
-local scan_code = token.scan_code
-local scan_dimen = token.scan_dimen
-local scan_glue = token.scan_glue
-local scan_keyword = token.scan_keyword
-local scan_token = token.scan_token
-local scan_word = token.scan_word
-local scan_number = token.scan_number
-local scan_csname = token.scan_csname
-
-local get_next = token.get_next
-
-if not token.get_macro then
- local scantoks = tex.scantoks
- local gettoks = tex.gettoks
- function token.get_meaning(name)
- scantoks("t_get_macro",tex.ctxcatcodes,"\\"..name)
- return gettoks("t_get_macro")
- end
- function token.get_macro(name)
- scantoks("t_get_macro",tex.ctxcatcodes,"\\"..name)
- local s = gettoks("t_get_macro")
- return match(s,"^.-%->(.*)$") or s
- end
-end
-
-local set_macro = token.set_macro
-local get_macro = token.get_macro
-local get_meaning = token.get_meaning
-local get_cmdname = token.get_cmdname
-local create_token = token.create
+local scan_toks = token.scan_toks
+local scan_string = token.scan_string
+local scan_int = token.scan_int
+local scan_code = token.scan_code
+local scan_dimen = token.scan_dimen
+local scan_glue = token.scan_glue
+local scan_keyword = token.scan_keyword
+local scan_keyword_cs = token.scan_keyword_cs or scan_keyword
+local scan_token = token.scan_token
+local scan_word = token.scan_word
+local scan_number = token.scan_number
+local scan_csname = token.scan_csname
+
+local get_next = token.get_next
+
+local set_macro = token.set_macro
+local get_macro = token.get_macro
+local get_meaning = token.get_meaning
+local get_cmdname = token.get_cmdname
+local create_token = token.create
function tokens.defined(name)
return get_cmdname(create_token(name)) ~= "undefined_cs"
@@ -251,6 +238,7 @@ tokens.scanners = { -- these expand
number = scan_number,
boolean = scan_boolean,
keyword = scan_keyword,
+ keywordcs = scan_keyword_cs,
csname = scan_csname,
}
diff --git a/tex/context/base/mkiv/toks-scn.lua b/tex/context/base/mkiv/toks-scn.lua
index 3c41eedd8..f3781d022 100644
--- a/tex/context/base/mkiv/toks-scn.lua
+++ b/tex/context/base/mkiv/toks-scn.lua
@@ -24,6 +24,7 @@ local scanstring = scanners.string
local scaninteger = scanners.integer
local scannumber = scanners.number
local scankeyword = scanners.keyword
+local scankeywordcs = scanners.keywordcs
local scanword = scanners.word
local scancode = scanners.code
local scanboolean = scanners.boolean
@@ -117,6 +118,7 @@ local shortcuts = {
scaninteger = scaninteger,
scannumber = scannumber,
scankeyword = scankeyword,
+ scankeywordcs = scankeywordcs,
scanword = scanword,
scancode = scancode,
scanboolean = scanboolean,
@@ -163,21 +165,21 @@ tokens.converters = {
-- that I then need to check the TeX end. More pain than gain and a bit
-- risky too.
-local f_if = formatters[ " if scankeyword('%s') then data['%s'] = scan%s()"]
-local f_elseif = formatters[" elseif scankeyword('%s') then data['%s'] = scan%s()"]
+local f_if = formatters[ " if scankeywordcs('%s') then data['%s'] = scan%s()"]
+local f_elseif = formatters[" elseif scankeywordcs('%s') then data['%s'] = scan%s()"]
----- f_if = formatters[" local key = scanword() if key == '' then break elseif key == '%s' then data['%s'] = scan%s()"]
----- f_elseif = formatters[" elseif key == '%s' then data['%s'] = scan%s()"]
------ f_if_x = formatters[ " if not data['%s'] and scankeyword('%s') then data['%s'] = scan%s()"]
------ f_elseif_x = formatters[" elseif not data['%s'] and scankeyword('%s') then data['%s'] = scan%s()"]
+----- f_if_x = formatters[ " if not data['%s'] and scankeywordcs('%s') then data['%s'] = scan%s()"]
+----- f_elseif_x = formatters[" elseif not data['%s'] and scankeywordcs('%s') then data['%s'] = scan%s()"]
local f_local = formatters["local scan%s = scanners.%s"]
local f_scan = formatters["scan%s()"]
local f_shortcut = formatters["local %s = scanners.converters.%s"]
-local f_if_c = formatters[ " if scankeyword('%s') then data['%s'] = %s(scan%s())"]
-local f_elseif_c = formatters[" elseif scankeyword('%s') then data['%s'] = %s(scan%s())"]
+local f_if_c = formatters[ " if scankeywordcs('%s') then data['%s'] = %s(scan%s())"]
+local f_elseif_c = formatters[" elseif scankeywordcs('%s') then data['%s'] = %s(scan%s())"]
local f_scan_c = formatters["%s(scan%s())"]
-- see above
diff --git a/tex/context/base/mkiv/util-evo-imp-server.lua b/tex/context/base/mkiv/util-evo-imp-server.lua
index 31d779102..f4dd5b3f7 100644
--- a/tex/context/base/mkiv/util-evo-imp-server.lua
+++ b/tex/context/base/mkiv/util-evo-imp-server.lua
@@ -62,7 +62,7 @@ function evohome.server(specification)
return
end
- local port = specification.port or (presets.server and presets.server.port) or 806
+ local port = specification.port or (presets.server and presets.server.port) or 8068
local host = specification.host or (presets.server and presets.server.host) or "*"
package.extraluapath(presets.filepath)
diff --git a/tex/context/base/mkiv/util-evo.lua b/tex/context/base/mkiv/util-evo.lua
index 25ad7f94d..7f0b59ac4 100644
--- a/tex/context/base/mkiv/util-evo.lua
+++ b/tex/context/base/mkiv/util-evo.lua
@@ -75,6 +75,12 @@ local defaultpresets = {
},
}
+local validzonetypes = {
+ ZoneTemperatureControl = true,
+ RadiatorZone = true,
+ ZoneValves = true,
+}
+
local function validfile(presets,filename)
if lfs.isfile(filename) then
-- we're okay
@@ -472,7 +478,7 @@ local function geteverything(presets,noschedules)
if zonestatus and gatewayzone then
local zonename = zonestatus.name
local zoneid = zonestatus.zoneId
- if gatewayzone.zoneType == "ZoneTemperatureControl" and zonename == gatewayzone.name then
+ if validzonetypes[gatewayzone.zoneType] and zonename == gatewayzone.name then
gatewayzone.heatSetpointStatus = zonestatus.heatSetpointStatus
gatewayzone.temperatureStatus = zonestatus.temperatureStatus
local zonestatus = usedzones[zonename] -- findzone(states,zonename)
@@ -530,8 +536,7 @@ local function gettemperatures(presets)
if zones then
local z = s[i].zones
for i=1,#zones do
- local zone = zones[i]
- if zone.zoneType == "ZoneTemperatureControl" then
+ if validzonetypes[zone.zoneType] then
local z = z[i]
if z.name == zone.name then
zone.temperatureStatus = z.temperatureStatus
@@ -613,7 +618,7 @@ local function loadtemperatures(presets)
local summary = { time = status.time }
for i=1,#zones do
local zone = zones[i]
- if zone.zoneType == "ZoneTemperatureControl" then
+ if validzonetypes[zone.zoneType] then
summary[#summary+1] = updatezone(presets,zone.name,zone)
end
end
diff --git a/tex/context/interface/mkii/keys-de.xml b/tex/context/interface/mkii/keys-de.xml
index 070844355..449d46fa6 100644
--- a/tex/context/interface/mkii/keys-de.xml
+++ b/tex/context/interface/mkii/keys-de.xml
@@ -188,6 +188,7 @@
<cd:variable name='extremestretch' value='extremestretch'/>
<cd:variable name='fact' value='gegeben'/>
<cd:variable name='february' value='februar'/>
+ <cd:variable name='field' value='field'/>
<cd:variable name='figure' value='abbildung'/>
<cd:variable name='figures' value='abbildungen'/>
<cd:variable name='file' value='datei'/>
@@ -855,6 +856,7 @@
<cd:constant name='headerstate' value='kopfzeilenstatus'/>
<cd:constant name='headlabel' value='headlabel'/>
<cd:constant name='headnumber' value='kopfnummer'/>
+ <cd:constant name='headseparator' value='headseparator'/>
<cd:constant name='headstyle' value='kopfstil'/>
<cd:constant name='height' value='hoehe'/>
<cd:constant name='hfactor' value='hfaktor'/>
@@ -1011,6 +1013,7 @@
<cd:constant name='numberset' value='numberset'/>
<cd:constant name='numberstarter' value='numberstarter'/>
<cd:constant name='numberstopper' value='numberstopper'/>
+ <cd:constant name='numberstrut' value='numberstrut'/>
<cd:constant name='numberstyle' value='nummernstil'/>
<cd:constant name='numberwidth' value='numberwidth'/>
<cd:constant name='nx' value='nx'/>
@@ -1167,6 +1170,7 @@
<cd:constant name='sidespacebefore' value='nebenvorspatium'/>
<cd:constant name='sidethreshold' value='sidethreshold'/>
<cd:constant name='sign' value='zeichen'/>
+ <cd:constant name='simplecommand' value='simplecommand'/>
<cd:constant name='size' value='groesse'/>
<cd:constant name='slantedfeatures' value='slantedfeatures'/>
<cd:constant name='slantedfont' value='slantedfont'/>
@@ -1246,6 +1250,7 @@
<cd:constant name='titledistance' value='titelabstand'/>
<cd:constant name='titleleft' value='titleleft'/>
<cd:constant name='titleright' value='titleright'/>
+ <cd:constant name='titlestrut' value='titlestrut'/>
<cd:constant name='titlestyle' value='titelstil'/>
<cd:constant name='to' value='zu'/>
<cd:constant name='toffset' value='toffset'/>
diff --git a/tex/context/interface/mkii/keys-it.xml b/tex/context/interface/mkii/keys-it.xml
index 4ad49cc05..50fd95639 100644
--- a/tex/context/interface/mkii/keys-it.xml
+++ b/tex/context/interface/mkii/keys-it.xml
@@ -188,6 +188,7 @@
<cd:variable name='extremestretch' value='extremestretch'/>
<cd:variable name='fact' value='fatto'/>
<cd:variable name='february' value='febbraio'/>
+ <cd:variable name='field' value='field'/>
<cd:variable name='figure' value='figura'/>
<cd:variable name='figures' value='figure'/>
<cd:variable name='file' value='file'/>
@@ -855,6 +856,7 @@
<cd:constant name='headerstate' value='statointestazione'/>
<cd:constant name='headlabel' value='etichettatesta'/>
<cd:constant name='headnumber' value='numerotesta'/>
+ <cd:constant name='headseparator' value='headseparator'/>
<cd:constant name='headstyle' value='stiletesta'/>
<cd:constant name='height' value='altezza'/>
<cd:constant name='hfactor' value='hfactor'/>
@@ -1168,6 +1170,7 @@
<cd:constant name='sidespacebefore' value='spaziolateraleprima'/>
<cd:constant name='sidethreshold' value='sidethreshold'/>
<cd:constant name='sign' value='segno'/>
+ <cd:constant name='simplecommand' value='simplecommand'/>
<cd:constant name='size' value='dimensione'/>
<cd:constant name='slantedfeatures' value='slantedfeatures'/>
<cd:constant name='slantedfont' value='slantedfont'/>
diff --git a/tex/context/interface/mkii/keys-pe.xml b/tex/context/interface/mkii/keys-pe.xml
index d6d1bc047..58f26400d 100644
--- a/tex/context/interface/mkii/keys-pe.xml
+++ b/tex/context/interface/mkii/keys-pe.xml
@@ -188,6 +188,7 @@
<cd:variable name='extremestretch' value='extremestretch'/>
<cd:variable name='fact' value='fact'/>
<cd:variable name='february' value='فوریه'/>
+ <cd:variable name='field' value='field'/>
<cd:variable name='figure' value='شکل'/>
<cd:variable name='figures' value='شکلها'/>
<cd:variable name='file' value='پرونده'/>
@@ -379,6 +380,7 @@
<cd:variable name='norepeat' value='norepeat'/>
<cd:variable name='normal' value='نرمال'/>
<cd:variable name='nospacing' value='بدون‌فضاگذاری'/>
+ <cd:variable name='nostopper' value='nostopper'/>
<cd:variable name='not' value='بدون'/>
<cd:variable name='notation' value='notation'/>
<cd:variable name='note' value='note'/>
@@ -854,6 +856,7 @@
<cd:constant name='headerstate' value='وضعیت‌سربرگ'/>
<cd:constant name='headlabel' value='برچسب‌سر'/>
<cd:constant name='headnumber' value='شماره‌سر'/>
+ <cd:constant name='headseparator' value='headseparator'/>
<cd:constant name='headstyle' value='سبک‌سر'/>
<cd:constant name='height' value='ارتفاع'/>
<cd:constant name='hfactor' value='عامل‌ارتفاع'/>
@@ -1010,6 +1013,7 @@
<cd:constant name='numberset' value='numberset'/>
<cd:constant name='numberstarter' value='numberstarter'/>
<cd:constant name='numberstopper' value='numberstopper'/>
+ <cd:constant name='numberstrut' value='numberstrut'/>
<cd:constant name='numberstyle' value='سبک‌شماره'/>
<cd:constant name='numberwidth' value='عرض‌شماره'/>
<cd:constant name='nx' value='nx'/>
@@ -1166,6 +1170,7 @@
<cd:constant name='sidespacebefore' value='فضای‌کناری‌قبل'/>
<cd:constant name='sidethreshold' value='sidethreshold'/>
<cd:constant name='sign' value='علامت'/>
+ <cd:constant name='simplecommand' value='simplecommand'/>
<cd:constant name='size' value='اندازه'/>
<cd:constant name='slantedfeatures' value='slantedfeatures'/>
<cd:constant name='slantedfont' value='slantedfont'/>
@@ -1245,6 +1250,7 @@
<cd:constant name='titledistance' value='فاصله‌عنوان'/>
<cd:constant name='titleleft' value='عنوان‌چپ'/>
<cd:constant name='titleright' value='عنوان‌راست'/>
+ <cd:constant name='titlestrut' value='titlestrut'/>
<cd:constant name='titlestyle' value='سبک‌عنوان'/>
<cd:constant name='to' value='به'/>
<cd:constant name='toffset' value='toffset'/>
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 7543cd36f..4fe331bcd 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-mathstackers.xml b/tex/context/interface/mkiv/i-mathstackers.xml
index 3e6613022..561936b9c 100644
--- a/tex/context/interface/mkiv/i-mathstackers.xml
+++ b/tex/context/interface/mkiv/i-mathstackers.xml
@@ -4,6 +4,8 @@
<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">
+ <!-- todo definemathdelimuter, was overloading define mathextensible -->
+
<cd:command name="definemathstackers" level="style" category="mathematics" file="math-stc.mkvi">
<cd:arguments>
<cd:resolve name="keyword-name"/>
@@ -140,7 +142,7 @@
<cd:resolve name="instance-mathextensible"/>
</cd:instances>
</cd:command>
-
+
<cd:command name="definemathoverextensible" level="system" category="mathematics" file="math-sty.mkvi">
<cd:arguments>
<cd:keywords optional="yes">
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index 4c03f5cb1..a9c7a2b2e 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/context/modules/mkiv/s-evohome.mkiv b/tex/context/modules/mkiv/s-evohome.mkiv
index 26abcfb59..1577517e5 100644
--- a/tex/context/modules/mkiv/s-evohome.mkiv
+++ b/tex/context/modules/mkiv/s-evohome.mkiv
@@ -272,14 +272,14 @@ end
-- os.execute([[mtxrun --script evohome --collect --presets=c:/data/develop/domotica/code/evohome-presets.lua]])
- local specification = {
- year = 2017,
- -- month = 11,
- presets = "c:/data/develop/domotica/evohome/evohome-presets.lua",
- }
+ -- local specification = {
+ -- year = 2017,
+ -- -- month = 11,
+ -- presets = "c:/data/develop/domotica/evohome/evohome-presets.lua",
+ -- }
-- moduledata.evohome.status (specification)
- moduledata.evohome.history(specification)
+ -- moduledata.evohome.history(specification)
local specification = {
year = 2018,
diff --git a/tex/context/modules/mkiv/s-fonts-coverage.lua b/tex/context/modules/mkiv/s-fonts-coverage.lua
index dd772d5f0..2408fc9a3 100644
--- a/tex/context/modules/mkiv/s-fonts-coverage.lua
+++ b/tex/context/modules/mkiv/s-fonts-coverage.lua
@@ -19,19 +19,37 @@ local char, bold, getvalue = context.char, context.bold, context.getvalue
local chardata = characters.data
-function moduledata.fonts.coverage.showcomparison(specification)
+function moduledata.fonts.coverage.showdifference(specification)
+ moduledata.fonts.coverage.showcomparison(specification,true)
+end
+
+function moduledata.fonts.coverage.showcomparison(specification,difference)
specification = interfaces.checkedspecification(specification)
local fontfiles = utilities.parsers.settings_to_array(specification.list or "")
local pattern = upper(specification.pattern or "")
+ local slot = specification.slot or ""
local present = { }
local names = { }
local files = { }
local chars = { }
+ local slots = false
- if not pattern then
+ if slot ~= "" then
+ slot = utilities.parsers.settings_to_array(slot)
+ for i=1,#slot do
+ local s = tonumber(slot[i])
+ if not s then
+ -- next one
+ elseif slots then
+ slots[s] = true
+ else
+ slots = { [s] = true }
+ end
+ end
+ elseif not pattern then
-- skip
elseif pattern == "" then
pattern = nil
@@ -80,11 +98,13 @@ function moduledata.fonts.coverage.showcomparison(specification)
table.concat(t," ")
}
- context.starttabulate { "|Tl" .. string.rep("|c",#names) .. "|Tl|" }
+ local nofnames = #names
+
+ context.starttabulate { "|Tl" .. string.rep("|c",nofnames) .. "|Tl|" }
NC()
bold("unicode")
NC()
- for i=1,#names do
+ for i=1,nofnames do
bold(i)
NC()
end
@@ -93,17 +113,35 @@ function moduledata.fonts.coverage.showcomparison(specification)
NR()
HL()
for k, v in table.sortedpairs(present) do
- if k <= 0 then
+ local skip = false
+ if difference then
+ local n = 0
+ for i=1,nofnames do
+ if chars[i][k] then
+ n= n + 1
+ end
+ end
+ skip = n == nofnames
+ end
+ if skip then
+ -- ignore
+ elseif k <= 0 then
-- ignore
elseif k >= 0x110000 then
logs.report("warning","weird character %U",k)
else
local description = chardata[k].description
- if not pattern or (pattern == k) or (description and lpegmatch(pattern,description)) then
+ local wantedslot = true
+ if slots then
+ wantedslot = slots[k]
+ elseif pattern then
+ wantedslot = pattern == k or (description and lpegmatch(pattern,description))
+ end
+ if wantedslot then
NC()
context("%05X",k)
NC()
- for i=1,#names do
+ for i=1,nofnames do
getvalue(names[i])
if chars[i][k] then
char(k)
diff --git a/tex/context/modules/mkiv/s-fonts-coverage.mkiv b/tex/context/modules/mkiv/s-fonts-coverage.mkiv
index 305bb9b7b..98a5c00a4 100644
--- a/tex/context/modules/mkiv/s-fonts-coverage.mkiv
+++ b/tex/context/modules/mkiv/s-fonts-coverage.mkiv
@@ -25,6 +25,7 @@
\registerctxluafile{s-fonts-coverage}{}
\installmodulecommandluasingle \showfontcomparison {moduledata.fonts.coverage.showcomparison}
+\installmodulecommandluasingle \showfontdifference {moduledata.fonts.coverage.showdifference}
\stopmodule
diff --git a/tex/context/modules/mkiv/s-present-original.mkiv b/tex/context/modules/mkiv/s-present-original.mkiv
index 809f7b2cb..1c5e94c85 100644
--- a/tex/context/modules/mkiv/s-present-original.mkiv
+++ b/tex/context/modules/mkiv/s-present-original.mkiv
@@ -57,7 +57,7 @@
% \definecolor [InteractionColor] [r=.1, g=.5, b=.8]
% \definecolor [ContrastColor] [r=.9, g=.5, b=.2]
-\definecolor [BackgroundColor] [r=.7, g=.7, b=.3]
+\definecolor [BackgroundColor] [r=.7, g=.7, b=.3]
\definecolor [InteractionColor] [r=.1, g=.5, b=.8]
\definecolor [ContrastColor] [r=.9, g=.5, b=.2]
diff --git a/tex/context/modules/mkiv/x-asciimath.lua b/tex/context/modules/mkiv/x-asciimath.lua
index 794cddbd1..02c2375d4 100644
--- a/tex/context/modules/mkiv/x-asciimath.lua
+++ b/tex/context/modules/mkiv/x-asciimath.lua
@@ -125,8 +125,9 @@ local reserved = {
["frac"] = { false, "\\frac", "binary" },
["stackrel"] = { false, "\\asciimathstackrel", "binary" },
["hat"] = { false, "\\widehat", "unary" },
- ["bar"] = { false, "\\overbar", "unary" },
- ["overbar"] = { false, "\\overbar", "unary" },
+ ["bar"] = { false, "\\overline", "unary" },
+ ["overbar"] = { false, "\\overline", "unary" },
+ ["overline"] = { false, "\\overline", "unary" },
["underline"] = { false, "\\underline", "unary" },
["ul"] = { false, "\\underline", "unary" },
["vec"] = { false, "\\overrightarrow", "unary" },
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index 6c57e0032..16477450d 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 : 01/24/18 10:47:11
+-- merge date : 02/06/18 18:11:25
do -- begin closure to overcome local limits and interference
diff --git a/tex/generic/context/luatex/luatex-pdf.tex b/tex/generic/context/luatex/luatex-pdf.tex
index b698285e3..372b3bf09 100644
--- a/tex/generic/context/luatex/luatex-pdf.tex
+++ b/tex/generic/context/luatex/luatex-pdf.tex
@@ -105,19 +105,33 @@
% converted
- \gdef\pdftexversion {\numexpr\pdffeedback version\relax}
- \gdef\pdftexrevision {\pdffeedback revision}
- \gdef\pdflastlink {\numexpr\pdffeedback lastlink\relax}
- \gdef\pdfretval {\numexpr\pdffeedback retval\relax}
- \gdef\pdflastobj {\numexpr\pdffeedback lastobj\relax}
- \gdef\pdflastannot {\numexpr\pdffeedback lastannot\relax}
- \gdef\pdfxformname {\numexpr\pdffeedback xformname\relax}
- \gdef\pdfcreationdate {\pdffeedback creationdate}
- \gdef\pdffontname {\numexpr\pdffeedback fontname\relax}
- \gdef\pdffontobjnum {\numexpr\pdffeedback fontobjnum\relax}
- \gdef\pdffontsize {\dimexpr\pdffeedback fontsize\relax}
- \gdef\pdfpageref {\numexpr\pdffeedback pageref\relax}
- \gdef\pdfcolorstackinit {\pdffeedback colorstackinit}
+ %gdef\pdftexversion {\numexpr\pdffeedback version\relax}
+ %gdef\pdftexrevision {\pdffeedback revision}
+ %gdef\pdflastlink {\numexpr\pdffeedback lastlink\relax}
+ %gdef\pdfretval {\numexpr\pdffeedback retval\relax}
+ %gdef\pdflastobj {\numexpr\pdffeedback lastobj\relax}
+ %gdef\pdflastannot {\numexpr\pdffeedback lastannot\relax}
+ %gdef\pdfxformname {\numexpr\pdffeedback xformname\relax}
+ %gdef\pdfcreationdate {\pdffeedback creationdate}
+ %gdef\pdffontname {\numexpr\pdffeedback fontname\relax}
+ %gdef\pdffontobjnum {\numexpr\pdffeedback fontobjnum\relax}
+ %gdef\pdffontsize {\dimexpr\pdffeedback fontsize\relax}
+ %gdef\pdfpageref {\numexpr\pdffeedback pageref\relax}
+ %gdef\pdfcolorstackinit {\pdffeedback colorstackinit}
+
+ \gdef\pdftexversion {\pdffeedback version}
+ \gdef\pdftexrevision {\pdffeedback revision}
+ \gdef\pdflastlink {\pdffeedback lastlink}
+ \gdef\pdfretval {\pdffeedback retval}
+ \gdef\pdflastobj {\pdffeedback lastobj}
+ \gdef\pdflastannot {\pdffeedback lastannot}
+ \gdef\pdfxformname {\pdffeedback xformname}
+ \gdef\pdfcreationdate {\pdffeedback creationdate}
+ \gdef\pdffontname {\pdffeedback fontname}
+ \gdef\pdffontobjnum {\pdffeedback fontobjnum}
+ \gdef\pdffontsize {\pdffeedback fontsize}
+ \gdef\pdfpageref {\pdffeedback pageref}
+ \gdef\pdfcolorstackinit {\pdffeedback colorstackinit}
% registers