summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-03-30 12:07:47 +0200
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-03-30 12:07:47 +0200
commited2c824995ef51ddb1dfc1fa2a526933cd377cda (patch)
treed70dbfc0cfe6b33c0b87c662d259e5fc53cb9afd /doc
parentf025339d0770904176dd9b32a405b23f809772ae (diff)
downloadcontext-ed2c824995ef51ddb1dfc1fa2a526933cd377cda.tar.gz
2016-03-30 12:01:00
Diffstat (limited to 'doc')
-rw-r--r--doc/context/documents/general/manuals/luatex.pdfbin1017376 -> 1023946 bytes
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-libraries.tex17
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-nodes.tex56
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-titlepage.tex3
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex.tex3
5 files changed, 57 insertions, 22 deletions
diff --git a/doc/context/documents/general/manuals/luatex.pdf b/doc/context/documents/general/manuals/luatex.pdf
index 81a7c42b9..760995ea8 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/sources/general/manuals/luatex/luatex-libraries.tex b/doc/context/sources/general/manuals/luatex/luatex-libraries.tex
index 71d14040b..df81bcea4 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-libraries.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-libraries.tex
@@ -5266,8 +5266,8 @@ registers:
\startfunctioncall
tex.setskip (<number> n, <node> s)
tex.setskip (<string> s, <node> s)
-tex.setskip ('global',<number> n, <node> s)
-tex.setskip ('global',<string> s, <node> s)
+tex.setskip ("global",<number> n, <node> s)
+tex.setskip ("global",<string> s, <node> s)
<node> s = tex.getskip (<number> n)
<node> s = tex.getskip (<string> s)
\stopfunctioncall
@@ -5285,6 +5285,19 @@ tex.scantoks("global",0,"$\int\limits^1_2$")
In the function-based interface, it is possible to define values globally by
using the string \type {global} as the first function argument.
+There are four extra skip related helpers:
+
+\startfunctioncall
+tex.setglue (<number> n, width, stretch, shrink, stretch_order, shrink_order)
+tex.setglue (<string> s, width, stretch, shrink, stretch_order, shrink_order)
+tex.setglue ("global",<number> n, width, stretch, shrink, stretch_order, shrink_order)
+tex.setglue ("global",<string> s, width, stretch, shrink, stretch_order, shrink_order)
+width, stretch, shrink, stretch_order, shrink_order = tex.getglue (<number> n)
+width, stretch, shrink, stretch_order, shrink_order = tex.getglue (<string> s)
+\stopfunctioncall
+
+The other two are \type {tex.setmuglue} and \type {tex.getmuglue}.
+
\subsection{Character code registers}
\TEX's character code tables (\type {\lccode}, \type {\uccode}, \type {\sfcode}, \type
diff --git a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
index 9b67b1f61..a48e2f267 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-nodes.tex
@@ -198,10 +198,14 @@ Id: \showid{ins}
\NC depth \NC number \NC \NC \NR
\NC head/list \NC \syntax{<node>} \NC the first node of the body of this
insert \NC \NR
-\NC spec \NC \syntax{<node>} \NC a pointer to the \type {\splittopskip}
- glue spec \NC \NR
+%NC spec \NC \syntax{<node>} \NC a pointer to the \type {\splittopskip}
+% glue spec \NC \NR
\stoptabulate
+There is a set of extra fields that concern the associated glue: \type {width},
+\type {stretch}, \type {stretch_order}, \type {shrink} and \type {shrink_order}.
+These are all numbers.
+
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 be result. You can use
\type {list} instead (often in functions you want to use local variable swith similar
@@ -279,6 +283,10 @@ Id: \showid{math}
\NC 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},
+\type {stretch}, \type {stretch_order}, \type {shrink} and \type {shrink_order}.
+These are all numbers.
+
\subsubsection{glue nodes}
Skips are about the only type of data objects in traditional \TEX\ that are not a
@@ -292,9 +300,6 @@ called a \type {glue_spec}, and it has the following accessible fields:
\NC stretch_order \NC number \NC \NC \NR
\NC shrink \NC number \NC \NC \NR
\NC shrink_order \NC number \NC \NC \NR
-\NC writable \NC boolean \NC If this is true, you can't assign to this
- \type {glue_spec} because it is one of the
- preallocated special cases. \NC \NR
\stoptabulate
% These objects are reference counted, so there is actually an extra read|-|only
@@ -309,26 +314,41 @@ the content fit in the available space. The \type {effective_glue} function that
takes a glue node and a parent (hlist or vlist) returns the effective width of
that glue item.
-A spec node is normally references to from a glue node:
+A gluespec node is a special kind of node that is used for storing a set of glue
+values in registers. Originally they were also used to store properties of glue
+nodes (using a system of reference counts) but we now keep these properties in
+the glue nodes themselves, which gives a cleaner interface to \LUA.
+
+The indirect spec approach was in fact an optimization in the original \TEX\
+code. First of all it can save quite some memory because all these spaces that
+become glue now share the same specification (only the reference count is
+incremented), and zero testing is also a bit faster because only the pointer has
+to be checked (this is no longer true for engines that implement for instance
+protrusion where we really need to ensure that zero is zero when we test for
+bounds). Another side effect is that glue specifications are read|-|only, so in
+the end copies need to be made when they are used from \LUA\ (each assignment to
+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).
Valid fields: \showfields{glue}\crlf
Id: \showid{glue}
\starttabulate[|lT|l|p|]
-\NC \ssbf field \NC \bf type \NC \bf explanation \NC \NR
-\NC subtype \NC number \NC \type {0} = \type {\skip},
- \type {1-18} = internal glue parameters,
- \type {100-103} = \quote {leader} subtypes \NC \NR
-\NC attr \NC \syntax{<node>} \NC \NC \NR
-\NC spec \NC \syntax{<node>} \NC pointer to a glue_spec item \NC \NR
-\NC leader \NC \syntax{<node>} \NC pointer to a box or rule for leaders \NC \NR
+\NC \ssbf field \NC \bf type \NC \bf explanation \NC \NR
+\NC subtype \NC number \NC \type {0} = \type {\skip},
+ \type {1-18} = internal glue parameters,
+ \type {98-99} = \quote {math glue} subtypes
+ \type {100-103} = \quote {leader} subtypes \NC \NR
+\NC attr \NC \syntax{<node>} \NC \NC \NR
+\NC leader \NC \syntax{<node>} \NC pointer to a box or rule for leaders \NC \NR
+\NC width \NC number \NC \NC \NR
+\NC stretch \NC number \NC \NC \NR
+\NC stretch_order \NC number \NC \NC \NR
+\NC shrink \NC number \NC \NC \NR
+\NC shrink_order \NC number \NC \NC \NR
\stoptabulate
-The indirect spec approach is an optimization in the original \TEX\ code. First
-of all it saves quite some memory because all these spaces that become glue now
-share the same specification, and zero testing is also faster because only the
-pointer has to be checked.
-
The exact meanings of the subtypes are as follows:
\starttabulate[|rT|l|]
diff --git a/doc/context/sources/general/manuals/luatex/luatex-titlepage.tex b/doc/context/sources/general/manuals/luatex/luatex-titlepage.tex
index 20c22160d..8ab56f85d 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-titlepage.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-titlepage.tex
@@ -32,7 +32,8 @@
[align=flushright,
foregroundcolor=blue,
frame=off]
- {\currentdate[month,space,year]\par
+ {\doifsomething{\documentvariable{status}}{\documentvariable{status}\par}
+ \currentdate[month,space,year]\par
Version \documentvariable{version}}
\stopstandardmakeup
diff --git a/doc/context/sources/general/manuals/luatex/luatex.tex b/doc/context/sources/general/manuals/luatex/luatex.tex
index 5dea07094..dd5bfac7c 100644
--- a/doc/context/sources/general/manuals/luatex/luatex.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex.tex
@@ -9,7 +9,8 @@
\dontcomplain
\startdocument
- [version=0.90.0]
+ [version=0.95.0,
+ status=Experimental]
\component luatex-titlepage