summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/context/documents/general/manuals/luatex.pdfbin1037938 -> 1039115 bytes
-rw-r--r--doc/context/documents/general/manuals/xml-mkiv.pdfbin1306364 -> 1321606 bytes
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-math.tex2
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-nodes.tex32
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex.tex4
-rw-r--r--doc/context/sources/general/manuals/xml/xml-mkiv.tex103
6 files changed, 129 insertions, 12 deletions
diff --git a/doc/context/documents/general/manuals/luatex.pdf b/doc/context/documents/general/manuals/luatex.pdf
index 8c20ea3ca..c7a492ea8 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 932b4cbaf..c21944c72 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/sources/general/manuals/luatex/luatex-math.tex b/doc/context/sources/general/manuals/luatex/luatex-math.tex
index cb8d198b1..91d2420f5 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-math.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-math.tex
@@ -603,7 +603,7 @@ correction takes place.
Possible locations are \type {top}, \type {bottom}, \type {both} and \type
{center}. When no location is given \type {top} is assumed. An additional
parameter \type {fraction} can be specified followed by a number; a value of for
-instance 1200 means that the criterium is 1.2 times the width of the nuclues. The
+instance 1200 means that the criterium is 1.2 times the width of the nucleus. The
fraction only applies to the stepwise selected shapes and is mostly meant for the
\type {overlay} location. It also works for the other locations but then it
concerns the width.
diff --git a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
index 8d32ab287..7d19d7713 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
@@ -532,6 +532,7 @@ into a single node type with separate subtypes for differentiation.
\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
\stoptabulate
\subsubsubsection{style nodes}
@@ -556,9 +557,9 @@ a trailing \type {'} to signify \quote {cramped} styles.
\NC scriptscript \NC node \NC list of scriptscriptsize alternatives \NC \NR
\stoptabulate
-A warning: never assign a node list to the display, text, script, or
-scriptscript field unless you are sure its internal link structure is
-correct, otherwise an error may be result.
+Warning: never assign a node list to the \type {display}, \type {text}, \type
+{script}, or \type {scriptscript} field unless you are sure its internal link
+structure is correct, otherwise an error may be result.
\subsubsubsection{radical nodes}
@@ -571,11 +572,13 @@ correct, otherwise an error may be result.
\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
\stoptabulate
-A warning: never assign a node list to the nucleus, sub, sup, left, or degree
-field unless you are sure its internal link structure is correct, otherwise an
-error may be result.
+Warning: never assign a node list to the \type {nucleus}, \type {sub}, \type
+{sup}, \type {left}, or \type {degree} field unless you are sure its internal
+link structure is correct, otherwise an error may be result.
\subsubsubsection{fraction nodes}
@@ -586,11 +589,14 @@ error may be result.
\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 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
\stoptabulate
-A warning: never assign a node list to the num, or denom field unless you are
-sure its internal link structure is correct, otherwise an error may be result.
+Warning: never assign a node list to the \type {num}, or \type {denom} field
+unless you are sure its internal link structure is correct, otherwise an error
+may be result.
\subsubsubsection{fence nodes}
@@ -599,8 +605,16 @@ sure its internal link structure is correct, otherwise an error may be result.
\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
\stoptabulate
+Warning: some of these fields are used by the renderer and might get adapted in
+the process.
+
\subsection{whatsit nodes}
Whatsit nodes come in many subtypes that you can ask for by running
diff --git a/doc/context/sources/general/manuals/luatex/luatex.tex b/doc/context/sources/general/manuals/luatex/luatex.tex
index cd67f07f2..7fd436666 100644
--- a/doc/context/sources/general/manuals/luatex/luatex.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex.tex
@@ -12,8 +12,8 @@
\dontcomplain
\startdocument
- [version=0.98.0,
- status=Pre-release]
+ [version=0.98.2,
+ status=pre-release]
\component luatex-titlepage
diff --git a/doc/context/sources/general/manuals/xml/xml-mkiv.tex b/doc/context/sources/general/manuals/xml/xml-mkiv.tex
index 3933c0063..caeff0ceb 100644
--- a/doc/context/sources/general/manuals/xml/xml-mkiv.tex
+++ b/doc/context/sources/general/manuals/xml/xml-mkiv.tex
@@ -3805,6 +3805,109 @@ typesetting often takes relatively more time than the lookup.
\stopsection
+\startsection[title=Finalizers]
+
+The \XML\ parser is also available outside \TEX. Here is an example of its usage.
+We pipe the result to \TEX\ but you can do with \type {t} whatever you like.
+
+\startbuffer
+local x = xml.load("manual-demo-1.xml")
+local t = { }
+
+for c in xml.collected(x,"//*") do
+ if not c.special and not t[c.tg] then
+ t[c.tg] = true
+ end
+end
+
+context.tocontext(table.sortedkeys(t))
+\stopbuffer
+
+\typebuffer
+
+This returns:
+
+\ctxluabuffer
+
+We can wrap this in a finalizer:
+
+\startbuffer
+xml.finalizers.taglist = function(collected)
+ local t = { }
+ for i=1,#collected do
+ local c = collected[i]
+ if not c.special then
+ local tg = c.tg
+ if tg and not t[tg] then
+ t[tg] = true
+ end
+ end
+ end
+ return table.sortedkeys(t)
+end
+\stopbuffer
+
+\typebuffer
+
+Or in a more extensive one:
+
+\startbuffer
+xml.finalizers.taglist = function(collected,parenttoo)
+ local t = { }
+ for i=1,#collected do
+ local c = collected[i]
+ if not c.special then
+ local tg = c.tg
+ if tg and not t[tg] then
+ t[tg] = true
+ end
+ if parenttoo then
+ local p = c.__p__
+ if p and not p.special then
+ local tg = p.tg .. ":" .. tg
+ if tg and not t[tg] then
+ t[tg] = true
+ end
+ end
+ end
+ end
+ end
+ return table.sortedkeys(t)
+end
+\stopbuffer
+
+\typebuffer \ctxluabuffer
+
+Usage is as follows:
+
+\startbuffer
+local x = xml.load("manual-demo-1.xml")
+local t = xml.applylpath(x,"//*/taglist()")
+
+context.tocontext(t)
+\stopbuffer
+
+\typebuffer
+
+And indeed we get:
+
+\ctxluabuffer
+
+But we can also say:
+
+\startbuffer
+local x = xml.load("manual-demo-1.xml")
+local t = xml.applylpath(x,"//*/taglist(true)")
+
+context.tocontext(t)
+\stopbuffer
+
+\typebuffer
+
+Now we get:
+
+\ctxluabuffer
+
\stopchapter
\stopbodymatter