summaryrefslogtreecommitdiff
path: root/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-03-26 13:38:18 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-03-26 13:38:18 +0100
commit788487819ccf38a8478cc2afd88e0c0b088d0ec1 (patch)
tree215addbe3b9e293c2958227e7fc8923880b2e71f /doc/context/sources/general/manuals/luatex/luatex-nodes.tex
parentadfe72d5a0c9d7bdc1bd7bc8faabb4d05e21d70a (diff)
downloadcontext-788487819ccf38a8478cc2afd88e0c0b088d0ec1.tar.gz
2016-03-26 13:07:00
Diffstat (limited to 'doc/context/sources/general/manuals/luatex/luatex-nodes.tex')
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-nodes.tex60
1 files changed, 41 insertions, 19 deletions
diff --git a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
index 8ffa9507b..9b67b1f61 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
@@ -1,3 +1,5 @@
+% language=uk
+
\environment luatex-style
\environment luatex-logos
@@ -138,9 +140,9 @@ Id: \showid{hlist}
A warning: never assign a node list to the \type {head} field unless you are sure
its internal link structure is correct, otherwise an error may result.
-Note: the new field name \type {head} was introduced in 0.65 to replace the old
-name \type {list}. Use of the name \type {list} is now deprecated, but it will
-stay available until at least version 0.80.
+Note: the field name \type {head} and \type {list} are both valid. Sometimes it
+makes more sense to refer to a list by \type {head}, sometimes \type {list} makes
+more sense.
\subsubsection{vlist nodes}
@@ -177,7 +179,7 @@ image.
backend specific). \NC \NR
\stoptabulate
-The subtypes 1 and~2 replace the xform and ximage whatsits and in nodelists they
+The subtypes 1 and~2 replace the xform and ximage whatsits and in node lists they
behave like rules of subtype_0 when it comes to dimensions. Subtype~3 only has
dimensions.
@@ -345,15 +347,21 @@ The exact meanings of the subtypes are as follows:
\NC 13 \NC \type {\spaceskip} \NC \NR
\NC 14 \NC \type {\xspaceskip} \NC \NR
\NC 15 \NC \type {\parfillskip} \NC \NR
-\NC 16 \NC \type {\thinmuskip} \NC \NR
-\NC 17 \NC \type {\medmuskip} \NC \NR
-\NC 18 \NC \type {\thickmuskip} \NC \NR
+\NC 16 \NC \type {\mathsurroundskip} \NC \NR
+\NC 17 \NC \type {\thinmuskip} \NC \NR
+\NC 18 \NC \type {\medmuskip} \NC \NR
+\NC 19 \NC \type {\thickmuskip} \NC \NR
+\NC 98 \NC \type {conditional math skip} \NC \NR
+\NC 99 \NC \type {muglue} \NC \NR
\NC 100 \NC \type {\leaders} \NC \NR
\NC 101 \NC \type {\cleaders} \NC \NR
\NC 102 \NC \type {\xleaders} \NC \NR
\NC 103 \NC \type {\gleaders} \NC \NR
\stoptabulate
+A regular word space also results in a \type {spaceskip} subtype (this used to be
+a \type {userskip} with subtype zero).
+
For convenience we provide access to the spec fields directly so that you can
avoid the spec lookup. So, the following fields can also be queried or set. When
you set a field and no spec is set, a spec will automatically be created.
@@ -452,9 +460,15 @@ replaced them by expansion factors that travel with glyph nodes. Apart from a
cleaner approach this is also a step towards a better separation between front-
and backend.
-The \type {is_char} function checks if a node is a glyphnode with a subtype still
+The \type {is_char} function checks if a node is a glyph node with a subtype still
less than 256. This function can be used to determine if applying font logic to a
-glyph node makes sense.
+glyph node makes sense. The value \type {nil} gets returned when the node is not
+a glyph, a character number is returned if the node is still tagged as character
+and \type {false} gets returned otherwise. When nil is returned, the id is also
+returned. The \type {is_glyph} variant doesn't check for a subtype being less
+than 256, so it returns either the character value or nil plus the id. These
+helpers are not always faster than separate calls but they sometimes permit
+making more readable tests.
\subsubsection{margin_kern nodes}
@@ -546,8 +560,8 @@ version as an extension to the \type {small_char}.
\subsubsection{Math core nodes}
First, there are the objects (the \TEX book calls then \quote {atoms}) that are
-associated with the simple math objects: Ord, Op, Bin, Rel, Open, Close, Punct,
-Inner, Over, Under, Vcent. These all have the same fields, and they are combined
+associated with the simple math objects: ord, op, bin, rel, open, close, punct,
+inner, over, under, vcent. These all have the same fields, and they are combined
into a single node type with separate subtypes for differentiation.
\subsubsubsection{simple nodes}
@@ -817,8 +831,8 @@ Id: \showid{dir}
\NC attr \NC \syntax{<node>} \NC \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
-\NC dvi_ptr \NC number \NC a saved dvi buffer byte offset \NC \NR
-\NC dir_h \NC number \NC a saved dvi position \NC \NR
+\NC dvi_ptr \NC number \NC a saved \DVI\ buffer byte offset \NC \NR
+\NC dir_h \NC number \NC a saved \DVI\ position \NC \NR
\stoptabulate
A note on \type {dir} strings. Direction specifiers are three|-|letter
@@ -931,7 +945,7 @@ Id: \showid{whatsit,pdf_dest}
\NC width \NC number \NC \NC \NR
\NC height \NC number \NC \NC \NR
\NC depth \NC number \NC \NC \NR
-\NC named_id \NC number \NC is the dest_id a string value? \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
@@ -969,7 +983,7 @@ Id: \showid{whatsit,pdf_thread}
\NC width \NC number \NC \NC \NR
\NC height \NC number \NC \NC \NR
\NC depth \NC number \NC \NC \NR
-\NC named_id \NC number \NC is the tread_id a string value? \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
@@ -986,7 +1000,7 @@ Id: \showid{whatsit,pdf_start_thread}
\NC width \NC number \NC \NC \NR
\NC height \NC number \NC \NC \NR
\NC depth \NC number \NC \NC \NR
-\NC named_id \NC number \NC is the tread_id a string value? \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
@@ -1022,7 +1036,7 @@ Id: \showid{whatsit,late_lua}
\NC attr \NC \syntax{<node>} \NC \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
+\NC 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
@@ -1161,11 +1175,11 @@ If performance matters you can use an function instead:
\starttabulate[|T|p|]
\NC getnext \NC parsing nodelist always involves this one \NC \NR
-\NC getprev \NC used less but is logical companion to getnext \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 otf handling (glyph nodes are consulted a lot) \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 getdisc \NC returns the \type {pre}, \type {post} and \type {replace} fields and
optionally when true is passed also the tail fields. \NC \NR
@@ -1228,6 +1242,7 @@ summarized this:
\NC \type {insert_after} \NC \yes \NC \yes \NC \NR
\NC \type {insert_before} \NC \yes \NC \yes \NC \NR
\NC \type {is_char} \NC \yes \NC \yes \NC \NR
+\NC \type {is_glyph} \NC \yes \NC \yes \NC \NR
\NC \type {is_direct} \NC \nop \NC \yes \NC \NR
\NC \type {is_node} \NC \yes \NC \yes \NC \NR
\NC \type {kerning} \NC \yes \NC \yes \NC \NR
@@ -1281,6 +1296,13 @@ taken for providing meta information about nodes. Note: The getters do only basi
checking for valid keys. You should just stick to the keys mentioned in the
sections that describe node properties.
+Some nodes have indirect references. For instance a math character refers to a
+family instead of a font. In that case we provide a virtual font field as
+accessor. So, \type {getfont} and \type {.font} can be used on them. The same is
+true for the \type {width}, \type {height} and \type {depth} of glue nodes. These
+actually access the spec node properties, and here we can set as well as get the
+values.
+
\stopchapter
\stopcomponent