summaryrefslogtreecommitdiff
path: root/doc/context/sources/general/manuals/luatex/luatex-modifications.tex
diff options
context:
space:
mode:
authorContext Git Mirror Bot <phg42.2a@gmail.com>2016-03-26 13:38:18 +0100
committerContext Git Mirror Bot <phg42.2a@gmail.com>2016-03-26 13:38:18 +0100
commit788487819ccf38a8478cc2afd88e0c0b088d0ec1 (patch)
tree215addbe3b9e293c2958227e7fc8923880b2e71f /doc/context/sources/general/manuals/luatex/luatex-modifications.tex
parentadfe72d5a0c9d7bdc1bd7bc8faabb4d05e21d70a (diff)
downloadcontext-788487819ccf38a8478cc2afd88e0c0b088d0ec1.tar.gz
2016-03-26 13:07:00
Diffstat (limited to 'doc/context/sources/general/manuals/luatex/luatex-modifications.tex')
-rw-r--r--doc/context/sources/general/manuals/luatex/luatex-modifications.tex133
1 files changed, 99 insertions, 34 deletions
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