diff options
author | Luigi Scarso <luigi.scarso@gmail.com> | 2016-04-14 09:27:03 +0000 |
---|---|---|
committer | Luigi Scarso <luigi.scarso@gmail.com> | 2016-04-14 09:27:03 +0000 |
commit | a8020de0fdcffefc08a0e49d1495d0ac21a0189f (patch) | |
tree | abea46bcbdbd99136cced7d0127225164c920292 /Master | |
parent | 1ff3dd32a94afec40e90dda8e2c14368e4f3dbe2 (diff) |
updated LuaTeX manual.
git-svn-id: svn://tug.org/texlive/trunk@40500 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/luatex/base/luatex-enhancements.tex | 342 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/base/luatex-fontloader.tex | 48 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/base/luatex-fonts.tex | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/base/luatex-graphics.tex | 20 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/base/luatex-modifications.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/base/luatex-nodes.tex | 6 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/base/luatex-style.tex | 29 | ||||
-rw-r--r-- | Master/texmf-dist/doc/luatex/base/luatex.pdf | bin | 916170 -> 926851 bytes |
8 files changed, 250 insertions, 201 deletions
diff --git a/Master/texmf-dist/doc/luatex/base/luatex-enhancements.tex b/Master/texmf-dist/doc/luatex/base/luatex-enhancements.tex index 4127f93300b..35c27cfb601 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-enhancements.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-enhancements.tex @@ -50,6 +50,8 @@ chapters on fonts and math we discuss a few more new ones. \section{Version information} +\subsection {\type {\luatexbanner}, \type {\luatexversion} and \type {\luatexrevision}} + There are three new primitives to test the version of \LUATEX: \starttabulate[|l|pl|pl|] @@ -80,8 +82,17 @@ The official \LUATEX\ version is defined as follows: \stopitem \stopitemize +\subsection{\type {\formatname}} + +The \type {\formatname} syntax is identical to \type {\jobname}. In \INITEX, the +expansion is empty. Otherwise, the expansion is the value that \type {\jobname} had +during the \INITEX\ run that dumped the currently loaded format. You can use this +token list to provide your own version info. + \section{\UNICODE\ text support} +\subsection {Extended ranges} + Text input and output is now considered to be \UNICODE\ text, so input characters can use the full range of \UNICODE\ ($2^{20}+2^{16}-1 = \hbox{0x10FFFF}$). Later chapters will talk of characters and glyphs. Although these are not @@ -121,6 +132,11 @@ characters on the console. Normalization of the \UNICODE\ input can be handled by a macro package during callback processing (this will be explained in \in {section} [iocallback]). +\subsection{\type {\Uchar}} + +The expandable command \type {\Uchar} reads a number between~0 and $1{,}114{,}111$ +and expands to the associated \UNICODE\ character. + \section{Extended tables} All traditional \TEX\ and \ETEX\ registers can be 16-bit numbers. The affected @@ -401,61 +417,6 @@ in the following example the number \type {8} gets typeset. } \stoptyping -\section{\type {\clearmarks}} - -This primitive complements the \ETEX\ mark primitives and clears a mark class -completely, resetting all three connected mark texts to empty. It is an -immediate command. - -\startsyntax -\clearmarks <16-bit number> -\stopsyntax - -\section{\type {\noligs} and \type {\nokerns}} - -These primitives prohibit ligature and kerning insertion at the time when the -initial node list is built by \LUATEX's main control loop. You can enable these -primitives when you want to do node list processing of \quote {characters}, where -\TEX's normal processing would get in the way. - -\startsyntax -\noligs <integer>!crlf -\nokerns <integer> -\stopsyntax - -These primitives can also be implemented by overloading the ligature building and -kerning functions, i.e.\ by assigning dummy functions to their associated -callbacks. Keep in mind that when you define a font (using \LUA) you can also -omit the kern and ligature tables, which has the same effect as the above. - -\section{\type {\formatname}} - -The \type {\formatname} syntax is identical to \type {\jobname}. In \INITEX, the -expansion is empty. Otherwise, the expansion is the value that \type {\jobname} had -during the \INITEX\ run that dumped the currently loaded format. - -\section{\type {\scantextokens}} - -The syntax of \type {\scantextokens} is identical to \type {\scantokens}. This -primitive is a slightly adapted version of \ETEX's \type {\scantokens}. The -differences are: - -\startitemize -\startitem - The last (and usually only) line does not have a \type {\endlinechar} - appended. -\stopitem -\startitem - \type {\scantextokens} never raises an EOF error, and it does not execute - \type {\everyeof} tokens. -\stopitem -\startitem - There are no \quote {\unknown\ while end of file \unknown} error tests - executed. This allows the expansion to end on a different grouping level or - while a conditional is still incomplete. -\stopitem -\stopitemize - \section {Alignments} \subsection{\tex {alignmark}} @@ -589,7 +550,15 @@ $ x + 1 = a $ \stoptyping -\section{\type {\matheqnogapstep}} +\section {Math} + +\subsection{Extensions} + +We will cover math in its own chapter because not only the font subsystem and +spacing model have been enhanced (thereby introducing many new primitives) but +also because some more control has been added to existing functionality. + +\subsection{\type {\matheqnogapstep}} By default \TEX\ will add one quad between the equation and the number. This is hard coded. A new primitive can control this: @@ -603,17 +572,20 @@ use a step to control the size. A value of zero will suppress the gap. The step is divided by 1000 which is the usual way to mimmick floating point factors in \TEX. -\section{\type {\outputbox}} +\section{Fonts} -\startsyntax -\outputbox = 65535 -\stopsyntax +\subsection{Font syntax} -This new integer parameter allows you to alter the number of the box that will be -used to store the page sent to the output routine. Its default value is 255, and -the acceptable range is from 0 to 65535. +\LUATEX\ will accept a braced argument as a font name: -\section{\type {\fontid} and \type {\setfontid}} +\starttyping +\font\myfont = {cmr10} +\stoptyping + +This allows for embedded spaces, without the need for double quotes. Macro +expansion takes place inside the argument. + +\subsection{\type {\fontid}} \startsyntax \fontid\font @@ -635,59 +607,89 @@ order of loading fonts. For instance, when in \CONTEXT\ virtual math \UNICODE\ fonts are used, we can easily get over a hundred ids in use. Not all ids have to be bound to a real font, after all it's just a number. +\subsection{\type {\setfontid}} + The primitive \type {\setfontid} can be used to enable a font with the given id (which of course needs to be a valid one). -\section{\type {\gleaders}} +\subsection{\type {\noligs} and \type {\nokerns}} -This type of leaders is anchored to the origin of the box to be shipped out. So -they are like normal \type {\leaders} in that they align nicely, except that the -alignment is based on the {\it largest\/} enclosing box instead of the {\it -smallest\/}. The \type {g} stresses this global nature. +These primitives prohibit ligature and kerning insertion at the time when the +initial node list is built by \LUATEX's main control loop. You can enable these +primitives when you want to do node list processing of \quote {characters}, where +\TEX's normal processing would get in the way. -\section{\type {\nohrule} and \type {\novrule}} +\startsyntax +\noligs <integer>!crlf +\nokerns <integer> +\stopsyntax -Because internally box resources and image resources are now stored as a special -kind of rule, we also introduced an empty rule variant. Because introducing a new -keyword can cause incompatibilities, two new primitives were introduced: \type -{\nohrule} and \type {\novrule}. These can be used to reserve space. This is -often more efficient than creating an empty box with fake dimensions). +These primitives can also be implemented by overloading the ligature building and +kerning functions, i.e.\ by assigning dummy functions to their associated +callbacks. Keep in mind that when you define a font (using \LUA) you can also +omit the kern and ligature tables, which has the same effect as the above. -\section{\type {\Uchar}} +\subsection{\type{\nospaces}} -The expandable command \type {\Uchar} reads a number between~0 and $1{,}114{,}111$ -and expands to the associated \UNICODE\ character. +This new primitive can be used to overrule the usual \type {\spaceskip} +related heuristics when a space character is seen in a text flow. The +value~\type{1} triggers no injection while \type{2} results in injection of +a zero skip. Below we see the results for four characters separated by a +space. -\section{\type {\hyphenationmin}} +\startlinecorrection +\startcombination[3*2] + {\ruledhbox to 5cm{\vtop{\hsize 10mm\nospaces=0\relax x x x x \par}\hss}} {\type {0 / hsize 10mm}} + {\ruledhbox to 5cm{\vtop{\hsize 10mm\nospaces=1\relax x x x x \par}\hss}} {\type {1 / hsize 10mm}} + {\ruledhbox to 5cm{\vtop{\hsize 10mm\nospaces=2\relax x x x x \par}\hss}} {\type {2 / hsize 10mm}} + {\ruledhbox to 5cm{\vtop{\hsize 1mm\nospaces=0\relax x x x x \par}\hss}} {\type {0 / hsize 1mm}} + {\ruledhbox to 5cm{\vtop{\hsize 1mm\nospaces=1\relax x x x x \par}\hss}} {\type {1 / hsize 1mm}} + {\ruledhbox to 5cm{\vtop{\hsize 1mm\nospaces=2\relax x x x x \par}\hss}} {\type {2 / hsize 1mm}} +\stopcombination +\stoplinecorrection -This primitive can be used to set the minimal word length, so setting it to a value -of~$5$ means that only words of 6 characters and more will be hyphenated, of course -within the constraints of the \type {\lefthyphenmin} and \type {\righthyphenmin} -values (as stored in the glyph node). This primitive accepts a number and stores -the value with the language. +\section{Tokens, commands and strings} -\section{\type {\boundary}, \type {\noboundary}, \type {\protrusionboundary} and \type -{\wordboundary}} +\subsection{\type {\scantextokens}} -The \type {\noboundary} commands used to inject a whatsit node but now injects a normal -node with type \type {boundary} and subtype~0. In addition you can say: +The syntax of \type {\scantextokens} is identical to \type {\scantokens}. This +primitive is a slightly adapted version of \ETEX's \type {\scantokens}. The +differences are: + +\startitemize +\startitem + The last (and usually only) line does not have a \type {\endlinechar} + appended. +\stopitem +\startitem + \type {\scantextokens} never raises an EOF error, and it does not execute + \type {\everyeof} tokens. +\stopitem +\startitem + There are no \quote {\unknown\ while end of file \unknown} error tests + executed. This allows the expansion to end on a different grouping level or + while a conditional is still incomplete. +\stopitem +\stopitemize + +\subsection{\type {\toksapp}, \type {\tokspre}, \type {\etoksapp} and \type {\etokspre}} + +Instead of: \starttyping -x\boundary 123\relax y +\toks0\expandafter{\the\toks0 foo} \stoptyping -This has the same effect but the subtype is now~1 and the value~123 is stored. -The traditional ligature builder still sees this as a cancel boundary directive -but at the \LUA\ end you can implement different behaviour. The added benefit of -passing this value is a side effect of the generalization. The subtypes~2 and~3 -are used to control protrusion and word boundaries in hyphenation. +you can use: -\section{\type {\vpack}, \type {\hpack} and \type {\tpack}} +\starttyping +\etoksapp0{foo} +\stoptyping -These three primitives are like \type {\vbox}, \type {\hbox} and \type {\vtop} -but don't apply the related callbacks. +The \type {pre} variants prepend instead of append, and the \type {e} variants +expand the passed general text. -\section{\type {\csstring}, \type {\begincsname} and \type {\lastnamedcs}} +\subsection{\type {\csstring}, \type {\begincsname} and \type {\lastnamedcs}} These are somewhat special. The \type {\csstring} primitive is like \type {\string} but it omits the leading escape character. This can be @@ -718,29 +720,46 @@ This is slightly more efficient than constructing the string twice (deep down in \LUATEX\ this also involves some \UTF8 juggling), but probably more relevant is that it saves a few tokens and can make code a bit more more readable. -\section{\type {\toksapp}, \type {\tokspre}, \type {\etoksapp} and \type {\etokspre}} +\subsection{\type {\clearmarks}} -Instead of: +This primitive complements the \ETEX\ mark primitives and clears a mark class +completely, resetting all three connected mark texts to empty. It is an +immediate command. -\starttyping -\toks0\expandafter{\the\toks0 foo} -\stoptyping +\startsyntax +\clearmarks <16-bit number> +\stopsyntax -you can use: +\subsection{\type{\letcharcode}} + +This primitive is still experimental but can be used to assign a meaning to an active +character, as in: \starttyping -\etoksapp0{foo} +\def\foo{bar} \letcharcode123\foo \stoptyping -The \type {pre} variants prepend instead of append, and the \type {e} variants -expand the passed general text. +This can be a bit nicer that using the uppercase tricks (using the property of +\type {\uppercase} that it treats active characters special). -\section{Debugging} +\section{Boxes, rules and leaders} -If \type {\tracingonline} is larger than~2, the node list display will also print -the node number of the nodes. +\subsection{\type {\outputbox}} -\section{Images and Forms} +\startsyntax +\outputbox = 65535 +\stopsyntax + +This new integer parameter allows you to alter the number of the box that will be +used to store the page sent to the output routine. Its default value is 255, and +the acceptable range is from 0 to 65535. + +\subsection{\type {\vpack}, \type {\hpack} and \type {\tpack}} + +These three primitives are like \type {\vbox}, \type {\hbox} and \type {\vtop} +but don't apply the related callbacks. + +\subsection{Images and Forms} These two concepts are now core concepts and no longer whatsits. They are in fact now implemented as rules with special properties. Normal rules have subtype~0, @@ -771,11 +790,58 @@ provides the image with dimensions defined by \type {\saveimageresource}. These optional parameters are not implemented for \type {\saveboxresource}. \starttyping -\pdfrefximage width 20mm height 10mm depth 5mm \pdflastximage -\pdfrefxform width 20mm height 10mm depth 5mm \pdflastxform +\useimageresource width 20mm height 10mm depth 5mm \lastsavedimageresourceindex +\useboxresource width 20mm height 10mm depth 5mm \lastsavedboxresourceindex \stoptyping -\section{\type {\outputmode} and \type {\draftmode}} +\subsection{\type {\nohrule} and \type {\novrule}} + +Because introducing a new keyword can cause incompatibilities, two new primitives +were introduced: \type {\nohrule} and \type {\novrule}. These can be used to +reserve space. This is often more efficient than creating an empty box with fake +dimensions). + +\subsection{\type {\gleaders}} + +This type of leaders is anchored to the origin of the box to be shipped out. So +they are like normal \type {\leaders} in that they align nicely, except that the +alignment is based on the {\it largest\/} enclosing box instead of the {\it +smallest\/}. The \type {g} stresses this global nature. + +\section {Languages} + +\subsection{\type {\hyphenationmin}} + +This primitive can be used to set the minimal word length, so setting it to a value +of~$5$ means that only words of 6 characters and more will be hyphenated, of course +within the constraints of the \type {\lefthyphenmin} and \type {\righthyphenmin} +values (as stored in the glyph node). This primitive accepts a number and stores +the value with the language. + +\subsection{\type {\boundary}, \type {\noboundary}, \type {\protrusionboundary} and \type +{\wordboundary}} + +The \type {\noboundary} commands used to inject a whatsit node but now injects a normal +node with type \type {boundary} and subtype~0. In addition you can say: + +\starttyping +x\boundary 123\relax y +\stoptyping + +This has the same effect but the subtype is now~1 and the value~123 is stored. +The traditional ligature builder still sees this as a cancel boundary directive +but at the \LUA\ end you can implement different behaviour. The added benefit of +passing this value is a side effect of the generalization. The subtypes~2 and~3 +are used to control protrusion and word boundaries in hyphenation. + +\section{Control and debugging} + +\subsection {Tracing} + +If \type {\tracingonline} is larger than~2, the node list display will also print +the node number of the nodes. + +\subsection{\type {\outputmode} and \type {\draftmode}} The \type {\outputmode} variable tells \LUATEX\ what it has to produce: @@ -788,7 +854,9 @@ The value of the \type {\draftmode} counter signals the backend if it should output less. The \PDF\ backend accepts a value of~$1$, while the \DVI\ backend ignores the value. -\section{File syntax} +\section {Files} + +\subsection{File syntax} \LUATEX\ will accept a braced argument as a file name: @@ -800,54 +868,12 @@ ignores the value. This allows for embedded spaces, without the need for double quotes. Macro expansion takes place inside the argument. -\section{Font syntax} - -\LUATEX\ will accept a braced argument as a font name: - -\starttyping -\font\myfont = {cmr10} -\stoptyping - -This allows for embedded spaces, without the need for double quotes. Macro -expansion takes place inside the argument. - -\section{Writing to file} +\subsection{Writing to file} You can now open upto 127 files with \type {\openout}. When no file is open writes will go to the console and log. As a consequence a system command is no longer possible but one can use \type {os.execute} to do the same. -\section{\type{\nospaces}} - -This new primitive can be used to overrule the usual \type {\spaceskip} -related heuristics when a space character is seen in a text flow. The -value~\type{1} triggers no injection while \type{2} results in injection of -a zero skip. Below we see the results for four characters separated by a -space. - -\startlinecorrection -\startcombination[3*2] - {\ruledhbox to 5cm{\vtop{\hsize 10mm\nospaces=0\relax x x x x \par}\hss}} {\type {0 / hsize 10mm}} - {\ruledhbox to 5cm{\vtop{\hsize 10mm\nospaces=1\relax x x x x \par}\hss}} {\type {1 / hsize 10mm}} - {\ruledhbox to 5cm{\vtop{\hsize 10mm\nospaces=2\relax x x x x \par}\hss}} {\type {2 / hsize 10mm}} - {\ruledhbox to 5cm{\vtop{\hsize 1mm\nospaces=0\relax x x x x \par}\hss}} {\type {0 / hsize 1mm}} - {\ruledhbox to 5cm{\vtop{\hsize 1mm\nospaces=1\relax x x x x \par}\hss}} {\type {1 / hsize 1mm}} - {\ruledhbox to 5cm{\vtop{\hsize 1mm\nospaces=2\relax x x x x \par}\hss}} {\type {2 / hsize 1mm}} -\stopcombination -\stoplinecorrection - -\section{\type{\letcharcode}} - -This primitive is still experimental but can be used to assign a meaning to an active -character, as in: - -\starttyping -\def\foo{bar} \letcharcode123\foo -\stoptyping - -This can be a bit nicer that using the uppercase tricks (using the property of -\type {\uppercase} that it treats active characters special). - \stopchapter \stopcomponent diff --git a/Master/texmf-dist/doc/luatex/base/luatex-fontloader.tex b/Master/texmf-dist/doc/luatex/base/luatex-fontloader.tex index 91f1ac69769..43a4f4a46c0 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-fontloader.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-fontloader.tex @@ -263,9 +263,9 @@ local fields = fontloader.fields(f) local fields = fontloader.fields(f.glyphs[0]) \stopfunctioncall -\subsection{Table types} +\section{Table types} -\subsubsection{Top-level} +\subsection{Top-level} The top|-|level keys in the returned table are (the explanations in this part of the documentation are not yet finished): @@ -349,7 +349,7 @@ the documentation are not yet finished): \NC truetype \NC boolean \NC signals a \TRUETYPE\ font \NC \NR \stoptabulate -\subsubsection{Glyph items} +\subsection{Glyph items} The \type {glyphs} is an array containing the per|-|character information (quite a few of these are only present if nonzero). @@ -499,7 +499,7 @@ For clarification, an anchor table could for example look like this : Note: The \type {baselig} table can be sparse! -\subsubsection{map table} +\subsection{map table} The top|-|level map is a list of encoding mappings. Each of those is a table itself. @@ -553,12 +553,12 @@ The \type {enc} table is a bit more verbose: \NC iso_2022_escape \NC string \NC \NC \NR \stoptabulate -\subsubsection{private table} +\subsection{private table} This is the font's private \POSTSCRIPT\ dictionary, if any. Keys and values are both strings. -\subsubsection{cidinfo table} +\subsection{cidinfo table} \starttabulate[|lT|l|p|] \NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR @@ -568,7 +568,7 @@ both strings. \NC version \NC number \NC \NC \NR \stoptabulate -\subsubsection[fontloaderpfminfotable]{pfminfo table} +\subsection[fontloaderpfminfotable]{pfminfo table} The \type {pfminfo} table contains most of the OS/2 information: @@ -643,7 +643,7 @@ The \type {panose} subtable has exactly 10 string keys: \NC xheight \NC string \NC id. \NC \NR \stoptabulate -\subsubsection[fontloadernamestable]{names table} +\subsection[fontloadernamestable]{names table} Each item has two top|-|level keys: @@ -683,7 +683,7 @@ are: \NC wwssubfamily \NC \NC \NR \stoptabulate -\subsubsection{anchor_classes table} +\subsection{anchor_classes table} The anchor_classes classes: @@ -697,7 +697,7 @@ The anchor_classes classes: % type is actually a lookup subtype, not a feature name. Officially, these % strings should be gpos_mark2mark etc. -\subsubsection{gpos table} +\subsection{gpos table} The \type {gpos} table has one array entry for each lookup. (The \type {gpos_} prefix is somewhat redundant.) @@ -768,7 +768,7 @@ Note: the kernclass (as far as we can see) always has one entry so it could be o deep instead. Also the seconds start at \type {[2]} which is close to the fontforge internals so we keep that too. -\subsubsection{gsub table} +\subsection{gsub table} This has identical layout to the \type {gpos} table, except for the type: @@ -782,7 +782,7 @@ type: {gsub_reversecontextchain} \NC \NR \stoptabulate -\subsubsection{ttf_tables and ttf_tab_saved tables} +\subsection{ttf_tables and ttf_tab_saved tables} \starttabulate[|lT|l|p|] \NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR @@ -792,7 +792,7 @@ type: \NC data \NC number \NC \NC \NR \stoptabulate -\subsubsection{mm table} +\subsection{mm table} \starttabulate[|lT|l|p|] \NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR @@ -817,12 +817,12 @@ The \type {axismaps}: \NC max \NC number \NC \NC \NR \stoptabulate -\subsubsection{mark_classes table} +\subsection{mark_classes table} The keys in this table are mark class names, and the values are a space|-|separated string of glyph names in this class. -\subsubsection{math table} +\subsection{math table} \starttabulate[|lT|p|] \NC ScriptPercentScaleDown \NC \NC \NR @@ -886,7 +886,7 @@ space|-|separated string of glyph names in this class. \NC FractionDelimiterDisplayStyleSize \NC \NC \NR \stoptabulate -\subsubsection{validation_state table} +\subsection{validation_state table} \starttabulate[|lT|p|] \NC \rmbf key \NC \bf explanation \NC \NR @@ -902,7 +902,7 @@ space|-|separated string of glyph names in this class. \NC bad_sfnt_header \NC \NC \NR \stoptabulate -\subsubsection{horiz_base and vert_base table} +\subsection{horiz_base and vert_base table} \starttabulate[|lT|l|p|] \NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR @@ -933,7 +933,7 @@ The \type {lang} subtable: The \type {features} points to an array of tables with the same layout except that in those nested tables, the tag represents a language. -\subsubsection{altuni table} +\subsection{altuni table} An array of alternate \UNICODE\ values. Inside that array are hashes with: @@ -943,7 +943,7 @@ An array of alternate \UNICODE\ values. Inside that array are hashes with: \NC variant \NC number \NC the alternative is driven by this unicode selector \NC \NR \stoptabulate -\subsubsection{vert_variants and horiz_variants table} +\subsection{vert_variants and horiz_variants table} \starttabulate[|lT|l|p|] \NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR @@ -964,7 +964,7 @@ The \type {parts} table is an array of smaller tables: \stoptabulate -\subsubsection{mathkern table} +\subsection{mathkern table} \starttabulate[|lT|l|p|] \NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR @@ -982,15 +982,15 @@ Each of the subtables is an array of small hashes with two keys: \NC kern \NC number \NC \NC \NR \stoptabulate -\subsubsection{kerns table} +\subsection{kerns table} Substructure is identical to the per|-|glyph subtable. -\subsubsection{vkerns table} +\subsection{vkerns table} Substructure is identical to the per|-|glyph subtable. -\subsubsection{texdata table} +\subsection{texdata table} \starttabulate[|lT|l|p|] \NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR @@ -998,7 +998,7 @@ Substructure is identical to the per|-|glyph subtable. \NC params \NC array \NC 22 font numeric parameters \NC \NR \stoptabulate -\subsubsection{lookups table} +\subsection{lookups table} Top|-|level \type {lookups} is quite different from the ones at character level. The keys in this hash are strings, the values the actual lookups, represented as diff --git a/Master/texmf-dist/doc/luatex/base/luatex-fonts.tex b/Master/texmf-dist/doc/luatex/base/luatex-fonts.tex index 9a1a7030e5c..7384f3b3ecc 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-fonts.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-fonts.tex @@ -7,6 +7,8 @@ \startchapter[reference=fonts,title={Font structure}] +\section {The font tables} + All \TEX\ fonts are represented to \LUA\ code as tables, and internally as \CCODE~structures. All keys in the table below are saved in the internal font structure if they are present in the table returned by the \type {define_font} @@ -392,6 +394,8 @@ best make sure that there is a \type {tounicode} vector enforced. \section[virtualfonts]{Virtual fonts} +\subsection{The structure} + You have to take the following steps if you want \LUATEX\ to treat the returned table from \type {define_font} as a virtual font: diff --git a/Master/texmf-dist/doc/luatex/base/luatex-graphics.tex b/Master/texmf-dist/doc/luatex/base/luatex-graphics.tex index 205f1703394..91feaaff8ec 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-graphics.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-graphics.tex @@ -14,7 +14,7 @@ The \type {img} library can be used as an alternative to \type {\pdfximage} and {\pdfximagebbox}. Image objects can also be used within virtual fonts via the \type {image} command listed in~\in {section} [virtualfonts]. -\subsection{\type {img.new}} +\subsection{\type {new}} \startfunctioncall <image> var = img.new() @@ -74,7 +74,7 @@ invalid images and we cannot guarantee side effects. A zero dimension image is still included when requested. No special flags are set. A proper workflow will not rely in such a catch but make sure that images are valid. -\subsection{\type {img.keys}} +\subsection{\type {keys}} \startfunctioncall <table> keys = img.keys() @@ -163,7 +163,7 @@ then use it by \LUATEX. If a \PDF\ file to be embedded already contains a \type {/Rotate} specification, the rotation result is the combination of the \type {/Rotate} rotation followed by the \type {transform} operation. -\subsection{\type {img.scan}} +\subsection{\type {scan}} \startfunctioncall <image> var = img.scan(<image> var) @@ -192,7 +192,7 @@ the available info like image width and height, and then throw away \type {a} again by saying \type {a=nil}. In that case no image object will be reserved in the PDF, and the used memory will be cleaned up automatically. -\subsection{\type {img.copy}} +\subsection{\type {copy}} \startfunctioncall <image> var = img.copy(<image> var) @@ -207,7 +207,7 @@ Afterwards, \type {a} and \type {b} still reference the same actual image dictionary, but the dimensions for \type {b} can now be changed from their initial values that were just copies from \type {a}. -\subsection{\type {img.write}} +\subsection{\type {write}} \startfunctioncall <image> var = img.write(<image> var) @@ -229,7 +229,7 @@ img.write { filename = "foo.png" } The \type {<image>} variable is returned in case you want it for later processing. -\subsection{\type {img.immediatewrite}} +\subsection{\type {immediatewrite}} \startfunctioncall <image> var = img.immediatewrite(<image> var) @@ -253,7 +253,7 @@ a = img.immediatewrite { filename = "foo.png" } The \type {<image>} variable is returned and you will most likely need it. -\subsection{\type {img.node}} +\subsection{\type {node}} \startfunctioncall <node> n = img.node(<image> var) @@ -275,7 +275,7 @@ This example outputs an image: node.write(img.node{filename="foo.png"}) \stoptyping -\subsection{\type {img.types}} +\subsection{\type {types}} \startfunctioncall <table> types = img.types() @@ -285,7 +285,7 @@ This function returns a list with the supported image file type names, currently these are \type {pdf}, \type {png}, \type {jpg}, \type {jp2} (JPEG~2000), and \type {jbig2}. -\subsection{\type {img.boxes}} +\subsection{\type {boxes}} \startfunctioncall <table> boxes = img.boxes() @@ -300,7 +300,7 @@ these are \type {media}, \type {crop}, \type {bleed}, \type {trim}, and \type The \MP\ library interface registers itself in the table \type {mplib}. It is based on \MPLIB\ version \ctxlua {context(mplib.version())}. -\subsection{\type {mplib.new}} +\subsection{\type {new}} To create a new \METAPOST\ instance, call diff --git a/Master/texmf-dist/doc/luatex/base/luatex-modifications.tex b/Master/texmf-dist/doc/luatex/base/luatex-modifications.tex index 2545be8cb00..0507a56e0fa 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-modifications.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-modifications.tex @@ -66,6 +66,8 @@ most still comes from the original. But we divert a bit. The upper limit to \type {\endlinechar} and \type {\newlinechar} is 127. \stopitem +\startitem + Magnification (\type {\mag}) is only supported in \DVI\ output mode. \stopitemize \stopsubsection diff --git a/Master/texmf-dist/doc/luatex/base/luatex-nodes.tex b/Master/texmf-dist/doc/luatex/base/luatex-nodes.tex index 8e6c59af69e..372aca1e58b 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-nodes.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-nodes.tex @@ -1393,7 +1393,7 @@ See the description of \type {node.hpack()} for a few memory allocation caveats. node.dimensions(<node> n, <node> t, <string> dir) \stopfunctioncall -This function calculates the natural in-line dimensions of the node list starting +This function calculates the natural in|-|line dimensions of the node list starting at node \type {n} and terminating just before node \type {t} (or the end of the list, if there is no second argument). The return values are scaled points. An alternative format that starts with glue parameters as the first three arguments @@ -1431,6 +1431,10 @@ example in code like this, which prints the width of the space in between the )) } \stoptyping +You need to keep in mind that this is one of the few places in \TEX\ where floats +are used, which means that you can get small differences in rounding when you +compare the width repported by \type {hpack} with \type {dimensions}. + \subsubsection{\type {node.mlist_to_hlist}} \startfunctioncall diff --git a/Master/texmf-dist/doc/luatex/base/luatex-style.tex b/Master/texmf-dist/doc/luatex/base/luatex-style.tex index 1b0912c93b6..feca120eddb 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-style.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-style.tex @@ -37,20 +37,28 @@ function document.functions.showfields(s) local t = string.split(s,',') - local r = { } - for _, a in pairs(node.fields(t[1],t[2])) do - if not skipped[a] then - table.insert(r,'\\type{'.. a .. '}') + local f = node.fields(t[1],t[2]) + if f then + local d = false + for i=1,#f do + local fi = f[i] + if skipped[fi] then + -- okay + elseif d then + context(', {\tttf %s}', fi) + else + context('{\tttf %s}', fi) + d = true + end end end - tex.sprint(table.concat(r, ', ')) end function document.functions.showid(s) local t = string.split(s,',') - tex.sprint('\\type{'.. node.id(t[1]) .. '}') + context('{tttf %s}',node.id(t[1])) if t[2] then - tex.sprint(', \\type{'.. node.subtype(t[2]) .. '}') + context(', {tttf %s}',node.subtype(t[2])) end end @@ -327,13 +335,18 @@ \setuplist [chapter,section,subsection,subsubsection] [interaction=all, - width=6em] + width=3em] \setuplist [chapter] [style=bold, color=keptcolor] +\setuplist + [subsection,subsubsection] + [margin=3em, + width=5em] + % Hans doesn't like the bookmarks opening by default so we comment this: % % \setupinteractionscreen diff --git a/Master/texmf-dist/doc/luatex/base/luatex.pdf b/Master/texmf-dist/doc/luatex/base/luatex.pdf Binary files differindex 8e7bd8959e8..3ebc97c7481 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex.pdf +++ b/Master/texmf-dist/doc/luatex/base/luatex.pdf |