summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2017-07-27 17:53:52 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2017-07-27 17:53:52 +0200
commitab56ea38d2f4f5b521ef097bac92812f6070ef55 (patch)
treee5f2ba9e66f1b1ef8f7b32f91aed0d744a14a0da
parentf7bfb1deb04d4ad101dbabf4d635d33cd98aa0a1 (diff)
downloadcontext-ab56ea38d2f4f5b521ef097bac92812f6070ef55.tar.gz
2017-07-27 16:23:00
-rw-r--r--doc/context/documents/general/manuals/luatex.pdfbin1103410 -> 2184708 bytes
-rw-r--r--doc/context/documents/general/manuals/xml-mkiv.pdfbin1351042 -> 1347020 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-cs.pdfbin845141 -> 845151 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-de.pdfbin843046 -> 843045 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-en.pdfbin848080 -> 848082 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-fr.pdfbin841716 -> 841722 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-it.pdfbin843454 -> 843462 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-nl.pdfbin840152 -> 840156 bytes
-rw-r--r--doc/context/documents/general/qrcs/setup-ro.pdfbin840220 -> 840226 bytes
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-enhancements.tex2
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-fonts.tex332
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-languages.tex138
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-lua.tex75
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-math.tex88
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-modifications.tex20
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-nodes.tex793
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-style.tex12
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-titlepage.tex2
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex.tex15
-rw-r--r--doc/context/sources/general/manuals/xml/xml-mkiv.tex1
-rw-r--r--metapost/context/base/mpiv/mp-mlib.mpiv42
-rw-r--r--tex/context/base/mkii/cont-new.mkii2
-rw-r--r--tex/context/base/mkii/context.mkii2
-rw-r--r--tex/context/base/mkii/mult-it.mkii1
-rw-r--r--tex/context/base/mkiv/attr-col.lua12
-rw-r--r--tex/context/base/mkiv/back-exp.lua316
-rw-r--r--tex/context/base/mkiv/back-exp.mkiv81
-rw-r--r--tex/context/base/mkiv/colo-imp-rgb.mkiv1
-rw-r--r--tex/context/base/mkiv/cont-new.mkiv2
-rw-r--r--tex/context/base/mkiv/context.mkiv11
-rw-r--r--tex/context/base/mkiv/core-con.lua48
-rw-r--r--tex/context/base/mkiv/core-con.mkiv5
-rw-r--r--tex/context/base/mkiv/core-ini.mkiv1
-rw-r--r--tex/context/base/mkiv/core-sys.mkiv7
-rw-r--r--tex/context/base/mkiv/export-example.css628
-rw-r--r--tex/context/base/mkiv/font-con.lua9
-rw-r--r--tex/context/base/mkiv/font-dsp.lua20
-rw-r--r--tex/context/base/mkiv/font-ext.lua228
-rw-r--r--tex/context/base/mkiv/font-ini.lua24
-rw-r--r--tex/context/base/mkiv/font-one.lua13
-rw-r--r--tex/context/base/mkiv/font-otl.lua6
-rw-r--r--tex/context/base/mkiv/font-oto.lua7
-rw-r--r--tex/context/base/mkiv/font-otr.lua2
-rw-r--r--tex/context/base/mkiv/font-ots.lua106
-rw-r--r--tex/context/base/mkiv/font-oup.lua94
-rw-r--r--tex/context/base/mkiv/font-tfm.lua5
-rw-r--r--tex/context/base/mkiv/grph-rul.lua40
-rw-r--r--tex/context/base/mkiv/lpdf-col.lua155
-rw-r--r--tex/context/base/mkiv/lpdf-ini.lua2
-rw-r--r--tex/context/base/mkiv/lpdf-mis.lua10
-rw-r--r--tex/context/base/mkiv/lpdf-nod.lua10
-rw-r--r--tex/context/base/mkiv/lpdf-ren.lua25
-rw-r--r--tex/context/base/mkiv/lpdf-tag.lua46
-rw-r--r--tex/context/base/mkiv/lxml-ini.lua1
-rw-r--r--tex/context/base/mkiv/lxml-ini.mkiv20
-rw-r--r--tex/context/base/mkiv/lxml-tex.lua7
-rw-r--r--tex/context/base/mkiv/math-act.lua22
-rw-r--r--tex/context/base/mkiv/math-frc.mkiv2
-rw-r--r--tex/context/base/mkiv/math-ini.lua38
-rw-r--r--tex/context/base/mkiv/math-noa.lua34
-rw-r--r--tex/context/base/mkiv/meta-pdf.lua4
-rw-r--r--tex/context/base/mkiv/node-acc.lua6
-rw-r--r--tex/context/base/mkiv/node-res.lua28
-rw-r--r--tex/context/base/mkiv/node-rul.lua13
-rw-r--r--tex/context/base/mkiv/status-files.pdfbin25716 -> 25748 bytes
-rw-r--r--tex/context/base/mkiv/status-lua.pdfbin426097 -> 426330 bytes
-rw-r--r--tex/context/base/mkiv/strc-flt.mkvi7
-rw-r--r--tex/context/base/mkiv/strc-sec.mkiv12
-rw-r--r--tex/context/base/mkiv/strc-syn.mkiv9
-rw-r--r--tex/context/base/mkiv/strc-tag.lua7
-rw-r--r--tex/context/base/mkiv/strc-tag.mkiv1
-rw-r--r--tex/context/base/mkiv/tabl-tbl.mkiv79
-rw-r--r--tex/context/base/mkiv/trac-vis.lua202
-rw-r--r--tex/context/base/mkiv/util-sta.lua14
-rw-r--r--tex/context/fonts/mkiv/lm.lfg2
-rw-r--r--tex/context/interface/mkii/keys-it.xml1
-rw-r--r--tex/context/interface/mkiv/i-context.pdfbin848080 -> 848082 bytes
-rw-r--r--tex/context/interface/mkiv/i-readme.pdfbin60774 -> 60776 bytes
-rw-r--r--tex/generic/context/luatex/luatex-fonts-ext.lua6
-rw-r--r--tex/generic/context/luatex/luatex-fonts-merged.lua177
80 files changed, 2619 insertions, 1512 deletions
diff --git a/doc/context/documents/general/manuals/luatex.pdf b/doc/context/documents/general/manuals/luatex.pdf
index b139a1456..e1c592dc8 100644
--- a/doc/context/documents/general/manuals/luatex.pdf
+++ b/doc/context/documents/general/manuals/luatex.pdf
Binary files differ
diff --git a/doc/context/documents/general/manuals/xml-mkiv.pdf b/doc/context/documents/general/manuals/xml-mkiv.pdf
index 4ca2570d3..c5c3a5f95 100644
--- a/doc/context/documents/general/manuals/xml-mkiv.pdf
+++ b/doc/context/documents/general/manuals/xml-mkiv.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf
index af319574c..366ccf4e8 100644
--- a/doc/context/documents/general/qrcs/setup-cs.pdf
+++ b/doc/context/documents/general/qrcs/setup-cs.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf
index 5bda40d3f..1aed3fa0c 100644
--- a/doc/context/documents/general/qrcs/setup-de.pdf
+++ b/doc/context/documents/general/qrcs/setup-de.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf
index 2cc4b4461..69d91f3b8 100644
--- a/doc/context/documents/general/qrcs/setup-en.pdf
+++ b/doc/context/documents/general/qrcs/setup-en.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf
index c406ad762..5262bd8ba 100644
--- a/doc/context/documents/general/qrcs/setup-fr.pdf
+++ b/doc/context/documents/general/qrcs/setup-fr.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf
index a91d4f1a9..9493ca08f 100644
--- a/doc/context/documents/general/qrcs/setup-it.pdf
+++ b/doc/context/documents/general/qrcs/setup-it.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf
index 324def4de..eaeeb579c 100644
--- a/doc/context/documents/general/qrcs/setup-nl.pdf
+++ b/doc/context/documents/general/qrcs/setup-nl.pdf
Binary files differ
diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf
index 4aea060b3..08f62856b 100644
--- a/doc/context/documents/general/qrcs/setup-ro.pdf
+++ b/doc/context/documents/general/qrcs/setup-ro.pdf
Binary files differ
diff --git a/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex b/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
index 19f88234a..9557f615b 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
@@ -55,7 +55,7 @@ chapters on fonts and math we discuss a few more new ones.
There are three new primitives to test the version of \LUATEX:
\starttabulate[|l|pl|pl|]
-\NC \bf primitive \NC \bf explanation \NC \bf value \NC \NR
+\BC primitive \BC explanation \BC value \NC \NR
\NC \type {\luatexbanner} \NC the banner reported on the command line \NC \luatexbanner \NC \NR
\NC \type {\luatexversion} \NC a combination of major and minor number \NC \the\luatexversion \NC \NR
\NC \type {\luatexrevision} \NC the revision number, the current value is \NC \luatexrevision \NC \NR
diff --git a/doc/context/sources/general/manuals/luatex/luatex-fonts.tex b/doc/context/sources/general/manuals/luatex/luatex-fonts.tex
index 76e7bd108..6d7236483 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-fonts.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-fonts.tex
@@ -22,65 +22,65 @@ The column \quote {\VF} means that this key will be created by the \type
The top|-|level keys in the table are as follows:
-\starttabulate[|Tl|c|c|c|l|p|]
-\NC \rmbf key \NC \bf vf \NC \bf tfm \NC \bf used \NC \bf value type \NC \bf description \NC \NR
-\NC name \NC yes \NC yes \NC yes \NC string \NC metric (file) name \NC \NR
-\NC area \NC no \NC yes \NC yes \NC string \NC (directory) location, typically empty \NC \NR
-\NC used \NC no \NC yes \NC yes \NC boolean\NC indicates usage (initial: false) \NC \NR
-\NC characters \NC yes \NC yes \NC yes \NC table \NC the defined glyphs of this font \NC \NR
-\NC checksum \NC yes \NC yes \NC no \NC number \NC default: 0 \NC \NR
-\NC designsize \NC no \NC yes \NC yes \NC number \NC expected size (default: 655360 == 10pt) \NC \NR
-\NC direction \NC no \NC yes \NC yes \NC number \NC default: 0 \NC \NR
-\NC encodingbytes \NC no \NC no \NC yes \NC number \NC default: depends on \type {format} \NC \NR
-\NC encodingname \NC no \NC no \NC yes \NC string \NC encoding name \NC \NR
-\NC fonts \NC yes \NC no \NC yes \NC table \NC locally used fonts \NC \NR
-\NC psname \NC no \NC no \NC yes \NC string \NC This is the \POSTSCRIPT\ fontname in the incoming font
- source, and it's used as fontname identifier in the \PDF\
- output. This has to be a valid string, e.g.\ no spaces
- and such, as the backend will not do a cleanup. This gives
- complete control to the loader. \NC \NR
-\NC fullname \NC no \NC no \NC yes \NC string \NC output font name, used as a fallback in the \PDF\ output
- if the \type {psname} is not set \NC \NR
-\NC header \NC yes \NC no \NC no \NC string \NC header comments, if any \NC \NR
-\NC hyphenchar \NC no \NC no \NC yes \NC number \NC default: \TEX's \type {\hyphenchar} \NC \NR
-\NC parameters \NC no \NC yes \NC yes \NC hash \NC default: 7 parameters, all zero \NC \NR
-\NC size \NC no \NC yes \NC yes \NC number \NC loaded (at) size. (default: same as designsize) \NC \NR
-\NC skewchar \NC no \NC no \NC yes \NC number \NC default: \TEX's \type {\skewchar} \NC \NR
-\NC type \NC yes \NC no \NC yes \NC string \NC basic type of this font \NC \NR
-\NC format \NC no \NC no \NC yes \NC string \NC disk format type \NC \NR
-\NC embedding \NC no \NC no \NC yes \NC string \NC \PDF\ inclusion \NC \NR
-\NC filename \NC no \NC no \NC yes \NC string \NC the name of the font on disk \NC \NR
-\NC tounicode \NC no \NC yes \NC yes \NC number \NC When this is set to~1 \LUATEX\ assumes per|-|glyph
- tounicode entries are present in the font. \NC \NR
-\NC stretch \NC no \NC no \NC yes \NC number \NC the \quote {stretch} value from \type
- {\expandglyphsinfont} \NC \NR
-\NC shrink \NC no \NC no \NC yes \NC number \NC the \quote {shrink} value from \type
- {\expandglyphsinfont} \NC \NR
-\NC step \NC no \NC no \NC yes \NC number \NC the \quote {step} value from \type
- {\expandglyphsinfont} \NC \NR
-\NC expansion_factor \NC no \NC no \NC no \NC number \NC the actual expansion factor of an expanded font \NC \NR
-\NC attributes \NC no \NC no \NC yes \NC string \NC the \type {\pdffontattr} \NC \NR
-\NC cache \NC no \NC no \NC yes \NC string \NC This key controls caching of the \LUA\ table on the
- \TEX\ end where \type {yes} means: use a reference to
- the table that is passed to \LUATEX\ (this is the
- default), and no \type {no} means: don't store the
- table reference, don't cache any \LUA\ data for this
- font while \type {renew} means: don't store the table
- reference, but save a reference to the table that is
- created at the first access to one of its fields in font.
- Note: the saved reference is thread|-|local, so be
- careful when you are using coroutines: an error will be
- thrown if the table has been cached in one thread, but
- you reference it from another thread. \NC \NR
-\NC nomath \NC no \NC no \NC yes \NC boolean\NC This key allows a minor speedup for text fonts. If it
- is present and true, then \LUATEX\ will not check the
- character entries for math|-|specific keys. \NC \NR
-\NC oldmath \NC no \NC no \NC yes \NC boolean\NC This key flags a font as representing an old school \TEX\
- math font and disables the \OPENTYPE\ code path. \NC \NR
-\NC slant \NC no \NC no \NC yes \NC number \NC This has the same semantics as the \type {SlantFont}
- operator in font map files. \NC \NR
-\NC extent \NC no \NC no \NC yes \NC number \NC This has the same semantics as the \type {ExtendFont}
- operator in font map files. \NC \NR
+\starttabulate[|l|c|c|c|l|p|]
+\BC key \BC vf \BC tfm \BC used \BC value type \BC description \NC \NR
+\NC \type{name} \NC yes \NC yes \NC yes \NC string \NC metric (file) name \NC \NR
+\NC \type{area} \NC no \NC yes \NC yes \NC string \NC (directory) location, typically empty \NC \NR
+\NC \type{used} \NC no \NC yes \NC yes \NC boolean \NC indicates usage (initial: false) \NC \NR
+\NC \type{characters} \NC yes \NC yes \NC yes \NC table \NC the defined glyphs of this font \NC \NR
+\NC \type{checksum} \NC yes \NC yes \NC no \NC number \NC default: 0 \NC \NR
+\NC \type{designsize} \NC no \NC yes \NC yes \NC number \NC expected size (default: 655360 == 10pt) \NC \NR
+\NC \type{direction} \NC no \NC yes \NC yes \NC number \NC default: 0 \NC \NR
+\NC \type{encodingbytes} \NC no \NC no \NC yes \NC number \NC default: depends on \type {format} \NC \NR
+\NC \type{encodingname} \NC no \NC no \NC yes \NC string \NC encoding name \NC \NR
+\NC \type{fonts} \NC yes \NC no \NC yes \NC table \NC locally used fonts \NC \NR
+\NC \type{psname} \NC no \NC no \NC yes \NC string \NC This is the \POSTSCRIPT\ fontname in the incoming font
+ source, and it's used as fontname identifier in the \PDF\
+ output. This has to be a valid string, e.g.\ no spaces
+ and such, as the backend will not do a cleanup. This gives
+ complete control to the loader. \NC \NR
+\NC \type{fullname} \NC no \NC no \NC yes \NC string \NC output font name, used as a fallback in the \PDF\ output
+ if the \type {psname} is not set \NC \NR
+\NC \type{header} \NC yes \NC no \NC no \NC string \NC header comments, if any \NC \NR
+\NC \type{hyphenchar} \NC no \NC no \NC yes \NC number \NC default: \TEX's \type {\hyphenchar} \NC \NR
+\NC \type{parameters} \NC no \NC yes \NC yes \NC hash \NC default: 7 parameters, all zero \NC \NR
+\NC \type{size} \NC no \NC yes \NC yes \NC number \NC loaded (at) size. (default: same as designsize) \NC \NR
+\NC \type{skewchar} \NC no \NC no \NC yes \NC number \NC default: \TEX's \type {\skewchar} \NC \NR
+\NC \type{type} \NC yes \NC no \NC yes \NC string \NC basic type of this font \NC \NR
+\NC \type{format} \NC no \NC no \NC yes \NC string \NC disk format type \NC \NR
+\NC \type{embedding} \NC no \NC no \NC yes \NC string \NC \PDF\ inclusion \NC \NR
+\NC \type{filename} \NC no \NC no \NC yes \NC string \NC the name of the font on disk \NC \NR
+\NC \type{tounicode} \NC no \NC yes \NC yes \NC number \NC When this is set to~1 \LUATEX\ assumes per|-|glyph
+ tounicode entries are present in the font. \NC \NR
+\NC \type{stretch} \NC no \NC no \NC yes \NC number \NC the \quote {stretch} value from \type
+ {\expandglyphsinfont} \NC \NR
+\NC \type{shrink} \NC no \NC no \NC yes \NC number \NC the \quote {shrink} value from \type
+ {\expandglyphsinfont} \NC \NR
+\NC \type{step} \NC no \NC no \NC yes \NC number \NC the \quote {step} value from \type
+ {\expandglyphsinfont} \NC \NR
+\NC \type{expansion_factor} \NC no \NC no \NC no \NC number \NC the actual expansion factor of an expanded font \NC \NR
+\NC \type{attributes} \NC no \NC no \NC yes \NC string \NC the \type {\pdffontattr} \NC \NR
+\NC \type{cache} \NC no \NC no \NC yes \NC string \NC This key controls caching of the \LUA\ table on the
+ \TEX\ end where \type {yes} means: use a reference to
+ the table that is passed to \LUATEX\ (this is the
+ default), and no \type {no} means: don't store the
+ table reference, don't cache any \LUA\ data for this
+ font while \type {renew} means: don't store the table
+ reference, but save a reference to the table that is
+ created at the first access to one of its fields in font.
+ Note: the saved reference is thread|-|local, so be
+ careful when you are using coroutines: an error will be
+ thrown if the table has been cached in one thread, but
+ you reference it from another thread. \NC \NR
+\NC \type{nomath} \NC no \NC no \NC yes \NC boolean \NC This key allows a minor speedup for text fonts. If it
+ is present and true, then \LUATEX\ will not check the
+ character entries for math|-|specific keys. \NC \NR
+\NC \type{oldmath} \NC no \NC no \NC yes \NC boolean \NC This key flags a font as representing an old school \TEX\
+ math font and disables the \OPENTYPE\ code path. \NC \NR
+\NC \type{slant} \NC no \NC no \NC yes \NC number \NC This has the same semantics as the \type {SlantFont}
+ operator in font map files. \NC \NR
+\NC \type{extent} \NC no \NC no \NC yes \NC number \NC This has the same semantics as the \type {ExtendFont}
+ operator in font map files. \NC \NR
\stoptabulate
The key \type {name} is always required. The keys \type {stretch}, \type
@@ -112,16 +112,16 @@ makes sure that the font's definition is written to the output file (\DVI\ or
signalling the \quote {normal} direction for this font. There are sixteen
possibilities:
-\starttabulate[|Tc|Tc|Tc|Tc|]
-\NC \rmbf number \NC \rmbf meaning \NC \rmbf number \NC \rmbf meaning \NC\NR
-\NC 0 \NC LT \NC 8 \NC TT \NC\NR
-\NC 1 \NC LL \NC 9 \NC TL \NC\NR
-\NC 2 \NC LB \NC 10 \NC TB \NC\NR
-\NC 3 \NC LR \NC 11 \NC TR \NC\NR
-\NC 4 \NC RT \NC 12 \NC BT \NC\NR
-\NC 5 \NC RL \NC 13 \NC BL \NC\NR
-\NC 6 \NC RB \NC 14 \NC BB \NC\NR
-\NC 7 \NC RR \NC 15 \NC BR \NC\NR
+\starttabulate[|c|c|c|c|]
+\BC number \BC meaning \BC number \BC meaning \NC \NR
+\NC \type{0} \NC \type{LT} \NC \type {8} \NC \type{TT} \NC \NR
+\NC \type{1} \NC \type{LL} \NC \type {9} \NC \type{TL} \NC \NR
+\NC \type{2} \NC \type{LB} \NC \type{10} \NC \type{TB} \NC \NR
+\NC \type{3} \NC \type{LR} \NC \type{11} \NC \type{TR} \NC \NR
+\NC \type{4} \NC \type{RT} \NC \type{12} \NC \type{BT} \NC \NR
+\NC \type{5} \NC \type{RL} \NC \type{13} \NC \type{BL} \NC \NR
+\NC \type{6} \NC \type{RB} \NC \type{14} \NC \type{BB} \NC \NR
+\NC \type{7} \NC \type{RR} \NC \type{15} \NC \type{BR} \NC \NR
\stoptabulate
These are \OMEGA|-|style direction abbreviations: the first character indicates
@@ -137,15 +137,15 @@ gives a nicer user interface.
The names and their internal remapping are:
-\starttabulate[|lT|c|]
-\NC \rmbf name \NC \rmbf remapping \NC\NR
-\NC slant \NC 1 \NC\NR
-\NC space \NC 2 \NC\NR
-\NC space_stretch \NC 3 \NC\NR
-\NC space_shrink \NC 4 \NC\NR
-\NC x_height \NC 5 \NC\NR
-\NC quad \NC 6 \NC\NR
-\NC extra_space \NC 7 \NC\LR
+\starttabulate[|l|c|]
+\BC name \BC remapping \NC \NR
+\NC \type {slant} \NC 1 \NC \NR
+\NC \type {space} \NC 2 \NC \NR
+\NC \type {space_stretch} \NC 3 \NC \NR
+\NC \type {space_shrink} \NC 4 \NC \NR
+\NC \type {x_height} \NC 5 \NC \NR
+\NC \type {quad} \NC 6 \NC \NR
+\NC \type {extra_space} \NC 7 \NC \NR
\stoptabulate
The keys \type {type}, \type {format}, \type {embedding}, \type {fullname} and
@@ -196,29 +196,29 @@ Each character hash itself is a hash. For example, here is the character \quote
The following top|-|level keys can be present inside a character hash:
-\starttabulate[|lT|c|c|c|l|p|]
-\NC \rmbf key \NC \bf vf \NC \bf tfm \NC \bf used \NC \bf type \NC \bf description \NC\NR
-\NC width \NC yes \NC yes \NC yes \NC number \NC character's width, in sp (default 0) \NC\NR
-\NC height \NC no \NC yes \NC yes \NC number \NC character's height, in sp (default 0) \NC\NR
-\NC depth \NC no \NC yes \NC yes \NC number \NC character's depth, in sp (default 0) \NC\NR
-\NC italic \NC no \NC yes \NC yes \NC number \NC character's italic correction, in sp (default zero) \NC\NR
-\NC top_accent \NC no \NC no \NC maybe \NC number \NC character's top accent alignment place, in sp (default zero) \NC\NR
-\NC bot_accent \NC no \NC no \NC maybe \NC number \NC character's bottom accent alignment place, in sp (default zero) \NC\NR
-\NC left_protruding \NC no \NC no \NC maybe \NC number \NC character's \type {\lpcode} \NC\NR
-\NC right_protruding \NC no \NC no \NC maybe \NC number \NC character's \type {\rpcode} \NC\NR
-\NC expansion_factor \NC no \NC no \NC maybe \NC number \NC character's \type {\efcode} \NC\NR
-\NC tounicode \NC no \NC no \NC maybe \NC string \NC character's \UNICODE\ equivalent(s), in \UTF|-|16BE hexadecimal format \NC\NR
-\NC next \NC no \NC yes \NC yes \NC number \NC the \quote {next larger} character index \NC\NR
-\NC extensible \NC no \NC yes \NC yes \NC table \NC the constituent parts of an extensible recipe \NC\NR
-\NC vert_variants \NC no \NC no \NC yes \NC table \NC constituent parts of a vertical variant set \NC \NR
-\NC horiz_variants \NC no \NC no \NC yes \NC table \NC constituent parts of a horizontal variant set \NC \NR
-\NC kerns \NC no \NC yes \NC yes \NC table \NC kerning information \NC\NR
-\NC ligatures \NC no \NC yes \NC yes \NC table \NC ligaturing information \NC\NR
-\NC commands \NC yes \NC no \NC yes \NC array \NC virtual font commands \NC\NR
-\NC name \NC no \NC no \NC no \NC string \NC the character (\POSTSCRIPT) name \NC\NR
-\NC index \NC no \NC no \NC yes \NC number \NC the (\OPENTYPE\ or \TRUETYPE) font glyph index \NC\NR
-\NC used \NC no \NC yes \NC yes \NC boolean \NC typeset already (default: false)? \NC\NR
-\NC mathkern \NC no \NC no \NC yes \NC table \NC math cut-in specifications \NC\NR
+\starttabulate[|l|c|c|c|l|p|]
+\BC key \BC vf \BC tfm \BC used \BC type \BC description \NC\NR
+\NC \type{width} \NC yes \NC yes \NC yes \NC number \NC character's width, in sp (default 0) \NC\NR
+\NC \type{height} \NC no \NC yes \NC yes \NC number \NC character's height, in sp (default 0) \NC\NR
+\NC \type{depth} \NC no \NC yes \NC yes \NC number \NC character's depth, in sp (default 0) \NC\NR
+\NC \type{italic} \NC no \NC yes \NC yes \NC number \NC character's italic correction, in sp (default zero) \NC\NR
+\NC \type{top_accent} \NC no \NC no \NC maybe \NC number \NC character's top accent alignment place, in sp (default zero) \NC\NR
+\NC \type{bot_accent} \NC no \NC no \NC maybe \NC number \NC character's bottom accent alignment place, in sp (default zero) \NC\NR
+\NC \type{left_protruding} \NC no \NC no \NC maybe \NC number \NC character's \type {\lpcode} \NC\NR
+\NC \type{right_protruding} \NC no \NC no \NC maybe \NC number \NC character's \type {\rpcode} \NC\NR
+\NC \type{expansion_factor} \NC no \NC no \NC maybe \NC number \NC character's \type {\efcode} \NC\NR
+\NC \type{tounicode} \NC no \NC no \NC maybe \NC string \NC character's \UNICODE\ equivalent(s), in \UTF|-|16BE hexadecimal format \NC\NR
+\NC \type{next} \NC no \NC yes \NC yes \NC number \NC the \quote {next larger} character index \NC\NR
+\NC \type{extensible} \NC no \NC yes \NC yes \NC table \NC the constituent parts of an extensible recipe \NC\NR
+\NC \type{vert_variants} \NC no \NC no \NC yes \NC table \NC constituent parts of a vertical variant set \NC \NR
+\NC \type{horiz_variants} \NC no \NC no \NC yes \NC table \NC constituent parts of a horizontal variant set \NC \NR
+\NC \type{kerns} \NC no \NC yes \NC yes \NC table \NC kerning information \NC\NR
+\NC \type{ligatures} \NC no \NC yes \NC yes \NC table \NC ligaturing information \NC\NR
+\NC \type{commands} \NC yes \NC no \NC yes \NC array \NC virtual font commands \NC\NR
+\NC \type{name} \NC no \NC no \NC no \NC string \NC the character (\POSTSCRIPT) name \NC\NR
+\NC \type{index} \NC no \NC no \NC yes \NC number \NC the (\OPENTYPE\ or \TRUETYPE) font glyph index \NC\NR
+\NC \type{used} \NC no \NC yes \NC yes \NC boolean \NC typeset already (default: false)? \NC\NR
+\NC \type{mathkern} \NC no \NC no \NC yes \NC table \NC math cut-in specifications \NC\NR
\stoptabulate
The values of \type {top_accent}, \type {bot_accent} and \type {mathkern} are
@@ -250,26 +250,26 @@ present. It in in turn can be overruled by \type {vert_variants}.
The \type {extensible} table is very simple:
-\starttabulate[|lT|l|p|]
-\NC \rmbf key \NC \bf type \NC \bf description \NC\NR
-\NC top \NC number \NC top character index \NC\NR
-\NC mid \NC number \NC middle character index \NC\NR
-\NC bot \NC number \NC bottom character index \NC\NR
-\NC rep \NC number \NC repeatable character index \NC\NR
+\starttabulate[|l|l|p|]
+\BC key \BC type \BC description \NC\NR
+\NC \type{top} \NC number \NC top character index \NC\NR
+\NC \type{mid} \NC number \NC middle character index \NC\NR
+\NC \type{bot} \NC number \NC bottom character index \NC\NR
+\NC \type{rep} \NC number \NC repeatable character index \NC\NR
\stoptabulate
The \type {horiz_variants} and \type {vert_variants} are arrays of components.
Each of those components is itself a hash of up to five keys:
-\starttabulate[|lT|l|p|]
-\NC \rmbf key \NC \bf type \NC \bf explanation \NC\NR
-\NC glyph \NC number \NC The character index. Note that this is an encoding number, not a name. \NC \NR
-\NC extender \NC number \NC One (1) if this part is repeatable, zero (0) otherwise. \NC \NR
-\NC start \NC number \NC The maximum overlap at the starting side (in scaled points). \NC \NR
-\NC end \NC number \NC The maximum overlap at the ending side (in scaled points). \NC \NR
-\NC advance \NC number \NC The total advance width of this item. It can be zero or missing,
- then the natural size of the glyph for character \type {component}
- is used. \NC \NR
+\starttabulate[|l|l|p|]
+\BC key \BC type \BC explanation \NC \NR
+\NC \type{glyph} \NC number \NC The character index. Note that this is an encoding number, not a name. \NC \NR
+\NC \type{extender} \NC number \NC One (1) if this part is repeatable, zero (0) otherwise. \NC \NR
+\NC \type{start} \NC number \NC The maximum overlap at the starting side (in scaled points). \NC \NR
+\NC \type{end} \NC number \NC The maximum overlap at the ending side (in scaled points). \NC \NR
+\NC \type{advance} \NC number \NC The total advance width of this item. It can be zero or missing,
+ then the natural size of the glyph for character \type {component}
+ is used. \NC \NR
\stoptabulate
The \type {kerns} table is a hash indexed by character index (and \quote
@@ -282,10 +282,10 @@ The \type {ligatures} table is a hash indexed by character index (and \quote
value \type {right_boundary}), with the values being yet another small hash, with
two fields:
-\starttabulate[|lT|l|p|]
-\NC \rmbf key \NC \bf type \NC \bf description \NC \NR
-\NC type \NC number \NC the type of this ligature command, default 0 \NC \NR
-\NC char \NC number \NC the character index of the resultant ligature \NC \NR
+\starttabulate[|l|l|p|]
+\BC key \BC type \BC description \NC \NR
+\NC \type{type} \NC number \NC the type of this ligature command, default 0 \NC \NR
+\NC \type{char} \NC number \NC the character index of the resultant ligature \NC \NR
\stoptabulate
The \type {char} field in a ligature is required.
@@ -299,15 +299,15 @@ forward one or two places. The glyph that ends up to the right of the insertion
point will become the next \quote {left}.
\starttabulate[|l|c|l|l|]
-\NC \bf textual (Knuth) \NC \bf number \NC \bf string \NC result \NC\NR
-\NC \type{l + r =: n} \NC 0 \NC \type{=:} \NC \type{|n} \NC\NR
-\NC \type{l + r =:| n} \NC 1 \NC \type{=:|} \NC \type{|nr} \NC\NR
-\NC \type{l + r |=: n} \NC 2 \NC \type{|=:} \NC \type{|ln} \NC\NR
-\NC \type{l + r |=:| n} \NC 3 \NC \type{|=:|} \NC \type{|lnr} \NC\NR
-\NC \type{l + r =:|> n} \NC 5 \NC \type{=:|>} \NC \type{n|r} \NC\NR
-\NC \type{l + r |=:> n} \NC 6 \NC \type{|=:>} \NC \type{l|n} \NC\NR
-\NC \type{l + r |=:|> n} \NC 7 \NC \type{|=:|>} \NC \type{l|nr} \NC\NR
-\NC \type{l + r |=:|>> n} \NC 11 \NC \type{|=:|>>} \NC \type{ln|r} \NC\NR
+\BC textual (Knuth) \BC number \BC string \BC result \NC\NR
+\NC \type{l + r =: n} \NC 0 \NC \type{=:} \NC \type{|n} \NC\NR
+\NC \type{l + r =:| n} \NC 1 \NC \type{=:|} \NC \type{|nr} \NC\NR
+\NC \type{l + r |=: n} \NC 2 \NC \type{|=:} \NC \type{|ln} \NC\NR
+\NC \type{l + r |=:| n} \NC 3 \NC \type{|=:|} \NC \type{|lnr} \NC\NR
+\NC \type{l + r =:|> n} \NC 5 \NC \type{=:|>} \NC \type{n|r} \NC\NR
+\NC \type{l + r |=:> n} \NC 6 \NC \type{|=:>} \NC \type{l|n} \NC\NR
+\NC \type{l + r |=:|> n} \NC 7 \NC \type{|=:|>} \NC \type{l|nr} \NC\NR
+\NC \type{l + r |=:|>> n} \NC 11 \NC \type{|=:|>>} \NC \type{ln|r} \NC\NR
\stoptabulate
The default value is~0, and can be left out. That signifies a \quote {normal}
@@ -324,10 +324,10 @@ structure. If the value is \type {real}, then this is a proper font, and the
inclusion mechanism will attempt to add the needed font object definitions to the
\PDF. Values for \type {type} are:
-\starttabulate[|Tl|p|]
-\NC \rmbf value \NC \rmbf description \NC\NR
-\NC real \NC this is a base font \NC\NR
-\NC virtual \NC this is a virtual font \NC\NR
+\starttabulate[|l|p|]
+\BC value \BC description \NC\NR
+\NC \type{real} \NC this is a base font \NC\NR
+\NC \type{virtual} \NC this is a virtual font \NC\NR
\stoptabulate
The actions to be taken depend on a number of different variables:
@@ -368,12 +368,12 @@ the separate characters.
Values for \type {format} are:
-\starttabulate[|Tl|p|]
-\NC \rmbf value \NC \rmbf description \NC \NR
-\NC type1 \NC this is a \POSTSCRIPT\ \TYPEONE\ font \NC \NR
-\NC type3 \NC this is a bitmapped (\PK) font \NC \NR
-\NC truetype \NC this is a \TRUETYPE\ or \TRUETYPE|-|based \OPENTYPE\ font \NC \NR
-\NC opentype \NC this is a \POSTSCRIPT|-|based \OPENTYPE\ font \NC \NR
+\starttabulate[|l|p|]
+\BC value \BC description \NC \NR
+\NC \type{type1} \NC this is a \POSTSCRIPT\ \TYPEONE\ font \NC \NR
+\NC \type{type3} \NC this is a bitmapped (\PK) font \NC \NR
+\NC \type{truetype} \NC this is a \TRUETYPE\ or \TRUETYPE|-|based \OPENTYPE\ font \NC \NR
+\NC \type{opentype} \NC this is a \POSTSCRIPT|-|based \OPENTYPE\ font \NC \NR
\stoptabulate
\type {type3} fonts are provided for backward compatibility only, and do not
@@ -381,11 +381,11 @@ support the new wide encoding options.
Values for \type {embedding} are:
-\starttabulate[|Tl|p|]
-\NC \rmbf value \NC \rmbf description \NC \NR
-\NC no \NC don't embed the font at all \NC \NR
-\NC subset \NC include and atttempt to subset the font \NC \NR
-\NC full \NC include this font in its entirety \NC \NR
+\starttabulate[|l|p|]
+\BC value \BC description \NC \NR
+\NC \type{no} \NC don't embed the font at all \NC \NR
+\NC \type{subset} \NC include and atttempt to subset the font \NC \NR
+\NC \type{full} \NC include this font in its entirety \NC \NR
\stoptabulate
The other fields are used as follows: The \type {fullname} will be the
@@ -467,28 +467,28 @@ The \type {commands} array is a hash where each item is another small array,
with the first entry representing a command and the extra items being the
parameters to that command. The allowed commands and their arguments are:
-\starttabulate[|Tl|l|l|p|]
-\NC \rmbf command name \NC \bf arguments \NC \bf type \NC \bf description \NC\NR
-\NC font \NC 1 \NC number \NC select a new font from the local \type {fonts} table\NC\NR
-\NC char \NC 1 \NC number \NC typeset this character number from the current font,
- and move right by the character's width\NC\NR
-\NC node \NC 1 \NC node \NC output this node (list), and move right
- by the width of this list\NC\NR
-\NC slot \NC 2 \NC 2 numbers \NC a shortcut for the combination of a font and char command\NC\NR
-\NC push \NC 0 \NC \NC save current position\NC\NR
-\NC nop \NC 0 \NC \NC do nothing \NC\NR
-\NC pop \NC 0 \NC \NC pop position \NC\NR
-\NC rule \NC 2 \NC 2 numbers \NC output a rule $ht*wd$, and move right.\NC\NR
-\NC down \NC 1 \NC number \NC move down on the page\NC\NR
-\NC right \NC 1 \NC number \NC move right on the page\NC\NR
-\NC special \NC 1 \NC string \NC output a \type {\special} command\NC\NR
-\NC pdf \NC 2 \NC 2 strings \NC output a \PDF\ literal, the first string is one of \type {origin},
- \type {page}, \type {direct} or \type {raw}; if you have one string
- only \type {origin} is assumed \NC\NR
-\NC lua \NC 1 \NC string \NC execute a \LUA\ script (at \type {\latelua} time)\NC\NR
-\NC image \NC 1 \NC image \NC output an image (the argument can be either an \type
- {<image>} variable or an \type {image_spec} table)\NC\NR
-\NC comment \NC any \NC any \NC the arguments of this command are ignored\NC\NR
+\starttabulate[|l|l|l|p|]
+\BC command name \BC arguments \BC type \BC description \NC \NR
+\NC \type{font} \NC 1 \NC number \NC select a new font from the local \type {fonts} table \NC \NR
+\NC \type{char} \NC 1 \NC number \NC typeset this character number from the current font,
+ and move right by the character's width \NC \NR
+\NC \type{node} \NC 1 \NC node \NC output this node (list), and move right
+ by the width of this list\NC \NR
+\NC \type{slot} \NC 2 \NC 2 numbers \NC a shortcut for the combination of a font and char command\NC \NR
+\NC \type{push} \NC 0 \NC \NC save current position\NC \NR
+\NC \type{nop} \NC 0 \NC \NC do nothing \NC \NR
+\NC \type{pop} \NC 0 \NC \NC pop position \NC \NR
+\NC \type{rule} \NC 2 \NC 2 numbers \NC output a rule $ht*wd$, and move right. \NC \NR
+\NC \type{down} \NC 1 \NC number \NC move down on the page \NC \NR
+\NC \type{right} \NC 1 \NC number \NC move right on the page \NC \NR
+\NC \type{special} \NC 1 \NC string \NC output a \type {\special} command \NC \NR
+\NC \type{pdf} \NC 2 \NC 2 strings \NC output a \PDF\ literal, the first string is one of \type {origin},
+ \type {page}, \type {direct} or \type {raw}; if you have one string
+ only \type {origin} is assumed \NC \NR
+\NC \type{lua} \NC 1 \NC string \NC execute a \LUA\ script (at \type {\latelua} time) \NC \NR
+\NC \type{image} \NC 1 \NC image \NC output an image (the argument can be either an \type
+ {<image>} variable or an \type {image_spec} table) \NC \NR
+\NC \type{comment} \NC any \NC any \NC the arguments of this command are ignored \NC \NR
\stoptabulate
When a font id is set to~0 then it will be replaced by the currently assigned
diff --git a/doc/context/sources/general/manuals/luatex/luatex-languages.tex b/doc/context/sources/general/manuals/luatex/luatex-languages.tex
index 850cddb36..365e87f26 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-languages.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-languages.tex
@@ -224,43 +224,43 @@ node. But by default also a hlist, vlist, rule, dir, whatsit, ins, and adjust no
indicate a start or end. You can omit the last set from the test by setting
\type {\hyphenationbounds} to a non|-|zero value:
-\starttabulate[|Tl|l|]
-\NC 0 \NC not strict \NC \NR
-\NC 1 \NC strict start \NC \NR
-\NC 2 \NC strict end \NC \NR
-\NC 3 \NC strict start and strict end \NC \NR
+\starttabulate[|l|l|]
+\NC \type{0} \NC not strict \NC \NR
+\NC \type{1} \NC strict start \NC \NR
+\NC \type{2} \NC strict end \NC \NR
+\NC \type{3} \NC strict start and strict end \NC \NR
\stoptabulate
The word start is determined as follows:
-\starttabulate[|Bl|l|]
-\NC boundary \NC yes when wordboundary \NC \NR
-\NC hlist \NC when hyphenationbounds 1 or 3 \NC \NR
-\NC vlist \NC when hyphenationbounds 1 or 3 \NC \NR
-\NC rule \NC when hyphenationbounds 1 or 3 \NC \NR
-\NC dir \NC when hyphenationbounds 1 or 3 \NC \NR
-\NC whatsit \NC when hyphenationbounds 1 or 3 \NC \NR
-\NC glue \NC yes \NC \NR
-\NC math \NC skipped \NC \NR
-\NC glyph \NC exhyphenchar (one only) : yes (so no -- ---) \NC \NR
-\NC otherwise \NC yes \NC \NR
+\starttabulate[|l|l|]
+\BC boundary \NC yes when wordboundary \NC \NR
+\BC hlist \NC when hyphenationbounds 1 or 3 \NC \NR
+\BC vlist \NC when hyphenationbounds 1 or 3 \NC \NR
+\BC rule \NC when hyphenationbounds 1 or 3 \NC \NR
+\BC dir \NC when hyphenationbounds 1 or 3 \NC \NR
+\BC whatsit \NC when hyphenationbounds 1 or 3 \NC \NR
+\BC glue \NC yes \NC \NR
+\BC math \NC skipped \NC \NR
+\BC glyph \NC exhyphenchar (one only) : yes (so no -- ---) \NC \NR
+\BC otherwise \NC yes \NC \NR
\stoptabulate
The word end is determined as follows:
-\starttabulate[|Bl|l|]
-\NC boundary \NC yes \NC \NR
-\NC glyph \NC yes when different language \NC \NR
-\NC glue \NC yes \NC \NR
-\NC penalty \NC yes \NC \NR
-\NC kern \NC yes when not italic (for some historic reason) \NC \NR
-\NC hlist \NC when hyphenationbounds 2 or 3 \NC \NR
-\NC vlist \NC when hyphenationbounds 2 or 3 \NC \NR
-\NC rule \NC when hyphenationbounds 2 or 3 \NC \NR
-\NC dir \NC when hyphenationbounds 2 or 3 \NC \NR
-\NC whatsit \NC when hyphenationbounds 2 or 3 \NC \NR
-\NC ins \NC when hyphenationbounds 2 or 3 \NC \NR
-\NC adjust \NC when hyphenationbounds 2 or 3 \NC \NR
+\starttabulate[|l|l|]
+\BC boundary \NC yes \NC \NR
+\BC glyph \NC yes when different language \NC \NR
+\BC glue \NC yes \NC \NR
+\BC penalty \NC yes \NC \NR
+\BC kern \NC yes when not italic (for some historic reason) \NC \NR
+\BC hlist \NC when hyphenationbounds 2 or 3 \NC \NR
+\BC vlist \NC when hyphenationbounds 2 or 3 \NC \NR
+\BC rule \NC when hyphenationbounds 2 or 3 \NC \NR
+\BC dir \NC when hyphenationbounds 2 or 3 \NC \NR
+\BC whatsit \NC when hyphenationbounds 2 or 3 \NC \NR
+\BC ins \NC when hyphenationbounds 2 or 3 \NC \NR
+\BC adjust \NC when hyphenationbounds 2 or 3 \NC \NR
\stoptabulate
\in{Figures}[hb:1] upto \in[hb:5] show some examples. In all cases we set the min
@@ -491,18 +491,18 @@ have been added:
The first parameter has the following consequences for automatic discs (the ones
resulting from an \type {\exhyphenchar}:
-\starttabulate[|Tc|l|l|]
-\BC mode \BC automatic disc \type{-} \BC explicit disc \type{\-} \NC \NR
+\starttabulate[|c|l|l|]
+\BC mode \BC automatic disc \type{-} \BC explicit disc \type{\-} \NC \NR
\HL
-\NC 0 \NC \type {\exhyphenpenalty} \NC \type {\exhyphenpenalty} \NC \NR
-\NC 1 \NC \type {\hyphenpenalty} \NC \type {\hyphenpenalty} \NC \NR
-\NC 2 \NC \type {\exhyphenpenalty} \NC \type {\hyphenpenalty} \NC \NR
-\NC 3 \NC \type {\hyphenpenalty} \NC \type {\exhyphenpenalty} \NC \NR
-\NC 4 \NC \type {\automatichyphenpenalty} \NC \type {\explicithyphenpenalty} \NC \NR
-\NC 5 \NC \type {\exhyphenpenalty} \NC \type {\explicithyphenpenalty} \NC \NR
-\NC 6 \NC \type {\hyphenpenalty} \NC \type {\explicithyphenpenalty} \NC \NR
-\NC 7 \NC \type {\automatichyphenpenalty} \NC \type {\exhyphenpenalty} \NC \NR
-\NC 8 \NC \type {\automatichyphenpenalty} \NC \type {\hyphenpenalty} \NC \NR
+\NC \type{0} \NC \type {\exhyphenpenalty} \NC \type {\exhyphenpenalty} \NC \NR
+\NC \type{1} \NC \type {\hyphenpenalty} \NC \type {\hyphenpenalty} \NC \NR
+\NC \type{2} \NC \type {\exhyphenpenalty} \NC \type {\hyphenpenalty} \NC \NR
+\NC \type{3} \NC \type {\hyphenpenalty} \NC \type {\exhyphenpenalty} \NC \NR
+\NC \type{4} \NC \type {\automatichyphenpenalty} \NC \type {\explicithyphenpenalty} \NC \NR
+\NC \type{5} \NC \type {\exhyphenpenalty} \NC \type {\explicithyphenpenalty} \NC \NR
+\NC \type{6} \NC \type {\hyphenpenalty} \NC \type {\explicithyphenpenalty} \NC \NR
+\NC \type{7} \NC \type {\automatichyphenpenalty} \NC \type {\exhyphenpenalty} \NC \NR
+\NC \type{8} \NC \type {\automatichyphenpenalty} \NC \type {\hyphenpenalty} \NC \NR
\stoptabulate
other values do what we always did in \LUATEX: insert \type {\exhyphenpenalty}.
@@ -547,9 +547,9 @@ listed items. It is important to note that the keys in an exception dictionary
can always be generated from the values. Here are a few examples:
\starttabulate[|l|l|l|]
-\NC \bf value \NC \bf implied key (input) \NC \bf effect \NC\NR
-\NC \type {ta-ble} \NC table \NC \type {ta\-ble} ($=$ \type {ta\discretionary{-}{}{}ble}) \NC\NR
-\NC \type {ba{k-}{}{c}ken} \NC backen \NC \type {ba\discretionary{k-}{}{c}ken} \NC\NR
+\BC value \BC implied key (input) \NC effect \NC\NR
+\NC \type {ta-ble} \NC table \NC \type {ta\-ble} ($=$ \type {ta\discretionary{-}{}{}ble}) \NC\NR
+\NC \type {ba{k-}{}{c}ken} \NC backen \NC \type {ba\discretionary{k-}{}{c}ken} \NC\NR
\stoptabulate
The resultant patterns and exception dictionary will be stored under the language
@@ -709,10 +709,10 @@ For example, take the word \type {office}, hyphenated \type {of-fice}, using a
type ligatures:
\starttabulate[|l|l|]
-\NC Initial: \NC \type {{o}{f}{f}{i}{c}{e}} \NC\NR
-\NC After hyphenation: \NC \type {{o}{f}{{-},{},{}}{f}{i}{c}{e}} \NC\NR
-\NC First ligature stage: \NC \type {{o}{{f-},{f},{<ff>}}{i}{c}{e}} \NC\NR
-\NC Final result: \NC \type {{o}{{f-},{<fi>},{<ffi>}}{c}{e}} \NC\NR
+\NC initial \NC \type {{o}{f}{f}{i}{c}{e}} \NC\NR
+\NC after hyphenation \NC \type {{o}{f}{{-},{},{}}{f}{i}{c}{e}} \NC\NR
+\NC first ligature stage \NC \type {{o}{{f-},{f},{<ff>}}{i}{c}{e}} \NC\NR
+\NC final result \NC \type {{o}{{f-},{<fi>},{<ffi>}}{c}{e}} \NC\NR
\stoptabulate
That's bad enough, but let us assume that there is also a hyphenation point
@@ -734,25 +734,25 @@ the top-level discretionary that resulted from the first hyphenation point.
Here is that nested solution again, in a different representation:
-\starttabulate[|l|l|l|l|]
-\NC \NC pre \NC post \NC replace \NC \NR
-\NC topdisc \NC \type {f-}$^1$ \NC sub1 \NC sub2 \NC \NR
-\NC sub1 \NC \type {f-}$^2$ \NC \type {i}$^3$ \NC \type {<fi>}$^4$ \NC \NR
-\NC sub2 \NC \type {<ff>-}$^5$\NC \type {i}$^6$ \NC \type {<ffi>}$^7$ \NC \NR
+\starttabulate[|l|c|c|c|c|c|c|]
+\NC \BC pre \BC \BC post \BC \BC replace \BC \NC \NR
+\NC topdisc \NC \type {f-} \NC (1) \NC \NC sub 1 \NC \NC sub 2 \NC \NR
+\NC sub 1 \NC \type {f-} \NC (2) \NC \type {i} \NC (3) \NC \type {<fi>} \NC (4) \NC \NR
+\NC sub 2 \NC \type {<ff>-} \NC (5) \NC \type {i} \NC (6) \NC \type {<ffi>} \NC (7) \NC \NR
\stoptabulate
When line breaking is choosing its breakpoints, the following fields will
eventually be selected:
-\starttabulate[|l|l|l|]
-\NC \type {of-f-ice} \NC \type {f-}$^1$ \NC \NR
-\NC \NC \type {f-}$^2$ \NC \NR
-\NC \NC \type {i}$^3$ \NC \NR
-\NC \type {of-fice} \NC \type {f-}$^1$ \NC \NR
-\NC \NC \type {<fi>}$^4$ \NC \NR
-\NC \type {off-ice} \NC \type {<ff>-}$^5$ \NC \NR
-\NC \NC \type {i}$^6$ \NC \NR
-\NC \type {office} \NC \type {<ffi>}$^7$ \NC \NR
+\starttabulate[|l|c|c|]
+\NC \type {of-f-ice} \NC \type {f-} \NC (1) \NC \NR
+\NC \NC \type {f-} \NC (2) \NC \NR
+\NC \NC \type {i} \NC (3) \NC \NR
+\NC \type {of-fice} \NC \type {f-} \NC (1) \NC \NR
+\NC \NC \type {<fi>} \NC (4) \NC \NR
+\NC \type {off-ice} \NC \type {<ff>-} \NC (5) \NC \NR
+\NC \NC \type {i} \NC (6) \NC \NR
+\NC \type {office} \NC \type {<ffi>} \NC (7) \NC \NR
\stoptabulate
The current solution in \LUATEX\ is not able to handle nested discretionaries,
@@ -770,14 +770,14 @@ make the whole stuff fit into just two discretionary nodes.
The mapping of the seven list fields to the six fields in this discretionary node
pair is as follows:
-\starttabulate[|l|p|]
-\NC \bf field \NC \bf description \NC \NR
-\NC \type {disc1.pre} \NC \type {f-}$^1$ \NC \NR
-\NC \type {disc1.post} \NC \type {<fi>}$^4$ \NC \NR
-\NC \type {disc1.replace} \NC \type {<ffi>}$^7$ \NC \NR
-\NC \type {disc2.pre} \NC \type {f-}$^2$ \NC \NR
-\NC \type {disc2.post} \NC \type {i}$^{3{,}6}$\NC \NR
-\NC \type {disc2.replace} \NC \type {<ff>-}$^5$\NC \NR
+\starttabulate[|l|c|c|]
+\BC field \BC description \NC \NC \NR
+\NC \type {disc1.pre} \NC \type {f-} \NC (1) \NC \NR
+\NC \type {disc1.post} \NC \type {<fi>} \NC (4) \NC \NR
+\NC \type {disc1.replace} \NC \type {<ffi>} \NC (7) \NC \NR
+\NC \type {disc2.pre} \NC \type {f-} \NC (2) \NC \NR
+\NC \type {disc2.post} \NC \type {i} \NC (3,6) \NC \NR
+\NC \type {disc2.replace} \NC \type {<ff>-} \NC (5) \NC \NR
\stoptabulate
What is actually generated after ligaturing has been applied is therefore:
diff --git a/doc/context/sources/general/manuals/luatex/luatex-lua.tex b/doc/context/sources/general/manuals/luatex/luatex-lua.tex
index e2edcecc9..3d7e14700 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-lua.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-lua.tex
@@ -55,33 +55,33 @@ option. If there is no \type {--lua} option, the command line is interpreted in
similar fashion as the other \TEX\ engines. Some options are accepted but have no
consequence. The following command|-|line options are understood:
-\starttabulate[|lT|p|]
-\NC --credits \NC display credits and exit \NC \NR
-\NC --debug-format \NC enable format debugging \NC \NR
-\NC --draftmode \NC switch on draft mode i.e.\ generate no output in \PDF\ mode \NC \NR
-\NC --[no-]file-line-error \NC disable/enable \type {file:line:error} style messages \NC \NR
-\NC --[no-]file-line-error-style \NC aliases of \type {--[no-]file-line-error} \NC \NR
-\NC --fmt=FORMAT \NC load the format file \type {FORMAT} \NC\NR
-\NC --halt-on-error \NC stop processing at the first error\NC \NR
-\NC --help \NC display help and exit \NC\NR
-\NC --ini \NC be \type {iniluatex}, for dumping formats \NC\NR
-\NC --interaction=STRING \NC set interaction mode: \type {batchmode}, \type {nonstopmode}, \type {scrollmode} or \type {errorstopmode} \NC \NR
-\NC --jobname=STRING \NC set the job name to \type {STRING} \NC \NR
-\NC --kpathsea-debug=NUMBER \NC set path searching debugging flags according to the bits of \type {NUMBER} \NC \NR
-\NC --lua=FILE \NC load and execute a \LUA\ initialization script \NC\NR
-\NC --[no-]mktex=FMT \NC disable/enable \type {mktexFMT} generation with \type {FMT} is \type {tex} or \type {tfm} \NC \NR
-\NC --nosocket \NC disable the \LUA\ socket library \NC\NR
-\NC --output-comment=STRING \NC use \type {STRING} for \DVI\ file comment instead of date (no effect for \PDF) \NC \NR
-\NC --output-directory=DIR \NC use \type {DIR} as the directory to write files to \NC \NR
-\NC --output-format=FORMAT \NC use \type {FORMAT} for job output; \type {FORMAT} is \type {dvi} or \type {pdf} \NC \NR
-\NC --progname=STRING \NC set the program name to \type {STRING} \NC \NR
-\NC --recorder \NC enable filename recorder \NC \NR
-\NC --safer \NC disable easily exploitable \LUA\ commands \NC\NR
-\NC --[no-]shell-escape \NC disable/enable system calls \NC \NR
-\NC --shell-restricted \NC restrict system calls to a list of commands given in \type {texmf.cnf} \NC \NR
-\NC --synctex=NUMBER \NC enable \type {synctex} \NC \NR
-\NC --utc \NC use utc times when applicable \NC \NR
-\NC --version \NC display version and exit \NC \NR
+\starttabulate[|l|p|]
+\NC \type{--credits} \NC display credits and exit \NC \NR
+\NC \type{--debug-format} \NC enable format debugging \NC \NR
+\NC \type{--draftmode} \NC switch on draft mode i.e.\ generate no output in \PDF\ mode \NC \NR
+\NC \type{--[no-]file-line-error} \NC disable/enable \type {file:line:error} style messages \NC \NR
+\NC \type{--[no-]file-line-error-style} \NC aliases of \type {--[no-]file-line-error} \NC \NR
+\NC \type{--fmt=FORMAT} \NC load the format file \type {FORMAT} \NC\NR
+\NC \type{--halt-on-error} \NC stop processing at the first error\NC \NR
+\NC \type{--help} \NC display help and exit \NC\NR
+\NC \type{--ini} \NC be \type {iniluatex}, for dumping formats \NC\NR
+\NC \type{--interaction=STRING} \NC set interaction mode: \type {batchmode}, \type {nonstopmode}, \type {scrollmode} or \type {errorstopmode} \NC \NR
+\NC \type{--jobname=STRING} \NC set the job name to \type {STRING} \NC \NR
+\NC \type{--kpathsea-debug=NUMBER} \NC set path searching debugging flags according to the bits of \type {NUMBER} \NC \NR
+\NC \type{--lua=FILE} \NC load and execute a \LUA\ initialization script \NC\NR
+\NC \type{--[no-]mktex=FMT} \NC disable/enable \type {mktexFMT} generation with \type {FMT} is \type {tex} or \type {tfm} \NC \NR
+\NC \type{--nosocket} \NC disable the \LUA\ socket library \NC\NR
+\NC \type{--output-comment=STRING} \NC use \type {STRING} for \DVI\ file comment instead of date (no effect for \PDF) \NC \NR
+\NC \type{--output-directory=DIR} \NC use \type {DIR} as the directory to write files to \NC \NR
+\NC \type{--output-format=FORMAT} \NC use \type {FORMAT} for job output; \type {FORMAT} is \type {dvi} or \type {pdf} \NC \NR
+\NC \type{--progname=STRING} \NC set the program name to \type {STRING} \NC \NR
+\NC \type{--recorder} \NC enable filename recorder \NC \NR
+\NC \type{--safer} \NC disable easily exploitable \LUA\ commands \NC\NR
+\NC \type{--[no-]shell-escape} \NC disable/enable system calls \NC \NR
+\NC \type{--shell-restricted} \NC restrict system calls to a list of commands given in \type {texmf.cnf} \NC \NR
+\NC \type{--synctex=NUMBER} \NC enable \type {synctex} \NC \NR
+\NC \type{--utc} \NC use utc times when applicable \NC \NR
+\NC \type{--version} \NC display version and exit \NC \NR
\stoptabulate
Some of the traditional flags are just ignored: \type {--etex}, \type
@@ -141,7 +141,7 @@ Then it checks the various safety switches. You can use those to disable some
\type {--safer} \type {nil}s the following functions:
\starttabulate[|l|l|]
-\NC \bf library \NC \bf functions \NC \NR
+\BC library \BC functions \NC \NR
\NC \type {os} \NC \type {execute} \type {exec} \type {spawn} \type {setenv} \type {rename} \type {remove} \type {tmpdir} \NC \NR
\NC \type {io} \NC \type {popen} \type {output} \type {tmpfile} \NC \NR
\NC \type {lfs} \NC \type {rmdir} \type {mkdir} \type {chdir} \type {lock} \type {touch} \NC \NR
@@ -404,7 +404,7 @@ The \type {os} library has a few extra functions and variables:
\startitem
\type {os.env} is a hash table containing a dump of the variables and
values in the process environment at the start of the run. It is writeable,
- but the actual environment is {\em not\/} updated automatically.
+ but the actual environment is \notabene {not} updated automatically.
\stopitem
\startitem
@@ -559,12 +559,17 @@ When Universal Time is needed, you can pass the flag \type {utc} to the engine.
property also works when the date and time are set by \LUATEX\ itself. It has a
complementary entry \type {use_utc_time} in the \type {texconfig} table.
-{\em To some extend a cleaner solution would be to have a flag that disables all
-variable data in one go (like filenames and so) but we just follow the method
-implemented in \PDFTEX\ where primitives are used to influence other properties.}
-
-{\em In \CONTEXT\ we provide the command line argument \type {--nodates} that
-does bit more disabling of dates.}
+\startnotabene
+ To some extend a cleaner solution would be to have a flag that disables all
+ variable data in one go (like filenames and so) but we just follow the method
+ implemented in \PDFTEX\ where primitives are used to influence other
+ properties.
+\stopnotabene
+
+\startnotabene
+ In \CONTEXT\ we provide the command line argument \type {--nodates} that does
+ bit more disabling of dates.
+\stopnotabene
\stopchapter
diff --git a/doc/context/sources/general/manuals/luatex/luatex-math.tex b/doc/context/sources/general/manuals/luatex/luatex-math.tex
index fa963360b..da4ce383b 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-math.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-math.tex
@@ -168,20 +168,20 @@ The input for such primitives would look like this:
The altered \TEX82 primitives are:
\starttabulate[|l|l|r|c|l|r|]
-\NC \bf primitive \NC \bf min \NC \bf max \NC \kern 2em \NC \bf min \NC \bf max \NC \NR
-\NC \type {\mathcode} \NC 0 \NC 10FFFF \NC = \NC 0 \NC 8000 \NC \NR
-\NC \type {\delcode} \NC 0 \NC 10FFFF \NC = \NC 0 \NC FFFFFF \NC \NR
+\BC primitive \BC min \BC max \BC \kern 2em \BC min \BC max \NC \NR
+\NC \type {\mathcode} \NC 0 \NC 10FFFF \NC = \NC 0 \NC 8000 \NC \NR
+\NC \type {\delcode} \NC 0 \NC 10FFFF \NC = \NC 0 \NC FFFFFF \NC \NR
\stoptabulate
The unaltered ones are:
\starttabulate[|l|l|r|]
-\NC \bf primitive \NC \bf min \NC \bf max \NC \NR
-\NC \type {\mathchardef} \NC 0 \NC 8000 \NC \NR
-\NC \type {\mathchar} \NC 0 \NC 7FFF \NC \NR
-\NC \type {\mathaccent} \NC 0 \NC 7FFF \NC \NR
-\NC \type {\delimiter} \NC 0 \NC 7FFFFFF \NC \NR
-\NC \type {\radical} \NC 0 \NC 7FFFFFF \NC \NR
+\BC primitive \BC min \BC max \NC \NR
+\NC \type {\mathchardef} \NC 0 \NC 8000 \NC \NR
+\NC \type {\mathchar} \NC 0 \NC 7FFF \NC \NR
+\NC \type {\mathaccent} \NC 0 \NC 7FFF \NC \NR
+\NC \type {\delimiter} \NC 0 \NC 7FFFFFF \NC \NR
+\NC \type {\radical} \NC 0 \NC 7FFFFFF \NC \NR
\stoptabulate
For practical reasons \type {\mathchardef} will silently accept values larger
@@ -193,18 +193,18 @@ The following new primitives are compatible with \XETEX:
% somewhat fuzzy:
\starttabulate[|l|l|r|c|l|r|]
-\NC \bf primitive \NC \bf min \NC \bf max \NC \kern 2em \NC \bf min \NC \bf max \NC \NR
-\NC \type {\Umathchardef} \NC 0+0+0 \NC 7+FF+10FFFF\rlap{\high{1}} \NC \NC \NC \NC \NR
-\NC \type {\Umathcharnumdef}\rlap{\high{5}} \NC -80000000 \NC 7FFFFFFF\rlap{\high{3}} \NC \NC \NC \NC \NR
-\NC \type {\Umathcode} \NC 0 \NC 10FFFF \NC = \NC 0+0+0 \NC 7+FF+10FFFF\rlap{\high{1}} \NC \NR
-\NC \type {\Udelcode} \NC 0 \NC 10FFFF \NC = \NC 0+0 \NC FF+10FFFF\rlap{\high{2}} \NC \NR
-\NC \type {\Umathchar} \NC 0+0+0 \NC 7+FF+10FFFF \NC \NC \NC \NC \NR
-\NC \type {\Umathaccent} \NC 0+0+0 \NC 7+FF+10FFFF\rlap{\high{2,4}} \NC \NC \NC \NC \NR
-\NC \type {\Udelimiter} \NC 0+0+0 \NC 7+FF+10FFFF\rlap{\high{2}} \NC \NC \NC \NC \NR
-\NC \type {\Uradical} \NC 0+0 \NC FF+10FFFF\rlap{\high{2}} \NC \NC \NC \NC \NR
-\NC \type {\Umathcharnum} \NC -80000000 \NC 7FFFFFFF\rlap{\high{3}} \NC \NC \NC \NC \NR
-\NC \type {\Umathcodenum} \NC 0 \NC 10FFFF \NC = \NC -80000000 \NC 7FFFFFFF\rlap{\high{3}} \NC \NR
-\NC \type {\Udelcodenum} \NC 0 \NC 10FFFF \NC = \NC -80000000 \NC 7FFFFFFF\rlap{\high{3}} \NC \NR
+\BC primitive \BC min \BC max \BC \kern 2em \BC min \BC max \NC \NR
+\NC \type {\Umathchardef} \NC 0+0+0 \NC 7+FF+10FFFF\rlap{\high{1}} \NC \NC \NC \NC \NR
+\NC \type {\Umathcharnumdef}\rlap{\high{5}} \NC -80000000 \NC 7FFFFFFF\rlap{\high{3}} \NC \NC \NC \NC \NR
+\NC \type {\Umathcode} \NC 0 \NC 10FFFF \NC = \NC 0+0+0 \NC 7+FF+10FFFF\rlap{\high{1}} \NC \NR
+\NC \type {\Udelcode} \NC 0 \NC 10FFFF \NC = \NC 0+0 \NC FF+10FFFF\rlap{\high{2}} \NC \NR
+\NC \type {\Umathchar} \NC 0+0+0 \NC 7+FF+10FFFF \NC \NC \NC \NC \NR
+\NC \type {\Umathaccent} \NC 0+0+0 \NC 7+FF+10FFFF\rlap{\high{2,4}} \NC \NC \NC \NC \NR
+\NC \type {\Udelimiter} \NC 0+0+0 \NC 7+FF+10FFFF\rlap{\high{2}} \NC \NC \NC \NC \NR
+\NC \type {\Uradical} \NC 0+0 \NC FF+10FFFF\rlap{\high{2}} \NC \NC \NC \NC \NR
+\NC \type {\Umathcharnum} \NC -80000000 \NC 7FFFFFFF\rlap{\high{3}} \NC \NC \NC \NC \NR
+\NC \type {\Umathcodenum} \NC 0 \NC 10FFFF \NC = \NC -80000000 \NC 7FFFFFFF\rlap{\high{3}} \NC \NR
+\NC \type {\Udelcodenum} \NC 0 \NC 10FFFF \NC = \NC -80000000 \NC 7FFFFFFF\rlap{\high{3}} \NC \NR
\stoptabulate
Specifications typically look like:
@@ -238,13 +238,13 @@ details.
New primitives that exist in \LUATEX\ only (all of these will be explained
in following sections):
-\starttabulate[|l|l|l|l|]
-\NC \bf primitive \NC \bf value range (in hex) \NC \NR
-\NC \type {\Uroot} \NC 0+0--FF+10FFFF$^2$ \NC \NR
-\NC \type {\Uoverdelimiter} \NC 0+0--FF+10FFFF$^2$ \NC \NR
-\NC \type {\Uunderdelimiter} \NC 0+0--FF+10FFFF$^2$ \NC \NR
-\NC \type {\Udelimiterover} \NC 0+0--FF+10FFFF$^2$ \NC \NR
-\NC \type {\Udelimiterunder} \NC 0+0--FF+10FFFF$^2$ \NC \NR
+\starttabulate[|l|l|]
+\BC primitive \BC value range (in hex) \NC \NR
+\NC \type {\Uroot} \NC 0+0--FF+10FFFF$^2$ \NC \NR
+\NC \type {\Uoverdelimiter} \NC 0+0--FF+10FFFF$^2$ \NC \NR
+\NC \type {\Uunderdelimiter} \NC 0+0--FF+10FFFF$^2$ \NC \NR
+\NC \type {\Udelimiterover} \NC 0+0--FF+10FFFF$^2$ \NC \NR
+\NC \type {\Udelimiterunder} \NC 0+0--FF+10FFFF$^2$ \NC \NR
\stoptabulate
\section{Cramped math styles}
@@ -336,7 +336,7 @@ now accessible via primitive commands. In fact, refactoring of the math engine
has resulted in many more parameters than were accessible before.
\starttabulate
-\NC \bf primitive name \NC \bf description \NC \NR
+\BC primitive name \BC description \NC \NR
\NC \type {\Umathquad} \NC the width of 18 mu's \NC \NR
\NC \type {\Umathaxis} \NC height of the vertical center axis of
the math formula above the baseline \NC \NR
@@ -447,7 +447,7 @@ dimension parameter. For math fonts, this should be set to zero.
\switchtobodyfont[8pt]
\starttabulate[|l|l|l|p|]
-\NC \bf variable \NC \bf style \NC \bf default value opentype \NC \bf default value tfm \NC \NR
+\BC variable \BC style \BC default value opentype \BC default value tfm \NC \NR
\NC \type {\Umathaxis} \NC -- \NC AxisHeight \NC axis_height \NC \NR
\NC \type {\Umathoperatorsize} \NC D, D' \NC DisplayOperatorMinHeight \NC $^6$ \NC \NR
\NC \type {\Umathfractiondelsize} \NC D, D' \NC FractionDelimiterDisplayStyleSize$^9$ \NC delim1 \NC \NR
@@ -579,7 +579,7 @@ kerns assume correction too. Anyway, with this parameter one can control it.
\NC \mathnolimitsmode8000 $\displaystyle\int\nolimits^0_1$
\NC \NR
\TB
- \NC \bf mode
+ \BC mode
\NC \tttf 0
\NC \tttf 1
\NC \tttf 2
@@ -587,7 +587,7 @@ kerns assume correction too. Anyway, with this parameter one can control it.
\NC \tttf 4
\NC \tttf 8000
\NC \NR
- \NC \bf superscript
+ \BC superscript
\NC 0
\NC font
\NC 0
@@ -595,7 +595,7 @@ kerns assume correction too. Anyway, with this parameter one can control it.
\NC +ic/2
\NC 0
\NC \NR
- \NC \bf subscript
+ \BC subscript
\NC -ic
\NC font
\NC 0
@@ -1033,8 +1033,8 @@ get the length of the last line, the following will often work too:
\LUATEX\ defines six new primitives that have the same function as
\type {^}, \type {_}, \type {$}, and \type {$$}:
-\starttabulate[|l|l|l|l|]
-\NC \bf primitive \NC \bf explanation \NC \NR
+\starttabulate[|l|l|]
+\BC primitive \BC explanation \NC \NR
\NC \type {\Usuperscript} \NC Duplicates the functionality of \type {^} \NC \NR
\NC \type {\Usubscript} \NC Duplicates the functionality of \type {_} \NC \NR
\NC \type {\Ustartmath} \NC Duplicates the functionality of \type {$}, % $
@@ -1090,7 +1090,7 @@ with zero being the default behaviour.
\start
\def\OneLiner#1#2%
- {\NC #1
+ {\NC \type{#1}
\NC \dontleavehmode\inframed[align=normal,offset=0pt,frame=off]{\mathsurroundmode#1\relax\hsize 100pt x$x$x}
\NC \dontleavehmode\inframed[align=normal,offset=0pt,frame=off]{\mathsurroundmode#1\relax\hsize 100pt x $x$ x}
\NC #2
@@ -1103,7 +1103,7 @@ with zero being the default behaviour.
\typebuffer \getbuffer
-\starttabulate[|Tc|c|c|pl|]
+\starttabulate[|c|c|c|pl|]
\HL
\BC mode \BC \type {x$x$x} \BC \type {x $x$ x} \BC effect \NC \NR
\HL
@@ -1213,13 +1213,13 @@ effects.
{$\mathscriptsmode#1\mathupright CH_2 + CH^+_2 + CH^2_2$}
\starttabulate[|c|c|c|l|]
-\NC \bf mode \NC \bf down \NC \bf up \NC \NC \NR
-\NC 0 \NC dynamic \NC dynamic \NC \SampleMath{0} \NC \NR
-\NC 1 \NC $d$ \NC $u$ \NC \SampleMath{1} \NC \NR
-\NC 2 \NC $s$ \NC $u$ \NC \SampleMath{2} \NC \NR
-\NC 3 \NC $s$ \NC $u + s - d$ \NC \SampleMath{3} \NC \NR
-\NC 4 \NC $d + (s-d)/2$ \NC $u + (s-d)/2$ \NC \SampleMath{4} \NC \NR
-\NC 5 \NC $d$ \NC $u + s - d$ \NC \SampleMath{5} \NC \NR
+\BC mode \BC down \BC up \BC \NC \NR
+\NC 0 \NC dynamic \NC dynamic \NC \SampleMath{0} \NC \NR
+\NC 1 \NC $d$ \NC $u$ \NC \SampleMath{1} \NC \NR
+\NC 2 \NC $s$ \NC $u$ \NC \SampleMath{2} \NC \NR
+\NC 3 \NC $s$ \NC $u + s - d$ \NC \SampleMath{3} \NC \NR
+\NC 4 \NC $d + (s-d)/2$ \NC $u + (s-d)/2$ \NC \SampleMath{4} \NC \NR
+\NC 5 \NC $d$ \NC $u + s - d$ \NC \SampleMath{5} \NC \NR
\stoptabulate
The value of this parameter obeys grouping but applies to the whole current
diff --git a/doc/context/sources/general/manuals/luatex/luatex-modifications.tex b/doc/context/sources/general/manuals/luatex/luatex-modifications.tex
index 50b19b8e5..10b4fd7a4 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-modifications.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-modifications.tex
@@ -326,7 +326,7 @@ provide the ability to use content that has been rendered in several places,
and images are also common. For that reason we also changed the names:
\starttabulate[|l|l|]
-\NC \bf new name \NC \bf old name \NC \NR
+\BC new name \BC old name \NC \NR
\NC \type {\saveboxresource} \NC \type {\pdfxform} \NC \NR
\NC \type {\saveimageresource} \NC \type {\pdfximage} \NC \NR
\NC \type {\useboxresource} \NC \type {\pdfrefxform} \NC \NR
@@ -1068,7 +1068,7 @@ by setting \type {\breakafterdirmode} to~\type {1}. The following table shows th
difference. Watch your spaces.
\def\ShowSome#1{%
- \NC
+ \BC
\type{#1}
\NC
\breakafterdirmode = 0
@@ -1083,7 +1083,7 @@ difference. Watch your spaces.
\NC \NR \HL
}
-\starttabulate[|B|pT(0pt)|w(5em)|pT(0pt)|p|]
+\starttabulate[|l|pT(0pt)|w(5em)|pT(0pt)|p|]
\HL
\BC \type{\breakafterdirmode}
\BC \type{0}
@@ -1105,16 +1105,16 @@ Another adaptation to the \ALEPH\ directional model is control over shapes drive
by \type {\hangindent} and \type {\parshape}. This is controlled by a new parameter
\type {\shapemode}:
-\starttabulate[|cTB|c|]
-\NC \NC \bf \type {\hangindent} \NC \bf \type {\parshape} \NC \NR
-\NC 0 \NC normal \NC normal \NC \NR
-\NC 1 \NC mirrored \NC normal \NC \NR
-\NC 2 \NC normal \NC mirrored \NC \NR
-\NC 3 \NC mirrored \NC mirrored \NC \NR
+\starttabulate[|c|c|c|]
+\BC \BC \type {\hangindent} \BC \type {\parshape} \NC \NR
+\BC \type{0} \NC normal \NC normal \NC \NR
+\BC \type{1} \NC mirrored \NC normal \NC \NR
+\BC \type{2} \NC normal \NC mirrored \NC \NR
+\BC \type{3} \NC mirrored \NC mirrored \NC \NR
\stoptabulate
The value is reset to zero (like \type {\hangindent} and \type {\parshape})
-after the paragraph is done with. You can use negative values to preven t
+after the paragraph is done with. You can use negative values to prevent
this.
In \in {figure} [fig:shapemode] a few examples are given.
diff --git a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
index f238a58db..60fc97ec6 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
@@ -48,9 +48,9 @@ the low|-|level interface.
An \type {attribute_list} item is used as a head pointer for a list of attribute
items. It has only one user-visible field:
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC next \NC node \NC pointer to the first attribute \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{next} \NC node \NC pointer to the first attribute \NC \NR
\stoptabulate
\subsubsection{attribute nodes}
@@ -60,11 +60,11 @@ A normal node's attribute field will point to an item of type \type
defined \quote {attribute} item, whose \type {next} will point to the second
\quote {attribute} item, etc.
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC next \NC node \NC pointer to the next attribute \NC \NR
-\NC number \NC number \NC the attribute type id \NC \NR
-\NC value \NC number \NC the attribute value \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{next} \NC node \NC pointer to the next attribute \NC \NR
+\NC \type{number} \NC number \NC the attribute type id \NC \NR
+\NC \type{value} \NC number \NC the attribute value \NC \NR
\stoptabulate
As mentioned it's better to use the official helpers rather than edit these
@@ -76,11 +76,11 @@ and there is no double linked list.
These are the nodes that comprise actual typesetting commands. A few fields are
present in all nodes regardless of their type, these are:
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC next \NC node \NC the next node in a list, or nil \NC \NR
-\NC id \NC number \NC the node's type (\type {id}) number \NC \NR
-\NC subtype \NC number \NC the node \type {subtype} identifier \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{next} \NC node \NC the next node in a list, or nil \NC \NR
+\NC \type{id} \NC number \NC the node's type (\type {id}) number \NC \NR
+\NC \type{subtype} \NC number \NC the node \type {subtype} identifier \NC \NR
\stoptabulate
The \type {subtype} is sometimes just a stub entry. Not all nodes actually use
@@ -98,19 +98,19 @@ internal magic uses a leading \type {temp} nodes to temporarily store a state.
\subsubsection{hlist nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC subtype \NC number \NC \showsubtypes{list} \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC width \NC number \NC the width of the box \NC \NR
-\NC height \NC number \NC the height of the box \NC \NR
-\NC depth \NC number \NC the depth of the box \NC \NR
-\NC shift \NC number \NC a displacement perpendicular to the character progression direction \NC \NR
-\NC glue_order \NC number \NC a number in the range $[0,4]$, indicating the glue order \NC \NR
-\NC glue_set \NC number \NC the calculated glue ratio \NC \NR
-\NC glue_sign \NC number \NC 0 = \type {normal}, 1 = \type {stretching}, 2 = \type {shrinking} \NC \NR
-\NC head/list \NC node \NC the first node of the body of this list \NC \NR
-\NC dir \NC string \NC the direction of this box, see~\in[dirnodes] \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{subtype} \NC number \NC \showsubtypes{list} \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{width} \NC number \NC the width of the box \NC \NR
+\NC \type{height} \NC number \NC the height of the box \NC \NR
+\NC \type{depth} \NC number \NC the depth of the box \NC \NR
+\NC \type{shift} \NC number \NC a displacement perpendicular to the character progression direction \NC \NR
+\NC \type{glue_order} \NC number \NC a number in the range $[0,4]$, indicating the glue order \NC \NR
+\NC \type{glue_set} \NC number \NC the calculated glue ratio \NC \NR
+\NC \type{glue_sign} \NC number \NC 0 = \type {normal}, 1 = \type {stretching}, 2 = \type {shrinking} \NC \NR
+\NC \type{head/list} \NC node \NC the first node of the body of this list \NC \NR
+\NC \type{dir} \NC string \NC the direction of this box, see~\in[dirnodes] \NC \NR
\stoptabulate
A warning: never assign a node list to the \type {head} field unless you are sure
@@ -132,27 +132,27 @@ Contrary to traditional \TEX, \LUATEX\ has more subtypes because we also use
rules to store reuseable objects and images. User nodes are invisible and can be
intercepted by a callback.
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC subtype \NC number \NC \showsubtypes{rule} \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC width \NC number \NC the width of the rule where the special value $-1073741824$ is used for \quote {running} glue dimensions \NC \NR
-\NC height \NC number \NC the height of the rule (can be negative) \NC \NR
-\NC depth \NC number \NC the depth of the rule (can be negative) \NC \NR
-\NC dir \NC string \NC the direction of this rule, see~\in[dirnodes] \NC \NR
-\NC index \NC number \NC an optional index that can be referred to \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{subtype} \NC number \NC \showsubtypes{rule} \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{width} \NC number \NC the width of the rule where the special value $-1073741824$ is used for \quote {running} glue dimensions \NC \NR
+\NC \type{height} \NC number \NC the height of the rule (can be negative) \NC \NR
+\NC \type{depth} \NC number \NC the depth of the rule (can be negative) \NC \NR
+\NC \type{dir} \NC string \NC the direction of this rule, see~\in[dirnodes] \NC \NR
+\NC \type{index} \NC number \NC an optional index that can be referred to \NC \NR
\stoptabulate
\subsubsection{ins nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC subtype \NC number \NC the insertion class \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC cost \NC number \NC the penalty associated with this insert \NC \NR
-\NC height \NC number \NC height of the insert \NC \NR
-\NC depth \NC number \NC depth of the insert \NC \NR
-\NC head/list \NC node \NC the first node of the body of this insert \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{subtype} \NC number \NC the insertion class \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{cost} \NC number \NC the penalty associated with this insert \NC \NR
+\NC \type{height} \NC number \NC height of the insert \NC \NR
+\NC \type{depth} \NC number \NC depth of the insert \NC \NR
+\NC \type{head/list} \NC node \NC the first node of the body of this insert \NC \NR
\stoptabulate
There is a set of extra fields that concern the associated glue: \type {width},
@@ -166,21 +166,21 @@ names and both names are equally sensible).
\subsubsection{mark nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC subtype \NC number \NC unused \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC class \NC number \NC the mark class \NC \NR
-\NC mark \NC table \NC a table representing a token list \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{subtype} \NC number \NC unused \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{class} \NC number \NC the mark class \NC \NR
+\NC \type{mark} \NC table \NC a table representing a token list \NC \NR
\stoptabulate
\subsubsection{adjust nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC subtype \NC number \NC \showsubtypes{adjust} \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC head/list \NC node \NC adjusted material \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{subtype} \NC number \NC \showsubtypes{adjust} \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{head/list} \NC node \NC adjusted material \NC \NR
\stoptabulate
A warning: never assign a node list to the \type {head} field unless you are sure
@@ -188,14 +188,14 @@ its internal link structure is correct, otherwise an error may be result.
\subsubsection{disc nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC subtype \NC number \NC \showsubtypes{disc} \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC pre \NC node \NC pointer to the pre|-|break text \NC \NR
-\NC post \NC node \NC pointer to the post|-|break text \NC \NR
-\NC replace \NC node \NC pointer to the no|-|break text \NC \NR
-\NC penalty \NC number \NC the penalty associated with the break, normally \type {\hyphenpenalty} or \type {\exhyphenpenalty} \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{subtype} \NC number \NC \showsubtypes{disc} \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{pre} \NC node \NC pointer to the pre|-|break text \NC \NR
+\NC \type{post} \NC node \NC pointer to the post|-|break text \NC \NR
+\NC \type{replace} \NC node \NC pointer to the no|-|break text \NC \NR
+\NC \type{penalty} \NC number \NC the penalty associated with the break, normally \type {\hyphenpenalty} or \type {\exhyphenpenalty} \NC \NR
\stoptabulate
The subtype numbers~4 and~5 belong to the \quote {of-f-ice} explanation given
@@ -223,11 +223,11 @@ freeing it again might crash \LUATEX).
\subsubsection{math nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC subtype \NC number \NC \showsubtypes{math} \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC surround \NC number \NC width of the \type {\mathsurround} kern \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{subtype} \NC number \NC \showsubtypes{math} \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{surround} \NC number \NC width of the \type {\mathsurround} kern \NC \NR
\stoptabulate
There is a set of extra fields that concern the associated glue: \type {width},
@@ -240,13 +240,13 @@ Skips are about the only type of data objects in traditional \TEX\ that are not
simple value. The structure that represents the glue components of a skip is
called a \type {glue_spec}, and it has the following accessible fields:
-\starttabulate[|lT|l|p|]
-\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR
-\NC width \NC number \NC the horizontal or vertical displacement \NC \NR
-\NC stretch \NC number \NC extra (positive) displacement or stretch amount \NC \NR
-\NC stretch_order \NC number \NC factor applied to stretch amount \NC \NR
-\NC shrink \NC number \NC extra (negative) displacement or shrink amount\NC \NR
-\NC shrink_order \NC number \NC factor applied to shrink amount \NC \NR
+\starttabulate[|l|l|p|]
+\BC key \BC type \BC explanation \NC \NR
+\NC \type{width} \NC number \NC the horizontal or vertical displacement \NC \NR
+\NC \type{stretch} \NC number \NC extra (positive) displacement or stretch amount \NC \NR
+\NC \type{stretch_order} \NC number \NC factor applied to stretch amount \NC \NR
+\NC \type{shrink} \NC number \NC extra (negative) displacement or shrink amount\NC \NR
+\NC \type{shrink_order} \NC number \NC factor applied to shrink amount \NC \NR
\stoptabulate
The effective width of some glue subtypes depends on the stretch or shrink needed
@@ -273,11 +273,11 @@ a field can result in a new copy). So in the end the advantages of sharing are
not that high (and nowadays memory is less an issue, also given that a glue node
is only a few memory words larger than a spec).
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC subtype \NC number \NC \showsubtypes{glue} \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC leader \NC node \NC pointer to a box or rule for leaders \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{subtype} \NC number \NC \showsubtypes{glue} \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{leader} \NC node \NC pointer to a box or rule for leaders \NC \NR
\stoptabulate
In addition there are the \type {width}, \type {stretch} \type {stretch_order},
@@ -290,20 +290,20 @@ a \type {userskip} with subtype zero).
\subsubsection{kern nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC subtype \NC number \NC \showsubtypes{kern} \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC kern \NC number \NC fixed horizontal or vertical advance \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{subtype} \NC number \NC \showsubtypes{kern} \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{kern} \NC number \NC fixed horizontal or vertical advance \NC \NR
\stoptabulate
\subsubsection{penalty nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC subtype \NC number \NC \showsubtypes{penalty} \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC penalty \NC number \NC the penalty value \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{subtype} \NC number \NC \showsubtypes{penalty} \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{penalty} \NC number \NC the penalty value \NC \NR
\stoptabulate
The subtypes are just informative and \TEX\ itself doesn't use them. When you
@@ -312,24 +312,24 @@ accumulation of \type {club}, \type{widow} and other relevant penalties.
\subsubsection[glyphnodes]{glyph nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \rmbf type \NC \rmbf explanation \NC \NR
-\NC subtype \NC number \NC bitfield \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC char \NC number \NC the chatacter index in the font \NC \NR
-\NC font \NC number \NC the font identifier \NC \NR
-\NC lang \NC number \NC the language identifier \NC \NR
-\NC left \NC number \NC the frozen \type {\lefthyphenmnin} value \NC \NR
-\NC right \NC number \NC the frozen \type {\righthyphenmnin} value \NC \NR
-\NC uchyph \NC boolean \NC the frozen \type {\uchyph} value \NC \NR
-\NC components \NC node \NC pointer to ligature components \NC \NR
-\NC xoffset \NC number \NC a virtual displacement in horizontal direction \NC \NR
-\NC yoffset \NC number \NC a virtual displacement in vertical direction \NC \NR
-\NC xadvance \NC number \NC an additional advance after the glyph (experimental) \NC \NR
-\NC width \NC number \NC the (original) width of the character \NC \NR
-\NC height \NC number \NC the (original) height of the character\NC \NR
-\NC depth \NC number \NC the (original) depth of the character\NC \NR
-\NC expansion_factor \NC number \NC the to be applied expansion_factor \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{subtype} \NC number \NC bitfield \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{char} \NC number \NC the chatacter index in the font \NC \NR
+\NC \type{font} \NC number \NC the font identifier \NC \NR
+\NC \type{lang} \NC number \NC the language identifier \NC \NR
+\NC \type{left} \NC number \NC the frozen \type {\lefthyphenmnin} value \NC \NR
+\NC \type{right} \NC number \NC the frozen \type {\righthyphenmnin} value \NC \NR
+\NC \type{uchyph} \NC boolean \NC the frozen \type {\uchyph} value \NC \NR
+\NC \type{components} \NC node \NC pointer to ligature components \NC \NR
+\NC \type{xoffset} \NC number \NC a virtual displacement in horizontal direction \NC \NR
+\NC \type{yoffset} \NC number \NC a virtual displacement in vertical direction \NC \NR
+%NC \type{xadvance} \NC number \NC an additional advance after the glyph (experimental) \NC \NR
+\NC \type{width} \NC number \NC the (original) width of the character \NC \NR
+\NC \type{height} \NC number \NC the (original) height of the character\NC \NR
+\NC \type{depth} \NC number \NC the (original) depth of the character\NC \NR
+\NC \type{expansion_factor} \NC number \NC the to be applied expansion_factor \NC \NR
\stoptabulate
The \type {width}, \type {height} and \type {depth} values are read|-|only. The
@@ -340,12 +340,12 @@ its internal link structure is correct, otherwise an error may be result. Valid
bits for the \type {subtype} field are:
\starttabulate[|c|l|]
-\NC \rmbf bit \NC \bf meaning \NC \NR
-\NC 0 \NC character \NC \NR
-\NC 1 \NC ligature \NC \NR
-\NC 2 \NC ghost \NC \NR
-\NC 3 \NC left \NC \NR
-\NC 4 \NC right \NC \NR
+\BC bit \BC meaning \NC \NR
+\NC 0 \NC character \NC \NR
+\NC 1 \NC ligature \NC \NR
+\NC 2 \NC ghost \NC \NR
+\NC 3 \NC left \NC \NR
+\NC 4 \NC right \NC \NR
\stoptabulate
See \in {section} [charsandglyphs] for a detailed description of the \type
@@ -373,11 +373,11 @@ and font id and returns true when a glyph or disc node references that font.
\subsubsection{boundary nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC subtype \NC number \NC \showsubtypes{boundary} \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC value \NC number \NC values 0--255 are reserved \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{subtype} \NC number \NC \showsubtypes{boundary} \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{value} \NC number \NC values 0--255 are reserved \NC \NR
\stoptabulate
This node relates to the \type {\noboundary}, \type {\boundary}, \type
@@ -385,16 +385,16 @@ This node relates to the \type {\noboundary}, \type {\boundary}, \type
\subsubsection{local_par nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC pen_inter \NC number \NC local interline penalty (from \type {\localinterlinepenalty}) \NC \NR
-\NC pen_broken \NC number \NC local broken penalty (from \type {\localbrokenpenalty}) \NC \NR
-\NC dir \NC string \NC the direction of this par. see~\in [dirnodes] \NC \NR
-\NC box_left \NC node \NC the \type {\localleftbox} \NC \NR
-\NC box_left_width \NC number \NC width of the \type {\localleftbox} \NC \NR
-\NC box_right \NC node \NC the \type {\localrightbox} \NC \NR
-\NC box_right_width \NC number \NC width of the \type {\localrightbox} \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{pen_inter} \NC number \NC local interline penalty (from \type {\localinterlinepenalty}) \NC \NR
+\NC \type{pen_broken} \NC number \NC local broken penalty (from \type {\localbrokenpenalty}) \NC \NR
+\NC \type{dir} \NC string \NC the direction of this par. see~\in [dirnodes] \NC \NR
+\NC \type{box_left} \NC node \NC the \type {\localleftbox} \NC \NR
+\NC \type{box_left_width} \NC number \NC width of the \type {\localleftbox} \NC \NR
+\NC \type{box_right} \NC node \NC the \type {\localrightbox} \NC \NR
+\NC \type{box_right_width} \NC number \NC width of the \type {\localrightbox} \NC \NR
\stoptabulate
A warning: never assign a node list to the \type {box_left} or \type {box_right}
@@ -403,11 +403,11 @@ error may be result.
\subsubsection[dirnodes]{dir nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC dir \NC string \NC the direction (but see below) \NC \NR
-\NC level \NC number \NC nesting level of this direction whatsit \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{dir} \NC string \NC the direction (but see below) \NC \NR
+\NC \type{level} \NC number \NC nesting level of this direction whatsit \NC \NR
\stoptabulate
A note on \type {dir} strings. Direction specifiers are three|-|letter
@@ -437,12 +437,12 @@ or popped from the direction stack.
\subsubsection{margin_kern nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC subtype \NC number \NC \showsubtypes{margin_kern} \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC width \NC number \NC the advance of the kern \NC \NR
-\NC glyph \NC node \NC the glyph to be used \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{subtype} \NC number \NC \showsubtypes{margin_kern} \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{width} \NC number \NC the advance of the kern \NC \NR
+\NC \type{glyph} \NC node \NC the glyph to be used \NC \NR
\stoptabulate
\subsection{Math nodes}
@@ -462,11 +462,11 @@ The \type {next} and \type {prev} fields for these subnodes are unused.
\subsubsubsection{math_char and math_text_char subnodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC char \NC number \NC the character index \NC \NR
-\NC fam \NC number \NC the family number \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{char} \NC number \NC the character index \NC \NR
+\NC \type{fam} \NC number \NC the family number \NC \NR
\stoptabulate
The \type {math_char} is the simplest subnode field, it contains the character
@@ -476,10 +476,10 @@ conversion (its sole function is to suppress a following italic correction).
\subsubsubsection{sub_box and sub_mlist subnodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC head/list \NC node \NC list of nodes \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{head/list} \NC node \NC list of nodes \NC \NR
\stoptabulate
These two subnode types are used for subsidiary list items. For \type {sub_box},
@@ -496,13 +496,13 @@ before, the \type {next} and \type {prev} fields are unused.
\subsubsubsection{delim subnodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC small_char \NC number \NC character index of base character \NC \NR
-\NC small_fam \NC number \NC family number of base character \NC \NR
-\NC large_char \NC number \NC character index of next larger character \NC \NR
-\NC large_fam \NC number \NC family number of next larger character \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{small_char} \NC number \NC character index of base character \NC \NR
+\NC \type{small_fam} \NC number \NC family number of base character \NC \NR
+\NC \type{large_char} \NC number \NC character index of next larger character \NC \NR
+\NC \type{large_fam} \NC number \NC family number of next larger character \NC \NR
\stoptabulate
The fields \type {large_char} and \type {large_fam} can be zero, in that case the
@@ -518,51 +518,51 @@ into a single node type with separate subtypes for differentiation.
Some noads have an option field. The values in this bitset are common:
-\starttabulate[|lT|lT|]
-\NC set \NC 0x08 \NC \NR
-\NC internal \NC 0x00 + 0x08 \NC \NR
-\NC internal \NC 0x01 + 0x08 \NC \NR
-\NC axis \NC 0x02 + 0x08 \NC \NR
-\NC no axis \NC 0x04 + 0x08 \NC \NR
-\NC exact \NC 0x10 + 0x08 \NC \NR
-\NC left \NC 0x11 + 0x08 \NC \NR
-\NC middle \NC 0x12 + 0x08 \NC \NR
-\NC right \NC 0x14 + 0x08 \NC \NR
-\NC no sub script \NC 0x21 + 0x08 \NC \NR
-\NC no super script \NC 0x22 + 0x08 \NC \NR
-\NC no script \NC 0x23 + 0x08 \NC \NR
+\starttabulate[|l|r|]
+\NC set \NC \type{0x08} \NC \NR
+\NC internal \NC \type{0x00} + \type{0x08} \NC \NR
+\NC internal \NC \type{0x01} + \type{0x08} \NC \NR
+\NC axis \NC \type{0x02} + \type{0x08} \NC \NR
+\NC no axis \NC \type{0x04} + \type{0x08} \NC \NR
+\NC exact \NC \type{0x10} + \type{0x08} \NC \NR
+\NC left \NC \type{0x11} + \type{0x08} \NC \NR
+\NC middle \NC \type{0x12} + \type{0x08} \NC \NR
+\NC right \NC \type{0x14} + \type{0x08} \NC \NR
+\NC no sub script \NC \type{0x21} + \type{0x08} \NC \NR
+\NC no super script \NC \type{0x22} + \type{0x08} \NC \NR
+\NC no script \NC \type{0x23} + \type{0x08} \NC \NR
\stoptabulate
\subsubsubsection{simple nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC subtype \NC number \NC \showsubtypes{noad} \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC nucleus \NC kernel node \NC base \NC \NR
-\NC sub \NC kernel node \NC subscript \NC \NR
-\NC sup \NC kernel node \NC superscript \NC \NR
-\NC options \NC number \NC bitset of rendering options \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{subtype} \NC number \NC \showsubtypes{noad} \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{nucleus} \NC kernel node \NC base \NC \NR
+\NC \type{sub} \NC kernel node \NC subscript \NC \NR
+\NC \type{sup} \NC kernel node \NC superscript \NC \NR
+\NC \type{options} \NC number \NC bitset of rendering options \NC \NR
\stoptabulate
\subsubsubsection{accent nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC subtype \NC number \NC \showsubtypes{accent} \NC \NR
-\NC nucleus \NC kernel node \NC base \NC \NR
-\NC sub \NC kernel node \NC subscript \NC \NR
-\NC sup \NC kernel node \NC superscript \NC \NR
-\NC accent \NC kernel node \NC top accent \NC \NR
-\NC bot_accent \NC kernel node \NC bottom accent \NC \NR
-\NC fraction \NC number \NC larger step criterium (divided by 1000) \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{subtype} \NC number \NC \showsubtypes{accent} \NC \NR
+\NC \type{nucleus} \NC kernel node \NC base \NC \NR
+\NC \type{sub} \NC kernel node \NC subscript \NC \NR
+\NC \type{sup} \NC kernel node \NC superscript \NC \NR
+\NC \type{accent} \NC kernel node \NC top accent \NC \NR
+\NC \type{bot_accent} \NC kernel node \NC bottom accent \NC \NR
+\NC \type{fraction} \NC number \NC larger step criterium (divided by 1000) \NC \NR
\stoptabulate
\subsubsubsection{style nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC style \NC string \NC contains the style \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{style} \NC string \NC contains the style \NC \NR
\stoptabulate
There are eight possibilities for the string value: one of \type {display},
@@ -571,13 +571,13 @@ be prefixed by \type {cramped}.
\subsubsubsection{choice nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC display \NC node \NC list of display size alternatives \NC \NR
-\NC text \NC node \NC list of text size alternatives \NC \NR
-\NC script \NC node \NC list of scriptsize alternatives \NC \NR
-\NC scriptscript \NC node \NC list of scriptscriptsize alternatives \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{display} \NC node \NC list of display size alternatives \NC \NR
+\NC \type{text} \NC node \NC list of text size alternatives \NC \NR
+\NC \type{script} \NC node \NC list of scriptsize alternatives \NC \NR
+\NC \type{scriptscript} \NC node \NC list of scriptscriptsize alternatives \NC \NR
\stoptabulate
Warning: never assign a node list to the \type {display}, \type {text}, \type
@@ -586,17 +586,17 @@ structure is correct, otherwise an error may be result.
\subsubsubsection{radical nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC subtype \NC number \NC \showsubtypes{radical} \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC nucleus \NC kernel node \NC base \NC \NR
-\NC sub \NC kernel node \NC subscript \NC \NR
-\NC sup \NC kernel node \NC superscript \NC \NR
-\NC left \NC delimiter node \NC \NC \NR
-\NC degree \NC kernel node \NC only set by \type {\Uroot} \NC \NR
-\NC width \NC number \NC required width \NC \NR
-\NC options \NC number \NC bitset of rendering options \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{subtype} \NC number \NC \showsubtypes{radical} \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{nucleus} \NC kernel node \NC base \NC \NR
+\NC \type{sub} \NC kernel node \NC subscript \NC \NR
+\NC \type{sup} \NC kernel node \NC superscript \NC \NR
+\NC \type{left} \NC delimiter node \NC \NC \NR
+\NC \type{degree} \NC kernel node \NC only set by \type {\Uroot} \NC \NR
+\NC \type{width} \NC number \NC required width \NC \NR
+\NC \type{options} \NC number \NC bitset of rendering options \NC \NR
\stoptabulate
Warning: never assign a node list to the \type {nucleus}, \type {sub}, \type
@@ -605,16 +605,16 @@ link structure is correct, otherwise an error may be result.
\subsubsubsection{fraction nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC width \NC number \NC (optional) width of the fraction \NC \NR
-\NC num \NC kernel node \NC numerator \NC \NR
-\NC denom \NC kernel node \NC denominator \NC \NR
-\NC left \NC delimiter node \NC left side symbol \NC \NR
-\NC right \NC delimiter node \NC right side symbol \NC \NR
-\NC middle \NC delimiter node \NC middle symbol \NC \NR
-\NC options \NC number \NC bitset of rendering options \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{width} \NC number \NC (optional) width of the fraction \NC \NR
+\NC \type{num} \NC kernel node \NC numerator \NC \NR
+\NC \type{denom} \NC kernel node \NC denominator \NC \NR
+\NC \type{left} \NC delimiter node \NC left side symbol \NC \NR
+\NC \type{right} \NC delimiter node \NC right side symbol \NC \NR
+\NC \type{middle} \NC delimiter node \NC middle symbol \NC \NR
+\NC \type{options} \NC number \NC bitset of rendering options \NC \NR
\stoptabulate
Warning: never assign a node list to the \type {num}, or \type {denom} field
@@ -623,16 +623,16 @@ may be result.
\subsubsubsection{fence nodes}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC subtype \NC number \NC \showsubtypes{fence} \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC delim \NC delimiter node \NC delimiter specification \NC \NR
-\NC italic \NC number \NC italic correction \NC \NR
-\NC height \NC number \NC required height \NC \NR
-\NC depth \NC number \NC required depth \NC \NR
-\NC options \NC number \NC bitset of rendering options \NC \NR
-\NC class \NC number \NC spacing related class \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{subtype} \NC number \NC \showsubtypes{fence} \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{delim} \NC delimiter node \NC delimiter specification \NC \NR
+\NC \type{italic} \NC number \NC italic correction \NC \NR
+\NC \type{height} \NC number \NC required height \NC \NR
+\NC \type{depth} \NC number \NC required depth \NC \NR
+\NC \type{options} \NC number \NC bitset of rendering options \NC \NR
+\NC \type{class} \NC number \NC spacing related class \NC \NR
\stoptabulate
Warning: some of these fields are used by the renderer and might get adapted in
@@ -656,30 +656,30 @@ Whatsit nodes come in many subtypes that you can ask for by running
\subsubsubsection{open whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC stream \NC number \NC \TEX's stream id number \NC \NR
-\NC name \NC string \NC file name \NC \NR
-\NC ext \NC string \NC file extension \NC \NR
-\NC area \NC string \NC file area (this may become obsolete) \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{stream} \NC number \NC \TEX's stream id number \NC \NR
+\NC \type{name} \NC string \NC file name \NC \NR
+\NC \type{ext} \NC string \NC file extension \NC \NR
+\NC \type{area} \NC string \NC file area (this may become obsolete) \NC \NR
\stoptabulate
\subsubsubsection{write whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC stream \NC number \NC \TEX's stream id number \NC \NR
-\NC data \NC table \NC a table representing the token list to be written \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{stream} \NC number \NC \TEX's stream id number \NC \NR
+\NC \type{data} \NC table \NC a table representing the token list to be written \NC \NR
\stoptabulate
\subsubsubsection{close whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC stream \NC number \NC \TEX's stream id number \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{stream} \NC number \NC \TEX's stream id number \NC \NR
\stoptabulate
\subsubsubsection{user_defined whatsits}
@@ -688,46 +688,46 @@ User|-|defined whatsit nodes can only be created and handled from \LUA\ code. In
effect, they are an extension to the extension mechanism. The \LUATEX\ engine
will simply step over such whatsits without ever looking at the contents.
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC user_id \NC number \NC id number \NC \NR
-\NC type \NC number \NC type of the value \NC \NR
-\NC value \NC number \NC a \LUA\ number \NC \NR
-\NC \NC node \NC a node list \NC \NR
-\NC \NC string \NC a \LUA\ string \NC \NR
-\NC \NC table \NC a \LUA\ table \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{user_id} \NC number \NC id number \NC \NR
+\NC \type{type} \NC number \NC type of the value \NC \NR
+\NC \type{value} \NC number \NC a \LUA\ number \NC \NR
+\NC \NC node \NC a node list \NC \NR
+\NC \NC string \NC a \LUA\ string \NC \NR
+\NC \NC table \NC a \LUA\ table \NC \NR
\stoptabulate
The \type {type} can have one of six distinct values. The number is the \ASCII\
value if the first character if the type name (so you can use string.byte("l")
instead of \type {108}).
-\starttabulate[|lT|lT|p|]
-\NC \rmbf value \NC \bf meaning \NC \bf explanation \NC \NR
-\NC 97 \NC a \NC list of attributes (a node list) \NC \NR
-\NC 100 \NC d \NC a \LUA\ number \NC \NR
-\NC 108 \NC l \NC a \LUA\ value (table, number, boolean, etc) \NC \NR
-\NC 110 \NC n \NC a node list \NC \NR
-\NC 115 \NC s \NC a \LUA\ string \NC \NR
-\NC 116 \NC t \NC a \LUA\ token list in \LUA\ table form (a list of triplets) \NC \NR
+\starttabulate[|r|c|p|]
+\BC value \BC meaning \BC explanation \NC \NR
+\NC 97 \NC a \NC list of attributes (a node list) \NC \NR
+\NC 100 \NC d \NC a \LUA\ number \NC \NR
+\NC 108 \NC l \NC a \LUA\ value (table, number, boolean, etc) \NC \NR
+\NC 110 \NC n \NC a node list \NC \NR
+\NC 115 \NC s \NC a \LUA\ string \NC \NR
+\NC 116 \NC t \NC a \LUA\ token list in \LUA\ table form (a list of triplets) \NC \NR
\stoptabulate
\subsubsubsection{save_pos whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
\stoptabulate
\subsubsubsection{late_lua whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC data \NC string \NC data to execute \NC \NR
-\NC string \NC string \NC data to execute \NC \NR
-\NC name \NC string \NC the name to use for \LUA\ error reporting \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{data} \NC string \NC data to execute \NC \NR
+\NC \type{string} \NC string \NC data to execute \NC \NR
+\NC \type{name} \NC string \NC the name to use for \LUA\ error reporting \NC \NR
\stoptabulate
The difference between \type {data} and \type {string} is that on assignment, the
@@ -738,31 +738,31 @@ The difference between \type {data} and \type {string} is that on assignment, th
\subsubsection{special whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC data \NC string \NC the \type {\special} information \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{data} \NC string \NC the \type {\special} information \NC \NR
\stoptabulate
\subsubsection{\PDF\ backend whatsits}
\subsubsubsection{pdf_literal whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC mode \NC number \NC the \quote {mode} setting of this literal \NC \NR
-\NC data \NC string \NC the \type {\pdfliteral} information \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{mode} \NC number \NC the \quote {mode} setting of this literal \NC \NR
+\NC \type{data} \NC string \NC the \type {\pdfliteral} information \NC \NR
\stoptabulate
Possible mode values are:
-\starttabulate[|lT|p|]
-\NC \rmbf value \NC \rmbf \PDFTEX\ keyword \NC \NR
-\NC 0 \NC setorigin \NC \NR
-\NC 1 \NC page \NC \NR
-\NC 2 \NC direct \NC \NR
-\NC 3 \NC raw \NC \NR
+\starttabulate[|l|p|]
+\BC value \BC \PDFTEX\ keyword \NC \NR
+\NC 0 \NC \type{setorigin} \NC \NR
+\NC 1 \NC \type{page} \NC \NR
+\NC 2 \NC \type{direct} \NC \NR
+\NC 3 \NC \type{raw} \NC \NR
\stoptabulate
The higher the number, the less checking and the more you can run into troubles.
@@ -771,58 +771,58 @@ what you generate.
\subsubsubsection{pdf_refobj whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC objnum \NC number \NC the referenced \PDF\ object number \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{objnum} \NC number \NC the referenced \PDF\ object number \NC \NR
\stoptabulate
\subsubsubsection{pdf_annot whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC width \NC number \NC the width (not used in calculations) \NC \NR
-\NC height \NC number \NC the height (not used in calculations) \NC \NR
-\NC depth \NC number \NC the depth (not used in calculations) \NC \NR
-\NC objnum \NC number \NC the referenced \PDF\ object number \NC \NR
-\NC data \NC string \NC the annotation data \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{width} \NC number \NC the width (not used in calculations) \NC \NR
+\NC \type{height} \NC number \NC the height (not used in calculations) \NC \NR
+\NC \type{depth} \NC number \NC the depth (not used in calculations) \NC \NR
+\NC \type{objnum} \NC number \NC the referenced \PDF\ object number \NC \NR
+\NC \type{data} \NC string \NC the annotation data \NC \NR
\stoptabulate
\subsubsubsection{pdf_start_link whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC width \NC number \NC the width (not used in calculations) \NC \NR
-\NC height \NC number \NC the height (not used in calculations) \NC \NR
-\NC depth \NC number \NC the depth (not used in calculations) \NC \NR
-\NC objnum \NC number \NC the referenced \PDF\ object number \NC \NR
-\NC link_attr \NC table \NC the link attribute token list \NC \NR
-\NC action \NC node \NC the action to perform \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{width} \NC number \NC the width (not used in calculations) \NC \NR
+\NC \type{height} \NC number \NC the height (not used in calculations) \NC \NR
+\NC \type{depth} \NC number \NC the depth (not used in calculations) \NC \NR
+\NC \type{objnum} \NC number \NC the referenced \PDF\ object number \NC \NR
+\NC \type{link_attr} \NC table \NC the link attribute token list \NC \NR
+\NC \type{action} \NC node \NC the action to perform \NC \NR
\stoptabulate
\subsubsubsection{pdf_end_link whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC \NC \NR
\stoptabulate
\subsubsubsection{pdf_dest whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC width \NC number \NC the width (not used in calculations) \NC \NR
-\NC height \NC number \NC the height (not used in calculations) \NC \NR
-\NC depth \NC number \NC the depth (not used in calculations) \NC \NR
-\NC named_id \NC number \NC is the \type {dest_id} a string value? \NC \NR
-\NC dest_id \NC number \NC the destination id \NC \NR
-\NC \NC string \NC the destination name \NC \NR
-\NC dest_type \NC number \NC type of destination \NC \NR
-\NC xyz_zoom \NC number \NC the zoom factor (times 1000) \NC \NR
-\NC objnum \NC number \NC the \PDF\ object number \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{width} \NC number \NC the width (not used in calculations) \NC \NR
+\NC \type{height} \NC number \NC the height (not used in calculations) \NC \NR
+\NC \type{depth} \NC number \NC the depth (not used in calculations) \NC \NR
+\NC \type{named_id} \NC number \NC is the \type {dest_id} a string value? \NC \NR
+\NC \type{dest_id} \NC number \NC the destination id \NC \NR
+\NC \NC string \NC the destination name \NC \NR
+\NC \type{dest_type} \NC number \NC type of destination \NC \NR
+\NC \type{xyz_zoom} \NC number \NC the zoom factor (times 1000) \NC \NR
+\NC \type{objnum} \NC number \NC the \PDF\ object number \NC \NR
\stoptabulate
\subsubsubsection{pdf_action whatsits}
@@ -830,98 +830,99 @@ what you generate.
These are a special kind of item that only appears inside \PDF\ start link
objects.
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC action_type \NC number \NC the kind of action involved \NC \NR
-\NC action_id \NC number or string \NC token list reference or string \NC \NR
-\NC named_id \NC number \NC the index of the destination \NC \NR
-\NC file \NC string \NC the target filename \NC \NR
-\NC new_window \NC number \NC the window state of the target \NC \NR
-\NC data \NC string \NC the name of the destination \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{action_type} \NC number \NC the kind of action involved \NC \NR
+\NC \type{action_id} \NC number or string \NC token list reference or string \NC \NR
+\NC \type{named_id} \NC number \NC the index of the destination \NC \NR
+\NC \type{file} \NC string \NC the target filename \NC \NR
+\NC \type{new_window} \NC number \NC the window state of the target \NC \NR
+\NC \type{data} \NC string \NC the name of the destination \NC \NR
\stoptabulate
Valid action types are:
-\starttabulate[|lT|lT|]
-\NC 0 \NC page \NC \NR
-\NC 1 \NC goto \NC \NR
-\NC 2 \NC thread \NC \NR
-\NC 3 \NC user \NC \NR
+\starttabulate[|l|l|]
+\NC 0 \NC \type{page} \NC \NR
+\NC 1 \NC \type{goto} \NC \NR
+\NC 2 \NC \type{thread} \NC \NR
+\NC 3 \NC \type{user} \NC \NR
\stoptabulate
Valid window types are:
-\starttabulate[|lT|lT|]
-\NC 0 \NC notset \NC \NR
-\NC 1 \NC new \NC \NR
-\NC 2 \NC nonew \NC \NR
+\starttabulate[|l|l|]
+\NC 0 \NC \type{notset} \NC \NR
+\NC 1 \NC \type{new} \NC \NR
+\NC 2 \NC \type{nonew} \NC \NR
\stoptabulate
\subsubsubsection{pdf_thread whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC width \NC number \NC the width (not used in calculations) \NC \NR
-\NC height \NC number \NC the height (not used in calculations) \NC \NR
-\NC depth \NC number \NC the depth (not used in calculations) \NC \NR
-\NC named_id \NC number \NC is \type {tread_id} a string value? \NC \NR
-\NC tread_id \NC number \NC the thread id \NC \NR
-\NC \NC string \NC the thread name \NC \NR
-\NC thread_attr \NC number \NC extra thread information \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{width} \NC number \NC the width (not used in calculations) \NC \NR
+\NC \type{height} \NC number \NC the height (not used in calculations) \NC \NR
+\NC \type{depth} \NC number \NC the depth (not used in calculations) \NC \NR
+\NC \type{named_id} \NC number \NC is \type {tread_id} a string value? \NC \NR
+\NC \type{tread_id} \NC number \NC the thread id \NC \NR
+\NC \NC string \NC the thread name \NC \NR
+\NC \type{thread_attr} \NC number \NC extra thread information \NC \NR
\stoptabulate
\subsubsubsection{pdf_start_thread whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC width \NC number \NC the width (not used in calculations) \NC \NR
-\NC height \NC number \NC the height (not used in calculations) \NC \NR
-\NC depth \NC number \NC the depth (not used in calculations) \NC \NR
-\NC named_id \NC number \NC is \type {tread_id} a string value? \NC \NR
-\NC tread_id \NC number \NC the thread id \NC \NR
-\NC \NC string \NC the thread name \NC \NR
-\NC thread_attr \NC number \NC extra thread information \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{width} \NC number \NC the width (not used in calculations) \NC \NR
+\NC \type{height} \NC number \NC the height (not used in calculations) \NC \NR
+\NC \type{depth} \NC number \NC the depth (not used in calculations) \NC \NR
+\NC \type{named_id} \NC number \NC is \type {tread_id} a string value? \NC \NR
+\NC \type{tread_id} \NC number \NC the thread id \NC \NR
+\NC \NC string \NC the thread name \NC \NR
+\NC \type{thread_attr} \NC number \NC extra thread information \NC \NR
\stoptabulate
\subsubsubsection{pdf_end_thread whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC \NC \NR
\stoptabulate
\subsubsubsection{pdf_colorstack whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC stack \NC number \NC colorstack id number \NC \NR
-\NC command \NC number \NC command to execute \NC \NR
-\NC data \NC string \NC data \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{stack} \NC number \NC colorstack id number \NC \NR
+\NC \type{command} \NC number \NC command to execute \NC \NR
+\NC \type{data} \NC string \NC data \NC \NR
\stoptabulate
\subsubsubsection{pdf_setmatrix whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
-\NC data \NC string \NC data \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
+\NC \type{data} \NC string \NC data \NC \NR
\stoptabulate
\subsubsubsection{pdf_save whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
\stoptabulate
\subsubsubsection{pdf_restore whatsits}
-\starttabulate[|lT|l|p|]
-\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC attr \NC node \NC list of attributes \NC \NR
+\starttabulate[|l|l|p|]
+\BC field \BC type \BC explanation \NC \NR
+\NC \type{attr} \NC node \NC list of attributes \NC \NR
\stoptabulate
\section{The \type {node} library}
@@ -1703,7 +1704,7 @@ node.set_attribute(<node> n, <number> id, <number> val)
\stopfunctioncall
Sets the attribute with number \type {id} to the value \type {val}. Duplicate
-assignments are ignored. {\em [needs explanation]}
+assignments are ignored.
\subsubsection{\type {node.unset_attribute}}
@@ -1859,24 +1860,24 @@ end
Some accessors are used frequently and for these we provide more efficient helpers:
-\starttabulate[|T|p|]
-\NC getnext \NC parsing nodelist always involves this one \NC \NR
-\NC getprev \NC used less but is logical companion to \type {getnext} \NC \NR
-\NC getboth \NC returns the next and prev pointer of a node \NC \NR
-\NC getid \NC consulted a lot \NC \NR
-\NC getsubtype \NC consulted less but also a topper \NC \NR
-\NC getfont \NC used a lot in \OPENTYPE\ handling (glyph nodes are consulted a lot) \NC \NR
-\NC getchar \NC idem and also in other places \NC \NR
-\NC getwhd \NC returns the \type {width}, \type {height} and \type {depth} of a list, rule or
- (unexpanded) glyph as well as glue (its spec is looked at) and unset nodes\NC \NR
-\NC getdisc \NC returns the \type {pre}, \type {post} and \type {replace} fields and
- optionally when true is passed also the tail fields. \NC \NR
-\NC getlist \NC we often parse nested lists so this is a convenient one too \NC \NR
-\NC getleader \NC comparable to list, seldom used in \TEX\ (but needs frequent consulting
- like lists; leaders could have been made a dedicated node type) \NC \NR
-\NC getfield \NC generic getter, sufficient for the rest (other field names are
- often shared so a specific getter makes no sense then) \NC \NR
-\NC getbox \NC gets the given box (a list node) \NC \NR
+\starttabulate[|t|p|]
+\NC \type{getnext} \NC parsing nodelist always involves this one \NC \NR
+\NC \type{getprev} \NC used less but is logical companion to \type {getnext} \NC \NR
+\NC \type{getboth} \NC returns the next and prev pointer of a node \NC \NR
+\NC \type{getid} \NC consulted a lot \NC \NR
+\NC \type{getsubtype} \NC consulted less but also a topper \NC \NR
+\NC \type{getfont} \NC used a lot in \OPENTYPE\ handling (glyph nodes are consulted a lot) \NC \NR
+\NC \type{getchar} \NC idem and also in other places \NC \NR
+\NC \type{getwhd} \NC returns the \type {width}, \type {height} and \type {depth} of a list, rule or
+ (unexpanded) glyph as well as glue (its spec is looked at) and unset nodes\NC \NR
+\NC \type{getdisc} \NC returns the \type {pre}, \type {post} and \type {replace} fields and
+ optionally when true is passed also the tail fields. \NC \NR
+\NC \type{getlist} \NC we often parse nested lists so this is a convenient one too \NC \NR
+\NC \type{getleader} \NC comparable to list, seldom used in \TEX\ (but needs frequent consulting
+ like lists; leaders could have been made a dedicated node type) \NC \NR
+\NC \type{getfield} \NC generic getter, sufficient for the rest (other field names are
+ often shared so a specific getter makes no sense then) \NC \NR
+\NC \type{getbox} \NC gets the given box (a list node) \NC \NR
\stoptabulate
In the direct namespace there are more such helpers and most of them are
@@ -1904,9 +1905,9 @@ consistency. You can of course always define additional accessor using \type
\def\yes{$+$} \def\nop{$-$}
-\starttabulate[|T|c|c|]
+\starttabulate[|l|c|c|]
\HL
-\NC \bf function \NC \bf node \NC \bf direct \NC \NR
+\BC function \BC node \BC direct \NC \NR
\HL
%NC \type {do_ligature_n} \NC \yes \NC \yes \NC \NR % was never documented and experimental
\NC \type {check_discretionaries}\NC \yes \NC \yes \NC \NR
diff --git a/doc/context/sources/general/manuals/luatex/luatex-style.tex b/doc/context/sources/general/manuals/luatex/luatex-style.tex
index c07dc3b76..547fd204a 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-style.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-style.tex
@@ -214,7 +214,7 @@
luaorbitfactor := 1 ;
picture p ; p := lualogo xsized (3PaperWidth/5) ;
- draw p shifted center Page shifted (0,-.5ypart center ulcorner p) ;
+ draw p shifted center Page shifted (0,-.85ypart center ulcorner p) ;
StopPage ;
\stopuseMPgraphic
@@ -354,6 +354,16 @@
[margin=3em,
width=5em]
+\definestartstop
+ [notabene]
+ [style=slanted]
+
+\definestartstop
+ [preamble]
+ [style=normal,
+ before=\blank,
+ after=\blank]
+
% Hans doesn't like the bookmarks opening by default so we comment this:
%
% \setupinteractionscreen
diff --git a/doc/context/sources/general/manuals/luatex/luatex-titlepage.tex b/doc/context/sources/general/manuals/luatex/luatex-titlepage.tex
index 8ab56f85d..307741ee1 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-titlepage.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-titlepage.tex
@@ -21,7 +21,7 @@
[align=middle,
foregroundcolor=blue,
frame=off]
- {Lua\TeX\\Reference}
+ {Lua\TeX\\Reference Manual}
\definedfont[Bold*default at 18pt] \setupinterlinespace
diff --git a/doc/context/sources/general/manuals/luatex/luatex.tex b/doc/context/sources/general/manuals/luatex/luatex.tex
index cc0d5fc9f..b31b87598 100644
--- a/doc/context/sources/general/manuals/luatex/luatex.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex.tex
@@ -34,13 +34,26 @@
\environment luatex-style
\environment luatex-logos
+\startmode[export]
+
+ \setupbackend
+ [export=luatex]
+
+\stopmode
+
\dontcomplain
\startdocument
[status=beta,
version=1.06.0]
-\component luatex-titlepage
+\startnotmode[*export]
+ \component luatex-titlepage
+\stopnotmode
+
+\startmode[*export]
+ \component luatex-export-titlepage
+\stopmode
\startfrontmatter
\component luatex-contents
diff --git a/doc/context/sources/general/manuals/xml/xml-mkiv.tex b/doc/context/sources/general/manuals/xml/xml-mkiv.tex
index 80d51532f..4834c4555 100644
--- a/doc/context/sources/general/manuals/xml/xml-mkiv.tex
+++ b/doc/context/sources/general/manuals/xml/xml-mkiv.tex
@@ -288,7 +288,6 @@ code can be used as starting point:
\starttyping
\startxmlsetups xml:demo:base
- \xmlsetsetup{#1}{*}{-}
\xmlsetsetup{#1}{document|section|p}{xml:demo:*}
\stopxmlsetups
diff --git a/metapost/context/base/mpiv/mp-mlib.mpiv b/metapost/context/base/mpiv/mp-mlib.mpiv
index 0638ee3e1..df60f6adc 100644
--- a/metapost/context/base/mpiv/mp-mlib.mpiv
+++ b/metapost/context/base/mpiv/mp-mlib.mpiv
@@ -1245,33 +1245,21 @@ vardef properties(text t) =
image(draw unitcircle t)
enddef ;
-% if metapostversion < 1.770 :
-%
-% def withproperties expr p =
-% if colormodel p = 3 :
-% withcolor greypart p
-% elseif colormodel p = 5 :
-% withcolor (redpart p,greenpart p,bluepart p)
-% elseif colormodel p = 7 :
-% withcolor (cyanpart p,magentapart p,yellowpart p,blackpart p)
-% fi
-% enddef ;
-%
-% else :
-
- def withproperties expr p =
- if colormodel p = 3 :
- withcolor greypart p
- elseif colormodel p = 5 :
- withcolor (redpart p,greenpart p,bluepart p)
- elseif colormodel p = 7 :
- withcolor (cyanpart p,magentapart p,yellowpart p,blackpart p)
- fi
- withprescript prescriptpart p
- withpostscript postscriptpart p
- enddef ;
-
-% fi ;
+def withproperties expr p =
+ if colormodel p = 3 :
+ withcolor greypart p
+ elseif colormodel p = 5 :
+ withcolor (redpart p,greenpart p,bluepart p)
+ elseif colormodel p = 7 :
+ withcolor (cyanpart p,magentapart p,yellowpart p,blackpart p)
+ fi
+ withpen penpart p
+ if dashpart p <> nullpicture :
+ dashed dashpart p
+ fi
+ withprescript prescriptpart p
+ withpostscript postscriptpart p
+enddef ;
% Experimental:
diff --git a/tex/context/base/mkii/cont-new.mkii b/tex/context/base/mkii/cont-new.mkii
index 9c02951b9..e6208bc86 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{2017.07.17 00:20}
+\newcontextversion{2017.07.27 16:17}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/mkii/context.mkii b/tex/context/base/mkii/context.mkii
index b6ffca4a5..6008167a6 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{2017.07.17 00:20}
+\edef\contextversion{2017.07.27 16:17}
%D For those who want to use this:
diff --git a/tex/context/base/mkii/mult-it.mkii b/tex/context/base/mkii/mult-it.mkii
index 269d1e545..a79b0b9e8 100644
--- a/tex/context/base/mkii/mult-it.mkii
+++ b/tex/context/base/mkii/mult-it.mkii
@@ -687,6 +687,7 @@
\setinterfaceconstant{bottomoffset}{offsetfondo}
\setinterfaceconstant{bottomspace}{spaziofondo}
\setinterfaceconstant{bottomstate}{statofondo}
+\setinterfaceconstant{break}{break}
\setinterfaceconstant{buffer}{buffer}
\setinterfaceconstant{cache}{cache}
\setinterfaceconstant{calculate}{calcola}
diff --git a/tex/context/base/mkiv/attr-col.lua b/tex/context/base/mkiv/attr-col.lua
index c3b644bda..48f2f2ac6 100644
--- a/tex/context/base/mkiv/attr-col.lua
+++ b/tex/context/base/mkiv/attr-col.lua
@@ -60,6 +60,8 @@ local formatters = string.formatters
local interfaces = interfaces
local implement = interfaces.implement
+local texgetattribute = tex.getattribute
+
-- We can distinguish between rules and glyphs but it's not worth the trouble. A
-- first implementation did that and while it saves a bit for glyphs and rules, it
-- costs more resourses for transparencies. So why bother.
@@ -448,6 +450,12 @@ function colors.forcesupport(value) -- can move to attr-div
colors.enable(value)
end
+function colors.toattributes(name)
+ local mc = list[a_color][name]
+ local mm = texgetattribute(a_selector)
+ return (mm == unsetvalue and 1) or mm or 1, mc or list[a_color][1] or unsetvalue
+end
+
-- transparencies
local a_transparency = attributes.private('transparency')
@@ -554,6 +562,10 @@ function transparencies.forcesupport(value) -- can move to attr-div
transparencies.enable(value)
end
+function transparencies.toattribute(name)
+ return list[a_transparency][name] or unsetvalue
+end
+
--- colorintents: overprint / knockout
attributes.colorintents = attributes.colorintents or { }
diff --git a/tex/context/base/mkiv/back-exp.lua b/tex/context/base/mkiv/back-exp.lua
index da7ec202f..0b27b0541 100644
--- a/tex/context/base/mkiv/back-exp.lua
+++ b/tex/context/base/mkiv/back-exp.lua
@@ -149,7 +149,7 @@ local overloads = fonts.mappings.overloads
-- todo: more locals (and optimize)
-local exportversion = "0.34"
+local exportversion = "0.35"
local mathmlns = "http://www.w3.org/1998/Math/MathML"
local contextns = "http://www.contextgarden.net/context/export" -- whatever suits
local cssnamespaceurl = "@namespace context url('%namespace%') ;"
@@ -347,16 +347,17 @@ do
-- /* text-align : justify ; */
local documenttemplate = [[
-document, %namespace%div.document {
+document,
+%namespace%div.document {
font-size : %size% !important ;
max-width : %width% !important ;
text-width : %align% !important ;
hyphens : %hyphens% !important ;
-}
-]]
+}]]
local styletemplate = [[
-%element%[detail="%detail%"], %namespace%div.%element%.%detail% {
+%element%[detail="%detail%"],
+%namespace%div.%element%.%detail% {
display : inline ;
font-style : %style% ;
font-variant : %variant% ;
@@ -416,7 +417,7 @@ local styletemplate = [[
})
--
local colorspecification = xml.css.colorspecification
- local fontspecification = xml.css.fontspecification
+ local fontspecification = xml.css.fontspecification
for element, details in sortedhash(usedstyles) do
for detail, data in sortedhash(details) do
local s = fontspecification(data.style)
@@ -431,6 +432,7 @@ local styletemplate = [[
weight = s.weight or "inherit",
family = s.family or "inherit",
color = c or "inherit",
+ display = s.display and "block" or nil,
})
end
end
@@ -550,7 +552,7 @@ end
do
- local fields = { "title", "subtitle", "author", "keywords" }
+ local fields = { "title", "subtitle", "author", "keywords", "url", "version" }
local function checkdocument(root)
local data = root.data
@@ -717,16 +719,32 @@ end
do
+ local strippedtag = structurestags.strip -- we assume global styles
+
local highlight = { }
- usedstyles.highlight = highlight
+ local construct = { }
- local strippedtag = structurestags.strip -- we assume global styles
+ usedstyles.highlight = highlight
+ usedstyles.construct = construct
+
+ function structurestags.sethighlight(name,style,color,mode)
+ if not highlight[name] then
+ highlight[name] = {
+ style = style,
+ color = color,
+ mode = mode == 1 and "display" or nil,
+ }
+ end
+ end
- function structurestags.sethighlight(style,color)
- highlight[strippedtag(locatedtag("highlight"))] = {
- style = style, -- xml.css.fontspecification(style),
- color = color, -- xml.css.colorspec(color),
- }
+ function structurestags.setconstruct(name,style,color,mode)
+ if not construct[name] then
+ construct[name] = {
+ style = style,
+ color = color,
+ mode = mode == 1 and "display" or nil,
+ }
+ end
end
end
@@ -1735,21 +1753,26 @@ do
local function hascontent(data)
for i=1,#data do
local di = data[i]
- if not di then
+ if not di or di.tg == "ignore" then
--
- elseif di.content then
- return true
else
- local d = di.data
- if d and #d > 0 and hascontent(d) then
+ local content = di.content
+ if content == " " then
+ --
+ elseif content then
return true
+ else
+ local d = di.data
+ if d and #d > 0 and hascontent(d) then
+ return true
+ end
end
end
end
end
function structurestags.settablecell(rows,columns,align)
- if align > 0 or rows > 1 or columns > 1 then
+ if align > 0 or rows > 1 or columns > 1 or kind > 0 then
tabledata[locatedtag("tablecell")] = {
rows = rows,
columns = columns,
@@ -1784,10 +1807,11 @@ do
local tabulatedata = { }
- function structurestags.settabulatecell(align)
- if align > 0 then
+ function structurestags.settabulatecell(align,kind)
+ if align > 0 or kind > 0 then
tabulatedata[locatedtag("tabulatecell")] = {
align = align,
+ kind = kind, -- 1 = bold head
}
end
end
@@ -1815,6 +1839,12 @@ do
elseif align == 3 then
setattribute(di,"align","middle")
end
+ local kind = hash.kind
+ if kind == 1 then
+ setattribute(di,"kind","strong")
+ elseif kind == 2 then
+ setattribute(di,"kind","equals")
+ end
end
end
@@ -1891,13 +1921,6 @@ do
local depth = 0
local inline = 0
- local function bpar(result)
- result[#result+1] = "\n<p>"
- end
- local function epar(result)
- result[#result+1] = "</p>\n"
- end
-
local function emptytag(result,embedded,element,nature,di) -- currently only break but at some point
local a = di.attributes -- we might add detail etc
if a then -- happens seldom
@@ -1919,6 +1942,34 @@ do
end
end
+ -- local function stripspaces(di)
+ -- local d = di.data
+ -- local n = #d
+ -- local m = 0
+ -- for i=1,n do
+ -- local di = d[i]
+ -- if di.tg then
+ -- m = m + 1
+ -- d[m] = di
+ -- end
+ -- end
+ -- for i=n,m+1,-1 do
+ -- d[i] = nil
+ -- end
+ -- end
+ --
+ -- -- simpler:
+
+ local function stripspaces(di)
+ local d = di.data
+ for i=1,#d do
+ local di = d[i]
+ if not di.tg then
+ di.content = ""
+ end
+ end
+ end
+
local function begintag(result,embedded,element,nature,di,skip)
local index = di.n
local fulltag = di.fulltag
@@ -1972,6 +2023,11 @@ do
if extra then
extra(di,element,index,fulltag)
end
+ --
+ if di.record then
+ stripspaces(di)
+ end
+ --
if exportproperties then
local p = specification.userdata
if not p then
@@ -2044,7 +2100,9 @@ do
if metadata then
result[#result+1] = f_metadata_begin(depth)
for k, v in table.sortedpairs(metadata) do
- result[#result+1] = f_metadata(depth+1,k,lpegmatch(p_entity,v))
+ if v ~= "" then
+ result[#result+1] = f_metadata(depth+1,k,lpegmatch(p_entity,v))
+ end
end
result[#result+1] = f_metadata_end(depth)
end
@@ -2333,7 +2391,7 @@ end
-- collector code
local function push(fulltag,depth)
- local tg, n, detail
+ local tg, n, detail, element, nature, record
local specification = specifications[fulltag]
if specification then
tg = specification.tagname
@@ -2344,9 +2402,12 @@ local function push(fulltag,depth)
tg, n = lpegmatch(tagsplitter,fulltag)
n = tonumber(n) -- to tonumber in tagsplitter
end
- local p = properties[tg]
- local element = p and p.export or tg
- local nature = p and p.nature or "inline" -- defaultnature
+ local p = properties[tg]
+ if p then
+ element = p.export or tg
+ nature = p.nature or "inline" -- defaultnature
+ record = p.record
+ end
local treedata = tree.data
local t = { -- maybe we can use the tag table
tg = tg,
@@ -2358,6 +2419,7 @@ local function push(fulltag,depth)
data = { },
attribute = currentattribute,
parnumber = currentparagraph,
+ record = record, -- we can consider storing properties
}
treedata[#treedata+1] = t
currentdepth = currentdepth + 1
@@ -2541,6 +2603,8 @@ local function finishexport()
end
end
+-- inserts ?
+
local function collectresults(head,list,pat,pap) -- is last used (we also have currentattribute)
local p
for n in traverse_nodes(head) do
@@ -2859,19 +2923,6 @@ function nodes.handlers.export(head) -- hooks into the page builder
end
-- continueexport()
restart = true
-
--- local function f(head,depth,pat)
--- for n in node.traverse(head) do
--- local a = n[a_tagged] or pat
--- local t = taglist[a]
--- print(depth,n,a,t and table.concat(t," "))
--- if n.id == hlist_code or n.id == vlist_code and n.list then
--- f(n.list,depth+1,a)
--- end
--- end
--- end
--- f(head,1)
-
collectresults(tonut(head))
if trace_export then
report_export("%w<!-- stop flushing page -->",currentdepth)
@@ -2886,7 +2937,7 @@ function builders.paragraphs.tag(head)
local subtype = getsubtype(n)
if subtype == line_code then
setattr(n,a_textblock,noftextblocks)
- elseif subtype == glue_code or subtype == kern_code then
+ elseif subtype == glue_code or subtype == kern_code then -- no need to set fontkerns
setattr(n,a_textblock,0)
end
end
@@ -2895,6 +2946,9 @@ end
do
+ local xmlcollected = xml.collected
+ local xmlsetcomment = xml.setcomment
+
local xmlpreamble = [[
<?xml version="1.0" encoding="UTF-8" standalone="%standalone%" ?>
@@ -2955,14 +3009,16 @@ local cssheadlink = [[
local elementtemplate = [[
/* element="%element%" detail="%detail%" chain="%chain%" */
-%element%, %namespace%div.%element% {
+%element%,
+%namespace%div.%element% {
display: %display% ;
}]]
local detailtemplate = [[
/* element="%element%" detail="%detail%" chain="%chain%" */
-%element%[detail=%detail%], %namespace%div.%element%.%detail% {
+%element%[detail=%detail%],
+%namespace%div.%element%.%detail% {
display: %display% ;
}]]
@@ -2983,7 +3039,7 @@ local htmltemplate = [[
</head>
<body>
- <div xmlns="http://www.pragma-ade.com/context/export">
+ <div class="document" xmlns="http://www.pragma-ade.com/context/export">
<div class="warning">Rendering can be suboptimal because there is no default/fallback css loaded.</div>
@@ -3061,7 +3117,7 @@ local htmltemplate = [[
local implicits = { }
local explicits = { }
local overloads = { }
- for e in xml.collected(xmltree,"*") do
+ for e in xmlcollected(xmltree,"*") do
local at = e.at
if at then
local explicit = at.explicit
@@ -3082,7 +3138,7 @@ local htmltemplate = [[
end
end
end
- for e in xml.collected(xmltree,"*") do
+ for e in xmlcollected(xmltree,"*") do
local at = e.at
if at then
local internal = at.internal
@@ -3214,7 +3270,7 @@ local htmltemplate = [[
local function remap(specification,source,target)
local comment = nil -- share comments
- for c in xml.collected(source,"*") do
+ for c in xmlcollected(source,"*") do
if not c.special then
local tg = c.tg
local ns = c.ns
@@ -3226,44 +3282,45 @@ local htmltemplate = [[
-- elseif tg == "a" then
-- c.ns = ""
else
- -- if tg == "tabulatecell" or tg == "tablecell" then
- local dt = c.dt
- local nt = #dt
- if nt == 0 or (nt == 1 and dt[1] == "") then
- if comment then
- c.dt = comment
- else
- xml.setcomment(c,"empty")
- comment = c.dt
- end
+ local dt = c.dt
+ local nt = #dt
+ if nt == 0 or (nt == 1 and dt[1] == "") then
+ if comment then
+ c.dt = comment
+ else
+ xmlsetcomment(c,"empty")
+ comment = c.dt
end
- -- end
+ end
local at = c.at
local class = nil
+ local label = nil
if tg == "document" then
at.href = nil
at.detail = nil
at.chain = nil
elseif tg == "metavariable" then
- at.detail = "metaname-" .. at.name
+ label = at.name
+ at.detail = "metaname-" .. label
class = makeclass(tg,at)
else
class = makeclass(tg,at)
end
local id = at.id
local href = at.href
+ local attr = nil
if id then
- id = lpegmatch(p_cleanid, id) or id
+ id = lpegmatch(p_cleanid, id) or id
if href then
href = lpegmatch(p_cleanhref,href) or href
- c.at = {
+ attr = {
class = class,
id = id,
href = href,
onclick = addclicks and f_onclick(href) or nil,
}
else
- c.at = {
+ attr = {
class = class,
id = id,
}
@@ -3271,18 +3328,22 @@ local htmltemplate = [[
else
if href then
href = lpegmatch(p_cleanhref,href) or href
- c.at = {
+ attr = {
class = class,
href = href,
onclick = addclicks and f_onclick(href) or nil,
}
else
- c.at = {
+ attr = {
class = class,
}
end
end
c.tg = "div"
+ c.at = attr
+ if label then
+ attr.label = label
+ end
end
end
end
@@ -3292,11 +3353,19 @@ local htmltemplate = [[
local addsuffix = file.addsuffix
local joinfile = file.join
+ local nameonly = file.nameonly
+ local basename = file.basename
local embedfile = false directives.register("export.embed",function(v) embedfile = v end)
local embedmath = false
- local function stopexport(v)
+ function structurestags.finishexport()
+
+ if exporting then
+ exporting = false
+ else
+ return
+ end
starttiming(treehash)
--
@@ -3314,10 +3383,8 @@ local htmltemplate = [[
--
wrapups.hashlistdata()
--
- if type(v) ~= "string" or v == v_yes or v == "" then
- v = tex.jobname
- end
-
+ local askedname = finetuning.file
+ --
-- we use a dedicated subpath:
--
-- ./jobname-export
@@ -3333,8 +3400,12 @@ local htmltemplate = [[
-- ./jobname-export/styles/jobname-images.css
-- ./jobname-export/styles/jobname-templates.css
- local basename = file.basename(v)
- local basepath = basename .. "-export"
+ if type(askedname) ~= "string" or askedname == v_yes or askedname == "" then
+ askedname = tex.jobname
+ end
+
+ local usedname = nameonly(askedname)
+ local basepath = usedname .. "-export"
local imagepath = joinfile(basepath,"images")
local stylepath = joinfile(basepath,"styles")
@@ -3358,21 +3429,23 @@ local htmltemplate = [[
end
-- we're now on the dedicated export subpath so we can't clash names
+ --
+ -- a xhtml suffix no longer seems to be work well with browsers
- local xmlfilebase = addsuffix(basename .. "-raw","xml" )
- local xhtmlfilebase = addsuffix(basename .. "-tag","xhtml")
- local htmlfilebase = addsuffix(basename .. "-div","xhtml")
- local specificationfilebase = addsuffix(basename .. "-pub","lua" )
+ local xmlfilebase = addsuffix(usedname .. "-raw","xml" )
+ local xhtmlfilebase = addsuffix(usedname .. "-tag","xhtml")
+ local htmlfilebase = addsuffix(usedname .. "-div","html")
+ local specificationfilebase = addsuffix(usedname .. "-pub","lua" )
local xmlfilename = joinfile(basepath, xmlfilebase )
local xhtmlfilename = joinfile(basepath, xhtmlfilebase )
local htmlfilename = joinfile(basepath, htmlfilebase )
local specificationfilename = joinfile(basepath, specificationfilebase)
--
- local defaultfilebase = addsuffix(basename .. "-defaults", "css")
- local imagefilebase = addsuffix(basename .. "-images", "css")
- local stylefilebase = addsuffix(basename .. "-styles", "css")
- local templatefilebase = addsuffix(basename .. "-templates","css")
+ local defaultfilebase = addsuffix(usedname .. "-defaults", "css")
+ local imagefilebase = addsuffix(usedname .. "-images", "css")
+ local stylefilebase = addsuffix(usedname .. "-styles", "css")
+ local templatefilebase = addsuffix(usedname .. "-templates","css")
--
local defaultfilename = joinfile(stylepath,defaultfilebase )
local imagefilename = joinfile(stylepath,imagefilebase )
@@ -3410,7 +3483,7 @@ local htmltemplate = [[
local list = table.unique(settings_to_array(cssfile))
for i=1,#list do
local source = addsuffix(list[i],"css")
- local target = joinfile(stylepath,file.basename(source))
+ local target = joinfile(stylepath,basename(source))
cssfiles[#cssfiles+1] = source
if not lfs.isfile(source) then
source = joinfile("../",source)
@@ -3445,7 +3518,7 @@ local htmltemplate = [[
-- only for testing
attach {
data = concat{ wholepreamble(true), result },
- name = file.basename(xmlfilename),
+ name = basename(xmlfilename),
registered = "export",
title = "raw xml export",
method = v_hidden,
@@ -3457,8 +3530,8 @@ local htmltemplate = [[
-- for k, v in sortedhash(embedded) do
-- attach {
-- data = v,
- -- file = file.basename(k),
- -- name = file.addsuffix(k,"xml"),
+ -- file = basename(k),
+ -- name = addsuffix(k,"xml"),
-- registered = k,
-- reference = k,
-- title = "xml export snippet: " .. k,
@@ -3483,13 +3556,13 @@ local htmltemplate = [[
io.savedata(xmlfilename,result)
report_export("saving css image definitions in %a",imagefilename)
- io.savedata(imagefilename,wrapups.allusedimages(basename))
+ io.savedata(imagefilename,wrapups.allusedimages(usedname))
report_export("saving css style definitions in %a",stylefilename)
- io.savedata(stylefilename,wrapups.allusedstyles(basename))
+ io.savedata(stylefilename,wrapups.allusedstyles(usedname))
report_export("saving css template in %a",templatefilename)
- io.savedata(templatefilename,allusedelements(basename))
+ io.savedata(templatefilename,allusedelements(usedname))
-- additionally we save an xhtml file; for that we load the file as xml tree
@@ -3505,9 +3578,10 @@ local htmltemplate = [[
-- at the tex end
local identity = interactions.general.getidentity()
+ local metadata = structures.tags.getmetadata()
local specification = {
- name = file.removesuffix(v),
+ name = usedname,
identifier = os.uuid(),
images = wrapups.uniqueusedimages(),
imagefile = joinfile("styles",imagefilebase),
@@ -3524,6 +3598,7 @@ local htmltemplate = [[
author = validstring(finetuning.author) or validstring(identity.author),
firstpage = validstring(finetuning.firstpage),
lastpage = validstring(finetuning.lastpage),
+ metadata = metadata,
}
report_export("saving specification in %a",specificationfilename,specificationfilename)
@@ -3537,10 +3612,15 @@ local htmltemplate = [[
remap(specification,xmltree)
+ -- believe it or not, but a <title/> can prevent viewing in browsers
+
local title = specification.title
if not title or title == "" then
- title = "no title" -- believe it or not, but a <title/> can prevent viewing in browsers
+ title = metadata.title
+ if not title or title == "" then
+ title = usedname -- was: "no title"
+ end
end
local variables = {
@@ -3555,7 +3635,7 @@ local htmltemplate = [[
-- finally we report how an epub file can be made (using the specification)
report_export("")
- report_export('create epub with: mtxrun --script epub --make "%s" [--purge --rename --svgmath]',file.nameonly(basename))
+ report_export('create epub with: mtxrun --script epub --make "%s" [--purge --rename --svgmath]',usedname)
report_export("")
stoptiming(treehash)
@@ -3564,17 +3644,8 @@ local htmltemplate = [[
local appendaction = nodes.tasks.appendaction
local enableaction = nodes.tasks.enableaction
- function structurestags.setupexport(t)
- merge(finetuning,t)
- keephyphens = finetuning.hyphen == v_yes
- exportproperties = finetuning.properties
- if exportproperties == v_no then
- exportproperties = false
- end
- end
-
- local function startexport(v)
- if v and not exporting then
+ function structurestags.initializeexport()
+ if not exporting then
report_export("enabling export to xml")
-- not yet known in task-ini
appendaction("shipouts","normalizers", "nodes.handlers.export")
@@ -3584,19 +3655,19 @@ local htmltemplate = [[
-- appendaction("finalizers","lists","builders.paragraphs.tag")
-- enableaction("finalizers","builders.paragraphs.tag")
luatex.registerstopactions(structurestags.finishexport)
- exporting = v
+ exporting = true
end
end
- function structurestags.finishexport()
- if exporting then
- stopexport(exporting)
- exporting = false
+ function structurestags.setupexport(t)
+ merge(finetuning,t)
+ keephyphens = finetuning.hyphen == v_yes
+ exportproperties = finetuning.properties
+ if exportproperties == v_no then
+ exportproperties = false
end
end
- directives.register("backend.export",startexport) -- maybe .name
-
statistics.register("xml exporting time", function()
if exporting then
return string.format("%s seconds, version %s", statistics.elapsedtime(treehash),exportversion)
@@ -3624,6 +3695,7 @@ implement {
{ "lastpage" },
{ "svgstyle" },
{ "cssfile" },
+ { "file" },
}
}
}
@@ -3634,6 +3706,12 @@ implement {
}
implement {
+ name = "initializeexport",
+ actions = structurestags.initializeexport,
+}
+
+
+implement {
name = "settagitemgroup",
actions = structurestags.setitemgroup,
arguments = { "boolean", "integer", "string" }
@@ -3684,7 +3762,13 @@ implement {
implement {
name = "settaghighlight",
actions = structurestags.sethighlight,
- arguments = { "string", "integer" }
+ arguments = { "string", "string", "integer", "integer" }
+}
+
+implement {
+ name = "settagconstruct",
+ actions = structurestags.setconstruct,
+ arguments = { "string", "string", "integer", "integer" }
}
implement {
@@ -3708,7 +3792,7 @@ implement {
implement {
name = "settagtabulatecell",
actions = structurestags.settabulatecell,
- arguments = "integer"
+ arguments = { "integer", "integer" },
}
implement {
diff --git a/tex/context/base/mkiv/back-exp.mkiv b/tex/context/base/mkiv/back-exp.mkiv
index 48f4d3c48..6e24ed641 100644
--- a/tex/context/base/mkiv/back-exp.mkiv
+++ b/tex/context/base/mkiv/back-exp.mkiv
@@ -94,7 +94,9 @@
\appendtoks
\unexpanded\def\dotagtabulatecell
- {\iftrialtypesetting\else\clf_settagtabulatecell\c_tabl_tabulate_align\fi}%
+ {\iftrialtypesetting\else
+ \clf_settagtabulatecell\c_tabl_tabulate_align\c_tabl_tabulate_kind
+ \fi}%
\unexpanded\def\dotagtabulatesignal
{\dontleavehmode\signalcharacter\ignorespaces}%
\to \everyenableelements
@@ -110,9 +112,26 @@
\to \everyenableelements
\appendtoks % frozen and assumed global per highlight class
+ \unexpanded\def\dotagconstruct
+ {\iftrialtypesetting\else
+ \clf_settagconstruct
+ {\currentstartstop}%
+ {\startstopparameter\c!style}%
+ \attribute\colorattribute
+ \ifvmode\plusone\else\zerocount\fi
+ \relax
+ \fi}%
+\to \everyenableelements
+
+\appendtoks % frozen and assumed global per highlight class
\unexpanded\def\dotaghighlight
{\iftrialtypesetting\else
- \clf_settaghighlight{\highlightparameter\c!style}\attribute\colorattribute\relax
+ \clf_settaghighlight
+ {\currenthighlight}%
+ {\highlightparameter\c!style}
+ \attribute\colorattribute
+ \ifvmode\plusone\else\zerocount\fi
+ \relax
\fi}%
\to \everyenableelements
@@ -239,10 +258,24 @@
\c!properties=\v!no, % no: ignore, yes: as attribute, otherwise: use as prefix
\c!hyphen=\v!no,
\c!svgstyle=,
- \c!cssfile=]
+ \c!cssfile=,
+ \c!file={\backendparameter\c!export}] % downward compatibility
+
+\resetsystemmode\v!export
+
+\unexpanded\def\doinitializeexport
+ {\edef\p_export{\backendparameter\c!export}%
+ \ifx\p_export\empty \else
+ \setuptagging[\c!state=\v!start]%
+ \clf_initializeexport
+ \setsystemmode\v!export
+ \exportingtrue
+ \glet\doinitializeexport\relax
+ \fi}
-\def\dosynchronizeexport
- {\let\currentexport\empty
+\unexpanded\def\dostartexport
+ {%\glet\dostartexport\relax
+ \let\currentexport\empty
\clf_setupexport
align {\exportparameter\c!align}%
bodyfont \dimexpr\exportparameter\c!bodyfont\relax
@@ -256,37 +289,35 @@
lastpage {\exportparameter\c!lastpage}%
svgstyle {\exportparameter\c!svgstyle}%
cssfile {\exportparameter\c!cssfile}%
+ file {\exportparameter\c!file}%
\relax}
+\unexpanded\def\dostopexport
+ {\glet\dostopexport\relax
+ \clf_finishexport}
+
\appendtoks
- \doifsomething{\backendparameter\c!export}\dosynchronizeexport
+ \doinitializeexport
+\to \everysetupbackend
+
+\appendtoks
+ \ifexporting
+ \dostartexport
+ \fi
\to \everystarttext
% better (before pdf gets closed, so we can embed), but it needs testing:
\appendtoks
- \clf_finishexport
+ \ifexporting
+ \dostopexport
+ \fi
\to \everystoptext
\appendtoks
- \doifsomething{\backendparameter\c!export}\dosynchronizeexport % in case it is done inside \starttext
+ \ifexporting
+ \dostartexport % in case it is done inside \starttext
+ \fi
\to \everysetupdocument
-% \appendtoks
-% \doifsomething{\backendparameter\c!xhtml}
-% {\enabledirectives[backend.export.xhtml=\backendparameter\c!xhtml]}%
-% \doifsomething{\backendparameter\c!css}
-% {\enabledirectives[backend.export.css={\backendparameter\c!css}]}%
-% \doifsomething{\backendparameter\c!alternative}
-% {\enabledirectives[backend.export.alternative={\backendparameter\c!alternative}]}%
-% \to \everysetupbackend
-
-\appendtoks
- \doifelsenothing{\backendparameter\c!export}
- {\resetsystemmode\v!export}
- {\setuptagging[\c!state=\v!start]%
- \enabledirectives[backend.export=\backendparameter\c!export]%
- \setsystemmode\v!export}%
-\to \everysetupbackend
-
\protect \endinput
diff --git a/tex/context/base/mkiv/colo-imp-rgb.mkiv b/tex/context/base/mkiv/colo-imp-rgb.mkiv
index 934071ed9..6e7e44f8c 100644
--- a/tex/context/base/mkiv/colo-imp-rgb.mkiv
+++ b/tex/context/base/mkiv/colo-imp-rgb.mkiv
@@ -59,6 +59,7 @@
\definecolor [darkgray] [s=.40]
\definecolor [middlegray] [s=.625]
\definecolor [lightgray] [s=.85]
+\definecolor [palegray] [s=.75]
%D These colors are mapped to interface dependant colornames.
diff --git a/tex/context/base/mkiv/cont-new.mkiv b/tex/context/base/mkiv/cont-new.mkiv
index 94b08824b..267ff3ec2 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{2017.07.17 00:20}
+\newcontextversion{2017.07.27 16:17}
%D This file is loaded at runtime, thereby providing an excellent place for
%D hacks, patches, extensions and new features.
diff --git a/tex/context/base/mkiv/context.mkiv b/tex/context/base/mkiv/context.mkiv
index 802d4fa29..4a629c6f1 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{2017.07.17 00:20}
+\edef\contextversion{2017.07.27 16:17}
\edef\contextkind {beta}
%D For those who want to use this:
@@ -184,13 +184,8 @@
\loadmarkfile{supp-box}
-%loadmarkfile{supp-vis} % replaced by trac-vis
-%loadmarkfile{supp-fun} % mostly replaced
-
\loadmarkfile{supp-ran}
\loadmarkfile{supp-mat}
-%loadmarkfile{spac-cha} % obsolete
-%loadmarkfile{supp-num} % obsolete
\loadmarkfile{core-uti}
\loadmkvifile{file-job}
@@ -230,7 +225,7 @@
\loadmarkfile{node-bck} % overloads anch-pgr (experimental and undocumented)
-\loadmarkfile{pack-cut} % leftovers from trac-vis
+\loadmarkfile{pack-cut}
\loadmarkfile{lang-mis}
\loadmarkfile{lang-url}
@@ -503,7 +498,7 @@
\loadmarkfile{typo-scr}
\loadmarkfile{phys-dim}
-\loadmarkfile{node-rul}
+\loadmarkfile{node-rul} % beware, defined \underbar so after math
\loadmkvifile{font-sol} % font solutions
\loadmkvifile{strc-not}
diff --git a/tex/context/base/mkiv/core-con.lua b/tex/context/base/mkiv/core-con.lua
index 10f8fc2ed..e643dc46c 100644
--- a/tex/context/base/mkiv/core-con.lua
+++ b/tex/context/base/mkiv/core-con.lua
@@ -21,7 +21,7 @@ local lower, upper, rep, match, gsub = string.lower, string.upper, string.rep, s
local utfchar, utfbyte = utf.char, utf.byte
local tonumber, tostring, type, rawset = tonumber, tostring, type, rawset
local P, S, R, Cc, Cf, Cg, Ct, Cs, C = lpeg.P, lpeg.S, lpeg.R, lpeg.Cc, lpeg.Cf, lpeg.Cg, lpeg.Ct, lpeg.Cs, lpeg.C
-local lpegmatch = lpeg.match
+local lpegmatch, lpegpatterns = lpeg.match, lpeg.patterns
local context = context
local commands = commands
@@ -44,7 +44,6 @@ local languages = languages
local ctx_labeltext = context.labeltext
local ctx_LABELTEXT = context.LABELTEXT
-local ctx_WORD = context.WORD
local ctx_space = context.space
local ctx_convertnumber = context.convertnumber
local ctx_highordinalstr = context.highordinalstr
@@ -1149,15 +1148,19 @@ implement {
-- These are just helpers but not really for the tex end. Do we have to
-- use translate here?
-local whitespace = lpeg.patterns.whitespace
-local word = lpeg.patterns.utf8uppercharacter^-1 * (1-whitespace)^1
+local whitespace = lpegpatterns.whitespace
+local word = lpegpatterns.utf8uppercharacter^-1 * (1-whitespace)^1
local pattern_one = Cs( whitespace^0 * word^-1 * P(1)^0)
local pattern_all = Cs((whitespace^1 + word)^1)
function converters.word (s) return s end -- dummies for typos
function converters.words(s) return s end -- dummies for typos
-function converters.Word (s) return lpegmatch(pattern_one,s) or s end
-function converters.Words(s) return lpegmatch(pattern_all,s) or s end
+
+local function Word (s) return lpegmatch(pattern_one,s) or s end
+local function Words(s) return lpegmatch(pattern_all,s) or s end
+
+converters.Word = Word
+converters.Words = Words
converters.upper = characters.upper
converters.lower = characters.lower
@@ -1324,7 +1327,7 @@ local function currentdate(str,currentlanguage) -- second argument false : no la
context("%02i",year % 100)
elseif tag == v_month or tag == "m" then
if currentlanguage == false then
- context(months[month])
+ context(Word(months[month]))
elseif mnemonic then
ctx_labeltext(variables[mnemonic[month]])
else
@@ -1332,7 +1335,7 @@ local function currentdate(str,currentlanguage) -- second argument false : no la
end
elseif tag == v_MONTH then
if currentlanguage == false then
- ctx_WORD(variables[months[month]])
+ context(Word(variables[months[month]]))
elseif mnemonic then
ctx_LABELTEXT(variables[mnemonic[month]])
else
@@ -1344,7 +1347,7 @@ local function currentdate(str,currentlanguage) -- second argument false : no la
context(month)
elseif tag == v_day or tag == "d" then
if currentlanguage == false then
- context(days[day])
+ context(day)
else
ctx_convertnumber(v_day,day) -- why not direct
end
@@ -1358,14 +1361,14 @@ local function currentdate(str,currentlanguage) -- second argument false : no la
elseif tag == v_weekday or tag == "w" then
local wd = weekday(day,month,year)
if currentlanguage == false then
- context(days[wd])
+ context(Word(days[wd]))
else
ctx_labeltext(variables[days[wd]])
end
elseif tag == v_WEEKDAY then
local wd = weekday(day,month,year)
if currentlanguage == false then
- ctx_WORD(days[wd])
+ context(Word(days[wd]))
else
ctx_LABELTEXT(variables[days[wd]])
end
@@ -1391,30 +1394,31 @@ local function currentdate(str,currentlanguage) -- second argument false : no la
end
end
-implement {
- name = "currentdate",
- actions = currentdate,
- arguments = { "string", "string" }
-}
+
implement {
- name = "rawdate",
- actions = currentdate,
- arguments = { "string", false }
+ name = "currentdate",
+ arguments = { "string", "string", "string" },
+ actions = function(pattern,default,language)
+ currentdate(
+ pattern == "" and default or pattern,
+ language == "" and false or language
+ )
+ end,
}
implement {
name = "unihex",
+ arguments = "integer",
actions = { formatters["U+%05X"], context },
- arguments = "integer"
}
-local n = lpeg.R("09")^1 / tonumber
+local n = R("09")^1 / tonumber
local p = Cf( Ct("")
* Cg(Cc("year") * (n )) * P("-")^-1
* Cg(Cc("month") * (n + Cc( 1))) * P("-")^-1
- * Cg(Cc("day") * (n + Cc( 1))) * lpeg.patterns.whitespace^-1
+ * Cg(Cc("day") * (n + Cc( 1))) * whitespace^-1
* Cg(Cc("hour") * (n + Cc( 0))) * P(":")^-1
* Cg(Cc("min") * (n + Cc( 0)))
, rawset)
diff --git a/tex/context/base/mkiv/core-con.mkiv b/tex/context/base/mkiv/core-con.mkiv
index a4d358e04..df0973132 100644
--- a/tex/context/base/mkiv/core-con.mkiv
+++ b/tex/context/base/mkiv/core-con.mkiv
@@ -416,8 +416,7 @@
\def\syst_converters_current_date[#1]%
{\begingroup
\the\everycurrentdate
- \doifsomething{#1}{\edef\currentdatespecification{#1}}%
- \clf_currentdate{\currentdatespecification}{\labellanguage}%
+ \clf_currentdate{#1}{\currentdatespecification}{\labellanguage}%
\endgroup}
\unexpanded\def\date
@@ -438,7 +437,7 @@
\endgroup}
\def\rawdate[#1]% expandable and no labels
- {\clf_rawdate{\currentdatespecification}}
+ {\clf_currentdate{#1}{\currentdatespecification}{}}
%D \macros
%D {currenttime}
diff --git a/tex/context/base/mkiv/core-ini.mkiv b/tex/context/base/mkiv/core-ini.mkiv
index 0407409a3..35790f131 100644
--- a/tex/context/base/mkiv/core-ini.mkiv
+++ b/tex/context/base/mkiv/core-ini.mkiv
@@ -171,6 +171,7 @@
\newif \ifinsidefloat
\newif \ifdoingblocks
\newif \ifgridsnapping
+\newif \ifexporting
\newconstant\pageduplexmode % 0 single 1 double 2 mix
\newconstant\pagebodymode % 0 not 1 normal pagebody 2 spread
diff --git a/tex/context/base/mkiv/core-sys.mkiv b/tex/context/base/mkiv/core-sys.mkiv
index 172cb7a38..a821c7868 100644
--- a/tex/context/base/mkiv/core-sys.mkiv
+++ b/tex/context/base/mkiv/core-sys.mkiv
@@ -208,6 +208,8 @@
\setuevalue {\currentstartstop}{\syst_startstop_indeed{\currentstartstop}}%
\to \everydefinestartstop
+\ifdefined\dotagconstruct \else \let\dotagconstruct\relax \fi
+
\unexpanded\def\syst_startstop_start#1%
{\namedstartstopparameter{#1}\c!before\relax
\bgroup
@@ -217,7 +219,8 @@
% this is the new method:
\usesetupsparameter\startstopparameter\relax % only in the display version
\dostarttagged\t!construct\currentstartstop
- \usestartstopstyleandcolor\c!style\c!color}
+ \usestartstopstyleandcolor\c!style\c!color
+ \dotagconstruct}
\unexpanded\def\syst_startstop_stop#1%
{\dostoptagged
@@ -231,7 +234,7 @@
\dostarttagged\t!construct\currentstartstop
\usestartstopstyleandcolor\c!style\c!color
\startstopparameter\c!left\relax}
- {\def\currentstartstop{#1}% safeguard, nto really needed
+ {\def\currentstartstop{#1}% safeguard, not really needed
\startstopparameter\c!right\relax
\dostoptagged
\startstopparameter\c!inbetween\relax}}
diff --git a/tex/context/base/mkiv/export-example.css b/tex/context/base/mkiv/export-example.css
index 8c7ae3bfc..812873afc 100644
--- a/tex/context/base/mkiv/export-example.css
+++ b/tex/context/base/mkiv/export-example.css
@@ -28,6 +28,8 @@
context|div.figure { } *[chain~='figure'] { }
context|div.figure.myfloatb { } *[chain~='figure'][detail='myfloatb'] { }
+ Inheritance when using div seems to be stronger so we need to take more precautions.
+
*/
@namespace context url('http://www.pragma-ade.com/context/export') ;
@@ -35,35 +37,42 @@
/* ignore : mixed */
/* metadata: display */
-ignore, context|div.ignore {
+ignore,
+context|div.ignore {
display : none ;
}
-ignore, context|div.private {
+ignore,
+context|div.private {
display : none ;
}
-xmetadata, context|div.xmetadata {
+xmetadata,
+context|div.xmetadata {
display : none ;
}
-xmetavariable, context|div.xmetavariable {
+xmetavariable,
+context|div.xmetavariable {
display : none ;
}
/* document : display */
-document:before, context|div.document:before {
+document:before,
+context|div.document:before {
content : attr(title) ;
font-size : 44pt ;
font-weight : bold ;
margin-bottom : 1em ;
}
-document, context|div.document {
+document,
+context|div.document {
font-family : "DejaVu Serif", "Lucida Bright", serif ;
font-size : 12pt ;
- line-height : 14.4pt;
+ /* line-height : 14.4pt; */
+ line-height : 2.8ex;
max-width : 50em ;
padding : 1em ;
/* text-align : justify ; */
@@ -72,35 +81,59 @@ document, context|div.document {
/* text-justify : inter-word ; */
}
-document>metadata, context|div.document context|div.metadata {
+document>metadata,
+context|div.document context|div.metadata {
font-family : "DejaVu Sans Mono", "Lucida Console", monospace ;
- margin-bottom : 2em ;
+ margin-bottom : 3ex ;
}
-document>metadata>metavariable[name="title"]:before,
- context|div.document context|div.metadata context|div.metavariable.name-title:before {
- content : "title\00A0\00A0\00A0:\00A0" ;
+/*
+ document>metadata>metavariable[name="X"]:before,
+ context|div.document context|div.metadata context|div.metavariable.metaname-X:before {
+ content : "X\00A0\00A0\00A0:\00A0" ;
+ }
+*/
+
+document>metadata,
+context|div.document context|div.metadata {
+ display : flex ;
+ flex-flow : column ;
}
-document>metadata>metavariable[name="author"]:before,
- context|div.document context|div.metadata context|div.metavariable.name-author:before {
- content : "author\00A0\00A0:\00A0" ;
+document>metadata>metavariable:before,
+context|div.document context|div.metadata context|div.metavariable:before {
+ display : inline ;
+ content : attr(label);
+ width : 8em ;
+ float : left ;
+ font-weight : bold ;
}
-document>metadata>metavariable[name="version"]:before,
- context|div.document context|div.metadata context|div.metavariable.name-version:before {
- content : "version\00A0:\00A0" ;
+document>metadata>metavariable[name="title"],
+context|div.document context|div.metadata context|div.metavariable.metaname-title {
+ order : -1 ;
+ display : block ;
+ width : 50em ;
+ float : left ;
+ font-family : "DejaVu Serif", "Lucida Bright", serif ;
+ font-weight : bold ;
+ font-size : 3em ;
+ text-align : left ;
+ margin-bottom : 2ex ;
}
-document>metadata>metavariable[name="title"], document>metadata>metavariable[name="author"], document>metadata>metavariable[name="version"],
- context|div.document context|div.metadata context|div.metavariable.name-title, context|div.document context|div.metadata context|div.metavariable.name-author, context|div.document context|div.metadata context|div.metavariable.name-version {
- display : block ;
+document>metadata>metavariable[name="title"]:before,
+context|div.document context|div.metadata context|div.metavariable.metaname-title:before {
+ content : none ;
}
/* paragraph : mixed */
/* p : mixed */
-paragraph, p, context|div.paragraph, context|div.p {
+paragraph,
+p,
+context|div.paragraph,
+context|div.p {
display : block ;
margin-top : 0.5em ;
margin-bottom : 0.5em ;
@@ -108,7 +141,8 @@ paragraph, p, context|div.paragraph, context|div.p {
/* break : display */
-break, context|div.break {
+break,
+context|div.break {
display : block ;
margin-bottom : 0.5em ;
}
@@ -116,14 +150,17 @@ break, context|div.break {
/* construct : inline */
/* highlight : inline */
-construct, context|div.construct {
+construct,
+context|div.construct {
}
-construct[detail="important"], context|div.construct.important {
+construct[detail="important"],
+context|div.construct.important {
font-weight : bold ;
}
-highlight, context|div.highlight { /* todo: style and color */
+highlight,
+context|div.highlight { /* todo: style and color */
display : inline ;
}
@@ -132,95 +169,167 @@ highlight, context|div.highlight { /* todo: style and color */
/* sectionnumber : mixed */
/* sectioncontent : display */
-section, context|div.section {
+section,
+context|div.section {
display : block ;
}
-sectioncontent, context|div.sectioncontent {
- display : block ;
- margin-top : 1em ;
- margin-bottom : 1em ;
+sectioncaption,
+context|div.sectioncaption {
+ display : block ;
+ text-align : left ;
+ page-break-after : avoid ;
+ margin-top : 3ex ;
+ margin-bottom : 2ex ;
}
-section[detail="chapter"], section[detail="title"],
- context|div.section.chapter, context|div.section.title {
- page-break-before : always ;
- page-break-after : avoid ;
- margin-top : 3em ;
- margin-bottom : 2em ;
+sectioncontent,
+context|div.sectioncontent {
+ display : block ;
}
-section[detail="section"], section[detail="subject"],
- context|div.section.section, context|div.section.subject {
- page-break-after : avoid ;
- margin-top : 2.5em ;
- margin-bottom : 2.5em ;
+sectionnumber,
+context|div.sectionnumber {
+ display : inline ;
+ margin-right : 1em ;
}
-section[detail="subsection"], section[detail="subsubject"],
- context|div.section.subsection, context|div.section.subsubject {
- page-break-after : avoid ;
- margin-top : 2em ;
- margin-bottom : 2em ;
+sectionnumber,
+context|div.sectiontitle {
+ display : inline ;
}
-section[detail="subsubsection"], section[detail="subsubsubject"],
- context|div.section.subsubsection, context|div.section.subsubsubject {
- page-break-after : avoid ;
- margin-top : 1em ;
- margin-bottom : 0em ;
+/* we need to use level as selector because section is used twice */
+
+/* chapter | title */
+
+section[detail="chapter"]>sectioncaption,
+section[detail="title"]>sectioncaption,
+context|div.level-2.chapter context|div.sectioncaption ,
+context|div.level-2.title context|div.sectioncaption {
+ font-size : 2em ;
+ font-weight : bold ;
}
-section[detail="summary"], section[detail="subsummary"],
- context|div.section.summary, context|div.section.subsummary {
- margin-top : 1em ;
- margin-bottom : 1em ;
+section[detail="chapter"],
+section[detail="title"],
+context|div.level-2.chapter,
+context|div.level-2.title {
+ page-break-before : always ;
+ margin-top : 4ex ;
}
-section[detail="chapter"]>sectionnumber,
- context|div.section.chapter context|div.sectionnumber {
- display : inline-block ;
- margin-right : 1em ;
- font-size : 3em ;
- font-weight : bold ;
+section[detail="chapter"]>sectioncaption>sectionnumber,
+context|div.level-2.chapter context|div.sectioncaption context|div.sectionnumber {
+ /* nothing */
}
-section[detail="chapter"]>sectiontitle, section[detail="title"]>sectiontitle,
- context|div.section.chapter context|div.sectiontitle, context|div.section.title context|div.sectiontitle {
- display : inline-block ;
- font-size : 3em ;
- font-weight : bold ;
+section[detail="chapter"]>sectioncaption>sectiontitle,
+section[detail="title"]>sectioncaption>sectiontitle,
+context|div.level-2.chapter context|div.sectioncaption context|div.sectiontitle,
+context|div.level-2.title context|div.sectioncaption context|div.sectiontitle {
+ /* nothing */
}
-section[detail="section"]>sectiontitle, section[detail="subject"]>sectiontitle,
- context|div.section.section context|div.sectiontitle, context|div.section.subject context|div.sectiontitle {
- display : inline-block ;
- font-size : 2.5em ;
+/* section | subject */
+
+section[detail="section"]>sectioncaption,
+section[detail="subject"]>sectioncaption,
+context|div.level-3.section context|div.sectioncaption,
+context|div.level-3.subject context|div.sectioncaption {
+ font-size : 1.75em ;
font-weight : bold ;
}
-section[detail="subsection"]>sectiontitle, section[detail="subsubject"]>sectiontitle,
- context|div.section.subsection context|div.sectiontitle, context|div.section.subsubject context|div.sectiontitle {
- display : inline-block ;
- font-size : 2em ;
+section[detail="section"],
+section[detail="subject"],
+context|div.level-3.section,
+context|div.level-3.subject {
+ /* nothing */
+}
+
+section[detail="section"]>sectioncaption>sectionnumber,
+context|div.level-3.section context|div.sectioncaption context|div.sectionnumber {
+ /* nothing */
+}
+
+section[detail="section"]>sectioncaption>sectiontitle,
+section[detail="subject"]>sectioncaption>sectiontitle,
+context|div.level-3.section context|div.sectioncaption context|div.sectiontitle,
+context|div.level-3.subject context|div.sectioncaption context|div.sectiontitle {
+ /* nothing */
+}
+
+/* subsection | subsubject */
+
+section[detail="subsection"]>sectioncaption,
+section[detail="subsubject"]>sectioncaption,
+context|div.level-4.subsection context|div.sectioncaption,
+context|div.level-4.subsubject context|div.sectioncaption {
+ font-size : 1.5em ;
font-weight : bold ;
}
-section[detail="subsubsection"]>sectiontitle, section[detail="subsubsubject"]>sectiontitle,
- context|div.section.subsubsection context|div.sectiontitle, context|div.section.subsubsubject context|div.sectiontitle {
- display : inline-block ;
- font-size : 1em ;
+section[detail="subsection"],
+section[detail="subsubject"],
+context|div.level-4.subsection,
+context|div.level-4.subsubject {
+ /* nothing */
+}
+
+section[detail="subsection"]>sectioncaption>sectionnumber,
+context|div.level-4.subsection context|div.sectioncaption context|div.sectionnumber {
+ /* nothing */
+}
+
+section[detail="subsection"]>sectioncaption>sectiontitle,
+section[detail="subsubject"]>sectioncaption>sectiontitle,
+context|div.level-4.subsection context|div.sectioncaption context|div.sectiontitle,
+context|div.level-4.subsubject context|div.sectioncaption context|div.sectiontitle {
+ /* nothing */
+}
+
+/* subsubsection | subsubsubject */
+
+section[detail="subsubsection"]>sectioncaption,
+section[detail="subsubsubject"]>sectioncaption,
+context|div.level-5.subsubsection context|div.sectioncaption,
+context|div.level-5.subsubsubject context|div.sectioncaption {
+ font-size : 1.25em ;
font-weight : bold ;
}
-section[detail="section"]>sectionnumber, context|div.section.section context|div.sectionnumber {
- display : inline-block ;
- margin-right : 1em ;
- font-size : 2.5em ;
- font-weight : bold ;
+section[detail="subsubsection"],
+section[detail="subsubsubject"],
+context|div.level-5.subsubsection,
+context|div.level-5.subsubsubject {
+ /* nothing */
+}
+
+section[detail="subsubsection"]>sectioncaption>sectionnumber,
+context|div.level-5.subsubsection context|div.sectioncaption context|div.sectionnumber {
+ /* nothing */
+}
+
+section[detail="subsubsection"]>sectioncaption>sectiontitle,
+section[detail="subsubsubject"]>sectioncaption>sectiontitle,
+context|div.level-5.subsubsection context|div.sectioncaption context|div.sectiontitle,
+context|div.level-5.subsubsubject context|div.sectioncaption context|div.sectiontitle {
+ /* nothing */
+}
+
+/* summary | subsummary*/
+
+section[detail="summary"],
+section[detail="subsummary"],
+context|div.section.summary,
+context|div.section.subsummary {
+ margin-top : 1em ;
+ margin-bottom : 1em ;
}
-section[detail="summary"]>sectiontitle, context|div.section.summary context|div.sectiontitle {
+section[detail="summary"]>sectioncaption>sectiontitle,
+context|div.section.summary context|div.sectioncaption context|div.sectiontitle {
display : block ;
margin-top : 1em ;
margin-bottom : 1em ;
@@ -228,16 +337,11 @@ section[detail="summary"]>sectiontitle, context|div.section.summary context|div.
border-bottom-style : solid ;
border-color : rgb(50%,50%,100%) ;
border-width : .15em;
+ text-align : left ;
}
-section[detail="subsection"]>sectionnumber, context|div.section.subsection context|div.sectionnumber {
- display : inline-block ;
- margin-right : 1em ;
- font-size : 1em ;
- font-weight : bold ;
-}
-
-section[detail="subsummary"]>sectiontitle, context|div.section.subsummary context|div.sectiontitle {
+section[detail="subsummary"]>sectioncaption>sectiontitle,
+context|div.section.subsummary context|div.sectioncaption context|div.sectiontitle {
display : block ;
margin-top : 1em ;
margin-bottom : 1em ;
@@ -245,6 +349,7 @@ section[detail="subsummary"]>sectiontitle, context|div.section.subsummary contex
border-color : rgb(50%,50%,100%) ;
border-bottom-style : dotted ;
border-width : .15em ;
+ text-align : left ;
}
/* itemgroup : display */
@@ -265,7 +370,8 @@ section[detail="subsummary"]>sectiontitle, context|div.section.subsummary contex
glyphs : 'Α' 'B' 'Γ' 'Δ' 'Ε' 'Ζ' 'Η' 'Θ' 'Ι' 'Κ' 'Λ' 'Μ' 'Ν' 'Ξ' 'Ο' 'Π' 'Ρ' 'Σ' 'Τ' 'Υ' 'Φ' 'Χ' 'Ψ' 'Ω' ;
}
-itemgroup, context|div.itemgroup {
+itemgroup,
+context|div.itemgroup {
display : block ;
margin-bottom : 0.5em ;
margin-top : 0.5em ;
@@ -284,18 +390,21 @@ itemgroup[symbol="n"], context|div.itemgroup.symbol-n { list-style-type : decima
itemgroup[symbol="g"], context|div.itemgroup.symbol-g { list-style-type : lower-greek ; }
itemgroup[symbol="G"], context|div.itemgroup.symbol-G { list-style-type : upper-greek ; }
-item, context|div.item {
+item,
+context|div.item {
display : list-item ;
margin-left : 1em ;
margin-bottom : 0.5em ;
margin-top : 0.5em ;
}
-itemtag, context|div.item {
+itemtag,
+context|div.item {
display: none ;
}
-itemcontent, context|div.itemcontent {
+itemcontent,
+context|div.itemcontent {
}
/* description : display */
@@ -303,13 +412,15 @@ itemcontent, context|div.itemcontent {
/* descriptioncontent : mixed */
/* descriptionsymbol : inline */
-description, context|div.description {
+description,
+context|div.description {
display : block ;
margin-bottom : 1em ;
margin-top : 1em ;
}
-descriptiontag, context|div.descriptiontag {
+descriptiontag,
+context|div.descriptiontag {
display : inline ;
float : left ;
clear : left ;
@@ -318,10 +429,12 @@ descriptiontag, context|div.descriptiontag {
font-weight : bold ;
}
-descriptioncontent, context|div.descriptioncontent {
+descriptioncontent,
+context|div.descriptioncontent {
}
-descriptionsymbol, context|div.descriptionsymbol {
+descriptionsymbol,
+context|div.descriptionsymbol {
display : inline ;
}
@@ -330,7 +443,8 @@ descriptionsymbol, context|div.descriptionsymbol {
/* verbatimline : mixed */
/* verbatim : inline */
-verbatimblock, context|div.verbatimblock {
+verbatimblock,
+context|div.verbatimblock {
background-color : rgb(50%,50%,100%) ;
display : block ;
padding : 1em ;
@@ -339,17 +453,20 @@ verbatimblock, context|div.verbatimblock {
font-family : "DejaVu Sans Mono", "Lucida Console", monospace ;
}
-verbatimlines+verbatimlines, context|div.verbatimlines+context|div.verbatimlines {
+verbatimlines+verbatimlines,
+context|div.verbatimlines+context|div.verbatimlines {
display : block ;
margin-top : 1em ;
}
-verbatimline, context|div.verbatimline {
+verbatimline,
+context|div.verbatimline {
display : block ;
white-space : pre-wrap ;
}
-verbatim, context|div.verbatim {
+verbatim,
+context|div.verbatim {
display : inline ;
white-space : pre-wrap ;
color : rgb(60%,60%,0%) ;
@@ -359,18 +476,21 @@ verbatim, context|div.verbatim {
/* lines : display */
/* line : mixed */
-lines, context|div.lines {
+lines,
+context|div.lines {
display : block ;
margin-bottom : 1em ;
margin-top : 1em ;
}
-lines+lines, context|div.lines+context|div.lines {
+lines+lines,
+context|div.lines+context|div.lines {
display : block ;
margin-top : 1em ;
}
-line, context|div.line {
+line,
+context|div.line {
display : block ;
white-space : pre-wrap ;
}
@@ -378,7 +498,10 @@ line, context|div.line {
/* synonym : inline */
/* sorting : inline */
-sorting, synonym, context|div.sorting, context|div.synonym {
+sorting,
+synonym,
+context|div.sorting,
+context|div.synonym {
display : inline ;
font-variant : small-caps ;
}
@@ -393,15 +516,18 @@ sorting, synonym, context|div.sorting, context|div.synonym {
/* registerpage : inline */
/* registerpagerange : mixed */
-register, context|div.register {
+register,
+context|div.register {
display: none ;
}
-registerlocation, context|div.registerlocation {
+registerlocation,
+context|div.registerlocation {
display: inline ;
}
-registerlocation:after, context|div.registerlocation:after {
+registerlocation:after,
+context|div.registerlocation:after {
content : "\25B6\00A0\00A0" ;
color : rgb(40%,40%,40%) ;
font-size : x-small ;
@@ -414,33 +540,39 @@ registerlocation:after, context|div.registerlocation:after {
/* tablerow : display */
/* tablecell : mixed */
-table, context|div.table {
+table,
+context|div.table {
display : table ;
}
-tablerow, context|div.tablerow {
+tablerow,
+context|div.tablerow {
display : table-row ;
}
-tablecell[align="middle"], context|div.tablecell.align-middle {
+tablecell[align="middle"],
+context|div.tablecell.align-middle {
display : table-cell ;
text-align : center ;
padding : .1em ;
}
-tablecell[align="flushleft"], context|div.tablecell.align-flushleft {
+tablecell[align="flushleft"],
+context|div.tablecell.align-flushleft {
display : table-cell ;
text-align : left ;
padding : .1em ;
}
-tablecell[align="flushright"], context|div.tablecell.align-flushright {
+tablecell[align="flushright"],
+context|div.tablecell.align-flushright {
display : table-cell ;
text-align : right ;
padding : .1em ;
}
-tablecell, context|div.tablecell {
+tablecell,
+context|div.tablecell {
display : table-cell ;
text-align : left ;
padding : .1em ;
@@ -450,73 +582,97 @@ tablecell, context|div.tablecell {
/* tabulaterow : display */
/* tabulatecell : mixed */
-tabulate, context|div.tabulate {
+tabulate,
+context|div.tabulate {
display : table ;
margin-top : 1em ;
margin-bottom : 1em ;
margin-left : 2.5em ;
}
-floatcontent>tabulate, context|div.floatcontent context|div.tabulate {
+floatcontent>tabulate,
+context|div.floatcontent context|div.tabulate {
margin-left : 0em ;
}
-tabulaterow, context|div.tabulaterow {
+tabulaterow,
+context|div.tabulaterow {
display : table-row ;
}
-tabulatecell[align="middle"], context|div.tabulatecell.align-middle {
+tabulatecell[align="middle"],
+context|div.tabulatecell.align-middle {
display : table-cell ;
text-align : center ;
padding-right : 1em ;
}
-tabulatecell[align="flushleft"], context|div.tabulatecell.align-flushleft {
+tabulatecell[align="flushleft"],
+context|div.tabulatecell.align-flushleft {
display : table-cell ;
text-align : left ;
padding-right : 1em ;
}
-tabulatecell[align="flushright"], context|div.tabulatecell.align-flushright {
+tabulatecell[align="flushright"],
+context|div.tabulatecell.align-flushright {
display : table-cell ;
text-align : right ;
padding-right : 1em ;
}
-tabulatecell, context|div.tabulatecell {
+tabulatecell,
+context|div.tabulatecell {
display : table-cell ;
text-align : left ;
padding-right : 1em ;
}
+tabulatecell[kind="strong"],
+context|div.tabulatecell.kind-strong {
+ font-weight : bold ;
+}
+
+tabulatecell[kind="equals"]:before,
+context|div.tabulatecell.kind-equals:before {
+ display : inline-block ;
+ clear : left ;
+ margin-left : -.6em ;
+ width : .6em ;
+ content : ":" ;
+}
+
/* combination : display */
/* combinationpair : display */
/* combinationcontent : mixed */
/* combinationcaption : mixed */
-combination, context|div.combination {
+combination,
+context|div.combination {
display : table ;
margin-top : 0em ;
margin-bottom : 0em ;
}
-combinationpair, context|div.combinationpair {
+combinationpair,
+context|div.combinationpair {
display : table-cell ;
padding-right : 1em ;
}
-combinationcontent, context|div.combinationcontent {
+combinationcontent,
+context|div.combinationcontent {
display : table-row ;
text-align : center ;
}
-combinationcaption, context|div.combinationcaption {
+combinationcaption,
+context|div.combinationcaption {
display : table-row ;
padding-top : 1ex ;
text-align : center ;
}
-
/* list : display */
/* listitem : display */
/* listtag : mixed */
@@ -524,39 +680,81 @@ combinationcaption, context|div.combinationcaption {
/* listdata : mixed */
/* listpage : mixed */
-list, context|div.list {
- display : block ;
+list,
+context|div.list {
+ display : block ;
+ text-align : left ;
}
-listitem[detail="chapter"], context|div.listitem.chapter {
+listitem[detail="chapter"],
+context|div.listitem.chapter {
display : block ;
margin-top : 1em ;
+ margin-left : 5em ;
font-weight : bold ;
}
-listitem[detail="section"], context|div.listitem.section {
- display : block ;
+listitem[detail="section"],
+context|div.listitem.section {
+ display : block ;
+ margin-left : 5em ;
}
-listitem[detail="subsection"], context|div.listitem.subsection {
- display : block ;
- display : inline-block ;
+listitem[detail="subsection"],
+context|div.listitem.subsection {
+ display : block ;
+ margin-left : 5em ;
}
-listtag, context|div.listtag {
- display : inline-block ;
- width : 5em ;
+/*
+listitem[detail="subsection"],
+context|div.listitem.subsection {
+ display : inline-block ;
+ margin-left : -5em ;
}
-listcontent, context|div.listcontent {
- display : inline-block ;
+listitem[detail="subsection"]>listtag,
+context|div.listitem.subsection context|div.listtag {
+ margin-right : 1em ;
}
+*/
-listdata, context|div.listdata {
- display : inline-block ;
+listitem[detail="chapter"]>listtag,
+context|div.listitem.chapter context|div.listtag {
+ display : inline-block ;
+ margin-left : -5em ;
+ float : left ;
+ clear : left ;
+}
+
+listitem[detail="section"]>listtag,
+context|div.listitem.section context|div.listtag {
+ display : inline-block ;
+ margin-left : -5em ;
+ float : left ;
+ clear : left ;
+}
+
+listitem[detail="subsection"]>listtag,
+context|div.listitem.subsection context|div.listtag {
+ display : inline-block ;
+ margin-left : -5em ;
+ float : left ;
+ clear : left ;
+}
+
+listcontent,
+context|div.listcontent {
+ display : inline ;
+}
+
+listdata,
+context|div.listdata {
+ display : inline ;
}
-listpage, context|div.listpage {
+listpage,
+context|div.listpage {
display : none ;
}
@@ -570,59 +768,77 @@ listpage, context|div.listpage {
/* :lang(en) */
-delimited[detail="quotation"]:before, delimitedblock[detail="quotation"]:before,
- context|div.delimited.quotation:before, context|div.delimitedblock.quotation:before {
+delimited[detail="quotation"]:before,
+delimitedblock[detail="quotation"]:before,
+context|div.delimited.quotation:before,
+context|div.delimitedblock.quotation:before {
/* content : "\201C" ; */
font-style : italic ;
}
-delimited[detail="quotation"]:after, delimitedblock[detail="quotation"]:after,
- context|div.delimited.quotation:after, context|div.delimitedblock.quotation:after {
+delimited[detail="quotation"]:after,
+delimitedblock[detail="quotation"]:after,
+context|div.delimited.quotation:after,
+context|div.delimitedblock.quotation:after {
/* content : "\201D" ; */
font-style : italic ;
}
-delimited[detail="quote"]:before, delimitedblock[detail="quote"]:before,
- context|div.delimited.quote:before, context|div.delimitedblock.quote:before {
+delimited[detail="quote"]:before,
+delimitedblock[detail="quote"]:before,
+context|div.delimited.quote:before,
+context|div.delimitedblock.quote:before {
/* content : "\2018" ; */
font-style : italic ;
}
-delimited[detail="quote"]:after, delimitedblock[detail="quote"]:after,
- context|div.delimited.quote:after, context|div.delimitedblock.quote:after {
+delimited[detail="quote"]:after,
+delimitedblock[detail="quote"]:after,
+context|div.delimited.quote:after,
+context|div.delimitedblock.quote:after {
/* content : "\2019" ; */
font-style : italic ;
}
-delimited, context|div.delimited {
+delimited,
+context|div.delimited {
display : inline
}
-delimitedcontent, context|div.delimitedcontent {
+delimitedcontent,
+context|div.delimitedcontent {
display : inline
}
-delimitedsymbol, context|div.delimitedsymbol {
+delimitedsymbol,
+context|div.delimitedsymbol {
display : inline
}
-delimitedblock, context|div.delimitedblock {
+delimitedblock,
+context|div.delimitedblock {
display : block
}
-subsentence:before, subsentence:after, context|div.subsentence:before, context|div.subsentence:after {
+subsentence:before,
+subsentence:after,
+context|div.subsentence:before,
+context|div.subsentence:after {
content : "\2014" ;
}
-subsentence, context|div.subsentence {
+subsentence,
+context|div.subsentence {
display : inline
}
-subsentencecontent, context|div.subsentencecontent {
+subsentencecontent,
+context|div.subsentencecontent {
display : inline
}
-subsentencesymbol, context|div.subsentencesymbol {
+subsentencesymbol,
+context|div.subsentencesymbol {
display : inline
}
@@ -636,36 +852,42 @@ subsentencesymbol, context|div.subsentencesymbol {
/* floattext : mixed */
/* floatcontent : mixed */
-float, context|div.float {
+float,
+context|div.float {
display : block ;
margin-top : 1em ;
margin-bottom : 1em ;
margin-left : 2.5em ;
}
-floatcaption, context|div.floatcaption {
+floatcaption,
+context|div.floatcaption {
display : block ;
margin-top : 0.5em ;
color : rgb(60%,60%,0%) ;
}
-floatlabel, context|div.floatlabel {
+floatlabel,
+context|div.floatlabel {
display : inline-block ;
font-weight : bold ;
margin-right : 0.25em ;
}
-floatnumber, context|div.floatnumber {
+floatnumber,
+context|div.floatnumber {
display : inline ;
font-weight : bold ;
margin-right : 0.25em ;
}
-floattext, context|div.floattext {
+floattext,
+context|div.floattext {
display : inline ;
}
-floatcontent, context|div.floatcontent {
+floatcontent,
+context|div.floatcontent {
}
/* image : mixed */
@@ -679,11 +901,14 @@ floatcontent, context|div.floatcontent {
height : 5.994cm ;
} */
-mpgraphic:before, context|div.mpgraphic:before { /* does not work with empty element */
+mpgraphic:before,
+context|div.mpgraphic:before {
+ /* does not work with empty element */
content : "[runtime metapost graphic]" ;
}
-mpgraphic, context|div.mpgraphic {
+mpgraphic,
+context|div.mpgraphic {
display : inline ;
}
@@ -695,63 +920,73 @@ mpgraphic, context|div.mpgraphic {
/* formulanumber : mixed */
/* formulacontent : display */
-formula, context|div.formula {
+formula,
+context|div.formula {
display : block ;
margin-top : 1em ;
margin-bottom : 1em ;
margin-left : 2.5em ;
}
-subformula, context|div.subformula { /* todo */
+subformula,
+context|div.subformula { /* todo */
display : block ;
margin-top : 1em ;
margin-bottom : 1em ;
margin-left : 2.5em ;
}
-formulaset, context|div.formulaset { /* todo */
+formulaset,
+context|div.formulaset { /* todo */
display : block ;
margin-top : 1em ;
margin-bottom : 1em ;
margin-left : 2.5em ;
}
-formulacaption, context|div.formulacaption { /* todo */
+formulacaption,
+context|div.formulacaption { /* todo */
display : block ;
margin-top : 0.5em ;
color : rgb(60%,60%,0%) ;
}
-formulalabel, context|div.formulalabel {
+formulalabel,
+context|div.formulalabel {
display : inline ;
font-weight : bold ;
margin-right : .25em ;
}
-formulanumber, context|div.formulanumber {
+formulanumber,
+context|div.formulanumber {
display : inline ;
font-weight : bold ;
}
-formulacontent, context|div.formulacontent {
+formulacontent,
+context|div.formulacontent {
display : block ;
}
-link, context|div.link {
+link,
+context|div.link {
display : inline ;
}
/* margintextblock : inline */
/* margintext : inline */
-margintext, context|div.margintext {
+margintext,
+context|div.margintext {
display : block ;
font-weight : bold ;
margin-top : 1em ;
margin-bottom : 1em ;
}
-margintext:before, context|div.margintext:before {
+margintext:before,
+context|div.margintext:before {
content : "\25B6\00A0\00A0" ;
color : rgb(40%,40%,40%) ;
}
@@ -793,15 +1028,18 @@ context|div.math-display {
/* unit : inline */
/* number : inline */
-quantity, context|div.quantity {
+quantity,
+context|div.quantity {
display : inline-block ;
}
-quantity>unit, context|div.quantity>context|div.unit {
+quantity>unit,
+context|div.quantity>context|div.unit {
display : inline ;
}
-quantity>number, context|div.quantity>context|div.number {
+quantity>number,
+context|div.quantity>context|div.number {
display : inline ;
}
@@ -809,24 +1047,28 @@ quantity>number, context|div.quantity>context|div.number {
/* sup : inline */
/* subsup : inline */
-sup, context|div.sup {
+sup,
+context|div.sup {
display : inline-block ;
font-size : xx-small ;
vertical-align : super ;
}
-sub, context|div.sub {
+sub,
+context|div.sub {
display : inline-block ;
font-size : xx-small ;
vertical-align : sub ;
}
-subsup>sup, context|div.subsup>context|div.sup {
+subsup>sup,
+context|div.subsup>context|div.sup {
display : inline ;
vertical-align : top ;
}
-subsup>sub, context|div.subsup>context|div.sub {
+subsup>sub,
+context|div.subsup>context|div.sub {
display : inline ;
vertical-align : bottom ;
}
@@ -840,11 +1082,13 @@ context|div[href]:hover {
/* setups */
-setup, context|div.setup {
+setup,
+context|div.setup {
display : block ;
}
-comment, context|div.comment {
+comment,
+context|div.comment {
background-color : rgb(50%,75%,100%) ;
display : block ;
padding : 1em ;
@@ -855,10 +1099,12 @@ comment, context|div.comment {
/* special */
-c, context|div.c {
+c,
+context|div.c {
display : inline ;
}
-warning, context|div.warning {
+warning,
+context|div.warning {
display : none ;
}
diff --git a/tex/context/base/mkiv/font-con.lua b/tex/context/base/mkiv/font-con.lua
index 327a75537..726004bd3 100644
--- a/tex/context/base/mkiv/font-con.lua
+++ b/tex/context/base/mkiv/font-con.lua
@@ -44,7 +44,7 @@ constructors.namemode = "fullpath" -- will be a function
constructors.version = 1.01
constructors.cache = containers.define("fonts", "constructors", constructors.version, false)
-constructors.privateoffset = 0xF0000 -- 0x10FFFF
+constructors.privateoffset = 0xF0000 -- 0x10FFFF | context also uses privates: 0xE000-0xEFFF
constructors.cacheintex = true -- so we see the original table in fonts.font
@@ -89,6 +89,13 @@ function constructors.scaled(scaledpoints, designsize) -- handles designsize in
end
end
+function constructors.getprivate(tfmdata)
+ local properties = tfmdata.properties
+ local private = properties.private
+ properties.private = private + 1
+ return private
+end
+
--[[ldx--
<p>Beware, the boundingbox is passed as reference so we may not overwrite it
in the process; numbers are of course copies. Here 65536 equals 1pt. (Due to
diff --git a/tex/context/base/mkiv/font-dsp.lua b/tex/context/base/mkiv/font-dsp.lua
index 2d3dce2fb..afeeacb3f 100644
--- a/tex/context/base/mkiv/font-dsp.lua
+++ b/tex/context/base/mkiv/font-dsp.lua
@@ -1497,8 +1497,6 @@ end
-- ValueFormat1 applies to the ValueRecord of the first glyph in each pair. ValueRecords for all first glyphs must use ValueFormat1. If ValueFormat1 is set to zero (0), the corresponding glyph has no ValueRecord and, therefore, should not be repositioned.
-- ValueFormat2 applies to the ValueRecord of the second glyph in each pair. ValueRecords for all second glyphs must use ValueFormat2. If ValueFormat2 is set to null, then the second glyph of the pair is the “next” glyph for which a lookup should be performed.
--- !!!!! this needs checking: when both false, we have no hit so then we might need to fall through
-
function gposhandlers.pair(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofglyphs)
local tableoffset = lookupoffset + offset
setposition(f,tableoffset)
@@ -1511,6 +1509,7 @@ function gposhandlers.pair(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofgly
local sets = readarray(f)
sets = readpairsets(f,tableoffset,sets,format1,format2,mainoffset,getdelta)
coverage = readcoverage(f,tableoffset + coverage)
+ -- local allzero = 0
for index, newindex in next, coverage do
local set = sets[newindex+1]
local hash = { }
@@ -1520,15 +1519,22 @@ function gposhandlers.pair(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofgly
local other = value[1]
local first = value[2]
local second = value[3]
+ -- if first == true and second == true then
+ -- -- upto the next lookup for this combination
+ -- allzero = allzero + 1
+ -- end
if first or second then
hash[other] = { first, second or nil } -- needs checking
else
- hash[other] = nil
+ hash[other] = nil -- what if set, maybe warning
end
end
end
coverage[index] = hash
end
+ -- if allzero > 0 then
+ -- report("%s allzero pairs in %a positioning lookup %a subtype %a",allzero,"pair",lookupid,subtype)
+ -- end
return {
format = "pair",
coverage = coverage,
@@ -1546,6 +1552,7 @@ function gposhandlers.pair(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofgly
classdef1 = readclassdef(f,tableoffset+classdef1,coverage)
classdef2 = readclassdef(f,tableoffset+classdef2,nofglyphs)
local usedcoverage = { }
+ -- local allzero = 0
for g1, c1 in next, classdef1 do
if coverage[g1] then
local l1 = classlist[c1]
@@ -1556,6 +1563,10 @@ function gposhandlers.pair(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofgly
if offsets then
local first = offsets[1]
local second = offsets[2]
+ -- if first == true and second == true then
+ -- -- upto the next lookup for this combination
+ -- allzero = allzero + 1
+ -- end
if first or second then
hash[paired] = { first, second or nil }
else
@@ -1567,6 +1578,9 @@ function gposhandlers.pair(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofgly
end
end
end
+ -- if allzero > 0 then
+ -- report("%s allzero pairs in %a positioning lookup %a subtype %a",allzero,"pair",lookupid,subtype)
+ -- end
return {
format = "pair",
coverage = usedcoverage,
diff --git a/tex/context/base/mkiv/font-ext.lua b/tex/context/base/mkiv/font-ext.lua
index 8e0971ca6..46309c324 100644
--- a/tex/context/base/mkiv/font-ext.lua
+++ b/tex/context/base/mkiv/font-ext.lua
@@ -37,8 +37,12 @@ local registerafmfeature = handlers.afm.features.register
local fontdata = hashes.identifiers
local fontproperties = hashes.properties
+local constructors = fonts.constructors
+local getprivate = constructors.getprivate
+
local allocate = utilities.storage.allocate
local settings_to_array = utilities.parsers.settings_to_array
+local settings_to_hash = utilities.parsers.settings_to_hash
local getparameters = utilities.parsers.getparameters
local gettexdimen = tex.getdimen
local family_font = node.family_font
@@ -46,6 +50,13 @@ local family_font = node.family_font
local setmetatableindex = table.setmetatableindex
local implement = interfaces.implement
+local variables = interfaces.variables
+
+
+local v_background = variables.background
+local v_frame = variables.frame
+local v_empty = variables.empty
+local v_none = variables.none
-- -- -- -- -- --
-- shared
@@ -647,15 +658,13 @@ local function manipulatedimensions(tfmdata,key,value)
depth = (spec[3] or 0) * exheight
end
if width > 0 then
- local resources = tfmdata.resources
local additions = { }
- local private = resources.private
for unicode, old_c in next, characters do
local oldwidth = old_c.width
if oldwidth ~= width then
-- Defining the tables in one step is more efficient
-- than adding fields later.
- private = private + 1
+ local private = getprivate(tfmdata)
local new_c
local commands = {
{ "right", (width - oldwidth) / 2 },
@@ -693,13 +702,12 @@ local function manipulatedimensions(tfmdata,key,value)
end
setmetatableindex(new_c,old_c)
characters[unicode] = new_c
- additions[private] = old_c
+ additions[private] = old_c
end
end
for k, v in next, additions do
characters[k] = v
end
- resources.private = private
elseif height > 0 and depth > 0 then
for unicode, old_c in next, characters do
old_c.height = height
@@ -741,80 +749,172 @@ registerafmfeature(dimensions_specification)
-- local gray = { "pdf", "origin", "/Tr1 gs .75 g" }
-- local black = { "pdf", "origin", "/Tr0 gs 0 g" }
--- sort of obsolete as we now have \showglyphs
+
+-- boundingbox={yes|background|frame|empty|<color>}
local push = { "push" }
local pop = { "pop" }
-local gray = { "pdf", "origin", ".75 g" }
-local black = { "pdf", "origin", "0 g" }
--- local gray = { "pdf", ".75 g" }
--- local black = { "pdf", "0 g" }
-local downcache = { } -- handy for huge cjk fonts
-local rulecache = { } -- handy for huge cjk fonts
+----- gray = { "pdf", "origin", ".75 g .75 G" }
+----- black = { "pdf", "origin", "0 g 0 G" }
+----- gray = { "pdf", ".75 g" }
+----- black = { "pdf", "0 g" }
-setmetatableindex(downcache,function(t,d)
- local v = { "down", d }
- t[d] = v
+-- local bp = number.dimenfactors.bp
+--
+-- local downcache = setmetatableindex(function(t,d)
+-- local v = { "down", d }
+-- t[d] = v
+-- return v
+-- end)
+--
+-- local backcache = setmetatableindex(function(t,h)
+-- local h = h * bp
+-- local v = setmetatableindex(function(t,w)
+-- -- local v = { "rule", h, w }
+-- local v = { "pdf", "origin", formatters["0 0 %0.6F %0.6F re F"](w*bp,h) }
+-- t[w] = v
+-- return v
+-- end)
+-- t[h] = v
+-- return v
+-- end)
+--
+-- local forecache = setmetatableindex(function(t,h)
+-- local h = h * bp
+-- local v = setmetatableindex(function(t,w)
+-- local v = { "pdf", "origin", formatters["%0.6F w 0 0 %0.6F %0.6F re S"](0.25*65536*bp,w*bp,h) }
+-- t[w] = v
+-- return v
+-- end)
+-- t[h] = v
+-- return v
+-- end)
+
+local bp = number.dimenfactors.bp
+local r = 0.25*65536*bp
+
+local backcache = setmetatableindex(function(t,h)
+ local h = h * bp
+ local v = setmetatableindex(function(t,d)
+ local d = d * bp
+ local v = setmetatableindex(function(t,w)
+ local v = { "pdf", "origin", formatters["%0.6F w 0 %0.6F %0.6F %0.6F re f"](r,-d,w*bp,h+d) }
+ t[w] = v
+ return v
+ end)
+ t[d] = v
+ return v
+ end)
+ t[h] = v
return v
end)
-setmetatableindex(rulecache,function(t,h)
- local v = { }
- t[h] = v
- setmetatableindex(v,function(t,w)
- local v = { "rule", h, w }
- t[w] = v
+local forecache = setmetatableindex(function(t,h)
+ local h = h * bp
+ local v = setmetatableindex(function(t,d)
+ local d = d * bp
+ local v = setmetatableindex(function(t,w)
+ -- the frame goes through the boundingbox
+ -- local v = { "pdf", "origin", formatters["[] 0 d 0 J %0.6F w 0 %0.6F %0.6F %0.6F re S"](r,-d,w*bp,h+d) }
+ local v = { "pdf", "origin", formatters["[] 0 d 0 J %0.6F w %0.6F %0.6F %0.6F %0.6F re S"](r,r/2,-d+r/2,w*bp-r,h+d-r) }
+ t[w] = v
+ return v
+ end)
+ t[d] = v
return v
end)
+ t[h] = v
return v
end)
+local startcolor = nil
+local stopcolor = nil
+
local function showboundingbox(tfmdata,key,value)
if value then
- local vfspecials = backends.pdf.tables.vfspecials
- local gray = vfspecials and (vfspecials.rulecolors[value] or vfspecials.rulecolors.palegray) or gray
+ if not backcolors then
+ local vfspecials = backends.pdf.tables.vfspecials
+ startcolor = vfspecials.startcolor
+ stopcolor = vfspecials.stopcolor
+ end
local characters = tfmdata.characters
- local resources = tfmdata.resources
local additions = { }
- local private = resources.private
+ local rulecache = backcache
+ local showchar = true
+ local color = "palegray"
+ if type(value) == "string" then
+ value = settings_to_array(value)
+ for i=1,#value do
+ local v = value[i]
+ if v == v_frame then
+ rulecache = forecache
+ elseif v == v_background then
+ rulecache = backcache
+ elseif v == v_empty then
+ showchar = false
+ elseif v == v_none then
+ color = nil
+ else
+ color = v
+ end
+ end
+ end
+ local gray = color and startcolor(color) or nil
+ local black = gray and stopcolor or nil
for unicode, old_c in next, characters do
- private = private + 1
- local width = old_c.width or 0
- local height = old_c.height or 0
- local depth = old_c.depth or 0
- local new_c
- if depth == 0 then
- new_c = {
- width = width,
- height = height,
- commands = {
- push,
- gray,
- rulecache[height][width],
- black,
- pop,
- { "slot", 1, private },
- -- { "slot", 0, private },
- }
+ local private = getprivate(tfmdata)
+ local width = old_c.width or 0
+ local height = old_c.height or 0
+ local depth = old_c.depth or 0
+ local char = showchar and { "slot", 1, private } or nil -- { "slot", 0, private }
+ -- local new_c
+ -- if depth == 0 then
+ -- new_c = {
+ -- width = width,
+ -- height = height,
+ -- commands = {
+ -- push,
+ -- gray,
+ -- rulecache[height][width],
+ -- black,
+ -- pop,
+ -- char,
+ -- }
+ -- }
+ -- else
+ -- new_c = {
+ -- width = width,
+ -- height = height,
+ -- depth = depth,
+ -- commands = {
+ -- push,
+ -- downcache[depth],
+ -- gray,
+ -- rulecache[height+depth][width],
+ -- black,
+ -- pop,
+ -- char,
+ -- }
+ -- }
+ -- end
+ local rule = rulecache[height][depth][width]
+ local new_c = {
+ width = width,
+ height = height,
+ depth = depth,
+ commands = gray and {
+ -- push,
+ gray,
+ rule,
+ black,
+ -- pop,
+ char,
+ } or {
+ rule,
+ char,
}
- else
- new_c = {
- width = width,
- height = height,
- depth = depth,
- commands = {
- push,
- downcache[depth],
- gray,
- rulecache[height+depth][width],
- black,
- pop,
- { "slot", 1, private },
- -- { "slot", 0, private },
- }
- }
- end
+ }
setmetatableindex(new_c,old_c)
characters[unicode] = new_c
additions[private] = old_c
@@ -822,7 +922,6 @@ local function showboundingbox(tfmdata,key,value)
for k, v in next, additions do
characters[k] = v
end
- resources.private = private
end
end
@@ -1115,7 +1214,7 @@ do
end
end
- fonts.constructors.newfeatures.otf.register {
+ constructors.newfeatures.otf.register {
name = "extraprivates",
description = "extra privates",
default = true,
@@ -1251,15 +1350,13 @@ do -- another hack for a crappy font
local function additalictowidth(tfmdata,key,value)
local characters = tfmdata.characters
- local resources = tfmdata.resources
local additions = { }
- local private = resources.private
for unicode, old_c in next, characters do
-- maybe check for math
local oldwidth = old_c.width
local olditalic = old_c.italic
if olditalic and olditalic ~= 0 then
- private = private + 1
+ local private = getprivate(tfmdata)
local new_c = {
width = oldwidth + olditalic,
height = old_c.height,
@@ -1279,7 +1376,6 @@ do -- another hack for a crappy font
for k, v in next, additions do
characters[k] = v
end
- resources.private = private
end
registerotffeature {
diff --git a/tex/context/base/mkiv/font-ini.lua b/tex/context/base/mkiv/font-ini.lua
index 7ac8f218b..e0ad46cac 100644
--- a/tex/context/base/mkiv/font-ini.lua
+++ b/tex/context/base/mkiv/font-ini.lua
@@ -10,22 +10,22 @@ if not modules then modules = { } end modules ['font-ini'] = {
<p>Not much is happening here.</p>
--ldx]]--
-local allocate = utilities.storage.allocate
+local allocate = utilities.storage.allocate
-fonts = fonts or { }
-local fonts = fonts
+fonts = fonts or { }
+local fonts = fonts
-fonts.hashes = { identifiers = allocate() }
+fonts.hashes = { identifiers = allocate() }
-fonts.tables = fonts.tables or { }
-fonts.helpers = fonts.helpers or { }
-fonts.tracers = fonts.tracers or { } -- for the moment till we have move to moduledata
-fonts.specifiers = fonts.specifiers or { } -- in format !
+fonts.tables = fonts.tables or { }
+fonts.helpers = fonts.helpers or { }
+fonts.tracers = fonts.tracers or { } -- for the moment till we have move to moduledata
+fonts.specifiers = fonts.specifiers or { } -- in format !
-fonts.analyzers = { } -- not needed here
-fonts.readers = { }
-fonts.definers = { methods = { } }
-fonts.loggers = { register = function() end }
+fonts.analyzers = { } -- not needed here
+fonts.readers = { }
+fonts.definers = { methods = { } }
+fonts.loggers = { register = function() end }
if context then
fontloader = nil
diff --git a/tex/context/base/mkiv/font-one.lua b/tex/context/base/mkiv/font-one.lua
index d9b9c65df..63ed610ed 100644
--- a/tex/context/base/mkiv/font-one.lua
+++ b/tex/context/base/mkiv/font-one.lua
@@ -41,6 +41,8 @@ local derivetable = table.derive
local findbinfile = resolvers.findbinfile
+local privateoffset = fonts.constructors and fonts.constructors.privateoffset or 0xF0000 -- 0x10FFFF
+
local definers = fonts.definers
local readers = fonts.readers
local constructors = fonts.constructors
@@ -139,7 +141,7 @@ local function enhance_unify_names(data, filename)
local unicodevector = fonts.encodings.agl.unicodes -- loaded runtime in context
local unicodes = { }
local names = { }
- local private = constructors.privateoffset
+ local private = data.private or privateoffset
local descriptions = data.descriptions
for name, blob in next, data.characters do
local code = unicodevector[name] -- or characters.name_to_unicode[name]
@@ -179,13 +181,13 @@ local function enhance_unify_names(data, filename)
end
end
data.characters = nil
+ data.private = private
local resources = data.resources
- local filename = resources.filename or file.removesuffix(file.basename(filename))
+ local filename = resources.filename or file.removesuffix(file.basename(filename))
resources.filename = resolvers.unresolve(filename) -- no shortcut
resources.unicodes = unicodes -- name to unicode
- resources.marks = { } -- todo
- -- resources.names = names -- name to index
- resources.private = private
+ resources.marks = { } -- todo
+ -- resources.names = names -- name to index
end
local everywhere = { ["*"] = { ["*"] = true } } -- or: { ["*"] = { "*" } }
@@ -587,6 +589,7 @@ local function copytotfm(data)
properties.fullname = fullname
properties.psname = fullname
properties.name = filename or fullname or fontname
+ properties.private = properties.private or data.private or privateoffset
--
if next(characters) then
return {
diff --git a/tex/context/base/mkiv/font-otl.lua b/tex/context/base/mkiv/font-otl.lua
index 1cdbb450a..9a3bcb9a9 100644
--- a/tex/context/base/mkiv/font-otl.lua
+++ b/tex/context/base/mkiv/font-otl.lua
@@ -79,6 +79,8 @@ local cleanup = 0 -- mk: 0=885M 1=765M 2=735M (regular run 730M)
local syncspace = true
local forcenotdef = false
+local privateoffset = fonts.constructors and fonts.constructors.privateoffset or 0xF0000 -- 0x10FFFF
+
local applyruntimefixes = fonts.treatments and fonts.treatments.applyfixes
local wildcard = "*"
@@ -285,7 +287,7 @@ local function copytotfm(data,cache_id)
end
if mathspecs then
for unicode, character in next, characters do
- local d = descriptions[unicode]
+ local d = descriptions[unicode] -- we could use parent table here
local m = d.math
if m then
-- watch out: luatex uses horiz_variants for the parts
@@ -448,6 +450,8 @@ local function copytotfm(data,cache_id)
-- properties.name = specification.name
-- properties.sub = specification.sub
--
+ properties.private = properties.private or data.private or privateoffset
+ --
return {
characters = characters,
descriptions = descriptions,
diff --git a/tex/context/base/mkiv/font-oto.lua b/tex/context/base/mkiv/font-oto.lua
index 0009d7f5f..031bab419 100644
--- a/tex/context/base/mkiv/font-oto.lua
+++ b/tex/context/base/mkiv/font-oto.lua
@@ -30,6 +30,8 @@ local registerotffeature = otffeatures.register
otf.defaultbasealternate = "none" -- first last
+local getprivate = fonts.constructors.getprivate
+
local wildcard = "*"
local default = "dflt"
@@ -165,13 +167,11 @@ end
-- messy if we need to take that into account.
local function makefake(tfmdata,name,present)
- local resources = tfmdata.resources
- local private = resources.private
+ local private = getprivate(tfmdata)
local character = { intermediate = true, ligatures = { } }
resources.unicodes[name] = private
tfmdata.characters[private] = character
tfmdata.descriptions[private] = { name = name }
- resources.private = private + 1
present[name] = private
return character
end
@@ -304,7 +304,6 @@ local function preparesubstitutions(tfmdata,feature,value,validlookups,lookuplis
local nofligatures = #ligatures
if nofligatures > 0 then
-
local characters = tfmdata.characters
local present = { }
local done = trace_baseinit and trace_ligatures and { }
diff --git a/tex/context/base/mkiv/font-otr.lua b/tex/context/base/mkiv/font-otr.lua
index bff81aa87..f79e41b22 100644
--- a/tex/context/base/mkiv/font-otr.lua
+++ b/tex/context/base/mkiv/font-otr.lua
@@ -1512,7 +1512,7 @@ end
formatreaders[13] = function(f,fontdata,offset)
--
- -- this fector is only used for simple fallback fonts
+ -- this vector is only used for simple fallback fonts
--
setposition(f,offset+2+2+4+4) -- skip format reserved length language
local mapping = fontdata.mapping
diff --git a/tex/context/base/mkiv/font-ots.lua b/tex/context/base/mkiv/font-ots.lua
index 54cacc543..1dca8962c 100644
--- a/tex/context/base/mkiv/font-ots.lua
+++ b/tex/context/base/mkiv/font-ots.lua
@@ -892,7 +892,7 @@ function handlers.gpos_pair(head,start,dataset,sequence,kerns,rlmode,step,i,inje
end
start = snext -- cf spec
elseif forcepairadvance then
- start = snext -- for testing
+ start = snext -- for testing, not cf spec
end
return head, start, true
elseif krn ~= 0 then
@@ -1490,7 +1490,7 @@ function chainprocs.gpos_pair(head,start,stop,dataset,sequence,currentlookup,rlm
end
start = snext -- cf spec
elseif forcepairadvance then
- start = snext -- for testing
+ start = snext -- for testing, not cf spec
end
return head, start, true
elseif krn ~= 0 then
@@ -4887,10 +4887,6 @@ do
local sequences = sequencelists[font] -- temp hack
- if not sequencelists then
- return head, false
- end
-
nesting = nesting + 1
if nesting == 1 then
@@ -5173,6 +5169,104 @@ do
return head, done
end
+ -- This is not an official helpoer and used for tracing experiments. It can be changed as I like
+ -- at any moment. At some point it might be used in a module that can help font development.
+
+ function otf.datasetpositionprocessor(head,font,direction,dataset)
+
+ currentfont = font
+ tfmdata = fontdata[font]
+ descriptions = tfmdata.descriptions -- only needed in gref so we could pass node there instead
+ characters = tfmdata.characters -- but this branch is not entered that often anyway
+ local resources = tfmdata.resources
+ marks = resources.marks
+ classes = resources.classes
+ threshold,
+ factor = getthreshold(font)
+ checkmarks = tfmdata.properties.checkmarks
+
+ if type(dataset) == "number" then
+ dataset = otfdataset(tfmdata,font,0)[dataset]
+ end
+
+ local sequence = dataset[3] -- sequences[s] -- also dataset[5]
+ local typ = sequence.type
+ -- local gpossing = typ == "gpos_single" or typ == "gpos_pair" -- store in dataset
+
+ -- gpos_contextchain gpos_context
+
+ -- if not gpossing then
+ -- return head, false
+ -- end
+
+ local handler = handlers[typ] -- store in dataset
+ local steps = sequence.steps
+ local nofsteps = sequence.nofsteps
+
+ local head = tonut(head)
+ local done = false
+ local dirstack = { } -- could move outside function but we can have local runs
+ local start = head
+ local initialrl = direction == "TRT" and -1 or 0
+ local rlmode = initialrl
+ local rlparmode = initialrl
+ local topstack = 0
+ local merged = steps.merged
+
+ -- local matches = false
+ local position = 0
+
+ while start do
+ local char, id = ischar(start,font)
+ if char then
+ position = position + 1
+ local m = merged[char]
+ if m then
+ for i=m[1],m[2] do
+ local step = steps[i]
+ local lookupcache = step.coverage
+ local lookupmatch = lookupcache[char]
+ if lookupmatch then
+ local ok
+ head, start, ok = handler(head,start,dataset,sequence,lookupmatch,rlmode,step,i)
+ if ok then
+ -- if matches then
+ -- matches[position] = i
+ -- else
+ -- matches = { [position] = i }
+ -- end
+ break
+ elseif not start then
+ break
+ end
+ end
+ end
+ if start then
+ start = getnext(start)
+ end
+ else
+ start = getnext(start)
+ end
+ elseif char == false then
+ start = getnext(start)
+ elseif id == glue_code then
+ start = getnext(start)
+ elseif id == math_code then
+ start = getnext(end_of_math(start))
+ elseif id == dir_code then
+ start, topstack, rlmode = txtdirstate(start,dirstack,topstack,rlparmode)
+ elseif id == localpar_code then
+ start, rlparmode, rlmode = pardirstate(start)
+ else
+ start = getnext(start)
+ end
+ end
+
+ return tonode(head) -- , matches
+ end
+
+ -- end of experiment
+
end
-- so far
diff --git a/tex/context/base/mkiv/font-oup.lua b/tex/context/base/mkiv/font-oup.lua
index 6084d1941..5ad7c1c6f 100644
--- a/tex/context/base/mkiv/font-oup.lua
+++ b/tex/context/base/mkiv/font-oup.lua
@@ -30,8 +30,8 @@ local f_index = formatters["I%05X"]
local f_character_y = formatters["%C"]
local f_character_n = formatters["[ %C ]"]
-local check_duplicates = true -- can become an option (pseudo feature) / aways needed anyway
-local check_soft_hyphen = false -- can become an option (pseudo feature) / needed for tagging
+local check_duplicates = true -- can become an option (pseudo feature) / aways needed anyway
+local check_soft_hyphen = true -- can become an option (pseudo feature) / needed for tagging
directives.register("otf.checksofthyphen",function(v)
check_soft_hyphen = v
@@ -371,6 +371,7 @@ local function copyduplicates(fontdata)
local duplicates = resources.duplicates
if check_soft_hyphen then
-- ebgaramond has a zero width empty soft hyphen
+ -- antykwatorunsks lacks a soft hyphen
local ds = descriptions[0xAD]
if not ds or ds.width == 0 then
if ds then
@@ -633,7 +634,6 @@ local function unifymissing(fontdata)
require("font-agl")
end
local unicodes = { }
- local private = fontdata.private
local resources = fontdata.resources
resources.unicodes = unicodes
for unicode, d in next, fontdata.descriptions do
@@ -2261,65 +2261,95 @@ end
local function checkkerns(lookup)
local steps = lookup.steps
local nofsteps = lookup.nofsteps
+ local kerned = 0
for i=1,nofsteps do
local step = steps[i]
if step.format == "pair" then
local coverage = step.coverage
local kerns = true
for g1, d1 in next, coverage do
- if d1[1] ~= 0 or d1[2] ~= 0 or d1[4] ~= 0 then
+ if d1 == true then
+ -- all zero
+ elseif not d1 then
+ -- null
+ elseif d1[1] ~= 0 or d1[2] ~= 0 or d1[4] ~= 0 then
kerns = false
break
end
end
if kerns then
report("turning pairs of step %a of %a lookup %a into kerns",i,lookup.type,lookup.name)
+ local c = { }
for g1, d1 in next, coverage do
- coverage[g1] = d1[3]
+ if d1 and d1 ~= true then
+ c[g1] = d1[3]
+ end
end
+ step.coverage = c
step.format = "kern"
+ kerned = kerned + 1
end
end
end
+ return kerned
end
+-- There are several options to optimize but we have this somewhat fuzzy aspect of
+-- advancing (depending on the second of a pair) so we need to retain that information.
+--
+-- We can have:
+--
+-- true, nil|false
+--
+-- which effectively means: nothing to be done and advance to next (so not next of
+-- next) and because coverage should be not overlapping we can wipe these. However,
+-- checking for (true,nil) (false,nil) and omitting them doesn't gain much.
+
+-- Because we pack we cannot mix tables and numbers so we can only turn a whole set in
+-- format kern instead of pair.
+
local function checkpairs(lookup)
local steps = lookup.steps
local nofsteps = lookup.nofsteps
local kerned = 0
- for i=1,nofsteps do
- local step = steps[i]
- if step.format == "pair" then
- local coverage = step.coverage
- local kerns = true
- for g1, d1 in next, coverage do
- for g2, d2 in next, d1 do
- if d2[2] then
- --- true or { a, b, c, d }
- kerns = false
- break
- else
- local v = d2[1]
- if v == true then
- -- all zero
- elseif v and (v[1] ~= 0 or v[2] ~= 0 or v[4] ~= 0) then
- kerns = false
- break
- end
+
+ local function onlykerns(step)
+ local coverage = step.coverage
+ for g1, d1 in next, coverage do
+ for g2, d2 in next, d1 do
+ if d2[2] then
+ --- true or { a, b, c, d }
+ return false
+ else
+ local v = d2[1]
+ if v == true then
+ -- all zero
+ elseif v and (v[1] ~= 0 or v[2] ~= 0 or v[4] ~= 0) then
+ return false
end
end
end
- if kerns then
+ end
+ return coverage
+ end
+
+ for i=1,nofsteps do
+ local step = steps[i]
+ if step.format == "pair" then
+ local coverage = onlykerns(step)
+ if coverage then
report("turning pairs of step %a of %a lookup %a into kerns",i,lookup.type,lookup.name)
for g1, d1 in next, coverage do
+ local d = { }
for g2, d2 in next, d1 do
local v = d2[1]
if v == true then
- d1[g2] = nil
+ -- ignore -- d1[g2] = nil
elseif v then
- d1[g2] = v[3]
+ d[g2] = v[3] -- d1[g2] = v[3]
end
end
+ coverage[g1] = d
end
step.format = "kern"
kerned = kerned + 1
@@ -2345,9 +2375,9 @@ function readers.compact(data)
for i=1,#lookups do
local lookup = lookups[i]
local nofsteps = lookup.nofsteps
+ local kind = lookup.type
allsteps = allsteps + nofsteps
if nofsteps > 1 then
- local kind = lookup.type
local merg = merged
if kind == "gsub_single" or kind == "gsub_alternate" or kind == "gsub_multiple" then
merged = merged + mergesteps_1(lookup)
@@ -2355,7 +2385,7 @@ function readers.compact(data)
merged = merged + mergesteps_4(lookup)
elseif kind == "gpos_single" then
merged = merged + mergesteps_1(lookup,true)
- checkkerns(lookup)
+ kerned = kerned + checkkerns(lookup)
elseif kind == "gpos_pair" then
merged = merged + mergesteps_2(lookup,true)
kerned = kerned + checkpairs(lookup)
@@ -2367,6 +2397,12 @@ function readers.compact(data)
if merg ~= merged then
lookup.merged = true
end
+ elseif nofsteps == 1 then
+ if kind == "gpos_single" then
+ kerned = kerned + checkkerns(lookup)
+ elseif kind == "gpos_pair" then
+ kerned = kerned + checkpairs(lookup)
+ end
end
end
else
diff --git a/tex/context/base/mkiv/font-tfm.lua b/tex/context/base/mkiv/font-tfm.lua
index 6584190ce..109efefa6 100644
--- a/tex/context/base/mkiv/font-tfm.lua
+++ b/tex/context/base/mkiv/font-tfm.lua
@@ -244,6 +244,8 @@ local function read_from_tfm(specification)
--
constructors.enhanceparameters(parameters) -- official copies for us
--
+ properties.private = properties.private or tfmdata.private or privateoffset
+ --
if newtfmdata then
--
-- We do nothing as we assume flat tfm files. It would become real messy
@@ -436,7 +438,7 @@ do
local originals = tfmdata.characters
local indices = { }
local parentfont = { "font", 1 }
- local private = fonts.constructors.privateoffset
+ local private = tfmdata or fonts.constructors.privateoffset
local reported = encdone[tfmfile][encfile]
-- create characters table
@@ -514,6 +516,7 @@ do
tfmdata.tounicode = 1
tfmdata.embedding = "subset"
tfmdata.usedbitmap = bitmap and virtualid
+ tfmdata.private = private
return tfmdata
end
diff --git a/tex/context/base/mkiv/grph-rul.lua b/tex/context/base/mkiv/grph-rul.lua
index e3d1d8963..6d05270a4 100644
--- a/tex/context/base/mkiv/grph-rul.lua
+++ b/tex/context/base/mkiv/grph-rul.lua
@@ -127,13 +127,17 @@ end
do
- local f_rectangle = formatters["%F w %F %F %F %F re %s"]
+ -- maybe %.6F
+
+ local f_rectangle = formatters["%.6F w %.6F %.6F %.6F %.6F re %s"]
+ local f_baselined = formatters["%.6F w %.6F %.6F %.6F %.6F re s %.6F %.6F m %.6F %.6F l s"]
+ local f_dashlined = formatters["%.6F w %.6F %.6F %.6F %.6F re s [%.6F %.6F] 2 d %.6F %.6F m %.6F %.6F l s"]
local f_radtangle = formatters[ [[
- %F w %F %F m
- %F %F l %F %F %F %F y
- %F %F l %F %F %F %F y
- %F %F l %F %F %F %F y
- %F %F l %F %F %F %F y
+ %.6F w %.6F %.6F m
+ %.6F %.6F l %.6F %.6F %.6F %.6F y
+ %.6F %.6F l %.6F %.6F %.6F %.6F y
+ %.6F %.6F l %.6F %.6F %.6F %.6F y
+ %.6F %.6F l %.6F %.6F %.6F %.6F y
h %s
]] ]
@@ -160,6 +164,30 @@ do
ruleactions.draw = ruleactions.fill
ruleactions.stroke = ruleactions.fill
+ local getwhd = nodes.nuts.getwhd
+
+ ruleactions.box = function(p,h,v,i,n)
+ local w, h, d = getwhd(n)
+ local line = p.line or 65536
+ local l = line *bpfactor
+ local w = w * bpfactor
+ local h = h * bpfactor
+ local d = d * bpfactor
+ local o = l / 2
+ if (d >= 0 and h >= 0) or (d <= 0 and h <= 0) then
+ local dashed = tonumber(p.dashed)
+ if dashed and dashed > 5*line then
+ dashed = dashed * bpfactor
+ local delta = (w - 2*dashed*floor(w/(2*dashed)))/2
+ pdfprint("direct",f_dashlined(l,o,o,w-l,h+d-l,dashed,dashed,delta,d,w-delta,d))
+ else
+ pdfprint("direct",f_baselined(l,o,o,w-l,h+d-l,0,d,w,d))
+ end
+ else
+ pdfprint("direct",f_rectangle(l,o,o,w-l,h+d-l))
+ end
+ end
+
end
interfaces.implement {
diff --git a/tex/context/base/mkiv/lpdf-col.lua b/tex/context/base/mkiv/lpdf-col.lua
index a1006f773..fc251fddc 100644
--- a/tex/context/base/mkiv/lpdf-col.lua
+++ b/tex/context/base/mkiv/lpdf-col.lua
@@ -24,7 +24,7 @@ local registrations = backends.pdf.registrations
local nodepool = nodes.nuts.pool
local register = nodepool.register
-local pdfliteral = nodepool.pdfliteral
+local pdfpageliteral = nodepool.pdfpageliteral
local pdfconstant = lpdf.constant
local pdfdictionary = lpdf.dictionary
@@ -42,13 +42,20 @@ local adddocumentcolorspace = lpdf.adddocumentcolorspace
local adddocumentextgstate = lpdf.adddocumentextgstate
local colors = attributes.colors
-local transparencies = attributes.transparencies
-local registertransparancy = transparencies.register
local registercolor = colors.register
local colorsvalue = colors.value
-local transparenciesvalue = transparencies.value
local forcedmodel = colors.forcedmodel
local getpagecolormodel = colors.getpagecolormodel
+local colortoattributes = colors.toattributes
+
+local transparencies = attributes.transparencies
+local registertransparancy = transparencies.register
+local transparenciesvalue = transparencies.value
+local transparencytoattribute = transparencies.toattribute
+
+local unsetvalue = attributes.unsetvalue
+
+local setmetatableindex = table.setmetatableindex
local c_transparency = pdfconstant("Transparency")
@@ -81,7 +88,7 @@ local transparencygroups = { }
lpdf.colorspaceconstants = colorspaceconstants
lpdf.transparencygroups = transparencygroups
-table.setmetatableindex(transparencygroups, function(transparencygroups,colormodel)
+setmetatableindex(transparencygroups, function(transparencygroups,colormodel)
local cs = colorspaceconstants[colormodel]
if cs then
local d = pdfdictionary {
@@ -116,26 +123,26 @@ lpdf.registerpagefinalizer(addpagegroup,3,"pagegroup")
-- color injection
function nodeinjections.rgbcolor(r,g,b)
- return register(pdfliteral(f_rgb(r,g,b,r,g,b)))
+ return register(pdfpageliteral(f_rgb(r,g,b,r,g,b)))
end
function nodeinjections.cmykcolor(c,m,y,k)
- return register(pdfliteral(f_cmyk(c,m,y,k,c,m,y,k)))
+ return register(pdfpageliteral(f_cmyk(c,m,y,k,c,m,y,k)))
end
function nodeinjections.graycolor(s) -- caching 0/1 does not pay off
- return register(pdfliteral(f_gray(s,s)))
+ return register(pdfpageliteral(f_gray(s,s)))
end
function nodeinjections.spotcolor(n,f,d,p)
if type(p) == "string" then
p = gsub(p,","," ") -- brr misuse of spot
end
- return register(pdfliteral(f_spot(n,n,p,p)))
+ return register(pdfpageliteral(f_spot(n,n,p,p)))
end
function nodeinjections.transparency(n)
- return register(pdfliteral(f_tr_gs(n)))
+ return register(pdfpageliteral(f_tr_gs(n)))
end
-- a bit weird but let's keep it here for a while
@@ -154,7 +161,7 @@ function nodeinjections.effect(effect,stretch,rulethickness)
-- always, no zero test (removed)
rulethickness = bp * rulethickness
effect = effects[effect] or effects['normal']
- return register(pdfliteral(f_effect(stretch,rulethickness,effect))) -- watch order
+ return register(pdfpageliteral(f_effect(stretch,rulethickness,effect))) -- watch order
end
-- spot- and indexcolors
@@ -701,31 +708,113 @@ function lpdf.finishtransparencycode()
end
end
--- this will move to lpdf-spe.lua
+-- this will move to lpdf-spe.lua an dwe then can also add a metatable with
+-- normal context colors
+
+do
+
+ local pdfcolor = lpdf.color
+ local pdftransparency = lpdf.transparency
+
+ local f_slant = formatters["q 1 0 %F 1 0 0 cm"]
+
+ -- local fillcolors = {
+ -- red = { "pdf", "origin", "1 0 0 rg" },
+ -- green = { "pdf", "origin", "0 1 0 rg" },
+ -- blue = { "pdf", "origin", "0 0 1 rg" },
+ -- gray = { "pdf", "origin", ".5 g" },
+ -- black = { "pdf", "origin", "0 g" },
+ -- palered = { "pdf", "origin", "1 .75 .75 rg" },
+ -- palegreen = { "pdf", "origin", ".75 1 .75 rg" },
+ -- paleblue = { "pdf", "origin", ".75 .75 1 rg" },
+ -- palegray = { "pdf", "origin", ".75 g" },
+ -- }
+ --
+ -- local strokecolors = {
+ -- red = { "pdf", "origin", "1 0 0 RG" },
+ -- green = { "pdf", "origin", "0 1 0 RG" },
+ -- blue = { "pdf", "origin", "0 0 1 RG" },
+ -- gray = { "pdf", "origin", ".5 G" },
+ -- black = { "pdf", "origin", "0 G" },
+ -- palered = { "pdf", "origin", "1 .75 .75 RG" },
+ -- palegreen = { "pdf", "origin", ".75 1 .75 RG" },
+ -- paleblue = { "pdf", "origin", ".75 .75 1 RG" },
+ -- palegray = { "pdf", "origin", ".75 G" },
+ -- }
+ --
+ -- backends.pdf.tables.vfspecials = allocate { -- todo: distinguish between glyph and rule color
+ --
+ -- red = { "pdf", "origin", "1 0 0 rg 1 0 0 RG" },
+ -- green = { "pdf", "origin", "0 1 0 rg 0 1 0 RG" },
+ -- blue = { "pdf", "origin", "0 0 1 rg 0 0 1 RG" },
+ -- gray = { "pdf", "origin", ".75 g .75 G" },
+ -- black = { "pdf", "origin", "0 g 0 G" },
+ --
+ -- -- rulecolors = fillcolors,
+ -- -- fillcolors = fillcolors,
+ -- -- strokecolors = strokecolors,
+ --
+ -- startslant = function(a) return { "pdf", "origin", f_slant(a) } end,
+ -- stopslant = { "pdf", "origin", "Q" },
+ --
+ -- }
+
+ local slants = setmetatableindex(function(t,k)
+ local v = { "pdf", "origin", f_slant(a) }
+ t[k] = v
+ return k
+ end)
+
+ local function startslant(a)
+ return slants[a]
+ end
-local f_slant = formatters["q 1 0 %F 1 0 0 cm"]
+ local c_cache = setmetatableindex(function(t,m)
+ local v = setmetatableindex(function(t,c)
+ local p = { "pdf", "origin", "q " .. pdfcolor(m,c) }
+ t[c] = p
+ return p
+ end)
+ t[m] = v
+ return v
+ end)
-backends.pdf.tables.vfspecials = allocate { -- todo: distinguish between glyph and rule color
+ -- we inherit the outer transparency
+
+ local t_cache = setmetatableindex(function(t,transparency)
+ local p = pdftransparency(transparency)
+ local v = setmetatableindex(function(t,colormodel)
+ local v = setmetatableindex(function(t,color)
+ local v = { "pdf", "origin", "q " .. pdfcolor(colormodel,color) .. " " .. p }
+ t[color] = v
+ return v
+ end)
+ t[colormodel] = v
+ return v
+ end)
+ t[transparency] = v
+ return v
+ end)
- red = { "pdf", "origin", "1 0 0 rg 1 0 0 RG" },
- green = { "pdf", "origin", "0 1 0 rg 0 1 0 RG" },
- blue = { "pdf", "origin", "0 0 1 rg 0 0 1 RG" },
- gray = { "pdf", "origin", ".75 g .75 G" },
- black = { "pdf", "origin", "0 g 0 G" },
+ local function startcolor(k)
+ local m, c = colortoattributes(k)
+ local t = transparencytoattribute(k)
+ if t then
+ return t_cache[t][m][c]
+ else
+ return c_cache[m][c]
+ end
+ end
- rulecolors = {
- red = { "pdf", "origin", '1 0 0 rg' },
- green = { "pdf", "origin", '0 1 0 rg' },
- blue = { "pdf", "origin", '0 0 1 rg' },
- gray = { "pdf", "origin", '.5 g' },
- black = { "pdf", "origin", '0 g' },
- palered = { "pdf", "origin", '1 .75 .75 rg' },
- palegreen = { "pdf", "origin", '.75 1 .75 rg' },
- paleblue = { "pdf", "origin", '.75 .75 1 rg' },
- palegray = { "pdf", "origin", '.75 g' },
- },
+ backends.pdf.tables.vfspecials = allocate { -- todo: distinguish between glyph and rule color
- startslant = function(a) return { "pdf", "origin", f_slant(a) } end,
- stopslant = { "pdf", "origin", "Q" },
+ startcolor = startcolor,
+ -- stopcolor = { "pdf", "origin", "0 g 0 G Q" },
+ stopcolor = { "pdf", "origin", "Q" },
-}
+ startslant = startslant,
+ stopslant = { "pdf", "origin", "Q" },
+
+ }
+
+end
diff --git a/tex/context/base/mkiv/lpdf-ini.lua b/tex/context/base/mkiv/lpdf-ini.lua
index 635f365a9..c5480d548 100644
--- a/tex/context/base/mkiv/lpdf-ini.lua
+++ b/tex/context/base/mkiv/lpdf-ini.lua
@@ -1203,7 +1203,7 @@ do
local f_actual_text = formatters["/Span <</ActualText %s >> BDC"]
local context = context
- local pdfdirect = nodes.pool.pdfdirect
+ local pdfdirect = nodes.pool.pdfdirectliteral
-- todo: use tounicode from the font mapper
diff --git a/tex/context/base/mkiv/lpdf-mis.lua b/tex/context/base/mkiv/lpdf-mis.lua
index 9d903ce96..7eb4829f8 100644
--- a/tex/context/base/mkiv/lpdf-mis.lua
+++ b/tex/context/base/mkiv/lpdf-mis.lua
@@ -29,7 +29,7 @@ local nuts = nodes.nuts
local copy_node = nuts.copy
local nodepool = nuts.pool
-local pdfliteral = nodepool.pdfliteral
+local pdfpageliteral = nodepool.pdfpageliteral
local register = nodepool.register
local pdfdictionary = lpdf.dictionary
@@ -69,10 +69,10 @@ local v_paper = variables.paper
local v_attachment = variables.attachment
local v_layer = variables.layer
-local positive = register(pdfliteral("/GSpositive gs"))
-local negative = register(pdfliteral("/GSnegative gs"))
-local overprint = register(pdfliteral("/GSoverprint gs"))
-local knockout = register(pdfliteral("/GSknockout gs"))
+local positive = register(pdfpageliteral("/GSpositive gs"))
+local negative = register(pdfpageliteral("/GSnegative gs"))
+local overprint = register(pdfpageliteral("/GSoverprint gs"))
+local knockout = register(pdfpageliteral("/GSknockout gs"))
local function initializenegative()
local a = pdfarray { 0, 1 }
diff --git a/tex/context/base/mkiv/lpdf-nod.lua b/tex/context/base/mkiv/lpdf-nod.lua
index 985d05a82..ca4c51c59 100644
--- a/tex/context/base/mkiv/lpdf-nod.lua
+++ b/tex/context/base/mkiv/lpdf-nod.lua
@@ -24,10 +24,10 @@ local new_node = nuts.new
local nodepool = nuts.pool
local register = nodepool.register
-local pdforiginliteral = register(new_node("whatsit", whatsitcodes.pdfliteral)) setfield(pdforiginliteral,"mode",0) -- set_origin_code
-local pdfpageliteral = register(new_node("whatsit", whatsitcodes.pdfliteral)) setfield(pdfpageliteral, "mode",1) -- page_code
-local pdfdirectliteral = register(new_node("whatsit", whatsitcodes.pdfliteral)) setfield(pdfdirectliteral,"mode",2) -- direct_code
-local pdfrawliteral = register(new_node("whatsit", whatsitcodes.pdfliteral)) setfield(pdfrawliteral, "mode",3) -- raw_code
+local pdforiginliteral = register(new_node("whatsit", whatsitcodes.pdfliteral)) setfield(pdforiginliteral,"mode",0) -- set_origin_code
+local pdfpageliteral = register(new_node("whatsit", whatsitcodes.pdfliteral)) setfield(pdfpageliteral, "mode",1) -- page_code
+local pdfdirectliteral = register(new_node("whatsit", whatsitcodes.pdfliteral)) setfield(pdfdirectliteral,"mode",2) -- direct_code
+local pdfrawliteral = register(new_node("whatsit", whatsitcodes.pdfliteral)) setfield(pdfrawliteral, "mode",3) -- raw_code
local pdfsave = register(new_node("whatsit", whatsitcodes.pdfsave))
local pdfrestore = register(new_node("whatsit", whatsitcodes.pdfrestore))
@@ -53,7 +53,7 @@ function nodepool.pdfpageliteral (str) local t = copy_node(pdfpageliteral ) se
function nodepool.pdfdirectliteral(str) local t = copy_node(pdfdirectliteral) setfield(t,"data",str) return t end
function nodepool.pdfrawliteral (str) local t = copy_node(pdfrawliteral ) setfield(t,"data",str) return t end
-nodepool.pdfliteral = nodepool.pdfpageliteral
+nodepool.pdfliteral = nodepool.pdfpageliteral -- best is to use a specific one: origin | page | direct | raw
function nodepool.pdfsave()
return copy_node(pdfsave)
diff --git a/tex/context/base/mkiv/lpdf-ren.lua b/tex/context/base/mkiv/lpdf-ren.lua
index a57c550fd..e9b22f382 100644
--- a/tex/context/base/mkiv/lpdf-ren.lua
+++ b/tex/context/base/mkiv/lpdf-ren.lua
@@ -9,8 +9,8 @@ if not modules then modules = { } end modules ['lpdf-ren'] = {
-- rendering
local tostring, tonumber, next = tostring, tonumber, next
-local format, rep = string.format, string.rep
local concat = table.concat
+local formatters = string.formatters
local settings_to_array = utilities.parsers.settings_to_array
local getrandom = utilities.randomizer.get
@@ -54,7 +54,7 @@ local copy_node = nuts.copy
local nodepool = nuts.pool
local register = nodepool.register
-local pdfliteral = nodepool.pdfliteral
+local pdfpageliteral = nodepool.pdfpageliteral
local pdf_ocg = pdfconstant("OCG")
local pdf_ocmd = pdfconstant("OCMD")
@@ -239,33 +239,38 @@ function executers.togglelayer(arguments) return setlayer(pdf_toggle,arguments)
-- injection
+local f_bdc = formatters["/OC /%s BDC"]
+local s_emc = "EMC"
+
function codeinjections.startlayer(name) -- used in mp
if not name then
name = "unknown"
end
useviewerlayer(name)
- return format("/OC /%s BDC",escapednames[name])
+ return f_bdc(escapednames[name])
end
function codeinjections.stoplayer(name) -- used in mp
- return "EMC"
+ return s_emc
end
local cache = { }
+local stop = nil
function nodeinjections.startlayer(name)
local c = cache[name]
if not c then
useviewerlayer(name)
- c = register(pdfliteral(format("/OC /%s BDC",escapednames[name])))
+ c = register(pdfpageliteral(f_bdc(escapednames[name])))
cache[name] = c
end
return copy_node(c)
end
-local stop = register(pdfliteral("EMC"))
-
function nodeinjections.stoplayer()
+ if not stop then
+ stop = register(pdfpageliteral(s_emc))
+ end
return copy_node(stop)
end
@@ -281,7 +286,7 @@ function nodeinjections.startstackedlayer(s,t,first,last)
r[#r+1] = startlayer(values[t[i]])
end
r = concat(r," ")
- return pdfliteral(r)
+ return pdfpageliteral(r)
end
function nodeinjections.stopstackedlayer(s,t,first,last)
@@ -290,7 +295,7 @@ function nodeinjections.stopstackedlayer(s,t,first,last)
r[#r+1] = stoplayer()
end
r = concat(r," ")
- return pdfliteral(r)
+ return pdfpageliteral(r)
end
function nodeinjections.changestackedlayer(s,t1,first1,last1,t2,first2,last2)
@@ -302,7 +307,7 @@ function nodeinjections.changestackedlayer(s,t1,first1,last1,t2,first2,last2)
r[#r+1] = startlayer(values[t2[i]])
end
r = concat(r," ")
- return pdfliteral(r)
+ return pdfpageliteral(r)
end
-- transitions
diff --git a/tex/context/base/mkiv/lpdf-tag.lua b/tex/context/base/mkiv/lpdf-tag.lua
index e33c8a811..9d33df6f3 100644
--- a/tex/context/base/mkiv/lpdf-tag.lua
+++ b/tex/context/base/mkiv/lpdf-tag.lua
@@ -55,7 +55,8 @@ local tonut = nuts.tonut
local tonode = nuts.tonode
local nodepool = nuts.pool
-local pdfliteral = nodepool.pdfliteral
+local pdfpageliteral = nodepool.pdfpageliteral
+local register = nodepool.register
local getid = nuts.getid
local getattr = nuts.getattr
@@ -67,10 +68,9 @@ local setfield = nuts.setfield
local setlink = nuts.setlink
local setlist = nuts.setlist
+local copy_node = nuts.copy
local traverse_nodes = nuts.traverse
local tosequence = nuts.tosequence
-local insert_before = nuts.insert_before
-local insert_after = nuts.insert_after
local structure_stack = { }
local structure_kids = pdfarray()
@@ -312,8 +312,14 @@ end
-- no need to adapt head, as we always operate on lists
+local EMCliteral = nil
+
function nodeinjections.addtags(head)
+ if not EMCliteral then
+ EMCliteral = register(pdfpageliteral("EMC"))
+ end
+
local last = nil
local ranges = { }
local range = nil
@@ -321,8 +327,9 @@ function nodeinjections.addtags(head)
local function collectranges(head,list)
for n in traverse_nodes(head) do
- local id = getid(n) -- 14: image, 8: literal (mp)
+ local id = getid(n)
if id == glyph_code then
+ -- maybe also disc
local at = getattr(n,a_tagged)
if not at then
range = nil
@@ -344,8 +351,7 @@ function nodeinjections.addtags(head)
end
last = nil
else
- local nl = getlist(n)
- collectranges(nl,n)
+ collectranges(getlist(n),n)
end
end
end
@@ -383,7 +389,6 @@ function nodeinjections.addtags(head)
local taglist = specification.taglist
local noftags = #taglist
local common = 0
-
if top then
for i=1,noftags >= noftop and noftop or noftags do
if top[i] == taglist[i] then
@@ -412,12 +417,12 @@ function nodeinjections.addtags(head)
prev = prv
end
end
-
if prev then
- literal = pdfliteral(makecontent(prev,id,specification))
+ literal = pdfpageliteral(makecontent(prev,id,specification))
elseif ignore then
- literal = pdfliteral(makeignore(specification))
+ literal = pdfpageliteral(makeignore(specification))
end
+
if literal then
local prev = getprev(start)
if prev then
@@ -427,14 +432,27 @@ function nodeinjections.addtags(head)
if list and getlist(list) == start then
setlist(list,literal)
end
+ local literal = copy_node(EMCliteral)
-- use insert instead:
- local literal = pdfliteral("EMC")
local next = getnext(stop)
if next then
setlink(literal,next)
end
setlink(stop,literal)
end
+
+-- if literal then
+-- if list and getlist(list) == start then
+-- setlink(literal,start)
+-- setlist(list,literal)
+-- else
+-- setlink(getprev(start),literal,start)
+-- end
+-- -- use insert instead:
+-- local literal = copy_node(EMCliteral)
+-- setlink(stop,literal,getnext(stop))
+-- end
+
top = taglist
noftop = noftags
end
@@ -558,9 +576,9 @@ end
-- end
--
-- if r > 0 then
--- local literal = pdfliteral(concat(result,"\n"))
+-- local literal = pdfpageliteral(concat(result,"\n"))
-- -- use insert instead:
--- local literal = pdfliteral(result)
+-- local literal = pdfpageliteral(result)
-- local prev = getprev(start)
-- if prev then
-- setlink(prev,literal)
@@ -582,7 +600,7 @@ end
-- for i=1,noftop do
-- result[i] = "EMC"
-- end
--- local literal = pdfliteral(concat(result,"\n"))
+-- local literal = pdfpageliteral(concat(result,"\n"))
-- -- use insert instead:
-- local next = getnext(last)
-- if next then
diff --git a/tex/context/base/mkiv/lxml-ini.lua b/tex/context/base/mkiv/lxml-ini.lua
index 11f634739..86d113f7c 100644
--- a/tex/context/base/mkiv/lxml-ini.lua
+++ b/tex/context/base/mkiv/lxml-ini.lua
@@ -111,6 +111,7 @@ implement { name = "xmlflushtext", actions = lxml.text, arg
implement { name = "xmlflushpure", actions = lxml.pure, arguments = "string" }
implement { name = "xmltobuffer", actions = lxml.tobuffer, arguments = { "string", "string", "string" } }
implement { name = "xmltobufferverbose", actions = lxml.tobuffer, arguments = { "string", "string", "string", true } }
+implement { name = "xmltobuffertextonly", actions = lxml.tobuffer, arguments = { "string", "string", "string", false } }
implement { name = "xmltofile", actions = lxml.tofile, arguments = { "string", "string", "string" } }
implement { name = "xmltoparameters", actions = lxml.toparameters, arguments = "string" }
implement { name = "xmlverbatim", actions = lxml.verbatim, arguments = "string" }
diff --git a/tex/context/base/mkiv/lxml-ini.mkiv b/tex/context/base/mkiv/lxml-ini.mkiv
index 6ba6bc8d4..f97857fbe 100644
--- a/tex/context/base/mkiv/lxml-ini.mkiv
+++ b/tex/context/base/mkiv/lxml-ini.mkiv
@@ -111,6 +111,7 @@
\let\xmltext \clf_xmltext
\let\xmltobuffer \clf_xmltobuffer % id pattern name
\let\xmltobufferverbose \clf_xmltobufferverbose % id pattern name
+\let\xmltobuffertextonly \clf_xmltobuffertextonly % id pattern name
\let\xmltofile \clf_xmltofile % id pattern filename
\let\xmltoparameters \clf_xmltoparameters
\let\xmlverbatim \clf_xmlverbatim
@@ -129,14 +130,23 @@
% goodie:
-\unexpanded\def\xmlprettyprint#1#2%
- {\xmltobufferverbose{#1}{.}{xml-temp}%
- \ifdefined\scitebuffer
- \scitebuffer[#2][xml-temp]%
+\def\xmltempbuffername{xml-temp}
+
+\unexpanded\def\prettyprintbuffer#1#2% only used here
+ {\ifdefined\scitebuffer
+ \scitebuffer[#2][#1]%
\else
- \typebuffer[xml-temp][\c!option=#2]%
+ \typebuffer[#1][\c!option=#2]%
\fi}
+\unexpanded\def\xmlprettyprint#1#2%
+ {\xmltobufferverbose{#1}{.}{\xmltempbuffername}%
+ \prettyprintbuffer\xmltempbuffername{#2}}
+
+\unexpanded\def\xmlprettyprinttext#1#2%
+ {\xmltobuffertextonly{#1}{.}{\xmltempbuffername}%
+ \prettyprintbuffer\xmltempbuffername{#2}}
+
% kind of special:
\let\xmlstartraw\clf_xmlstartraw
diff --git a/tex/context/base/mkiv/lxml-tex.lua b/tex/context/base/mkiv/lxml-tex.lua
index 76a20fbef..f23919801 100644
--- a/tex/context/base/mkiv/lxml-tex.lua
+++ b/tex/context/base/mkiv/lxml-tex.lua
@@ -58,6 +58,7 @@ local xmlcontent = xml.content
local xmllastmatch = xml.lastmatch
local xmlpushmatch = xml.pushmatch
local xmlpopmatch = xml.popmatch
+local xmlstring = xml.string
directives.enable("xml.path.keeplastmatch")
@@ -2239,8 +2240,12 @@ texfinalizers.lowerall = xmlfinalizers.lowerall
function lxml.tobuffer(id,pattern,name,unescaped)
local collected = xmlapplylpath(getid(id),pattern)
if collected then
- if unescaped then
+ if unescaped == true then
collected = xmlcontent(collected[1]) -- expanded entities !
+ elseif unescaped == false then
+ local t = { }
+ xmlstring(collected[1],function(s) t[#t+1] = s end)
+ collected = concat(t)
else
collected = tostring(collected[1])
end
diff --git a/tex/context/base/mkiv/math-act.lua b/tex/context/base/mkiv/math-act.lua
index 68f2c5ce4..826669a3d 100644
--- a/tex/context/base/mkiv/math-act.lua
+++ b/tex/context/base/mkiv/math-act.lua
@@ -218,6 +218,8 @@ sequencers.appendaction("mathparameters","system","mathematics.overloadparameter
sequencers.appendaction("beforecopyingcharacters","system","mathematics.tweakbeforecopyingfont")
sequencers.appendaction("aftercopyingcharacters", "system","mathematics.tweakaftercopyingfont")
+local virtualized = mathematics.virtualized
+
function mathematics.overloaddimensions(target,original,set)
local goodies = target.goodies
if goodies then
@@ -235,11 +237,19 @@ function mathematics.overloaddimensions(target,original,set)
local hfactor = parameters.hfactor
local vfactor = parameters.vfactor
local addprivate = fonts.helpers.addprivate
-target.type = "virtual"
-target.properties.virtualized = true
+ -- to be sure
+ target.type = "virtual"
+ target.properties.virtualized = true
+ --
local function overload(dimensions)
for unicode, data in next, dimensions do
local character = characters[unicode]
+ if not character then
+ local c = virtualized[unicode]
+ if c then
+ character = characters[c]
+ end
+ end
if character then
--
local width = data.width
@@ -511,12 +521,14 @@ local function horizontalcode(family,unicode)
end
elseif kind == e_right then
local charlist = data[3].horiz_variants
- local right = charlist[#charlist]
- roffset = abs((right["start"] or 0) - (right["end"] or 0))
+ if charlist then
+ local right = charlist[#charlist]
+ roffset = abs((right["start"] or 0) - (right["end"] or 0))
+ end
elseif kind == e_horizontal then
local charlist = data[3].horiz_variants
if charlist then
- local left = charlist[1]
+ local left = charlist[1]
local right = charlist[#charlist]
loffset = abs((left ["start"] or 0) - (left ["end"] or 0))
roffset = abs((right["start"] or 0) - (right["end"] or 0))
diff --git a/tex/context/base/mkiv/math-frc.mkiv b/tex/context/base/mkiv/math-frc.mkiv
index b573e69bd..762fc8d23 100644
--- a/tex/context/base/mkiv/math-frc.mkiv
+++ b/tex/context/base/mkiv/math-frc.mkiv
@@ -235,6 +235,8 @@
% also makes testing easier. When left and right margins are needed we might merge the
% variants again. After all, these are not real installers.
+% the denominator is in cramped!
+
\setvalue{\??mathfractionalternative\v!inner}%
{\ifcase\d_math_fraction_margin
\expandafter\math_fraction_inner_normal
diff --git a/tex/context/base/mkiv/math-ini.lua b/tex/context/base/mkiv/math-ini.lua
index 2cb4e2413..c4bb822d6 100644
--- a/tex/context/base/mkiv/math-ini.lua
+++ b/tex/context/base/mkiv/math-ini.lua
@@ -132,11 +132,39 @@ local extensibles = allocate {
table.setmetatableindex(extensibles,function(t,k) t[k] = 0 return 0 end)
-mathematics.extensibles = extensibles
-mathematics.classes = classes
-mathematics.codes = codes
------------.accents = codes
-mathematics.families = families
+local virtualized = allocate {
+}
+
+function mathematics.virtualize(unicode,virtual)
+
+ local function virtualize(k,v)
+ local c = virtualized[k]
+ if c == v then
+ report_math("character %C is already virtualized to %C",k,v)
+ elseif c then
+ report_math("character %C is already virtualized to %C, ignoring mapping to %C",k,c,v)
+ else
+ virtualized[k] = v
+ end
+ end
+
+ if type(unicode) == "table" then
+ for k, v in next, unicode do
+ virtualize(k,v)
+ end
+ elseif type(unicode) == "number" and type(virtual) == "number" then
+ virtualize(unicode,virtual)
+ -- else
+ -- error
+ end
+end
+
+mathematics.extensibles = extensibles
+mathematics.classes = classes
+mathematics.codes = codes
+-----------.accents = codes
+mathematics.families = families
+mathematics.virtualized = virtualized
-- there will be proper functions soon (and we will move this code in-line)
-- no need for " in class and family (saves space)
diff --git a/tex/context/base/mkiv/math-noa.lua b/tex/context/base/mkiv/math-noa.lua
index 970ce3d87..50e21669d 100644
--- a/tex/context/base/mkiv/math-noa.lua
+++ b/tex/context/base/mkiv/math-noa.lua
@@ -116,7 +116,6 @@ local setsub = nuts.setsub
local setsup = nuts.setsup
local flush_node = nuts.flush
-local new_node = nuts.new -- todo: pool: math_noad math_sub
local copy_node = nuts.copy
local slide_nodes = nuts.slide
local set_visual = nuts.setvisual
@@ -126,6 +125,10 @@ local mlist_to_hlist = nodes.mlist_to_hlist
local font_of_family = node.family_font
local new_kern = nodepool.kern
+local new_submlist = nodepool.submlist
+local new_noad = nodepool.noad
+local new_delimiter = nodepool.delimiter
+local new_fence = nodepool.fence
local fonthashes = fonts.hashes
local fontdata = fonthashes.identifiers
@@ -174,8 +177,8 @@ local math_noad = nodecodes.noad -- attr nucleus sub sup
local math_accent = nodecodes.accent -- attr nucleus sub sup accent
local math_radical = nodecodes.radical -- attr nucleus sub sup left degree
local math_fraction = nodecodes.fraction -- attr nucleus sub sup left right
-local math_box = nodecodes.subbox -- attr list
-local math_sub = nodecodes.submlist -- attr list
+local math_subbox = nodecodes.subbox -- attr list
+local math_submlist = nodecodes.submlist -- attr list
local math_char = nodecodes.mathchar -- attr fam char
local math_textchar = nodecodes.mathtextchar -- attr fam char
local math_delim = nodecodes.delim -- attr small_fam small_char large_fam large_char
@@ -253,7 +256,7 @@ local function process(start,what,n,parent)
noad = getsub (start) if noad then process(noad,what,n,start) end -- list
elseif id == math_char or id == math_textchar or id == math_delim then
break
- elseif id == math_box or id == math_sub then
+ elseif id == math_subbox or id == math_submlist then
local noad = getlist(start) if noad then process(noad,what,n,start) end -- list (not getlist !)
elseif id == math_fraction then
local noad = getfield(start,"num") if noad then process(noad,what,n,start) end -- list
@@ -298,7 +301,7 @@ local function processnested(current,what,n)
noad = getnucleus(current) if noad then process(noad,what,n,current) end -- list
noad = getsup (current) if noad then process(noad,what,n,current) end -- list
noad = getsub (current) if noad then process(noad,what,n,current) end -- list
- elseif id == math_box or id == math_sub then
+ elseif id == math_subbox or id == math_submlist then
noad = getlist(current) if noad then process(noad,what,n,current) end -- list (not getlist !)
elseif id == math_fraction then
noad = getfield(current,"num") if noad then process(noad,what,n,current) end -- list
@@ -334,7 +337,7 @@ local function processstep(current,process,n,id)
noad = getnucleus(current) if noad then process(noad,n,current) end -- list
noad = getsup (current) if noad then process(noad,n,current) end -- list
noad = getsub (current) if noad then process(noad,n,current) end -- list
- elseif id == math_box or id == math_sub then
+ elseif id == math_subbox or id == math_submlist then
noad = getlist(current) if noad then process(noad,n,current) end -- list (not getlist !)
elseif id == math_fraction then
noad = getfield(current,"num") if noad then process(noad,n,current) end -- list
@@ -733,8 +736,8 @@ processors.autofences = autofences
local dummyfencechar = 0x2E
local function makefence(what,char)
- local d = new_node(math_delim)
- local f = new_node(math_fence)
+ local d = new_delimiter()
+ local f = new_fence()
if char then
local sym = getnucleus(char)
local chr = getchar(sym)
@@ -753,7 +756,7 @@ local function makefence(what,char)
end
local function makelist(noad,f_o,o_next,c_prev,f_c,middle)
- local list = new_node(math_sub)
+ local list = new_submlist()
setlist(list,f_o)
setsubtype(noad,noad_inner)
setnucleus(noad,list)
@@ -986,7 +989,7 @@ local function replace(pointer,what,n,parent)
if start_super == stop_super then
setsup(pointer,getnucleus(start_super))
else
- local list = new_node(math_sub) -- todo attr
+ local list = new_submlist() -- todo attr
setlist(list,start_super)
setsup(pointer,list)
end
@@ -999,7 +1002,7 @@ local function replace(pointer,what,n,parent)
if start_sub == stop_sub then
setsub(pointer,getnucleus(start_sub))
else
- local list = new_node(math_sub) -- todo attr
+ local list = new_submlist() -- todo attr
setlist(list,start_sub)
setsub(pointer,list)
end
@@ -1267,12 +1270,13 @@ local default_factor = 1/20
local setcolor = nodes.tracers.colors.set
local resetcolor = nodes.tracers.colors.reset
local italic_kern = new_kern
+
local c_positive_d = "trace:dg"
local c_negative_d = "trace:dr"
local function insert_kern(current,kern)
- local sub = new_node(math_sub) -- todo: pool
- local noad = new_node(math_noad) -- todo: pool
+ local sub = new_submlist()
+ local noad = new_noad()
setlist(sub,kern)
setnext(kern,noad)
setnucleus(noad,current)
@@ -1467,6 +1471,8 @@ do
return k
end)
+ -- no correction after prime because that moved to a superscript
+
kernpairs[math_char] = function(pointer,what,n,parent)
if getattr(pointer,a_kernpairs) == 1 then
local font = getfont(pointer)
@@ -1537,6 +1543,8 @@ local movesub = {
[0x2037] = 0xFE937,
}
+mathematics.virtualize(movesub)
+
-- local movesub = {
-- -- primes
-- [0x2032] = 0x2032,
diff --git a/tex/context/base/mkiv/meta-pdf.lua b/tex/context/base/mkiv/meta-pdf.lua
index c17a2a4c7..dfc00ed9e 100644
--- a/tex/context/base/mkiv/meta-pdf.lua
+++ b/tex/context/base/mkiv/meta-pdf.lua
@@ -31,7 +31,7 @@ local pdfgraycode = lpdf.graycode
local pdfspotcode = lpdf.spotcode
local pdftransparencycode = lpdf.transparencycode
local pdffinishtransparencycode = lpdf.finishtransparencycode
-local pdfliteral = nodes.pool.pdfliteral
+----- pdfpageliteral = nodes.pool.pdfpageliteral
metapost.mptopdf = metapost.mptopdf or { }
local mptopdf = metapost.mptopdf
@@ -64,7 +64,7 @@ resetall()
-- -- comment hack
--
-- local function pdfcode(str)
--- context(pdfliteral(str))
+-- context(pdfpageliteral(str))
-- end
local pdfcode = context.pdfliteral
diff --git a/tex/context/base/mkiv/node-acc.lua b/tex/context/base/mkiv/node-acc.lua
index dccd7b7c0..c3400c752 100644
--- a/tex/context/base/mkiv/node-acc.lua
+++ b/tex/context/base/mkiv/node-acc.lua
@@ -136,6 +136,8 @@ end)
--
-- tasks.appendaction("processors", "words", "nodes.injectspans")
--
+-- local pdfpageliteral = nuts.pool.pdfpageliteral
+--
-- local function injectspans(head)
-- local done = false
-- for n in traverse_nodes(tonut(head)) do
@@ -144,8 +146,8 @@ end)
-- local a = getattr(n,a_hyphenated)
-- if a then
-- local str = codes[a]
--- local b = new_pdfliteral(format("/Span << /ActualText %s >> BDC", lpdf.tosixteen(str)))
--- local e = new_pdfliteral("EMC")
+-- local b = pdfpageliteral(format("/Span << /ActualText %s >> BDC", lpdf.tosixteen(str)))
+-- local e = pdfpageliteral("EMC")
-- insert_before(head,n,b)
-- insert_after(head,n,e)
-- done = true
diff --git a/tex/context/base/mkiv/node-res.lua b/tex/context/base/mkiv/node-res.lua
index 858408bd9..815ca2ca3 100644
--- a/tex/context/base/mkiv/node-res.lua
+++ b/tex/context/base/mkiv/node-res.lua
@@ -182,6 +182,16 @@ local rightskip = register_nut(new_nut("glue",skipcodes.rightskip))
local temp = register_nut(new_nut("temp",0))
local noad = register_nut(new_nut("noad"))
+local delimiter = register_nut(new_nut("delim"))
+local fence = register_nut(new_nut("fence"))
+local submlist = register_nut(new_nut("sub_mlist"))
+local accent = register_nut(new_nut("accent"))
+local radical = register_nut(new_nut("radical"))
+local fraction = register_nut(new_nut("fraction"))
+local subbox = register_nut(new_nut("sub_box"))
+local mathchar = register_nut(new_nut("math_char"))
+local mathtextchar = register_nut(new_nut("math_text_char"))
+local choice = register_nut(new_nut("choice"))
local boundary = register_nut(new_nut("boundary",boundarycodes.user))
local wordboundary = register_nut(new_nut("boundary",boundarycodes.word))
@@ -378,7 +388,6 @@ function nutpool.leader(width,list)
return n
end
-
function nutpool.latelua(code)
local n = copy_nut(latelua)
setfield(n,"string",code)
@@ -421,9 +430,20 @@ function nutpool.temp()
return copy_nut(temp)
end
-function nutpool.noad()
- return copy_nut(noad)
-end
+function nutpool.noad() return copy_nut(noad) end
+function nutpool.delimiter() return copy_nut(delimiter) end
+function nutpool.fence() return copy_nut(fence) end
+function nutpool.submlist() return copy_nut(submlist) end
+function nutpool.noad() return copy_nut(noad) end
+function nutpool.delimiter() return copy_nut(delim) end nutpool.delim = nutpool.delimiter
+function nutpool.fence() return copy_nut(fence) end
+function nutpool.accent() return copy_nut(accent) end
+function nutpool.radical() return copy_nut(radical) end
+function nutpool.fraction() return copy_nut(fraction) end
+function nutpool.subbox() return copy_nut(subbox) end
+function nutpool.mathchar() return copy_nut(mathchar) end
+function nutpool.mathtextchar() return copy_nut(mathtextchar) end
+function nutpool.choice() return copy_nut(choice) end
local function new_hlist(list,width,height,depth,shift)
local n = copy_nut(hlist)
diff --git a/tex/context/base/mkiv/node-rul.lua b/tex/context/base/mkiv/node-rul.lua
index b6cb9c167..316c3fded 100644
--- a/tex/context/base/mkiv/node-rul.lua
+++ b/tex/context/base/mkiv/node-rul.lua
@@ -128,13 +128,16 @@ local rules = nodes.rules or { }
nodes.rules = rules
rules.data = rules.data or { }
+local nutrules = nuts.rules or { }
+nuts.rules = nutrules -- not that many
+
storage.register("nodes/rules/data", rules.data, "nodes.rules.data")
local data = rules.data
-- we implement user rules here as it takes less code this way
-local function userrule(t,noattributes)
+local function usernutrule(t,noattributes)
local r = new_userrule(t.width or 0,t.height or 0,t.depth or 0)
if noattributes == false or noattributes == nil then
-- avoid fuzzy ones
@@ -142,7 +145,13 @@ local function userrule(t,noattributes)
setattrlist(r,current_attr())
end
properties[r] = t
- return tonode(r)
+ return r
+end
+
+nutrules.userrule = usernutrule
+
+local function userrule(t,noattributes)
+ return tonode(usernutrule(t,noattributes))
end
rules.userrule = userrule
diff --git a/tex/context/base/mkiv/status-files.pdf b/tex/context/base/mkiv/status-files.pdf
index a233248a0..8d30534bd 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 52156f07e..7a271febb 100644
--- a/tex/context/base/mkiv/status-lua.pdf
+++ b/tex/context/base/mkiv/status-lua.pdf
Binary files differ
diff --git a/tex/context/base/mkiv/strc-flt.mkvi b/tex/context/base/mkiv/strc-flt.mkvi
index 5e31a2714..4323b70da 100644
--- a/tex/context/base/mkiv/strc-flt.mkvi
+++ b/tex/context/base/mkiv/strc-flt.mkvi
@@ -540,7 +540,7 @@
\def\strc_floats_place_indeed[#location][#reference]#caption%
{\strc_floats_reset_variables
- \edef\floatlocation{#location}%
+ \edef\floatlocation{\ifexporting\v!here\else#location\fi}%
\ifx\floatlocation\empty
\edef\floatlocation{\floatparameter\c!default}% beware of a clash between alignment locations
\fi
@@ -592,7 +592,7 @@
\setexpandedfloatparameter\c!bottomoffset{\floatcaptionparameter\c!bottomoffset}%
\setexpandedfloatparameter\c!freeregion {\floatcaptionparameter\c!freeregion}%
\def\m_strc_floats_saved_userdata{#2}%
- \edef\floatlocation{\floatcaptionparameter\c!location}%
+ \edef\floatlocation{\ifexporting\v!here\else\floatcaptionparameter\c!location\fi}%
\setfloatcaptionparameter\c!location{\savedfloatlocation}% not expanded
\ifx\floatlocation\empty
\edef\floatlocation{\floatparameter\c!default}%
@@ -1097,6 +1097,7 @@
% already be set at this point
\processcommacommand[\floatlocation]\strc_floats_check_extra_actions_step
\ifx\extrafloatlocation\empty \else
+ % maybe not when exporting
\edef\floatlocation{\extrafloatlocation,\floatlocation}%
\setfloatmethodvariables\floatlocation
\fi}}
@@ -1246,7 +1247,7 @@
\global\floatwidth \wd\floatbox
\global\floatheight \ht\floatbox % forget about the depth
\global\floattextwidth\dimexpr\hsize-\floatwidth-\rootfloatparameter\c!margin\relax
- \edef\floatlocation{\floatlocationmethod}% to be sure .. why
+ \edef\floatlocation{\ifexporting\v!here\else\floatlocationmethod\fi}% to be sure .. why
\doifelseinset\v!tall\floatlocationmethod
{\floattextheight\dimexpr\pagegoal-\pagetotal-\bigskipamount\relax % ugly, this bigskip
\ifdim\floattextheight>\textheight
diff --git a/tex/context/base/mkiv/strc-sec.mkiv b/tex/context/base/mkiv/strc-sec.mkiv
index b0771b475..af8ba5ba1 100644
--- a/tex/context/base/mkiv/strc-sec.mkiv
+++ b/tex/context/base/mkiv/strc-sec.mkiv
@@ -852,6 +852,7 @@
\strc_sectioning_before_yes
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
+ \dostarttagged\t!sectioncaption\empty
\let\getheadsyncs\theheadsynchonization
\let\getheadtitle\fullheadtitle
\ifconditional\headshownumber
@@ -860,18 +861,23 @@
\else
\strc_rendering_place_head_text
\fi
+ \dostoptagged
\strc_sectioning_after_yes
\else\ifconditional\c_strc_sectioning_hidden
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
+ \dostarttagged\t!sectioncaption\empty
\let\getheadsyncs\theheadsynchonization
\strc_rendering_place_head_hidden % only something when tracing
+ \dostoptagged
\else
\strc_sectioning_before_nop % toegevoegd ivm subpaginanr / tug sheets
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
+ \dostarttagged\t!sectioncaption\empty
\let\getheadsyncs\theheadsynchonization
\strc_rendering_place_head_empty % just flush 'm
+ \dostoptagged
\strc_sectioning_after_nop
\fi\fi
\else
@@ -879,22 +885,28 @@
\strc_sectioning_before_yes
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
+ \dostarttagged\t!sectioncaption\empty
\let\getheadsyncs\theheadsynchonization
\let\getheadtitle\fullheadtitle
\strc_rendering_place_head_text
+ \dostoptagged
\strc_sectioning_after_yes
\else\ifconditional\c_strc_sectioning_hidden
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
\let\getheadsyncs\theheadsynchonization
+ \dostarttagged\t!sectioncaption\empty
\strc_rendering_place_head_hidden % only something when tracing
+ \dostoptagged
\else
% do nothing / should be vbox to 0pt
\strc_sectioning_before_nop
\strc_sectioning_register{#1}{#2}{#3}% after optional \page
\strc_sectioning_report
+ \dostarttagged\t!sectioncaption\empty
\let\getheadsyncs\theheadsynchonization
\strc_rendering_place_head_empty % just flush 'm
+ \dostoptagged
\strc_sectioning_after_nop
\fi\fi
\fi
diff --git a/tex/context/base/mkiv/strc-syn.mkiv b/tex/context/base/mkiv/strc-syn.mkiv
index 72c94d069..75001be27 100644
--- a/tex/context/base/mkiv/strc-syn.mkiv
+++ b/tex/context/base/mkiv/strc-syn.mkiv
@@ -335,14 +335,16 @@
[\c!alternative=\v!normal]
\unexpanded\def\strc_synonyms_insert_meaning#1#2% name tag
- {\begingroup
+ {\dontleavehmode % otherwise we don't get it right at the beginning of a par
+ \begingroup
\def\currentsimplelist{#1}%
\def\currentsynonymtag{#2}%
\fastsetup{\??simplelistrenderings::\v!text}%
\endgroup}
\unexpanded\def\strc_synonyms_insert#1#2% name tag
- {\begingroup
+ {\dontleavehmode % otherwise we don't get it right at the beginning of a par
+ \begingroup
\edef\currentsimplelist{#1}%
\let \currentsynonym\currentsimplelist % for a while
\def \currentsynonymtag{#2}%
@@ -549,7 +551,8 @@
[\c!alternative=\v!normal]
\unexpanded\def\strc_sorting_insert#1#2% name tag
- {\begingroup
+ {\dontleavehmode % otherwise we don't get it right at the beginning of a par
+ \begingroup
% no kap currently, of .. we need to map cap onto WORD
\edef\currentsorting{#1}%
\def \currentsortingtag{#2}%
diff --git a/tex/context/base/mkiv/strc-tag.lua b/tex/context/base/mkiv/strc-tag.lua
index 9d1fec33e..1be44821e 100644
--- a/tex/context/base/mkiv/strc-tag.lua
+++ b/tex/context/base/mkiv/strc-tag.lua
@@ -60,7 +60,7 @@ tags.specifications = specifications
local p_splitter = C((1-S(">"))^1) * P(">") * C(P(1)^1)
tagpatterns.splitter = p_splitter
-local properties = allocate {
+local properties = allocate { -- todo: more "record = true" to improve formatting
document = { pdf = "Div", nature = "display" },
@@ -71,6 +71,7 @@ local properties = allocate {
highlight = { pdf = "Span", nature = "inline" },
section = { pdf = "Sect", nature = "display" },
+ sectioncaption = { pdf = "Div", nature = "display", record = true },
sectiontitle = { pdf = "H", nature = "mixed" },
sectionnumber = { pdf = "H", nature = "mixed" },
sectioncontent = { pdf = "Div", nature = "display" },
@@ -282,6 +283,10 @@ function tags.registermetadata(data)
end
end
+function tags.getmetadata()
+ return documentdata or { }
+end
+
function tags.start(tag,specification)
if not enabled then
codeinjections.enabletags()
diff --git a/tex/context/base/mkiv/strc-tag.mkiv b/tex/context/base/mkiv/strc-tag.mkiv
index 7fdfd7afa..34fef5f50 100644
--- a/tex/context/base/mkiv/strc-tag.mkiv
+++ b/tex/context/base/mkiv/strc-tag.mkiv
@@ -32,6 +32,7 @@
\def\t!highlight {highlight} % Span
\def\t!section {section} % Sect
+\def\t!sectioncaption {sectioncaption} % Div
\def\t!sectiontitle {sectiontitle} % H
\def\t!sectionnumber {sectionnumber} % H
\def\t!sectioncontent {sectioncontent} % Div
diff --git a/tex/context/base/mkiv/tabl-tbl.mkiv b/tex/context/base/mkiv/tabl-tbl.mkiv
index b21771009..006edd9a1 100644
--- a/tex/context/base/mkiv/tabl-tbl.mkiv
+++ b/tex/context/base/mkiv/tabl-tbl.mkiv
@@ -216,6 +216,7 @@
\newconstant \c_tabl_tabulate_pass
\newconstant \c_tabl_tabulate_type
+\newconstant \c_tabl_tabulate_kind % 1=strong 2=equals
\newconstant \c_tabl_tabulate_splitlinemode \c_tabl_tabulate_splitlinemode\plusone
\newconstant \c_tabl_tabulate_colorspan
\newconstant \c_tabl_tabulate_localcolorspan
@@ -262,12 +263,6 @@
\expandafter\tabl_tabulate_initialize_boxes_step
\fi}
-% \def\tabl_tabulate_initialize_box#1% also used elsewhere
-% {\ifcsname\??tabulatebox\number#1\endcsname
-% \tabl_tabulate_initialize_box_yes#1%
-% \else
-% \tabl_tabulate_initialize_box_nop#1%
-% \fi}
\def\tabl_tabulate_initialize_box#1% also used elsewhere
{\ifcsname\??tabulatebox\number#1\endcsname
\tabl_tabulate_initialize_box_yes
@@ -275,7 +270,6 @@
\tabl_tabulate_initialize_box_nop#1%
\fi}
-%def\tabl_tabulate_initialize_box_yes#1{\global \setbox\csname\??tabulatebox\number#1\endcsname\emptybox}
\def\tabl_tabulate_initialize_box_yes {\global \setbox\lastnamedcs\emptybox}
\def\tabl_tabulate_initialize_box_nop#1{\expandafter\newbox\csname\??tabulatebox\number#1\endcsname}
@@ -1346,7 +1340,13 @@
\tabl_tabulate_process}
\def\tabulateEQ
- {\ifconditional\c_tabl_tabulate_firstflushed\else\tabulationparameter{EQ}\fi
+ {\ifconditional\c_tabl_tabulate_firstflushed\else
+ \dostarttaggedchained\t!ignore\empty\empty
+ \dostarttagged\t!ignore\empty
+ \tabulationparameter{EQ}%
+ \dostoptagged
+ \dostoptagged
+ \fi
\global\setfalse\c_tabl_tabulate_equal}
% The next ones will be token registers
@@ -1420,43 +1420,46 @@
\doifelsefastoptionalcheck{\tabl_tabulate_set_color_column_yes#1}{\tabl_tabulate_set_color_column_nop#1}}
\def\tabl_tabulate_set_color_column_nop
- {\tabl_tabulate_column_normal}
+ {\tabl_tabulate_column_normal\zerocount}
\def\tabl_tabulate_set_color_column_yes#1[#2]%
{\xdef\m_tabl_tabulate_color_local{#2}%
- \tabl_tabulate_column_normal#1}
+ \tabl_tabulate_column_normal\zerocount#1}
% normal columns:
-\def\tabl_tabulate_column_normal#1%
+\def\tabl_tabulate_column_normal#1#2%
{\unskip
\aligntab
\ifconditional\c_tabl_tabulate_equal\tabulateequalpos\else\tabulatenormalpos\fi
\aligntab
- \global\c_tabl_tabulate_type#1%
+ \global\c_tabl_tabulate_kind#1%
+ \global\c_tabl_tabulate_type#2%
\aligntab}
% equal columns
-\def\tabl_tabulate_column_equal#1%
+\def\tabl_tabulate_column_equal#1#2%
{\unskip
\aligntab
\tabulateequalpos
- \aligntab\global\c_tabl_tabulate_type#1%
+ \aligntab
+ \global\c_tabl_tabulate_kind#1%
+ \global\c_tabl_tabulate_type#2%
\aligntab}
% ruled columns
-\def\tabl_tabulate_column_vruled#1%
+\def\tabl_tabulate_column_vruled#1#2%
{\unskip % 0-n
-% \ifnum\c_tabl_tabulate_column=\plusone
-% \global\c_tabl_tabulate_has_rule_spec_first\plusone
-% \else\ifnum\c_tabl_tabulate_column=\c_tabl_tabulate_nofcolumns
-% \global\c_tabl_tabulate_has_rule_spec_last\plusone
-% \fi\fi
+ %\ifnum\c_tabl_tabulate_column=\plusone
+ % \global\c_tabl_tabulate_has_rule_spec_first\plusone
+ %\else\ifnum\c_tabl_tabulate_column=\c_tabl_tabulate_nofcolumns
+ % \global\c_tabl_tabulate_has_rule_spec_last\plusone
+ %\fi\fi
\global\let\m_tabl_tabulate_vrule_color_local\m_tabl_tabulate_vrule_color_default
\global\d_tabl_tabulate_vrulethickness_local\d_tabl_tabulate_vrulethickness_default
- \doifelsefastoptionalcheck{\tabl_tabulate_column_vruled_yes#1}{\tabl_tabulate_column_vruled_nop#1}}
+ \doifelsefastoptionalcheck{\tabl_tabulate_column_vruled_yes#1#2}{\tabl_tabulate_column_vruled_nop#1#2}}
\def\tabl_tabulate_column_vruled_nop
{\tabl_tabulate_column_normal}
@@ -1466,9 +1469,9 @@
{\global\d_tabl_tabulate_vrulethickness_local#1\d_tabl_tabulate_vrulethickness_default}
{\xdef\m_tabl_tabulate_vrule_color_local{#1}}}
-\def\tabl_tabulate_column_vruled_yes#1[#2]%
- {\rawprocesscommalist[#2]\tabl_tabulate_column_vruled_step
- \tabl_tabulate_column_normal#1}
+\def\tabl_tabulate_column_vruled_yes#1#2[#3]%
+ {\rawprocesscommalist[#3]\tabl_tabulate_column_vruled_step
+ \tabl_tabulate_column_normal#1#2}
\def\tabl_tabulate_column_vruled_normal
{\vrule\s!width\d_tabl_tabulate_vrulethickness\relax}
@@ -1506,7 +1509,7 @@
% auto columns
\def\tabl_tabulate_column_inject_auto
- {\tabl_tabulate_column_normal\zerocount
+ {\tabl_tabulate_column_normal\zerocount\zerocount
\ifnum\c_tabl_tabulate_column>\c_tabl_tabulate_columns\relax
\expandafter\NR
\else
@@ -1802,22 +1805,22 @@
% so far
-\unexpanded\def\tabl_tabulate_VL_first{\tabl_tabulate_column_vruled\zerocount}
-\unexpanded\def\tabl_tabulate_NC_first{\tabl_tabulate_column_normal\zerocount}
-\unexpanded\def\tabl_tabulate_RC_first{\tabl_tabulate_column_normal\plusone}
-\unexpanded\def\tabl_tabulate_HC_first{\tabl_tabulate_column_normal\plustwo}
-\unexpanded\def\tabl_tabulate_EQ_first{\tabl_tabulate_column_equal \zerocount}
-\unexpanded\def\tabl_tabulate_RQ_first{\tabl_tabulate_column_equal \plusone}
-\unexpanded\def\tabl_tabulate_HQ_first{\tabl_tabulate_column_equal \plustwo}
+\unexpanded\def\tabl_tabulate_VL_first{\tabl_tabulate_column_vruled\zerocount\zerocount}
+\unexpanded\def\tabl_tabulate_NC_first{\tabl_tabulate_column_normal\zerocount\zerocount}
+\unexpanded\def\tabl_tabulate_RC_first{\tabl_tabulate_column_normal\zerocount\plusone}
+\unexpanded\def\tabl_tabulate_HC_first{\tabl_tabulate_column_normal\zerocount\plustwo}
+\unexpanded\def\tabl_tabulate_EQ_first{\tabl_tabulate_column_equal \plustwo \zerocount}
+\unexpanded\def\tabl_tabulate_RQ_first{\tabl_tabulate_column_equal \zerocount\plusone}
+\unexpanded\def\tabl_tabulate_HQ_first{\tabl_tabulate_column_equal \zerocount\plustwo}
%unexpanded\def\tabl_tabulate_NG_first{\NC\tabl_tabulate_charalign}
%unexpanded\def\tabl_tabulate_NG_first{\NC}
%unexpanded\def\tabl_tabulate_NN_first{\NC\tabl_tabulate_digits} % new, undocumented, test first
%unexpanded\def\tabl_tabulate_ND_first{\NC\tabl_tabulate_digits} % same, for old times sake
-\unexpanded\def\tabl_tabulate_NG_first{\tabl_tabulate_column_normal\zerocount}
-\unexpanded\def\tabl_tabulate_NN_first{\tabl_tabulate_column_normal\zerocount\tabl_tabulate_digits} % new, undocumented, test first
-\unexpanded\def\tabl_tabulate_ND_first{\tabl_tabulate_column_normal\zerocount\tabl_tabulate_digits} % same, for old times sake
+\unexpanded\def\tabl_tabulate_NG_first{\tabl_tabulate_column_normal\zerocount\zerocount}
+\unexpanded\def\tabl_tabulate_NN_first{\tabl_tabulate_column_normal\zerocount\zerocount\tabl_tabulate_digits} % new, undocumented, test first
+\unexpanded\def\tabl_tabulate_ND_first{\tabl_tabulate_column_normal\zerocount\zerocount\tabl_tabulate_digits} % same, for old times sake
\unexpanded\def\tabl_tabulate_NR_first {\tabl_tabulate_NR_common\conditionaltrue \tabl_tabulate_check_penalties} % next row
\unexpanded\def\tabl_tabulate_NB_first {\tabl_tabulate_NR_common\conditionaltrue \tabl_tabulate_nobreak_inject } % next row no break
@@ -1833,7 +1836,11 @@
%D The following shortcut is handy for tables where one needs bold headers:
%unexpanded\def\tabl_tabulate_BC_first{\NC\let\fontstyle\globalfontstyle\bf}
-\unexpanded\def\tabl_tabulate_BC_first{\tabl_tabulate_column_normal\zerocount\let\fontstyle\globalfontstyle\bf}
+
+\unexpanded\def\tabl_tabulate_BC_first
+ {\tabl_tabulate_column_normal\plusone\zerocount
+ \let\fontstyle\globalfontstyle
+ \bf}
\appendtoks
\let\VL\tabl_tabulate_VL_first
diff --git a/tex/context/base/mkiv/trac-vis.lua b/tex/context/base/mkiv/trac-vis.lua
index 38bad03e2..d53b1191a 100644
--- a/tex/context/base/mkiv/trac-vis.lua
+++ b/tex/context/base/mkiv/trac-vis.lua
@@ -115,6 +115,8 @@ local hpack_string = nuts.typesetters.tohpack
local texgetattribute = tex.getattribute
local texsetattribute = tex.setattribute
+local setmetatableindex = table.setmetatableindex
+
local unsetvalue = attributes.unsetvalue
local current_font = font.current
@@ -214,6 +216,8 @@ end
-- we can preset a bunch of bits
+local userrule -- bah, not yet defined: todo, delayed(nuts.rules,"userrule")
+
local function enable()
if not usedfont then
-- we use a narrow monospaced font -- infofont ?
@@ -250,6 +254,10 @@ local function enable()
report_visualize("enabled")
enabled = true
tex.setcount("global","c_syst_visualizers_state",1) -- so that we can optimize at the tex end
+ --
+ if not userrule then
+ userrule = nuts.rules.userrule
+ end
end
local function setvisual(n,a,what,list) -- this will become more efficient when we have the bit lib linked in
@@ -303,14 +311,49 @@ function nuts.setvisuals(n,mode)
setattr(n,a_visual,setvisual(mode,getattr(n,a_visual),true,true))
end
-function nuts.applyvisuals(n,mode)
+-- fast setters
+
+do
+
+ local cached = setmetatableindex(function(t,k)
+ if k == true then
+ return texgetattribute(a_visual)
+ elseif not k then
+ t[k] = unsetvalue
+ return unsetvalue
+ else
+ local v = setvisual(k)
+ t[k] = v
+ return v
+ end
+ end)
+
+ -- local function applyvisuals(n,mode)
+ -- local a = cached[mode]
+ -- apply_to_nodes(n,function(n) setattr(n,a_visual,a) end)
+ -- end
+
local a = unsetvalue
- if mode == true then
- a = texgetattribute (a_visual)
- elseif mode then
- a = setvisual(mode)
+
+ local f = function(n) setattr(n,a_visual,a) end
+
+ local function applyvisuals(n,mode)
+ a = cached[mode]
+ apply_to_nodes(n,f)
+ end
+
+ nuts.applyvisuals = applyvisuals
+
+ function nodes.applyvisuals(n,mode)
+ applyvisuals(tonut(n),mode)
end
- apply_to_nodes(n,function(n) setattr(n,a_visual,a) end)
+
+ function visualizers.attribute(mode)
+ return cached[mode]
+ end
+
+ visualizers.attributes = cached
+
end
function nuts.copyvisual(n,m)
@@ -401,7 +444,7 @@ local function sometext(str,layer,color,textcolor,lap) -- we can just paste verb
return info, width
end
-local caches = table.setmetatableindex("table")
+local caches = setmetatableindex("table")
local fontkern do
@@ -624,7 +667,7 @@ local ruledbox do
local b_cache = caches["box"]
local o_cache = caches["origin"]
- table.setmetatableindex(o_cache,function(t,size)
+ setmetatableindex(o_cache,function(t,size)
local rule = new_rule(2*size,size,size)
local origin = hpack_nodes(rule)
setcolor(rule,c_origin_d)
@@ -649,29 +692,29 @@ local ruledbox do
local linewidth = emwidth/fraction
local size = 2*linewidth
local baseline, baseskip
- if dp ~= 0 and ht ~= 0 then
- if wd > 20*linewidth then
- local targetsize = wd - size
- baseline = b_cache[targetsize]
- if not baseline then
- -- due to an optimized leader color/transparency we need to set the glue node in order
- -- to trigger this mechanism
- local leader = setlink(new_glue(size),new_rule(3*size,linewidth,0),new_glue(size))
- leader = hpack_nodes(leader)
- baseline = new_glue(0,65536,0,2,0)
- setleader(baseline,leader)
- setsubtype(baseline,cleaders_code)
- setlisttransparency(baseline,c_text)
- baseline = hpack_nodes(baseline,targetsize)
- b_cache[targetsize] = baseline
- end
- baseline = copy_list(baseline)
- baseskip = new_kern(-wd+linewidth)
- else
- baseline = new_rule(wd-size,linewidth,0)
- baseskip = new_kern(-wd+size)
- end
- end
+ -- if dp ~= 0 and ht ~= 0 then
+ -- if wd > 20*linewidth then
+ -- local targetsize = wd - size
+ -- baseline = b_cache[targetsize]
+ -- if not baseline then
+ -- -- due to an optimized leader color/transparency we need to set the glue node in order
+ -- -- to trigger this mechanism
+ -- local leader = setlink(new_glue(size),new_rule(3*size,linewidth,0),new_glue(size))
+ -- leader = hpack_nodes(leader)
+ -- baseline = new_glue(0,65536,0,2,0)
+ -- setleader(baseline,leader)
+ -- setsubtype(baseline,cleaders_code)
+ -- setlisttransparency(baseline,c_text)
+ -- baseline = hpack_nodes(baseline,targetsize)
+ -- b_cache[targetsize] = baseline
+ -- end
+ -- baseline = copy_list(baseline)
+ -- baseskip = new_kern(-wd+linewidth)
+ -- else
+ -- baseline = new_rule(wd-size,linewidth,0)
+ -- baseskip = new_kern(-wd+size)
+ -- end
+ -- end
local this
if not simple then
this = b_cache[what]
@@ -684,16 +727,31 @@ local ruledbox do
end
end
-- we need to trigger the right mode (else sometimes no whatits)
+ -- local info = setlink(
+ -- this and copy_list(this) or nil,
+ -- new_rule(linewidth,ht,dp),
+ -- new_rule(wd-size,-dp+linewidth,dp),
+ -- new_rule(linewidth,ht,dp),
+ -- new_kern(-wd+linewidth),
+ -- new_rule(wd-size,ht,-ht+linewidth),
+ -- baseskip,
+ -- baseskip and baseline or nil
+ -- )
+ --
+ -- userrules:
+ --
local info = setlink(
this and copy_list(this) or nil,
- new_rule(linewidth,ht,dp),
- new_rule(wd-size,-dp+linewidth,dp),
- new_rule(linewidth,ht,dp),
- new_kern(-wd+linewidth),
- new_rule(wd-size,ht,-ht+linewidth),
- baseskip,
- baseskip and baseline or nil
+ userrule {
+ width = wd,
+ height = ht,
+ depth = dp,
+ line = linewidth,
+ type = "box",
+ dashed = 3*size,
+ }
)
+ --
setlisttransparency(info,c_text)
info = new_hlist(info)
--
@@ -763,6 +821,10 @@ end
local ruledglyph do
+ -- see boundingbox feature .. maybe a pdf stream is more efficient, after all we
+ -- have a frozen color anyway or i need a more detailed cache .. below is a more
+ -- texie approach
+
ruledglyph = function(head,current,previous) -- wrong for vertical glyphs
local wd = getwidth(current)
-- local wd = chardata[getfont(current)][getchar(current)].width
@@ -777,21 +839,53 @@ local ruledglyph do
setboth(current)
local linewidth = emwidth/(2*fraction)
local baseline
- -- if dp ~= 0 and ht ~= 0 then
- if (dp >= 0 and ht >= 0) or (dp <= 0 and ht <= 0) then
- baseline = new_rule(wd-2*linewidth,linewidth,0)
- end
- local doublelinewidth = 2*linewidth
- -- could be a pdf rule (or a user rule now)
- local info = setlink(
- new_rule(linewidth,ht,dp),
- new_rule(wd-doublelinewidth,-dp+linewidth,dp),
- new_rule(linewidth,ht,dp),
- new_kern(-wd+linewidth),
- new_rule(wd-doublelinewidth,ht,-ht+linewidth),
- new_kern(-wd+doublelinewidth),
- baseline
+ local info
+ --
+ -- original
+ --
+ -- if (dp >= 0 and ht >= 0) or (dp <= 0 and ht <= 0) then
+ -- baseline = new_rule(wd-2*linewidth,linewidth,0)
+ -- end
+ -- local doublelinewidth = 2*linewidth
+ -- -- could be a pdf rule (or a user rule now)
+ -- info = setlink(
+ -- new_rule(linewidth,ht,dp),
+ -- new_rule(wd-doublelinewidth,-dp+linewidth,dp),
+ -- new_rule(linewidth,ht,dp),
+ -- new_kern(-wd+linewidth),
+ -- new_rule(wd-doublelinewidth,ht,-ht+linewidth),
+ -- new_kern(-wd+doublelinewidth),
+ -- baseline
+ -- )
+ --
+ -- experiment with subtype outline
+ --
+ -- if (dp >= 0 and ht >= 0) or (dp <= 0 and ht <= 0) then
+ -- baseline = new_rule(wd,linewidth/2,0)
+ -- end
+ -- local r = new_rule(wd-linewidth,ht-linewidth/4,dp-linewidth/4)
+ -- setsubtype(r,nodes.rulecodes.outline)
+ -- setfield(r,"transform",linewidth)
+ -- info = setlink(
+ -- new_kern(linewidth/4),
+ -- r,
+ -- new_kern(-wd+linewidth/2),
+ -- baseline
+ -- )
+ --
+ -- userrules:
+ --
+ info = setlink(
+ userrule {
+ width = wd,
+ height = ht,
+ depth = dp,
+ line = linewidth,
+ type = "box",
+ },
+ new_kern(-wd)
)
+ --
local char = chardata[getfont(current)][getchar(current)]
if char and type(char.unicode) == "table" then -- hackery test
setlistcolor(info,c_ligature)
@@ -821,6 +915,10 @@ local ruledglyph do
end
end
+ function visualizers.setruledglyph(f)
+ ruledglyph = f or ruledglyph
+ end
+
end
local ruledglue do
diff --git a/tex/context/base/mkiv/util-sta.lua b/tex/context/base/mkiv/util-sta.lua
index 27ab5a624..614ef567e 100644
--- a/tex/context/base/mkiv/util-sta.lua
+++ b/tex/context/base/mkiv/util-sta.lua
@@ -289,24 +289,24 @@ end
--
-- local concat = table.concat
--
--- local pdfliteral = nodes.pool.pdfliteral
+-- local pdfpageliteral = nodes.pool.pdfpageliteral
--
-- function demostacker.start(s,t,first,last)
-- local n = whatever[t[last]]
-- -- s.report("start: %s",n)
--- return pdfliteral(n)
+-- return pdfpageliteral(n)
-- end
--
-- function demostacker.stop(s,t,first,last)
-- local n = whatever[false]
-- -- s.report("stop: %s",n)
--- return pdfliteral(n)
+-- return pdfpageliteral(n)
-- end
--
-- function demostacker.change(s,t1,first1,last1,t2,first2,last2)
-- local n = whatever[t2[last2]]
-- -- s.report("change: %s",n)
--- return pdfliteral(n)
+-- return pdfpageliteral(n)
-- end
--
-- demostacker.mode = "switch"
@@ -325,7 +325,7 @@ end
-- r[#r+1] = whatever[t[i]]
-- end
-- -- s.report("start: %s",concat(r," "))
--- return pdfliteral(concat(r," "))
+-- return pdfpageliteral(concat(r," "))
-- end
--
-- function demostacker.stop(s,t,first,last)
@@ -334,7 +334,7 @@ end
-- r[#r+1] = whatever[false]
-- end
-- -- s.report("stop: %s",concat(r," "))
--- return pdfliteral(concat(r," "))
+-- return pdfpageliteral(concat(r," "))
-- end
--
-- function demostacker.change(s,t1,first1,last1,t2,first2,last2)
@@ -346,7 +346,7 @@ end
-- r[#r+1] = whatever[t2[i]]
-- end
-- -- s.report("change: %s",concat(r," "))
--- return pdfliteral(concat(r," "))
+-- return pdfpageliteral(concat(r," "))
-- end
--
-- demostacker.mode = "stack"
diff --git a/tex/context/fonts/mkiv/lm.lfg b/tex/context/fonts/mkiv/lm.lfg
index aebedd01b..ec37a2975 100644
--- a/tex/context/fonts/mkiv/lm.lfg
+++ b/tex/context/fonts/mkiv/lm.lfg
@@ -34,6 +34,8 @@ return {
height = 960,
depth = 40,
},
+ -- [0xFE932] = { xoffset = 50, width = 290 }, -- used prime
+ -- [0x2032] = { xoffset = 50, width = 290 }, -- prime
},
signs = {
-- set dimensions
diff --git a/tex/context/interface/mkii/keys-it.xml b/tex/context/interface/mkii/keys-it.xml
index 86d6868b4..0df2eba36 100644
--- a/tex/context/interface/mkii/keys-it.xml
+++ b/tex/context/interface/mkii/keys-it.xml
@@ -693,6 +693,7 @@
<cd:constant name='bottomoffset' value='offsetfondo'/>
<cd:constant name='bottomspace' value='spaziofondo'/>
<cd:constant name='bottomstate' value='statofondo'/>
+ <cd:constant name='break' value='break'/>
<cd:constant name='buffer' value='buffer'/>
<cd:constant name='cache' value='cache'/>
<cd:constant name='calculate' value='calcola'/>
diff --git a/tex/context/interface/mkiv/i-context.pdf b/tex/context/interface/mkiv/i-context.pdf
index 2cc4b4461..69d91f3b8 100644
--- a/tex/context/interface/mkiv/i-context.pdf
+++ b/tex/context/interface/mkiv/i-context.pdf
Binary files differ
diff --git a/tex/context/interface/mkiv/i-readme.pdf b/tex/context/interface/mkiv/i-readme.pdf
index 90c08a129..11502611e 100644
--- a/tex/context/interface/mkiv/i-readme.pdf
+++ b/tex/context/interface/mkiv/i-readme.pdf
Binary files differ
diff --git a/tex/generic/context/luatex/luatex-fonts-ext.lua b/tex/generic/context/luatex/luatex-fonts-ext.lua
index 7d9c58ccb..15762d9ba 100644
--- a/tex/generic/context/luatex/luatex-fonts-ext.lua
+++ b/tex/generic/context/luatex/luatex-fonts-ext.lua
@@ -13,6 +13,7 @@ end
local fonts = fonts
local otffeatures = fonts.constructors.features.otf
+local getprivate = fonts.constructors.getprivate
-- A few generic extensions.
@@ -290,15 +291,13 @@ local setmetatableindex = table.setmetatableindex
local function additalictowidth(tfmdata,key,value)
local characters = tfmdata.characters
- local resources = tfmdata.resources
local additions = { }
- local private = resources.private
for unicode, old_c in next, characters do
-- maybe check for math
local oldwidth = old_c.width
local olditalic = old_c.italic
if olditalic and olditalic ~= 0 then
- private = private + 1
+ local private = getprivate(tfmdata)
local new_c = {
width = oldwidth + olditalic,
height = old_c.height,
@@ -316,7 +315,6 @@ local function additalictowidth(tfmdata,key,value)
for k, v in next, additions do
characters[k] = v
end
- resources.private = private
end
otffeatures.register {
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua
index a8a7889ca..f2d897b64 100644
--- a/tex/generic/context/luatex/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : c:/data/develop/context/sources/luatex-fonts-merged.lua
-- parent file : c:/data/develop/context/sources/luatex-fonts.lua
--- merge date : 07/17/17 00:20:46
+-- merge date : 07/27/17 16:17:50
do -- begin closure to overcome local limits and interference
@@ -7623,6 +7623,12 @@ function constructors.scaled(scaledpoints,designsize)
return scaledpoints
end
end
+function constructors.getprivate(tfmdata)
+ local properties=tfmdata.properties
+ local private=properties.private
+ properties.private=private+1
+ return private
+end
function constructors.cleanuptable(tfmdata)
if constructors.autocleanup and tfmdata.properties.virtualized then
for k,v in next,tfmdata.characters do
@@ -15556,7 +15562,7 @@ function gposhandlers.pair(f,fontdata,lookupid,lookupoffset,offset,glyphs,nofgly
if first or second then
hash[other]={ first,second or nil }
else
- hash[other]=nil
+ hash[other]=nil
end
end
end
@@ -17351,7 +17357,7 @@ local f_index=formatters["I%05X"]
local f_character_y=formatters["%C"]
local f_character_n=formatters["[ %C ]"]
local check_duplicates=true
-local check_soft_hyphen=false
+local check_soft_hyphen=true
directives.register("otf.checksofthyphen",function(v)
check_soft_hyphen=v
end)
@@ -17911,7 +17917,6 @@ local function unifymissing(fontdata)
require("font-agl")
end
local unicodes={}
- local private=fontdata.private
local resources=fontdata.resources
resources.unicodes=unicodes
for unicode,d in next,fontdata.descriptions do
@@ -19259,62 +19264,73 @@ end
local function checkkerns(lookup)
local steps=lookup.steps
local nofsteps=lookup.nofsteps
+ local kerned=0
for i=1,nofsteps do
local step=steps[i]
if step.format=="pair" then
local coverage=step.coverage
local kerns=true
for g1,d1 in next,coverage do
- if d1[1]~=0 or d1[2]~=0 or d1[4]~=0 then
+ if d1==true then
+ elseif not d1 then
+ elseif d1[1]~=0 or d1[2]~=0 or d1[4]~=0 then
kerns=false
break
end
end
if kerns then
report("turning pairs of step %a of %a lookup %a into kerns",i,lookup.type,lookup.name)
+ local c={}
for g1,d1 in next,coverage do
- coverage[g1]=d1[3]
+ if d1 and d1~=true then
+ c[g1]=d1[3]
+ end
end
+ step.coverage=c
step.format="kern"
+ kerned=kerned+1
end
end
end
+ return kerned
end
local function checkpairs(lookup)
local steps=lookup.steps
local nofsteps=lookup.nofsteps
local kerned=0
- for i=1,nofsteps do
- local step=steps[i]
- if step.format=="pair" then
- local coverage=step.coverage
- local kerns=true
- for g1,d1 in next,coverage do
- for g2,d2 in next,d1 do
- if d2[2] then
- kerns=false
- break
- else
- local v=d2[1]
- if v==true then
- elseif v and (v[1]~=0 or v[2]~=0 or v[4]~=0) then
- kerns=false
- break
- end
+ local function onlykerns(step)
+ local coverage=step.coverage
+ for g1,d1 in next,coverage do
+ for g2,d2 in next,d1 do
+ if d2[2] then
+ return false
+ else
+ local v=d2[1]
+ if v==true then
+ elseif v and (v[1]~=0 or v[2]~=0 or v[4]~=0) then
+ return false
end
end
end
- if kerns then
+ end
+ return coverage
+ end
+ for i=1,nofsteps do
+ local step=steps[i]
+ if step.format=="pair" then
+ local coverage=onlykerns(step)
+ if coverage then
report("turning pairs of step %a of %a lookup %a into kerns",i,lookup.type,lookup.name)
for g1,d1 in next,coverage do
+ local d={}
for g2,d2 in next,d1 do
local v=d2[1]
if v==true then
- d1[g2]=nil
elseif v then
- d1[g2]=v[3]
+ d[g2]=v[3]
end
end
+ coverage[g1]=d
end
step.format="kern"
kerned=kerned+1
@@ -19339,9 +19355,9 @@ function readers.compact(data)
for i=1,#lookups do
local lookup=lookups[i]
local nofsteps=lookup.nofsteps
+ local kind=lookup.type
allsteps=allsteps+nofsteps
if nofsteps>1 then
- local kind=lookup.type
local merg=merged
if kind=="gsub_single" or kind=="gsub_alternate" or kind=="gsub_multiple" then
merged=merged+mergesteps_1(lookup)
@@ -19349,7 +19365,7 @@ function readers.compact(data)
merged=merged+mergesteps_4(lookup)
elseif kind=="gpos_single" then
merged=merged+mergesteps_1(lookup,true)
- checkkerns(lookup)
+ kerned=kerned+checkkerns(lookup)
elseif kind=="gpos_pair" then
merged=merged+mergesteps_2(lookup,true)
kerned=kerned+checkpairs(lookup)
@@ -19361,6 +19377,12 @@ function readers.compact(data)
if merg~=merged then
lookup.merged=true
end
+ elseif nofsteps==1 then
+ if kind=="gpos_single" then
+ kerned=kerned+checkkerns(lookup)
+ elseif kind=="gpos_pair" then
+ kerned=kerned+checkpairs(lookup)
+ end
end
end
else
@@ -19611,6 +19633,7 @@ local forceload=false
local cleanup=0
local syncspace=true
local forcenotdef=false
+local privateoffset=fonts.constructors and fonts.constructors.privateoffset or 0xF0000
local applyruntimefixes=fonts.treatments and fonts.treatments.applyfixes
local wildcard="*"
local default="dflt"
@@ -19775,7 +19798,7 @@ local function copytotfm(data,cache_id)
end
if mathspecs then
for unicode,character in next,characters do
- local d=descriptions[unicode]
+ local d=descriptions[unicode]
local m=d.math
if m then
local italic=m.italic
@@ -19915,6 +19938,7 @@ local function copytotfm(data,cache_id)
properties.fullname=fullname
properties.psname=psname
properties.name=filename or fullname
+ properties.private=properties.private or data.private or privateoffset
return {
characters=characters,
descriptions=descriptions,
@@ -20245,6 +20269,7 @@ local otf=fonts.handlers.otf
local otffeatures=otf.features
local registerotffeature=otffeatures.register
otf.defaultbasealternate="none"
+local getprivate=fonts.constructors.getprivate
local wildcard="*"
local default="dflt"
local formatters=string.formatters
@@ -20335,13 +20360,11 @@ local function registerbasefeature(feature,value)
applied[#applied+1]=feature.."="..tostring(value)
end
local function makefake(tfmdata,name,present)
- local resources=tfmdata.resources
- local private=resources.private
+ local private=getprivate(tfmdata)
local character={ intermediate=true,ligatures={} }
resources.unicodes[name]=private
tfmdata.characters[private]=character
tfmdata.descriptions[private]={ name=name }
- resources.private=private+1
present[name]=private
return character
end
@@ -25879,9 +25902,6 @@ do
end
function otf.featuresprocessor(head,font,attr,direction,n)
local sequences=sequencelists[font]
- if not sequencelists then
- return head,false
- end
nesting=nesting+1
if nesting==1 then
currentfont=font
@@ -26115,6 +26135,77 @@ do
head=tonode(head)
return head,done
end
+ function otf.datasetpositionprocessor(head,font,direction,dataset)
+ currentfont=font
+ tfmdata=fontdata[font]
+ descriptions=tfmdata.descriptions
+ characters=tfmdata.characters
+ local resources=tfmdata.resources
+ marks=resources.marks
+ classes=resources.classes
+ threshold,
+ factor=getthreshold(font)
+ checkmarks=tfmdata.properties.checkmarks
+ if type(dataset)=="number" then
+ dataset=otfdataset(tfmdata,font,0)[dataset]
+ end
+ local sequence=dataset[3]
+ local typ=sequence.type
+ local handler=handlers[typ]
+ local steps=sequence.steps
+ local nofsteps=sequence.nofsteps
+ local head=tonut(head)
+ local done=false
+ local dirstack={}
+ local start=head
+ local initialrl=direction=="TRT" and -1 or 0
+ local rlmode=initialrl
+ local rlparmode=initialrl
+ local topstack=0
+ local merged=steps.merged
+ local position=0
+ while start do
+ local char,id=ischar(start,font)
+ if char then
+ position=position+1
+ local m=merged[char]
+ if m then
+ for i=m[1],m[2] do
+ local step=steps[i]
+ local lookupcache=step.coverage
+ local lookupmatch=lookupcache[char]
+ if lookupmatch then
+ local ok
+ head,start,ok=handler(head,start,dataset,sequence,lookupmatch,rlmode,step,i)
+ if ok then
+ break
+ elseif not start then
+ break
+ end
+ end
+ end
+ if start then
+ start=getnext(start)
+ end
+ else
+ start=getnext(start)
+ end
+ elseif char==false then
+ start=getnext(start)
+ elseif id==glue_code then
+ start=getnext(start)
+ elseif id==math_code then
+ start=getnext(end_of_math(start))
+ elseif id==dir_code then
+ start,topstack,rlmode=txtdirstate(start,dirstack,topstack,rlparmode)
+ elseif id==localpar_code then
+ start,rlparmode,rlmode=pardirstate(start)
+ else
+ start=getnext(start)
+ end
+ end
+ return tonode(head)
+ end
end
local plugins={}
otf.plugins=plugins
@@ -30020,6 +30111,7 @@ local report_afm=logs.reporter("fonts","afm loading")
local setmetatableindex=table.setmetatableindex
local derivetable=table.derive
local findbinfile=resolvers.findbinfile
+local privateoffset=fonts.constructors and fonts.constructors.privateoffset or 0xF0000
local definers=fonts.definers
local readers=fonts.readers
local constructors=fonts.constructors
@@ -30090,7 +30182,7 @@ local function enhance_unify_names(data,filename)
local unicodevector=fonts.encodings.agl.unicodes
local unicodes={}
local names={}
- local private=constructors.privateoffset
+ local private=data.private or privateoffset
local descriptions=data.descriptions
for name,blob in next,data.characters do
local code=unicodevector[name]
@@ -30129,12 +30221,12 @@ local function enhance_unify_names(data,filename)
end
end
data.characters=nil
+ data.private=private
local resources=data.resources
local filename=resources.filename or file.removesuffix(file.basename(filename))
resources.filename=resolvers.unresolve(filename)
resources.unicodes=unicodes
resources.marks={}
- resources.private=private
end
local everywhere={ ["*"]={ ["*"]=true } }
local noflags={ false,false,false,false }
@@ -30488,6 +30580,7 @@ local function copytotfm(data)
properties.fullname=fullname
properties.psname=fullname
properties.name=filename or fullname or fontname
+ properties.private=properties.private or data.private or privateoffset
if next(characters) then
return {
characters=characters,
@@ -30990,6 +31083,7 @@ local function read_from_tfm(specification)
parameters.quad=parameters.quad or parameters[6] or 0
parameters.extra_space=parameters.extra_space or parameters[7] or 0
constructors.enhanceparameters(parameters)
+ properties.private=properties.private or tfmdata.private or privateoffset
if newtfmdata then
elseif constructors.resolvevirtualtoo then
fonts.loggers.register(tfmdata,file.suffix(filename),specification)
@@ -31136,7 +31230,7 @@ do
local originals=tfmdata.characters
local indices={}
local parentfont={ "font",1 }
- local private=fonts.constructors.privateoffset
+ local private=tfmdata or fonts.constructors.privateoffset
local reported=encdone[tfmfile][encfile]
local backmap=vector and table.swapped(vector)
local done={}
@@ -31203,6 +31297,7 @@ do
tfmdata.tounicode=1
tfmdata.embedding="subset"
tfmdata.usedbitmap=bitmap and virtualid
+ tfmdata.private=private
return tfmdata
end
end
@@ -31914,6 +32009,7 @@ if context then
end
local fonts=fonts
local otffeatures=fonts.constructors.features.otf
+local getprivate=fonts.constructors.getprivate
local function initializeitlc(tfmdata,value)
if value then
local parameters=tfmdata.parameters
@@ -32131,14 +32227,12 @@ otffeatures.register {
local setmetatableindex=table.setmetatableindex
local function additalictowidth(tfmdata,key,value)
local characters=tfmdata.characters
- local resources=tfmdata.resources
local additions={}
- local private=resources.private
for unicode,old_c in next,characters do
local oldwidth=old_c.width
local olditalic=old_c.italic
if olditalic and olditalic~=0 then
- private=private+1
+ local private=getprivate(tfmdata)
local new_c={
width=oldwidth+olditalic,
height=old_c.height,
@@ -32156,7 +32250,6 @@ local function additalictowidth(tfmdata,key,value)
for k,v in next,additions do
characters[k]=v
end
- resources.private=private
end
otffeatures.register {
name="italicwidths",