summaryrefslogtreecommitdiff
path: root/doc/context/sources/general/manuals/luatex
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
parentadfe72d5a0c9d7bdc1bd7bc8faabb4d05e21d70a (diff)
downloadcontext-788487819ccf38a8478cc2afd88e0c0b088d0ec1.tar.gz
2016-03-26 13:07:00
Diffstat (limited to 'doc/context/sources/general/manuals/luatex')
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-enhancements.tex27
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-fonts.tex49
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-introduction.tex102
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-languages.tex20
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-libraries.tex305
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-lua.tex94
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-math.tex85
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-modifications.tex133
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-nodes.tex60
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-style.tex2
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-titlepage.tex12
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex.tex7
12 files changed, 396 insertions, 500 deletions
diff --git a/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex b/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
index 19d99b74f..37d99a84d 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-enhancements.tex
@@ -1,3 +1,5 @@
+% language=uk
+
\environment luatex-style
\environment luatex-logos
@@ -32,17 +34,15 @@ it may be needed to put these assignments before the above line:
\catcode `\}=2
\stoptyping
-More fine-grained primitives control is possible, you can look up the details in
+More fine|-|grained primitives control is possible, you can look up the details in
\in {section} [luaprimitives]. For simplicity's sake, this manual assumes that you
have executed the \type {\directlua} command as given above.
-The startup behavior documented above is considered stable in the sense that
-there will not be backward|-|incompatible changes any more. However, we can
-decide to promite some primitives to the \LUATEX\ namespace. For instance, after
-version 0.80.1 we promoted some rather generic \PDFTEX\ primitives to core
-\LUATEX\ ones, and the ones inherited frome \ALEPH\ (\OMEGA) are also promoted.
-Effectively this means that we now have the \type {tex}, \type {etex}, \type
-{luatex} and \type {pdftex} (sub)sets left.
+The startup behaviour documented above is considered stable in the sense that
+there will not be backward|-|incompatible changes any more. We have promoted some
+rather generic \PDFTEX\ primitives to core \LUATEX\ ones, and the ones inherited
+frome \ALEPH\ (\OMEGA) are also promoted. Effectively this means that we now have
+the \type {tex}, \type {etex}, \type {luatex} and \type {pdftex} (sub)sets left.
\section{Version information}
@@ -327,7 +327,7 @@ can break up \LUATEX\ pretty bad. If you are not careful while working with the
node list interface, you may even end up with assertion errors from within the
\TEX\ portion of the executable.
-The behavior documented in the above subsection is considered stable in the sense
+The behaviour documented in the above subsection is considered stable in the sense
that there will not be backward-incompatible changes any more.
\subsection{\type {\latelua}}
@@ -478,7 +478,7 @@ preambles.
Catcode tables are a new feature that allows you to switch to a predefined
catcode regime in a single statement. You can have a practically unlimited number
of different tables. This subsystem is backward compatible: if you never use the
-following commands, your document will not notice any difference in behavior
+following commands, your document will not notice any difference in behaviour
compared to traditional \TEX. The contents of each catcode table is independent
from any other catcode tables, and their contents is stored and retrieved from
the format file.
@@ -565,8 +565,9 @@ If this new integer parameter is non|-|zero, then \LUATEX\ will not complain
about non-expandable commands appearing in the middle of a \type {\ifcsname}
expansion. Instead, it will keep getting expanded tokens from the input until it
encounters an \type {\endcsname} command. Use with care! This command is
-experimental: if the input expansion is unbalanced wrt. \type {\csname} \ldots
-\type {\endcsname} pairs, the \LUATEX\ process may hang indefinitely.
+experimental: if the input expansion is unbalanced with respect to \type
+{\csname} \ldots \type {\endcsname} pairs, the \LUATEX\ process may hang
+indefinitely.
\subsection{\type {\suppressoutererror}}
@@ -597,7 +598,7 @@ a $
\section{\type {\matheqnogapstep}}
By default \TEX\ will add one quad between the equation and the number. This is
-hardcoded. A new primitive can control this:
+hard coded. A new primitive can control this:
\startsyntax
\matheqnogapstep = 1000
diff --git a/doc/context/sources/general/manuals/luatex/luatex-fonts.tex b/doc/context/sources/general/manuals/luatex/luatex-fonts.tex
index 937e99c91..745d28c74 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-fonts.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-fonts.tex
@@ -1,3 +1,5 @@
+% language=uk
+
\environment luatex-style
\environment luatex-logos
@@ -54,7 +56,7 @@ The top|-|level keys in the table are as follows:
\NC \NR
\NC psname \NC no \NC no \NC yes \NC string \NC
actual (\POSTSCRIPT) name (this is the PS fontname in the incoming font
- source, also used as fontname identifier in the \PDF\ output, new in 0.43)
+ source, also used as fontname identifier in the \PDF\ output)
\NC \NR
\NC fullname \NC no \NC no \NC yes \NC string \NC
output font name, used as a fallback in the \PDF\ output
@@ -110,16 +112,15 @@ The top|-|level keys in the table are as follows:
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 \type {tex} end. \type {yes}:
- use a reference to the table that is passed to \LUATEX\ (this is the
- default). \type {no}: don't store the table reference, don't cache any lua
- data for this font. \type {renew}: 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.fonts. (new in 0.40.0, before that caching was always
- \type {yes}). 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 ($\approx$
- coroutine)
+ this key controls caching of the \LUA\ table on the \type {tex} end. \type
+ {yes}: use a reference to the table that is passed to \LUATEX\ (this is the
+ default). \type {no}: don't store the table reference, don't cache any \LUA\
+ data for this font. \type {renew}: 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.fonts. 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
+ ($\approx$ coroutine)
\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,
@@ -241,11 +242,11 @@ The following top|-|level keys can be present inside a character hash:
\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 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 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
@@ -271,13 +272,13 @@ entry for the \PDF\ font (or font subset) based on the character|-|level \type
{tounicode} strings, where they are available. If a character does not have a
sensible \UNICODE\ equivalent, do not provide a string either (no empty strings).
-If the font-level \type {tounicode} is not set, then \LUATEX\ will build up \type
+If the font level \type {tounicode} is not set, then \LUATEX\ will build up \type
{/ToUnicode} based on the \TEX\ code points you used, and any character-level
-\type {tounicodes} will be ignored. {\it At the moment, the string format is
-exactly the format that is expected by Adobe \CMAP\ files (\UTF-16BE in
-hexadecimal encoding), minus the enclosing angle brackets. This may change in the
-future.} Small example: the \type {tounicode} for a \type {fi} ligature would be
-\type {00660069}.
+\type {tounicodes} will be ignored. The string format is exactly the format that
+is expected by Adobe \CMAP\ files (\UTF-16BE in hexadecimal encoding), minus the
+enclosing angle brackets. Small example: the \type {tounicode} for a \type {fi}
+ligature would be \type {00660069}. When you pass a number the conversion will be
+done for you.
The presence of \type {extensible} will overrule \type {next}, if that is also
present. It in in turn can be overruled by \type {vert_variants}.
@@ -301,7 +302,7 @@ Each of those components is itself a hash of up to five keys:
\NC extender \NC number \NC One (1) if this part is repeatable, zero (0) otherwise. \NC \NR
\NC start \NC number \NC Maximum overlap at the starting side (in scaled points). \NC \NR
\NC end \NC number \NC Maximum overlap at the ending side (in scaled points). \NC \NR
-\NC advance \NC number \NC Total advance width of this item (can be zero or missing,
+\NC advance \NC number \NC The total advance width of this item (can be zero or missing,
then the natural size of the glyph for character \type {component}
is used). \NC \NR
\stoptabulate
@@ -390,7 +391,7 @@ and \TRUETYPE\ fonts loaded via \LUA. For \TYPEONE\ fonts, you have to set \type
supported at all.
If no special care is needed, \LUATEX\ currently falls back to the
-mapfile|-|based solution used by \PDFTEX\ and \DVIPS. This behavior will be
+mapfile|-|based solution used by \PDFTEX\ and \DVIPS. This behaviour will be
removed in the future, when the existing code becomes integrated in the new
subsystem.
@@ -495,7 +496,7 @@ fonts = {
says that the first referenced font (index 1) in this virtual font is \type
{ptrmr8a} loaded at 10pt, and the second is \type {psyr} loaded at a little over
-9pt. The third one is previously defined font that is known to \LUATEX\ as fontid
+9pt. The third one is previously defined font that is known to \LUATEX\ as font id
\quote {38}.
The array index numbers are used by the character command definitions that are
diff --git a/doc/context/sources/general/manuals/luatex/luatex-introduction.tex b/doc/context/sources/general/manuals/luatex/luatex-introduction.tex
index 5fcc96546..ad03970a5 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-introduction.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-introduction.tex
@@ -1,3 +1,5 @@
+% language=uk
+
\environment luatex-style
\environment luatex-logos
@@ -6,40 +8,36 @@
\startchapter[title=Introduction]
This book will eventually become the reference manual of \LUATEX. At the moment,
-it simply reports the behavior of the executable matching the snapshot or beta
+it simply reports the behaviour of the executable matching the snapshot or beta
release date in the title page. We don't claim it is complete and we assume that
the reader knows about \TEX\ as described in \quotation {The \TEX\ Book}, the
\quotation {\ETEX\ manual}, the \quotation {\PDFTEX\ manual}, etc. Additional
reference material is published in journals of user groups and \CONTEXT\ related
documentation.
-Features may come and go. The current version of \LUATEX\ can be used for
-production (in fact it is used in production by the authors) but users cannot
-depend on complete stability, nor on functionality staying the same. This means
-that when you update your binary, you also need to check if something fundamental
-has changed. Normally this is communicated in articles or messages to a mailing
-list. We're still not at version 1 but when we reach that state the interface
-will be stable. Of course we then can decide to move towards version 2 with
-different properties.
-
-This means that occasionally you can encounter functionality not described here.
-Just consider that experimental then. They are either a playground or are being
-tested in real situations first before being finalized. And we can equally well
-kick them out again. When they stay we will descibe them in the manual or more
-extensively in articles.
+Successive versions brought new functionality, more control, some cleanup of
+internals and experimental features evolved into stable ones or were dropped.
+Already quite early \LUATEX\ could be used for production and it was used in
+production by the authors. Successive versions sometimes demanded a adaption to
+the \LUA\ interfacing, but the concepts were unchanged. The current version can
+be considered stable in functionality and there will be no fundamental changes
+between 0.90 and 1.00. Of course we then can decide to move towards version 2.00
+with different properties.
Don't expect \LUATEX\ to behave the same as \PDFTEX ! Although the core
-functionality of that 8 bit engine is present, \LUATEX\ can behave different due
-to its wide (32 bit) characters, many registers and large memory support. There
-is native \UTF\ input, support for large (more that 8 bit) fonts, and the math
-machinery is tuned for \OPENTYPE\ math. Ther ei ssupport for directional
+functionality of that 8 bit engine was starting point, it has been combined with
+the directional support of \OMEGA\ (\ALEPH). But, \LUATEX\ can behave different
+due to its wide (32 bit) characters, many registers and large memory support.
+There is native \UTF\ input, support for large (more that 8 bit) fonts, and the
+math machinery is tuned for \OPENTYPE\ math. There is support for directional
typesetting too. The log output can differ from other engines and will likely
differ more as we move forward. When you run plain \TEX\ for sure \LUATEX\ runs
-slower than \PDFTEX\ but when you run for instance \CONTEXT\ it might be faster. But
-in any case: 32 bit all||over combined with more features has a price.
+slower than \PDFTEX\ but when you run for instance \CONTEXT\ \MKIV\ it might be
+faster on more complex documents. But in any case: 32 bit all||over combined with
+more features has a price.
\LUATEX\ consists of a number of interrelated but (still) distinguishable parts.
-The organization of the source code is adapted so that it cna glue all these
+The organization of the source code is adapted so that it can glue all these
components together. We continue cleaning up side effects of the accumulated
code in \TEX\ engines (especially code that is not needed any longer).
@@ -47,53 +45,69 @@ code in \TEX\ engines (especially code that is not needed any longer).
\startitem
Most of \PDFTEX\ version 1.40.9, converted to C (with patches from later
releases). Some experimental features have been removed and some utility
- macros are not inherited as their functionality can be done in \LUA. We
- still use the \type {\pdf*} primitive namespace.
+ macros are not inherited as their functionality can be done in \LUA. The
+ number of backend interface commands has been reduced to a few. The
+ extensions are separated from the core (which we keep close to the
+ original \TEX\ core). Some mechanisms like expansion and protrusion can
+ behave different from the original due to some cleanup and optimization.
+ Some whatsit based functionality (image support and reusable content)
+ is now core functionality.
\stopitem
\startitem
The direction model and some other bits from \ALEPH\ RC4 (derived from
- \OMEGA) is included. The related primitives are part of core \LUATEX.
+ \OMEGA) is included. The related primitives are part of core \LUATEX\ but
+ at the node level directional support is no longer based on so called
+ whatsits but on real nodes. In fact, whatsits are now only used for
+ backend specific extensions.
\stopitem
\startitem
- We currently use \LUA\ 5.2.*. At some point we might decide to move to
- 5.3.* but that is yet to be decided.
- \stopitem
- \startitem
- There are few \LUA\ libraries that we consider part of the core \LUA\
- machinery.
+ Neither \ALEPH's I/O translation processes, nor tcx files, nor \ENCTEX\
+ can be used, these encoding|-|related functions are superseded by a
+ \LUA|-|based solution (reader callbacks). In a similar fashion all file
+ \IO\ can be intercepted.
\stopitem
\startitem
+ We currently use \LUA\ 5.2.*. At some point we might decide to move to
+ 5.3.* but that is yet to be decided. There are few \LUA\ libraries that
+ we consider part of the core \LUA\ machinery, for instance \type {lpeg}.
There are additional \LUA\ libraries that interface to the internals of
\TEX.
\stopitem
\startitem
There are various \TEX\ extensions but only those that cannot be done
- using the \LUA\ interfaces.
+ using the \LUA\ interfaces. The math machinery often has two code paths:
+ one traditional and the other more suitable for wide \OPENTYPE\ fonts.
\stopitem
\startitem
The fontloader uses parts of \FONTFORGE\ 2008.11.17 combined with
- additionaL code specific for usage in a \TEX\ engine.
+ additionaL code specific for usage in a \TEX\ engine. We try to minimize
+ specific font support to what \TEX needs: character references and
+ dimensions and delegate everything else to \LUA. That way we keep \TEX\
+ open for extensions without touching the core.
\stopitem
\startitem
- the \METAPOST\ library
+ The \METAPOST\ library is integral part of \LUATEX. This gives \TEX\ some
+ graphical capabilities using a relative high speed graphical subsystem.
+ Again \LUA\ is used as glue between the frontend and backend. Further
+ development of \METAPOST\ is closely related to \LUATEX.
\stopitem
\stopitemize
-Neither \ALEPH's I/O translation processes, nor tcx files, nor \ENCTEX\ can be
-used, these encoding|-|related functions are superseded by a \LUA|-|based
-solution (reader callbacks). Most of the \PDFTEX\ backend is available but via a
-bit different interface.
+The yearly \TEXLIVE\ version is the stable version, any version between them are
+to be considered beta. The beta releases are normally available via the \CONTEXT\
+distribution channels (the garden and so called minimals).
+
+\blank[1*big]
-The yearly \TEXLIVE\ version is the stable version, any version between them is
-considered beta. Keep in mind that new (or changed) features also need to be
-reflected in the macro package that you use.
+Hans Hagen, Harmut Henkel, \crlf
+Taco Hoekwater \& Luigi Scarso
\blank[3*big]
\starttabulate
-\NC \LUATEX \EQ Version \number\luatexversion.\luatexrevision \NC \NR
-\NC \CONTEXT \EQ \contextversion \NC \NR
-\NC timestamp \EQ \currentdate \NC \NR
+\NC Version \EQ \currentdate \NC \NR
+\NC \LUATEX \EQ Snapshot \number\luatexversion.\luatexrevision \NC \NR
+\NC \CONTEXT \EQ \contextversion \NC \NR
\stoptabulate
\stopchapter
diff --git a/doc/context/sources/general/manuals/luatex/luatex-languages.tex b/doc/context/sources/general/manuals/luatex/luatex-languages.tex
index 35ffd945e..ad73a4d31 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-languages.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-languages.tex
@@ -1,3 +1,5 @@
+% language=uk
+
\environment luatex-style
\environment luatex-logos
@@ -59,8 +61,8 @@ stored in the same place as other nodes like boxes and kerns and glues.
In \LUATEX, these two types are merged into one, somewhat larger structure called
a \type {glyph_node}. Besides having the old character, font, and component
-fields, and the new special fields like \quote {attr}
-(see~\in{section}[glyphnodes]), these nodes also contain:
+fields, and the new special fields like \quote {attr} (see~\in {section}
+[glyphnodes]), these nodes also contain:
\startitemize
@@ -153,7 +155,7 @@ but rejected because in practice the current approach is sufficient and it would
not be compatible anyway.
Beware: the values are always saved in the format, independent of the setting
-of \type {\savinghyphcodes} at the mnoment the format is dumped.
+of \type {\savinghyphcodes} at the moment the format is dumped.
\section{The main control loop}
@@ -173,10 +175,10 @@ achieve the same effect.
This change of meaning did happen with \type {\char}, that now generates \quote
{glyph} nodes with a character subtype. In traditional \TEX\ there was a strong
-relationship betwene the 8|-|bit input encoding, hyphenation and glyph staken
+relationship between the 8|-|bit input encoding, hyphenation and glyphs taken
from a font. In \LUATEX\ we have \UTF\ input, and in most cases this maps
directly to a character in a font, apart from glyph replacement in the font
-engine. If you want to access arbitrary glyphs in a font directly you can alwasy
+engine. If you want to access arbitrary glyphs in a font directly you can always
use \LUA\ to do so, because fonts are available as \LUA\ table.
Second, all the results of processing in math mode eventually become nodes with
@@ -207,7 +209,7 @@ control loop.
The only use \LUATEX\ has for \type {\hyphenchar} is at the check whether a word
should be considered for hyphenation at all. If the \type {\hyphenchar} of the font
attached to the first character node in a word is negative, then hyphenation of
-that word is abandoned immediately. {\bf This behavior is added for backward
+that word is abandoned immediately. {\bf This behaviour is added for backward
compatibility only, and the use of \type {\hyphenchar=-1} as a means of
preventing hyphenation should not be used in new \LUATEX\ documents.}
@@ -294,7 +296,7 @@ speed gain would be lost if it had to interpret command sequences while doing so
It is possible to specify extra hyphenation points in compound words by using
\type {{-}{}{-}} for the explicit hyphen character (replace \type {-} by the
actual explicit hyphen character if needed). For example, this matches the word
-\quote {multi|-|word|-|boundaries} and allows an extra break inbetweem \quote
+\quote {multi|-|word|-|boundaries} and allows an extra break inbetween \quote
{boun} and \quote {daries}:
\starttyping
@@ -391,14 +393,14 @@ word boundary).
All languages start out with \type {\prehyphenchar=`\-}, \type {\posthyphenchar=0},
\type {\preexhyphenchar=0} and \type {\postexhyphenchar=0}. When you assign the
values of one of these four parameters, you are actually changing the settings
-for the current \type {\language}, this behavior is compatible with \type {\patterns}
+for the current \type {\language}, this behaviour is compatible with \type {\patterns}
and \type {\hyphenation}.
\LUATEX\ also hyphenates the first word in a paragraph. Words can be up to 256
characters long (up from 64 in \TEX82). Longer words generate an error right now,
but eventually either the limitation will be removed or perhaps it will become
possible to silently ignore the excess characters (this is what happens in
-\TEX82, but there the behavior cannot be controlled).
+\TEX82, but there the behaviour cannot be controlled).
If you are using the \LUA\ function \type {lang.hyphenate}, you should be aware
that this function expects to receive a list of \quote {character} nodes. It will
diff --git a/doc/context/sources/general/manuals/luatex/luatex-libraries.tex b/doc/context/sources/general/manuals/luatex/luatex-libraries.tex
index e03d875f9..71d14040b 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-libraries.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-libraries.tex
@@ -1,3 +1,5 @@
+% language=uk
+
\environment luatex-style
\environment luatex-logos
@@ -31,7 +33,7 @@ This library has functions that register, find and list callbacks. Callbacks are
\LUA\ functions that are called in well defined places. There are two kind of
callbacks: those that mix with existing functionality, and those that (when
enabled) replace functionality. In mosty cases the second category is expected to
-behave similar to the built in functiontionality because in a next step specific
+behave similar to the built in functionality because in a next step specific
data is expected. For instance, you can replace the hyphenation routine. The
function gets a list that can be hyphenated (or not). The final list should be
valid and is (normally) used for constructing a paragraph. Another function can
@@ -63,8 +65,6 @@ whatever it would execute by default (when no callback function is registered at
all). Be warned: this may cause all sorts of grief unless you know {\em exactly}
what you are doing!
-Currently, callbacks are not dumped into the format file.
-
\startfunctioncall
<table> info = callback.list()
\stopfunctioncall
@@ -80,7 +80,7 @@ If the callback is not set, \type {callback.find} returns \type {nil}.
\subsection{File discovery callbacks}
-The behavior documented in this subsection is considered stable in the sense that
+The behaviour documented in this subsection is considered stable in the sense that
there will not be backward|-|incompatible changes any more.
\subsubsection{\type {find_read_file} and \type {find_write_file}}
@@ -220,7 +220,7 @@ Your callback function should have the following conventions:
\stopfunctioncall
The \type {asked_name} is an image file. Your return value is used to open a file
-from the harddisk, so make sure you return something that is considered the name
+from the hard disk, so make sure you return something that is considered the name
of a valid file by your operating system.
\subsection[iocallback]{File reading callbacks}
@@ -353,9 +353,8 @@ end
\stopfunctioncall
If you return \type {nil}, \LUATEX\ will pretend like your callback never
-happened. You can gain a small amount of processing time from that.
-
-This callback does not replace any internal code.
+happened. You can gain a small amount of processing time from that. This callback
+does not replace any internal code.
\subsubsection{\type {process_output_buffer}}
@@ -371,9 +370,8 @@ end
\stopfunctioncall
If you return \type {nil}, \LUATEX\ will pretend like your callback never
-happened. You can gain a small amount of processing time from that.
-
-This callback does not replace any internal code.
+happened. You can gain a small amount of processing time from that. This callback
+does not replace any internal code.
\subsubsection{\type {process_jobname}}
@@ -389,40 +387,8 @@ end
The only argument is the actual job name; you should not use \type {tex.jobname}
inside this function or infinite recursion may occur. If you return \type {nil},
-\LUATEX\ will pretend your callback never happened.
-
-This callback does not replace any internal code.
-
-% \subsubsection{\type {token_filter}}
-%
-% This callback allows you to replace the way \LUATEX\ fetches lexical tokens.
-%
-% \startfunctioncall
-% function()
-% return <table> token
-% end
-% \stopfunctioncall
-%
-% The calling convention for this callback is a bit more complicated than for most
-% other callbacks. The function should either return a \LUA\ table representing a
-% valid to|-|be|-|processed token or tokenlist, or something else like \type {nil}
-% or an empty table.
-%
-% If your \LUA\ function does not return a table representing a valid token, it
-% will be immediately called again, until it eventually does return a useful token
-% or tokenlist (or until you reset the callback value to nil). See the description
-% of \type {token} for some handy functions to be used in conjunction with this
-% callback.
-%
-% If your function returns a single usable token, then that token will be processed
-% by \LUATEX\ immediately. If the function returns a token list (a table consisting
-% of a list of consecutive token tables), then that list will be pushed to the
-% input stack at a completely new token list level, with its token type set to
-% \quote {inserted}. In either case, the returned token(s) will not be fed back
-% into the callback function.
-%
-% Setting this callback to \type {false} has no effect (because otherwise nothing
-% would happen, forever).
+\LUATEX\ will pretend your callback never happened. This callback does not
+replace any internal code.
\subsection{Node list processing callbacks}
@@ -522,7 +488,7 @@ three things:
\startitemize
\startitem
- boolean \type {true} signals succesful processing
+ boolean \type {true} signals succesfull processing
\stopitem
\startitem
\type {<node>} signals that the \quote {head} node should be replaced by the
@@ -793,7 +759,7 @@ end
\stopfunctioncall
This callback replaces the code that prints \LUATEX's banner. Note that for
-successful use, this callback has to be set in the lua initialization script,
+successful use, this callback has to be set in the \LUA\ initialization script,
otherwise it will be seen only after the run has already started.
\subsubsection{\type {stop_run}}
@@ -836,37 +802,7 @@ end
This callback is run from inside the \TEX\ error function, and the idea is to
allow you to do some extra reporting on top of what \TEX\ already does (none of
the normal actions are removed). You may find some of the values in the \type
-{status} table useful.
-
-This callback does not replace any internal code.
-
-\iffalse % this has been retracted for the moment
-
- \startitemize
-
- \sym{message}
-
- is the formal error message \TEX\ has given to the user. (the line after the
- \type {'!'}).
-
- \sym{indicator}
-
- is either a filename (when it is a string) or a location indicator (a number)
- that can mean lots of different things like a token list id or a \type {\read}
- number.
-
- \sym{lineno}
-
- is the current line number.
- \stopitemize
-
- This is an investigative item for 'testing the water' only. The final goal is the
- total replacement of \TEX's error handling routines, but that needs lots of
- adjustments in the web source because \TEX\ deals with errors in a somewhat
- haphazard fashion. This is why the exact definition of \type {indicator} is not
- given here.
-
-\fi
+{status} table useful. This callback does not replace any internal code.
\subsubsection{\type {show_error_message}}
@@ -885,7 +821,7 @@ function()
end
\stopfunctioncall
-This callback replaces the code that prints the extra lua error message.
+This callback replaces the code that prints the extra \LUA\ error message.
\subsubsection{\type {start_file}}
@@ -937,7 +873,7 @@ function(shippingout)
end
\stopfunctioncall
-This callback is called after the pdf page stream has been assembled and before
+This callback is called after the \PDF\ page stream has been assembled and before
the page object gets finalized.
\subsection{Font-related callbacks}
@@ -970,7 +906,7 @@ The \type {id} is the internal number assigned to the font.
The internal structure of the \type {font} table that is to be returned is
explained in \in {chapter} [fonts]. That table is saved internally, so you can
put extra fields in the table for your later \LUA\ code to use. In alternative,
-retval can be a previously defined fontid. This is useful if a previous
+\type {retval} can be a previously defined fontid. This is useful if a previous
definition can be reused instead of creating a whole new font structure.
Setting this callback to \type {false} is pointless as it will prevent font
@@ -978,12 +914,12 @@ loading completely but will nevertheless generate errors.
\section{The \type {epdf} library}
-The \type {epdf} library provides Lua bindings to many \PDF\ access functions
-that are defined by the poppler pdf viewer library (written in C$+{}+$ by
+The \type {epdf} library provides \LUA\ bindings to many \PDF\ access functions
+that are defined by the poppler \PDF\ viewer library (written in C$+{}+$ by
Kristian H\o gsberg, based on xpdf by Derek Noonburg). Within \LUATEX\ (and
\PDFTEX), xpdf functionality is being used since long time to embed \PDF\ files.
The \type {epdf} library shall allow to scrutinize an external \PDF\ file. It
-gives access to its document structure, e.g., catalog, cross-reference table,
+gives access to its document structure: catalog, cross|-|reference table,
individual pages, objects, annotations, info, and metadata. The \LUATEX\ team is
evaluating the possibility of reducing the binding to a basic low level \PDF\
primitives and delegate the complete set of functions to an external shared
@@ -1452,10 +1388,10 @@ case the given length is (at most) the string length.
The returned object can be used in the \type {img} library instead of a filename.
Both the memory stream and it's use in the image library is experimental and can
change. In case you wonder where this can be used: when you use the swiglib
-library for graphic magick, it can return such a userdata object. This permits
-conversion in memory and passing the result directly to the backend. This might
-save some runtime in one|-|pass workflows. This feature is currently not meant
-for production.
+library for \type {graphicmagick}, it can return such a userdata object. This
+permits conversion in memory and passing the result directly to the backend. This
+might save some runtime in one|-|pass workflows. This feature is currently not
+meant for production.
\section{The \type {font} library}
@@ -1521,7 +1457,7 @@ font.setfont(<number> n, <table> f)
\stopfunctioncall
Note that at the moment, each access to the \type {font.fonts} or call to \type
-{font.getfont} creates a lua table for the whole font. This process can be quite
+{font.getfont} creates a \LUA\ table for the whole font. This process can be quite
slow. In a later version of \LUATEX, this interface will change (it will start
using userdata objects instead of actual tables).
@@ -1611,7 +1547,7 @@ of consecutive numbers: in some cases there can be holes in the sequence.
\stopfunctioncall
This function returns either \type {nil}, or a \type {table}, or an array of
-small tables (in the case of a TrueType collection). The returned table(s) will
+small tables (in the case of a \TRUETYPE\ collection). The returned table(s) will
contain some fairly interesting information items from the font(s) defined by the
file:
@@ -1825,11 +1761,11 @@ fontloader.close(f)
\stoptyping
In this case, the \LUATEX\ memory requirement stays below 100MB on the test
-computer, while the internal stucture generated by \type {to_table()} needs more
+computer, while the internal structure generated by \type {to_table()} needs more
than 2GB of memory (the font itself is 6.9MB in disk size).
Only the top|-|level font, the subfont table entries, and the glyphs are virtual
-objects, everything else still produces normal lua values and tables.
+objects, everything else still produces normal \LUA\ values and tables.
If you want to know the valid fields in a font or glyph structure, call the \type
{fields} function on an object of a particular type (either glyph or font):
@@ -3130,9 +3066,8 @@ Test if an (absolute) file name is a readable file.
The return value is the actual absolute filename you should use, because the disk
name is not always the same as the requested name, due to aliases and
-system|-|specific handling under e.g.\ \MSDOS.
-
-Returns \type {nil} if the file does not exist or is not readable.
+system|-|specific handling under e.g.\ \MSDOS. Returns \type {nil} if the file
+does not exist or is not readable.
\subsection{\type {expand_path}}
@@ -3372,7 +3307,7 @@ lua.name[<number> n] = <string> s
<string> s = lua.name[<number> n]
\stopfunctioncall
-If you want to unset a lua name, you can assign \type {nil} to it.
+If you want to unset a \LUA\ name, you can assign \type {nil} to it.
\section{The \type {mplib} library}
@@ -3420,7 +3355,7 @@ with:
\type {pfb}, \type {enc} \NC \NR
\stoptabulate
-Return either the full pathname of the found file, or \type {nil} if the file
+Return either the full path name of the found file, or \type {nil} if the file
cannot be found.
Note that the new version of \MPLIB\ no longer uses binary mem files, so the way
@@ -3466,7 +3401,7 @@ Generally speaking, it is best to keep your chunks small, but beware that all
chunks have to obey proper syntax, like each of them is a small file. For
instance, you cannot split a single statement over multiple chunks.
-In contrast with the normal standalone \type {mpost} command, there is {\em no}
+In contrast with the normal stand alone \type {mpost} command, there is {\em no}
implied \quote{input} at the start of the first chunk.
\subsection{\type {mp:finish}}
@@ -3523,7 +3458,7 @@ you can call:
\NC copy_objects \NC function \NC returns a deep copy of the array of graphic
objects in this \type {fig} \NC \NR
\NC filename \NC function \NC the filename this \type {fig}'s \POSTSCRIPT\
- output would have written to in standalone
+ output would have written to in stand alone
mode \NC \NR
\NC width \NC function \NC the \type {fontcharwd} value \NC \NR
\NC height \NC function \NC the \type {fontcharht} value \NC \NR
@@ -4044,7 +3979,7 @@ is also possible:
This calling method takes glue settings into account and is especially useful for
finding the actual width of a sublist of nodes that are already boxed, for
-example in code like this, which prints the width of the space inbetween the
+example in code like this, which prints the width of the space in between the
\type {a} and \type {b} as it would be if \type {\box0} was used as-is:
\starttyping
@@ -4119,7 +4054,7 @@ This function also accept string \type {id}'s.
<node> t = node.traverse(<node> n)
\stopfunctioncall
-This is a lua iterator that loops over the node list that starts at \type {n}.
+This is a \LUA\ iterator that loops over the node list that starts at \type {n}.
Typically code looks like this:
\starttyping
@@ -4266,7 +4201,7 @@ tail (both \type {n} and \type {m} can change into a new ligature).
<node> h, <node> t, <boolean> success = node.kerning(<node> n, <node> m)
\stopfunctioncall
-Apply \TEX|-|style kerning to the specified nodelist. The tail node \type {m} is
+Apply \TEX|-|style kerning to the specified node list. The tail node \type {m} is
optional. The two returned nodes \type {h} and \type {t} are the head and tail
(either one of these can be an inserted kern node, because special kernings with
word boundaries are possible).
@@ -4457,7 +4392,7 @@ The counterpart of this function returns two values.
{pdf.getxformmargin}}
These function can be used to set and retrieve the margins that are added to the
-natural boundingboxes of the respective objects.
+natural bounding boxes of the respective objects.
\subsection{\type {pdf.h}, \type {pdf.v}}
@@ -4742,11 +4677,11 @@ iteration down to properly process any other, embedded XObjects.
Of course, this is not a very useful example in practise, but for the purpose of
demonstrating \type {pdfscanner}, it is just long enough. It makes use of only
one \type {scanner} method: \type {scanner:pop()}. That function pops the top
-operand of the internal stack, and returns a lua table where the object at index
+operand of the internal stack, and returns a \LUA\ table where the object at index
one is a string representing the type of the operand, and object two is its
value.
-The list of possible operand types and associated lua value types is:
+The list of possible operand types and associated \LUA\ value types is:
\starttabulate[|lT|p|]
\NC integer \NC <number> \NC \NR
@@ -4768,7 +4703,7 @@ In case of \type {string}, please bear in mind that PDF actually supports
different types of strings (with different encodings) in different parts of the
PDF document, so may need to reencode some of the results; \type {pdfscanner}
always outputs the byte stream without reencoding anything. \type {pdfscanner}
-does not differentiate between literal strings and hexidecimal strings (the
+does not differentiate between literal strings and hexadecimal strings (the
hexadecimal values are decoded), and it treats the stream data for inline images
as a string that is the single operand for \type {EI}.
@@ -4873,8 +4808,8 @@ The current list is:
\NC filename \NC name of the current input file \NC \NR
\NC inputid \NC numeric id of the current input \NC \NR
\NC linenumber \NC location in the current input file \NC \NR
-\NC lasterrorstring \NC last tex error string \NC \NR
-\NC lastluaerrorstring \NC last lua error string \NC \NR
+\NC lasterrorstring \NC last \TEX\ error string \NC \NR
+\NC lastluaerrorstring \NC last \LUA\ error string \NC \NR
\NC lastwarningtag \NC last warning string\NC \NR
\NC lastwarningstring \NC last warning tag, normally an indication of in what part\NC \NR
\NC lasterrorcontext \NC last error context string (with newlines) \NC \NR
@@ -4885,8 +4820,8 @@ The current list is:
\NC callbacks \NC total number of executed callbacks so far \NC \NR
\NC indirect_callbacks \NC number of those that were themselves
a result of other callbacks (e.g. file readers) \NC \NR
-\NC luatex_version \NC the luatex version number \NC \NR
-\NC luatex_revision \NC the luatex revision string \NC \NR
+\NC luatex_version \NC the \LUATEX\ version number \NC \NR
+\NC luatex_revision \NC the \LUATEX\ revision string \NC \NR
\NC ini_version \NC \type {true} if this is an \INITEX\ run \NC \NR
\NC shell_escape \NC \type {0} means disabled, \type {1} is restricted and
\type {2} means anything is permitted \NC \NR
@@ -5704,7 +5639,7 @@ makes it suitable for use as a partial line input mechanism:
\starttyping
before\directlua{tex.sprint("\\relax")tex.sprint(" inbetween")}after
\stoptyping
- the space before \type {inbetween} will be gobbled as a result of the \quote
+ the space before \type {in between} will be gobbled as a result of the \quote
{normal} scanning of \type {\relax}.
\stopitem
\stopitemize
@@ -5910,16 +5845,6 @@ will define \type {\LuaTeXformatname} with the same intrinsic meaning as the
documented primitive \type {\formatname}, provided that the control sequences \type
{\LuaTeXformatname} is currently undefined.
-% Second example:
-%
-% \starttyping
-% tex.enableprimitives('Omega',tex.extraprimitives ('omega'))
-% \stoptyping
-%
-% will define a whole series of csnames like \type {\Omegatextdir}, \type
-% {\Omegapardir}, etc., but it will stick with \type {\OmegaVersion} instead of
-% creating the doubly-prefixed \type {\OmegaOmegaVersion}.
-
When \LUATEX\ is run with \type {--ini} only the \TEX82 primitives and \type
{\directlua} are available, so no extra primitives {\bf at all}.
@@ -5970,9 +5895,9 @@ end
\NC luatex \NC \ctxlua{document.showprimitives('luatex') } \NC \NR
\stoptabulate
-Note that \type {'luatex'} does not contain \type {directlua}, as that
-isconsidered to be a core primitive, along with all the \TEX82 primitives, so it
-is part of the list that is returned from \type {'core'}.
+Note that \type {'luatex'} does not contain \type {directlua}, as that is
+considered to be a core primitive, along with all the \TEX82 primitives, so it is
+part of the list that is returned from \type {'core'}.
% \type {'umath'} is a subset of \type {'luatex'} that covers the Unicode math
% primitives as it might be desired to handle the prefixing of that subset
@@ -6138,7 +6063,7 @@ the executable after loading and executing the startup file.
shell_escape_commands \NC string \NC \NC Comma-separated list of command
names that may be executed by \type {\write18} even if \type {shell_escape}
is set to \type {'p'}. Do {\it not\/} use spaces around commas, separate any
- required command arguments by using a space, and use the ASCII double quote
+ required command arguments by using a space, and use the \ASCII\ double quote
(\type {"}) for any needed argument or path quoting
\NC \NR
@@ -6172,12 +6097,12 @@ the executable after loading and executing the startup file.
\NC \NR
\NC formatname \NC string \NC
\NC
- if no format name was given on the commandline, this key will be tested first
+ if no format name was given on the command line, this key will be tested first
instead of simply quitting
\NC \NR
\NC jobname \NC string \NC
\NC
- if no input file name was given on the commandline, this key will be tested
+ if no input file name was given on the command line, this key will be tested
first instead of simply giving up
\NC \NR
\stoptabulate
@@ -6225,132 +6150,6 @@ string if you only want to move to the next line.
You can disable \type {^^} escaping of control characters by passing a value of
zero.
-% \section[luatokens]{The \type {oldtoken} library (obsolete)}
-%
-% {\em Nota Bene: This library will disappear soon. It is replaced by the \type
-% {token} library, that used to be called \type {newroken}.}
-%
-% The \type {token} table contains interface functions to \TEX's handling of
-% tokens. These functions are most useful when combined with the \type
-% {token_filter} callback, but they could be used standalone as well.
-%
-% A token is represented in \LUA\ as a small table. For the moment, this table
-% consists of three numeric entries:
-%
-% \starttabulate[|l|l|p|]
-% \NC \bf index \NC \bf meaning \NC \bf description \NC \NR
-% \NC 1 \NC command code \NC this is a value between~$0$ and~$130$ (approximately)\NC \NR
-% \NC 2 \NC command modifier \NC this is a value between~$0$ and~$2^{21}$ \NC \NR
-% \NC 3 \NC control sequence id \NC for commands that are not the result of control
-% sequences, like letters and characters, it is zero,
-% otherwise, it is a number pointing into the \quote
-% {equivalence table} \NC \NR
-% \stoptabulate
-%
-% \subsection{\type {oldtoken.get_next}}
-%
-% \startfunctioncall
-% token t = oldtoken.get_next()
-% \stopfunctioncall
-%
-% This fetches the next input token from the current input source, without
-% expansion.
-%
-% \subsection{\type {oldtoken.is_expandable}}
-%
-% \startfunctioncall
-% <boolean> b = oldtoken.is_expandable(<token> t)
-% \stopfunctioncall
-%
-% This tests if the token \type {t} could be expanded.
-%
-% \subsection{\type {oldtoken.expand}}
-%
-% \startfunctioncall
-% oldtoken.expand(<token> t)
-% \stopfunctioncall
-%
-% If a token is expandable, this will expand one level of it, so that the first
-% token of the expansion will now be the next token to be read by \type
-% {oldtoken.get_next()}.
-%
-% \subsection{\type {oldtoken.is_activechar}}
-%
-% \startfunctioncall
-% <boolean> b = oldtoken.is_activechar(<token> t)
-% \stopfunctioncall
-%
-% This is a special test that is sometimes handy. Discovering whether some control
-% sequence is the result of an active character turned out to be very hard
-% otherwise.
-%
-% \subsection{\type {oldtoken.create}}
-%
-% \startfunctioncall
-% token t = oldtoken.create(<string> csname)
-% token t = oldtoken.create(<number> charcode)
-% token t = oldtoken.create(<number> charcode, <number> catcode)
-% \stopfunctioncall
-%
-% This is the token factory. If you feed it a string, then it is the name of a
-% control sequence (without leading backslash), and it will be looked up in the
-% equivalence table.
-%
-% If you feed it number, then this is assumed to be an input character, and an
-% optional second number gives its category code. This means it is possible to
-% overrule a character's category code, with a few exceptions: the category codes~0
-% (escape), 9~(ignored), 13~(active), 14~(comment), and 15 (invalid) cannot occur
-% inside a token. The values~0, 9, 14 and~15 are therefore illegal as input to
-% \type {oldtoken.create()}, and active characters will be resolved immediately.
-%
-% Note: unknown string sequences and never defined active characters will result in
-% a token representing an \quote {undefined control sequence} with a near|-|random
-% name. It is {\em not} possible to define brand new control sequences using
-% \type {oldtoken.create}!
-%
-% \subsection{\type {oldtoken.command_name}}
-%
-% \startfunctioncall
-% <string> commandname = oldtoken.command_name(<token> t)
-% \stopfunctioncall
-%
-% This returns the name associated with the \quote {command} value of the token in
-% \LUATEX. There is not always a direct connection between these names and
-% primitives. For instance, all \type {\ifxxx} tests are grouped under \type
-% {if_test}, and the \quote {command modifier} defines which test is to be run.
-%
-% \subsection{\type {oldtoken.command_id}}
-%
-% \startfunctioncall
-% <number> i = oldtoken.command_id(<string> commandname)
-% \stopfunctioncall
-%
-% This returns a number that is the inverse operation of the previous command, to
-% be used as the first item in a token table.
-%
-% \subsection{\type {oldtoken.csname_name}}
-%
-% \startfunctioncall
-% <string> csname = oldtoken.csname_name(<token> t)
-% \stopfunctioncall
-%
-% This returns the name associated with the \quote {equivalence table} value of the
-% token in \LUATEX. It returns the string value of the command used to create the
-% current token, or an empty string if there is no associated control sequence.
-%
-% Keep in mind that there are potentially two control sequences that return the
-% same csname string: single character control sequences and active characters have
-% the same \quote {name}.
-%
-% \subsection{\type {oldtoken.csname_id}}
-%
-% \startfunctioncall
-% <number> i = oldtoken.csname_id(<string> csname)
-% \stopfunctioncall
-%
-% This returns a number that is the inverse operation of the previous command, to
-% be used as the third item in a token table.
-
\subsection{The \type {token} libray}
The current \type {token} library will be replaced by a new one that is more
diff --git a/doc/context/sources/general/manuals/luatex/luatex-lua.tex b/doc/context/sources/general/manuals/luatex/luatex-lua.tex
index 86ddc17e8..5bf4f3475 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-lua.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-lua.tex
@@ -1,3 +1,5 @@
+% language=uk
+
\environment luatex-style
\environment luatex-logos
@@ -26,11 +28,11 @@ interpreter:
\stopitemize
In this mode, it will set \LUA's \type {arg[0]} to the found script name, pushing
-preceding options in negative values and the rest of the commandline in the
+preceding options in negative values and the rest of the command line in the
positive values, just like the \LUA\ interpreter.
\LUATEX\ will exit immediately after executing the specified \LUA\ script and is,
-in effect, a somewhat bulky standalone \LUA\ interpreter with a bunch of extra
+in effect, a somewhat bulky stand alone \LUA\ interpreter with a bunch of extra
preloaded libraries.
\subsection{\LUATEX\ as a \LUA\ byte compiler}
@@ -38,18 +40,18 @@ preloaded libraries.
There are two situations that make \LUATEX\ behave like the \LUA\ byte compiler:
\startitemize[packed]
-\startitem if a \type {--luaconly} option is given on the commandline, or \stopitem
+\startitem if a \type {--luaconly} option is given on the command line, or \stopitem
\startitem if the executable is named \type {texluac} \stopitem
\stopitemize
-In this mode, \LUATEX\ is exactly like \type {luac} from the standalone \LUA\
+In this mode, \LUATEX\ is exactly like \type {luac} from the stand alone \LUA\
distribution, except that it does not have the \type {-l} switch, and that it
accepts (but ignores) the \type {--luaconly} switch.
\subsection{Other commandline processing}
-When the \LUATEX\ executable starts, it looks for the \type {--lua} commandline
-option. If there is no \type {--lua} option, the commandline is interpreted in a
+When the \LUATEX\ executable starts, it looks for the \type {--lua} command line
+option. If there is no \type {--lua} option, the command line is interpreted in a
similar fashion as in traditional \PDFTEX\ and \ALEPH. Some options are accepted
but have no consequence. The following command|-|line options are understood:
@@ -59,7 +61,7 @@ but have no consequence. The following command|-|line options are understood:
\NC --safer \NC disable easily exploitable \LUA\ commands \NC\NR
\NC --nosocket \NC disable the \LUA\ socket library \NC\NR
\NC --help \NC display help and exit \NC\NR
-\NC --ini \NC be iniluatex, for dumping formats \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 --halt-on-error \NC stop processing at the first error\NC \NR
@@ -129,16 +131,16 @@ any other web2c-based typesetting engine, except that \LUATEX\ has a few extra
switches.
If the \type {--lua} option is present, \LUATEX\ will enter an alternative mode
-of commandline processing in comparison to the standard web2c programs.
+of command line processing in comparison to the standard web2c programs.
In this mode, a small series of actions is taken in order. First, it will parse
-the commandline as usual, but it will only interpret a small subset of the
+the command line as usual, but it will only interpret a small subset of the
options immediately: \type {--safer}, \type {--nosocket}, \type
{--[no-]shell-escape}, \type {--enable-write18}, \type {--disable-write18}, \type
{--shell-restricted}, \type {--help}, \type {--version}, and \type {--credits}.
Now it searches for the requested \LUA\ initialization script. If it cannot be
-found using the actual name given on the commandline, a second attempt is made by
+found using the actual name given on the command line, a second attempt is made by
prepending the value of the environment variable \type {LUATEXDIR}, if that
variable is defined in the environment.
@@ -156,10 +158,10 @@ Then it checks the various safety switches. You can use those to disable some
Furthermore, it disables loading of compiled \LUA\ libraries and it makes \type
{io.open()} fail on files that are opened for anything besides reading.
-When \LUATEX\ starts it set the locale to a neutral value. If for some reason you use
-\type {os.locale}, you need to make sire you nil it afterwards because otherise it
-can interfere with code that for instance generates dates. You can nil the
-locale with
+When \LUATEX\ starts it set the locale to a neutral value. If for some reason you
+use \type {os.locale}, you need to make sure you \type {nil} it afterwards
+because otherwise it can interfere with code that for instance generates dates.
+You can nil the locale with
\starttyping
os.setlocale(nil.nil)
@@ -174,15 +176,15 @@ make \type {io.popen()}, \type {os.execute}, \type {os.exec} and \type {os.spawn
adhere to the requested option.
Next the initialization script is loaded and executed. From within the script,
-the entire commandline is available in the \LUA\ table \type {arg}, beginning with
+the entire command line is available in the \LUA\ table \type {arg}, beginning with
\type {arg[0]}, containing the name of the executable. As consequence, the warning
about unrecognized option is suppressed.
-Commandline processing happens very early on. So early, in fact, that none of
+Command line processing happens very early on. So early, in fact, that none of
\TEX's initializations have taken place yet. For that reason, the tables that
deal with typesetting, like \type {tex}, \type {token}, \type {node} and
\type {pdf}, are off|-|limits during the execution of the startup file (they
-are nilled). Special care is taken that \type {texio.write} and \type
+are \type {nil}'d). Special care is taken that \type {texio.write} and \type
{texio.write_nl} function properly, so that you can at least report your actions
to the log file when (and if) it eventually becomes opened (note that \TEX\ does
not even know its \type {\jobname} yet at this point). See \in {chapter} [libraries]
@@ -196,17 +198,17 @@ should not store anything in variables or within tables with these four global
names, as they will be overwritten completely.
We recommend you use the startup file only for your own \TEX|-|independent
-initializations (if you need any), to parse the commandline, set values in the
+initializations (if you need any), to parse the command line, set values in the
\type {texconfig} table, and register the callbacks you need.
-\LUATEX\ allows some of the commandline options to be overridden by reading
+\LUATEX\ allows some of the command line options to be overridden by reading
values from the \type {texconfig} table at the end of script execution (see the
description of the \type {texconfig} table later on in this document for more
details on which ones exactly).
Unless the \type {texconfig} table tells \LUATEX\ not to initialize \KPATHSEA\
at all (set \type {texconfig.kpse_init} to \type {false} for that), \LUATEX\
-acts on some more commandline options after the initialization script is
+acts on some more command line options after the initialization script is
finished: in order to initialize the built|-|in \KPATHSEA\ library properly,
\LUATEX\ needs to know the correct program name to use, and for that it needs to
check \type {--progname}, or \type {--ini} and \type {--fmt}, if \type
@@ -270,7 +272,7 @@ In keeping with the other \TEX|-|like programs in \TEXLIVE, the two \LUA\ functi
{shell_escape} and|/|or \type {shell_escape_commands} in account. Whenever
\LUATEX\ is run with the assumed intention to typeset a document (and by that we
mean that it is called as \type {luatex}, as opposed to \type {texlua}, and that
-the commandline option \type {--luaonly} was not given), it will only run the
+the command line option \type {--luaonly} was not given), it will only run the
four functions above if the matching \type {texmf.cnf} variable(s) or their \type
{texconfig} (see \in {section} [texconfig]) counterparts allow execution of the
requested system command. In \quote {script interpreter} runs of \LUATEX, these
@@ -370,7 +372,7 @@ The \type {os} library has a few extra functions and variables:
The set of consecutive values starting at integer~1 in the table are the
arguments that are passed on to the command (the value at index~1 becomes
\type {arg[0]}). The command is searched for in the execution path, so there
- is normally no need to pass on a fully qualified pathname.
+ is normally no need to pass on a fully qualified path name.
If the argument is a string, then it is automatically converted into a table
by splitting on whitespace. In this case, it is impossible for the command
@@ -483,7 +485,7 @@ LC_NUMERIC=C
\section {\LUA\ modules}
-The implied use of the built|-|in Lua modules in this section is deprecated. If
+The implied use of the built|-|in \LUA\ modules in this section is deprecated. If
you want to use one of these libraries, please start your source file with a
proper \type {require} line. At some point \LUATEX\ will switch to loading these
modules on demand.
@@ -494,42 +496,40 @@ Some modules that are normally external to \LUA\ are statically linked in with
\startitemize
\startitem
- \type {slnunicode}, from the \type {Selene} libraries, \hyphenatedurl
- {http://luaforge.net/projects/sln}. (version 1.1) This library has been
- slightly extended so that the \type {unicode.utf8.*} functions also accept the
- first 256 values of plane~18. This is the range \LUATEX\ uses for raw binary
- output, as explained above.
+ \type {slnunicode}, from the \type {selene} libraries, \hyphenatedurl
+ {http://luaforge.net/projects/sln}. This library has been slightly extended
+ so that the \type {unicode.utf8.*} functions also accept the first 256 values
+ of plane~18. This is the range \LUATEX\ uses for raw binary output, as
+ explained above.
\stopitem
\startitem
- \type {luazip}, from the kepler project,
- \hyphenatedurl{http://www.keplerproject.org/luazip/}. (version 1.2.1, but
- patched for compilation with \LUA\ 5.2)
+ \type {luazip}, from the kepler project, \hyphenatedurl
+ {http://www.keplerproject.org/luazip/}.
\stopitem
\startitem
\type {luafilesystem}, also from the kepler project, \hyphenatedurl
- {http://www.keplerproject.org/luafilesystem/}. (version 1.5.0)
+ {http://www.keplerproject.org/luafilesystem/}.
\stopitem
\startitem
\type {lpeg}, by Roberto Ierusalimschy, \hyphenatedurl
- {http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html}. (version 0.10.2) This
- library is not \UNICODE|-|aware, but interprets strings on a
- byte|-|per|-|byte basis. This mainly means that \type {lpeg.S} cannot be
- used with \UTF\ characters encoded in more than two bytes, and thus \type
- {lpeg.S} will look for one of those two bytes when matching, not the
- combination of the two. The same is true for \type {lpeg.R}, although the
- latter will display an error message if used with multibyte characters.
- Therefore \type {lpeg.R('aä')} results in the message \type {bad argument
- #1 to 'R' (range must have two characters)}, since to \type {lpeg}, \type {ä}
- is two 'characters' (bytes), so \type {aä} totals three. In practice this is
- no real issue.
+ {http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html}. This library is not
+ \UNICODE|-|aware, but interprets strings on a byte|-|per|-|byte basis. This
+ mainly means that \type {lpeg.S} cannot be used with \UTF\ characters encoded
+ in more than two bytes, and thus \type {lpeg.S} will look for one of those
+ two bytes when matching, not the combination of the two. The same is true for
+ \type {lpeg.R}, although the latter will display an error message if used
+ with multibyte characters. Therefore \type {lpeg.R('aä')} results in the
+ message \type {bad argument #1 to 'R' (range must have two characters)},
+ since to \type {lpeg}, \type {ä} is two 'characters' (bytes), so \type {aä}
+ totals three. In practice this is no real issue.
\stopitem
\startitem
\type {lzlib}, by Tiago Dionizio, \hyphenatedurl
- {http://luaforge.net/projects/lzlib/}. (version 0.2)
+ {http://luaforge.net/projects/lzlib/}.
\stopitem
\startitem
@@ -539,9 +539,9 @@ Some modules that are normally external to \LUA\ are statically linked in with
\startitem
\type {luasocket}, by Diego Nehab \hyphenatedurl
- {http://w3.impa.br/~diego/software/luasocket/} (version 2.0.2). The \type
- {.lua} support modules from \type {luasocket} are also preloaded inside the
- executable, there are no external file dependencies.
+ {http://w3.impa.br/~diego/software/luasocket/}. The \type {.lua} support
+ modules from \type {luasocket} are also preloaded inside the executable,
+ there are no external file dependencies.
\stopitem
\stopitemize
diff --git a/doc/context/sources/general/manuals/luatex/luatex-math.tex b/doc/context/sources/general/manuals/luatex/luatex-math.tex
index 5447835db..d28b4e6b5 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-math.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-math.tex
@@ -1,3 +1,5 @@
+% language=uk
+
\environment luatex-style
\environment luatex-logos
@@ -189,7 +191,7 @@ are described as follows:
In \LUATEX\ one can set the styles in more detail which means that you sometimes
have to set both normal and cramped styles to get the effect you want. If we
-force styles in the scriptr using \type {\scriptstyle} and \type {\crampedscriptstyle}
+force styles in the script using \type {\scriptstyle} and \type {\crampedscriptstyle}
we get this:
\startbuffer[demo]
@@ -238,7 +240,7 @@ has resulted in many more parameters than were accessible before.
\starttabulate
\NC \bf primitive name \NC \bf description \NC \NR
-\NC \type {\Umathquad} \NC the width of 18mu's \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
\NC \type {\Umathoperatorsize} \NC minimum size of large operators in display mode \NC \NR
@@ -306,13 +308,14 @@ needed.
\section{Skips around display math}
-The injection of \type {\abovedisplayskip} and \type {\belowdisplayskip} is not symmetrical. An
-above one is always inserted, also when zero, but the below is only inserted when larger than
-zero. Especially the later mkes it sometimes hard to fully control spacing. Therefore \LUATEX\
-comes with a new directive: \type {\mathdisplayskipmode}. The following values apply:
+The injection of \type {\abovedisplayskip} and \type {\belowdisplayskip} is not
+symmetrical. An above one is always inserted, also when zero, but the below is
+only inserted when larger than zero. Especially the later mkes it sometimes hard
+to fully control spacing. Therefore \LUATEX\ comes with a new directive: \type
+{\mathdisplayskipmode}. The following values apply:
\starttabulate
-\NC 0 \NC normal tex behaviour: always above, only below when larger than zero \NC \NR
+\NC 0 \NC normal \TEX\ behaviour: always above, only below when larger than zero \NC \NR
\NC 1 \NC always \NC \NR
\NC 2 \NC only when not zero \NC \NR
\NC 3 \NC never, not even when not zero \NC \NR
@@ -425,24 +428,24 @@ that assumes that an oldstyle \TEX\ font is used. Also, they do not set \type
{\Umathradicaldegreeraise}. These are then automatically initialized to
$5/18$quad, $-10/18$quad, and 60.
-Note 3: If tfm fonts are used, then the \type {\Umathradicalvgap} is not set until
-the first time \LUATEX\ has to typeset a formula because this needs parameters
-from both family2 and family3. This provides a partial backward compatibility
-with \TEX82, but that compatibility is only partial: once the \type
+Note 3: If \TFM\ fonts are used, then the \type {\Umathradicalvgap} is not set
+until the first time \LUATEX\ has to typeset a formula because this needs
+parameters from both family~2 and family~3. This provides a partial backward
+compatibility with \TEX82, but that compatibility is only partial: once the \type
{\Umathradicalvgap} is set, it will not be recalculated any more.
-Note 4: (also if tfm fonts are used) A similar situation arises wrt. \type
-{\Umathspaceafterscript}: it is not set until the first time \LUATEX\ has to
-typeset a formula. This provides some backward compatibility with \TEX82. But
-once the \type {\Umathspaceafterscript} is set, \type {\scriptspace} will never be
-looked at again.
+Note 4: When \TFM\ fonts are used a similar situation arises with respect to
+\type {\Umathspaceafterscript}: it is not set until the first time \LUATEX\ has
+to typeset a formula. This provides some backward compatibility with \TEX82. But
+once the \type {\Umathspaceafterscript} is set, \type {\scriptspace} will never
+be looked at again.
-Note 5: Tfm fonts set \type {\Umathconnectoroverlapmin} to zero because \TEX82\
-always stacks extensibles without any overlap.
+Note 5: Traditional \TFM\ fonts set \type {\Umathconnectoroverlapmin} to zero
+because \TEX82\ always stacks extensibles without any overlap.
-Note 6: The \type {\Umathoperatorsize} is only used in \type {\displaystyle}, and is
-only set in \OPENTYPE\ fonts. In \TFM\ font mode, it is artificially set to one
-scaled point more than the initial attempt's size, so that always the \quote
+Note 6: The \type {\Umathoperatorsize} is only used in \type {\displaystyle}, and
+is only set in \OPENTYPE\ fonts. In \TFM\ font mode, it is artificially set to
+one scaled point more than the initial attempt's size, so that always the \quote
{first next} will be tried, just like in \TEX82.
Note 7: The \type {\Umathradicaldegreeraise} is a special case because it is the
@@ -450,12 +453,12 @@ only parameter that is expressed in a percentage instead of as a number of scale
points.
Note 8: \type {SubscriptShiftDownWithSuperscript} does not actually exist in the
-\quote {standard} Opentype Math font Cambria, but it is useful enough to be
+\quote {standard} \OPENTYPE\ math font Cambria, but it is useful enough to be
added.
Note 9: \type {FractionDelimiterDisplayStyleSize} and \type
-{FractionDelimiterSize} do not actually exist in the \quote {standard} Opentype
-Math font Cambria, but were useful enough to be added.
+{FractionDelimiterSize} do not actually exist in the \quote {standard} \OPENTYPE\
+math font Cambria, but were useful enough to be added.
\section{Math spacing setting}
@@ -540,8 +543,8 @@ like this:
\Umathopordspacing\displaystyle=4mu plus 2mu
\stoptyping
-They are all initialized by initex to the values mentioned in the table in
-Chapter~18 of the \TEX book.
+They are all initialized by \type {initex} to the values mentioned in the table
+in Chapter~18 of the \TEX book.
Note 1: for ease of use as well as for backward compatibility, \type
{\thinmuskip}, \type {\medmuskip} and \type {\thickmuskip} are treated
@@ -587,14 +590,8 @@ followed by its italic correction is used instead.
The vertical placement of a top accent depends on the \type {x_height} of the
font of the accentee (as explained in the \TEX book), but if value that turns out
-to be zero and the font had a MathConstants table, then \type {AccentBaseHeight}
-is used instead.
-
-% there is no bot_accent in opentype math
-%
-% If a math bottom accent has to be placed, the \type {bot_accent} value is checked
-% instead of \type {top_accent}. Because bottom accents do not exist in \TEX82, the
-% \type {\skewchar} kern is ignored.
+to be zero and the font had a \type {MathConstants} table, then \type
+{AccentBaseHeight} is used instead.
The vertical placement of a bottom accent is straight below the accentee, no
correction takes place.
@@ -603,7 +600,7 @@ 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
-fraction only aplies to the stepwise selected shapes and is mostly meant for 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.
@@ -624,15 +621,15 @@ The placement of the degree is controlled by the math parameters \type
\section{Math kerning in super- and subscripts}
-The character fields in a lua-loaded OpenType math font can have a \quote
+The character fields in a \LUA|-|loaded \OPENTYPE\ math font can have a \quote
{mathkern} table. The format of this table is the same as the \quote {mathkern}
table that is returned by the \type {fontloader} library, except that all height
and kern values have to be specified in actual scaled points.
When a super- or subscript has to be placed next to a math item, \LUATEX\ checks
whether the super- or subscript and the nucleus are both simple character items.
-If they are, and if the fonts of both character imtes are OpenType fonts (as
-opposed to legacy \TEX\ fonts), then \LUATEX\ will use the OpenType MATH
+If they are, and if the fonts of both character items are \OPENTYPE\ fonts (as
+opposed to legacy \TEX\ fonts), then \LUATEX\ will use the \OPENTYPE\ math
algorithm for deciding on the horizontal placement of the super- or subscript.
This works as follows:
@@ -656,12 +653,12 @@ This works as follows:
For each of these two locations:
\startitemize
\startitem
- find the mathkern value at this height for the base (for a subscript
+ find the math kern value at this height for the base (for a subscript
placement, this is the bottom_right corner, for a superscript
placement the top_right corner)
\stopitem
\startitem
- find the mathkern value at this height for the script (for a
+ find the math kern value at this height for the script (for a
subscript placement, this is the top_left corner, for a superscript
placement the bottom_left corner)
\stopitem
@@ -676,9 +673,9 @@ This works as follows:
\stopitem
\stopitemize
-The mathkern value at a specific height is the kern value that is specified by the
+The math kern value at a specific height is the kern value that is specified by the
next higher height and kern pair, or the highest one in the character (if there is no
-value high enough in the character), or simply zero (if the character has no mathkern
+value high enough in the character), or simply zero (if the character has no math kern
pairs at all).
\section{Scripts on horizontally extensible items like arrows}
@@ -895,7 +892,7 @@ of \type {\mathsurround}, we can remain compatible.
Normally you will force delimiters to certain sizes by putting an empty box or
rule next to it. The resulting delimiter will either be a character from the
stepwise size range or an extensible. The latter can be quite differently
-positioned that the characters as it depends on the fit aas well as the fact if
+positioned that the characters as it depends on the fit as well as the fact if
the used characters in the font have depth or height. Commands like (plain \TEX
s) \type {\big} need use this feature. In \LUATEX\ we provide a bit more control
by three variants that supporting optional parameters \type {height}, \type
@@ -923,7 +920,7 @@ by three variants that supporting optional parameters \type {height}, \type
The keyword \type {exact} can be used as directive that the real dimensions
should be applied when the criteria can't be met which can happen when we're
-still stepping through the succesively larger variants. When no dimensions are
+still stepping through the successively larger variants. When no dimensions are
given the \type {noaxis} command can be used to prevent shifting over the axis.
You can influence the final class with the keyword \type {class} which will
diff --git a/doc/context/sources/general/manuals/luatex/luatex-modifications.tex b/doc/context/sources/general/manuals/luatex/luatex-modifications.tex
index f0bbe2a26..81d90253f 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-modifications.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-modifications.tex
@@ -1,3 +1,5 @@
+% language=uk
+
\environment luatex-style
\environment luatex-logos
@@ -11,8 +13,8 @@
The first version of \LUATEX\ only had a few extra primitives and it was largely
the same as \PDFTEX. Then we merged substantial parts of \ALEPH\ into the code
-and got more primitives. When we got more stable teh decision was made to clean
-up the rather hybrid nature of the program. This means that some primnitives have
+and got more primitives. When we got more stable the decision was made to clean
+up the rather hybrid nature of the program. This means that some primitives have
been promoted to core primitives, often with a different name, and that others
were removed. This made it possible to start cleaning up the code base. We will
describe most in following paragraphs.
@@ -69,7 +71,7 @@ most still comes from the original. But we divert a bit.
\startsubsection[title=Changes from \ETEX\ 2.2]
Being the de factor standard extension of course we provide the \ETEX\
-functionality, but with a few small adaptions.
+functionality, but with a few small adaptations.
\startitemize
@@ -132,7 +134,7 @@ which in turn triggered renaming primitives.
\stopitem
\startitem
- A number of \quote {pdftex primitives} have been removed as they can be
+ A number of \quote {\PDFTEX\ primitives} have been removed as they can be
implemented using \LUA:
\start \raggedright
@@ -181,7 +183,7 @@ which in turn triggered renaming primitives.
\startitem
The current version of \LUATEX\ no longer replaces and|/|or merges fonts in
- embedded pdf files with fonts of the enveloping \PDF\ document. This
+ embedded \PDF\ files with fonts of the enveloping \PDF\ document. This
regression may be temporary, depending on how the rewritten font backend will
look like.
\stopitem
@@ -213,7 +215,7 @@ which in turn triggered renaming primitives.
\startitem
When \type {\adjustspacing} has value~2, hz optimization will be applied to
- glyphs and kerns. When the valus is~3, only glyphs will be treated. A value
+ glyphs and kerns. When the value is~3, only glyphs will be treated. A value
smaller than~2 disables this feature.
\stopitem
@@ -270,7 +272,7 @@ which in turn triggered renaming primitives.
One change involves the so called xforms and ximages. In \PDFTEX\ these are
implemented as so called whatsits. But contrary to other whatsits they have
dimensions that need to be taken into account when for instance calculating
-optimal linebreaks. In \LUATEX\ these are now promoted to normal nodes, which
+optimal line breaks. In \LUATEX\ these are now promoted to normal nodes, which
simplifies code that needs those dimensions.
Another reason for promotion is that these are useful concepts. Backends can
@@ -293,6 +295,35 @@ typical backend specific ones. The index that gets returned is to be considered
as \quote {just a number} and although it still has the same meaning (object
related) as before, you should not depend on that.
+The protrusion detection mechanism is enhanced a bit to enable a bit more complex
+situations. When protrusion characters are identified some nodes are skipped:
+
+\startitemize[packed]
+\startitem zero glue \stopitem
+\startitem penalties \stopitem
+\startitem empty discretionaries \stopitem
+\startitem normal zero kerns \stopitem
+\startitem rules with zero dimensions \stopitem
+\startitem math nodes with a surround of zero \stopitem
+\startitem dir nodes \stopitem
+\startitem empty horizontal lists \stopitem
+\startitem local par nodes \stopitem
+\startitem inserts, marks and adjusts \stopitem
+\startitem boundaries \stopitem
+\startitem whatsits \stopitem
+\stopitemize
+
+Because this can not be enough, you can also use a boundary node to make the next
+node being ignored. When the boundary value is~1 or~3, the next node will be
+ignored in the test when locating a left boundary condition. When the value is~2
+or~3, the previous node will be ignored when locating a right boundary condition
+(the search goes from right to left). This permits protrusion combined with for
+instance content moved into the margin:
+
+\starttyping
+\boundary1\llap{!\quad}«Who needs protrusion?»
+\stoptyping
+
\stopsubsection
\startsubsection[title=Changes from \ALEPH\ RC4]
@@ -464,7 +495,7 @@ others promoted to core \LUATEX\ primitives. That is only part of the story. In
order to separate the backend specific primitives in de code these commands are
now replaced by only a few. In traditional \TEX\ we only had the \DVI\ backend
but now we have two: \DVI\ and \PDF. Additional functionality is implemented as
-\quote {extensions} in \TEX speak. By seperating more strickly we are able to
+\quote {extensions} in \TEX speak. By separating more strickly we are able to
keep the core (fontend) clean and stable. If for some reason an extra backend
option is needed, it can be implemented without touching the core. The three
\PDF\ backend related primitives are
@@ -484,33 +515,35 @@ has already be the case right from the start. If you want the traditional \PDFTE
primitives (for as far their functionality is still around) you now can do this:
\starttyping
-\protected\def\pdfliteral {\pdfextension literal}
-\protected\def\pdfcolorstack {\pdfextension colorstack}
-\protected\def\pdfsetmatrix {\pdfextension setmatrix}
-\protected\def\pdfsave {\pdfextension save\relax}
-\protected\def\pdfrestore {\pdfextension restore\relax}
-\protected\def\pdfobj {\pdfextension obj }
-\protected\def\pdfrefobj {\pdfextension refobj }
-\protected\def\pdfannot {\pdfextension annot }
-\protected\def\pdfstartlink {\pdfextension startlink }
-\protected\def\pdfendlink {\pdfextension endlink\relax}
-\protected\def\pdfoutline {\pdfextension outline }
-\protected\def\pdfdest {\pdfextension dest }
-\protected\def\pdfthread {\pdfextension thread }
-\protected\def\pdfstartthread {\pdfextension startthread }
-\protected\def\pdfendthread {\pdfextension endthread\relax}
-\protected\def\pdfinfo {\pdfextension info }
-\protected\def\pdfcatalog {\pdfextension catalog }
-\protected\def\pdfnames {\pdfextension names }
-\protected\def\pdfincludechars {\pdfextension includechars }
-\protected\def\pdffontattr {\pdfextension fontattr }
-\protected\def\pdfmapfile {\pdfextension mapfile }
-\protected\def\pdfmapline {\pdfextension mapline }
-\protected\def\pdftrailer {\pdfextension trailer }
-\protected\def\pdfglyphtounicode{\pdfextension glyphtounicode }
+\protected\def\pdfliteral {\pdfextension literal}
+\protected\def\pdfcolorstack {\pdfextension colorstack}
+\protected\def\pdfsetmatrix {\pdfextension setmatrix}
+\protected\def\pdfsave {\pdfextension save\relax}
+\protected\def\pdfrestore {\pdfextension restore\relax}
+\protected\def\pdfobj {\pdfextension obj }
+\protected\def\pdfrefobj {\pdfextension refobj }
+\protected\def\pdfannot {\pdfextension annot }
+\protected\def\pdfstartlink {\pdfextension startlink }
+\protected\def\pdfendlink {\pdfextension endlink\relax}
+\protected\def\pdfoutline {\pdfextension outline }
+\protected\def\pdfdest {\pdfextension dest }
+\protected\def\pdfthread {\pdfextension thread }
+\protected\def\pdfstartthread {\pdfextension startthread }
+\protected\def\pdfendthread {\pdfextension endthread\relax}
+\protected\def\pdfinfo {\pdfextension info }
+\protected\def\pdfcatalog {\pdfextension catalog }
+\protected\def\pdfnames {\pdfextension names }
+\protected\def\pdfincludechars {\pdfextension includechars }
+\protected\def\pdffontattr {\pdfextension fontattr }
+\protected\def\pdfmapfile {\pdfextension mapfile }
+\protected\def\pdfmapline {\pdfextension mapline }
+\protected\def\pdftrailer {\pdfextension trailer }
+\protected\def\pdfglyphtounicode {\pdfextension glyphtounicode }
+\protected\def\pdfsuppressoptionalinfo{\pdfextension suppressoptionalinfo }
+\protected\def\pdfinfoid {\pdfextension infoid }
\stoptyping
-The introspective primitives can bve defines as:
+The introspective primitives can be defined as:
\starttyping
\def\pdftexversion {\numexpr\pdffeedback version\relax}
@@ -673,6 +706,38 @@ The backend is derived from \PDFTEX\ so the same syntax applies. However, the
checking takes place so when this is used it had better be a valid (flushed)
object.
+In order to be (more or less) compatible with \PDFTEX\ we also support the
+option to suppress some info:
+
+\starttyping
+\pdfvariable suppressoptionalinfo \numexpr
+ 0
+ + 1 % PTEX.FullBanner
+ + 2 % PTEX.FileName
+ + 4 % PTEX.PageNumber
+ + 8 % PTEX.InfoDict
+ + 16 % Creator
+ + 32 % CreationDate
+ + 64 % ModDate
+ + 128 % Producer
+ + 256 % Trapped
+ + 512 % ID
+\relax
+\stoptyping
+
+In addition you can overload the trailer id, but we don't do any checking on
+validity, so you have to pass a valid array. The following is like the ones
+normally generated by the engine:
+
+\starttyping
+\pdfvariable trailerid {[
+ <FA052949448907805BA83C1E78896398>
+ <FA052949448907805BA83C1E78896398>
+]}
+\stoptyping
+
+So, you even need to include the brackets!
+
\stopsubsection
\stopsection
@@ -763,7 +828,7 @@ All of the internal code is changed in such a way that if one of the \type
basically the same convention as the callback: a single read into a buffer big
enough to hold the entire file contents. While this uses more memory than the
previous code (that mostly used \type {getc} calls), it can be quite a bit faster
-(depending on your I/O subsystem).
+(depending on your \IO\ subsystem).
\stopsubsection
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
diff --git a/doc/context/sources/general/manuals/luatex/luatex-style.tex b/doc/context/sources/general/manuals/luatex/luatex-style.tex
index 90479adf1..1c79b7695 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-style.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-style.tex
@@ -197,7 +197,7 @@
luaorbitfactor := 1 ;
picture p ; p := lualogo xsized (3PaperWidth/5) ;
- draw p shifted center Page shifted (0,-ypart center ulcorner p) ;
+ draw p shifted center Page shifted (0,-.5ypart center ulcorner p) ;
StopPage ;
\stopuseMPgraphic
diff --git a/doc/context/sources/general/manuals/luatex/luatex-titlepage.tex b/doc/context/sources/general/manuals/luatex/luatex-titlepage.tex
index cf40b8eb8..20c22160d 100644
--- a/doc/context/sources/general/manuals/luatex/luatex-titlepage.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex-titlepage.tex
@@ -23,17 +23,17 @@
frame=off]
{Lua\TeX\\Reference}
- \definedfont[Bold*default at 24pt] \setupinterlinespace
+ \definedfont[Bold*default at 18pt] \setupinterlinespace
\setlayerframed
[page]
- [preset=middletop,
- voffset=.35\paperheight]
- [align=middle,
+ [preset=rightbottom,
+ offset=.01\paperheight]
+ [align=flushright,
foregroundcolor=blue,
frame=off]
- {\doifsomething{\documentvariable{snapshot}}{snapshot \documentvariable{snapshot}}%
- \doifsomething{\documentvariable{beta}} {beta \documentvariable{beta}}}
+ {\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 6640e126e..5dea07094 100644
--- a/doc/context/sources/general/manuals/luatex/luatex.tex
+++ b/doc/context/sources/general/manuals/luatex/luatex.tex
@@ -3,18 +3,13 @@
% \tex vs \type vs \syntax vs. \luatex
% \em \it \/
-% \enabledirectives[nodes.basepass*]
-
-% \unprotect
-% \protect
-
\environment luatex-style
\environment luatex-logos
\dontcomplain
\startdocument
- [beta=0.89.0]
+ [version=0.90.0]
\component luatex-titlepage