From 74326d3975653dbc32ce3cd8b431dba40917e7dc Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Mon, 11 Jul 2016 15:16:51 +0200 Subject: 2016-07-11 13:48:00 --- doc/context/documents/general/manuals/luatex.pdf | Bin 1010997 -> 1734 bytes .../general/manuals/luatex/luatex-languages.tex | 33 ++++ .../manuals/luatex/luatex-modifications.tex | 208 +++++++++++++++++++++ .../general/manuals/luatex/luatex-style.tex | 6 +- 4 files changed, 246 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/context/documents/general/manuals/luatex.pdf b/doc/context/documents/general/manuals/luatex.pdf index e650e7132..3c8dd980c 100644 Binary files a/doc/context/documents/general/manuals/luatex.pdf and b/doc/context/documents/general/manuals/luatex.pdf differ diff --git a/doc/context/sources/general/manuals/luatex/luatex-languages.tex b/doc/context/sources/general/manuals/luatex/luatex-languages.tex index 83969acef..ad7b7b9d6 100644 --- a/doc/context/sources/general/manuals/luatex/luatex-languages.tex +++ b/doc/context/sources/general/manuals/luatex/luatex-languages.tex @@ -212,6 +212,25 @@ as trigger. Here are a few examples of usage: \stopbuffer \typebuffer \start \dontcomplain \hsize 1pt \getbuffer \par \stop +We only accept an explicit hyphen when there is a preceding glyph and we skip a +sequence of explicit hyphens as that normally indicates a \type {--} or \type +{---} ligature in which case we can in a worse case usage get bad node lists +later on due to messed up ligature building as these dashes are ligatures in base +fonts. This is a side effect of the separating the hyphenation, ligaturing and +kerning steps. + +The start and end of a characters is signalled by a glue, penalty, kern or boundary +node. But by default also a hlist, vlist, rule, dir, whatsit, ins, and adjust node +indicate a start or end. You can omit the last set from the test by setting +\type {\hyphenationbounds} to a non|-|zero value: + +\starttabulate[|Tl|l|] +\NC 0 \NC not strict \NC \NR +\NC 1 \NC strict start \NC \NR +\NC 2 \NC strict end \NC \NR +\NC 3 \NC strict start and strict end \NC \NR +\stoptabulate + \section{The main control loop} In \LUATEX's main loop, almost all input characters that are to be typeset are @@ -735,3 +754,17 @@ initialized due to \type {\savinghyphcodes} being larger than zero. \stopchapter \stopcomponent + +% \parindent0pt \hsize=1.1cm +% 12-34-56 \par +% 12-34-\hbox{56} \par +% 12-34-\vrule width 1em height 1.5ex \par +% 12-\hbox{34}-56 \par +% 12-\vrule width 1em height 1.5ex-56 \par +% \hjcode`\1=`\1 \hjcode`\2=`\2 \hjcode`\3=`\3 \hjcode`\4=`\4 \vskip.5cm +% 12-34-56 \par +% 12-34-\hbox{56} \par +% 12-34-\vrule width 1em height 1.5ex \par +% 12-\hbox{34}-56 \par +% 12-\vrule width 1em height 1.5ex-56 \par + diff --git a/doc/context/sources/general/manuals/luatex/luatex-modifications.tex b/doc/context/sources/general/manuals/luatex/luatex-modifications.tex index 7105330a2..549cfe377 100644 --- a/doc/context/sources/general/manuals/luatex/luatex-modifications.tex +++ b/doc/context/sources/general/manuals/luatex/luatex-modifications.tex @@ -777,6 +777,153 @@ normally generated by the engine: So, you even need to include the brackets! +Although we started from a merge of \PDFTEX\ and \ALEPH, by now the code base as +well as functionality has diverted from those parents. Here we show the options +that can be passed to the extensions. + +\starttexsyntax +\pdfextension literal + [ direct | page ] { tokens } +\stoptexsyntax + +\starttexsyntax +\pdfextension dest + num integer | name { tokens }!crlf + [ fitbh | fitbv | fitb | fith| fitv | fit | + fitr | xyz [ zoom ] +\stoptexsyntax + +\starttexsyntax +\pdfextension annot + reserveobjnum | useobjnum + { tokens } +\stoptexsyntax + +\starttexsyntax +\pdfextension save +\stoptexsyntax + +\starttexsyntax +\pdfextension restore +\stoptexsyntax + +\starttexsyntax +\pdfextension setmatrix + { tokens } +\stoptexsyntax + +\starttexsyntax +[ \immediate ] \pdfextension obj + reserveobjnum +\stoptexsyntax + +\starttexsyntax +[ \immediate ] \pdfextension obj + [ useobjnum ] + [ uncompressed ] + [ stream [ attr { tokens } ] ] + [ file ] + { tokens } +\stoptexsyntax + +\starttexsyntax +\pdfextension refobj + +\stoptexsyntax + +\starttexsyntax +\pdfextension colorstack + + set { tokens } | push { tokens } | pop | current +\stoptexsyntax + +\starttexsyntax +\pdfextension startlink + [ attr { tokens } ] + user { tokens } | goto | thread + [ file { tokens } ] + [ page { tokens } | name { tokens } | num integer ] + [ newwindow | nonewwindow ] +\stoptexsyntax + +\starttexsyntax +\pdfextension endlink +\stoptexsyntax + +\starttexsyntax +\pdfextension startthread + num | name { tokens } +\stoptexsyntax + +\starttexsyntax +\pdfextension endthread +\stoptexsyntax + +\starttexsyntax +\pdfextension thread + num | name { tokens } +\stoptexsyntax + +\starttexsyntax +\pdfextension outline + [ attr { tokens } ] + [ useobjnum ] + [ count ] + { tokens } +\stoptexsyntax + +\starttexsyntax +\pdfextension glyphtounicode + { tokens } + { tokens } +\stoptexsyntax + +\starttexsyntax +\pdfextension catalog + { tokens } + [ openaction + user { tokens } | goto | thread + [ file { tokens } ] + [ page { tokens } | name { tokens } | num ] + [ newwindow | nonewwindow ] ] +\stoptexsyntax + +\starttexsyntax +\pdfextension fontattr + + {tokens} +\stoptexsyntax + +\starttexsyntax +\pdfextension mapfile + {tokens} +\stoptexsyntax + +\starttexsyntax +\pdfextension mapline + {tokens} +\stoptexsyntax + +\starttexsyntax +\pdfextension includechars + {tokens} +\stoptexsyntax + +\starttexsyntax +\pdfextension info + {tokens} +\stoptexsyntax + +\starttexsyntax +\pdfextension names + {tokens} +\stoptexsyntax + +\starttexsyntax +\pdfextension trailer + {tokens} +\stoptexsyntax + \stopsection \startsection[title=Directions] @@ -912,6 +1059,67 @@ kerns, should be handled in the input or macro package because there is no way w can predict the expected behaviour. In fact, the \type {\linedir} is just a convenience extra which could also have been implemented using node list parsing. +Another adaptation to the \ALEPH\ directional model is control over shapes driven +by \type {\hangindent} and \type {\parshape}. This is controlled by a new parameter +\type {\shapemode}: + +\starttabulate[|cTB|c|] +\NC \NC \bf \type {\hangindent} \NC \bf \type {\parshape} \NC \NR +\NC 0 \NC normal \NC normal \NC \NR +\NC 1 \NC mirrored \NC normal \NC \NR +\NC 2 \NC normal \NC mirrored \NC \NR +\NC 3 \NC mirrored \NC mirrored \NC \NR +\stoptabulate + +The value is reset to zero (like \type {\hangindent} and \type {\parshape}) +after the paragraph is done with. You can use negative values to preven t +this. + +In \in {figure} [fig:shapemode] a few examples are given. + +\startplacefigure[reference=fig:shapemode,title={The effect of \type {shapemode}.}] + \startcombination[2*3] + {\ruledvbox \bgroup \setuptolerance[verytolerant] + \hsize .45\textwidth \switchtobodyfont[6pt] + \pardir TLT \textdir TLT + \hangindent 40pt \hangafter -3 + \leftskip10pt \input tufte \par + \egroup} {TLT: hangindent} + {\ruledvbox \bgroup \setuptolerance[verytolerant] + \hsize .45\textwidth \switchtobodyfont[6pt] + \pardir TLT \textdir TLT + \parshape 4 0pt .8\hsize 10pt .8\hsize 20pt .8\hsize 0pt \hsize + \input tufte \par + \egroup} {TLT: parshape} + {\ruledvbox \bgroup \setuptolerance[verytolerant] + \hsize .45\textwidth \switchtobodyfont[6pt] + \pardir TRT \textdir TRT + \hangindent 40pt \hangafter -3 + \leftskip10pt \input tufte \par + \egroup} {TRT: hangindent mode 0} + {\ruledvbox \bgroup \setuptolerance[verytolerant] + \hsize .45\textwidth \switchtobodyfont[6pt] + \pardir TRT \textdir TRT + \parshape 4 0pt .8\hsize 10pt .8\hsize 20pt .8\hsize 0pt \hsize + \input tufte \par + \egroup} {TRT: parshape mode 0} + {\ruledvbox \bgroup \setuptolerance[verytolerant] + \hsize .45\textwidth \switchtobodyfont[6pt] + \shapemode=3 + \pardir TRT \textdir TRT + \hangindent 40pt \hangafter -3 + \leftskip10pt \input tufte \par + \egroup} {TRT: hangindent mode 1 & 3} + {\ruledvbox \bgroup \setuptolerance[verytolerant] + \hsize .45\textwidth \switchtobodyfont[6pt] + \shapemode=3 + \pardir TRT \textdir TRT + \parshape 4 0pt .8\hsize 10pt .8\hsize 20pt .8\hsize 0pt \hsize + \input tufte \par + \egroup} {TRT: parshape mode 2 & 3} + \stopcombination +\stopplacefigure + \stopsection \startsection[title=Implementation notes] diff --git a/doc/context/sources/general/manuals/luatex/luatex-style.tex b/doc/context/sources/general/manuals/luatex/luatex-style.tex index 26688abaf..c07dc3b76 100644 --- a/doc/context/sources/general/manuals/luatex/luatex-style.tex +++ b/doc/context/sources/general/manuals/luatex/luatex-style.tex @@ -286,7 +286,7 @@ \unexpanded\def\nonterminal#1>{\mathematics{\langle\hbox{\rm #1}\rangle}} -% taco's brainwave -) +% taco's brainwave -) .. todo: create a typing variant so that we can avoid the !crlf \newcatcodetable\syntaxcodetable @@ -323,6 +323,10 @@ !egroup +\definetyping + [texsyntax] + [color=maincolor] + % end of wave \setupinteraction -- cgit v1.2.3