diff options
author | Luigi Scarso <luigi.scarso@gmail.com> | 2018-01-19 00:54:37 +0000 |
---|---|---|
committer | Luigi Scarso <luigi.scarso@gmail.com> | 2018-01-19 00:54:37 +0000 |
commit | 3a34da25aa2d19195ca8c002847e119e5032fd2f (patch) | |
tree | 8290add20ef96eed0a42037303414c8c7a74bbc4 | |
parent | 1ac895d2df3e20334a1b5a80d931b6d1be8e0703 (diff) |
LuaTeX 1.07.0 manual
git-svn-id: svn://tug.org/texlive/trunk@46381 c570f23f-e606-0410-a88d-b1316a301751
18 files changed, 2837 insertions, 2174 deletions
diff --git a/Master/texmf-dist/doc/luatex/base/luatex-backend.tex b/Master/texmf-dist/doc/luatex/base/luatex-backend.tex index 40b64721188..46e9222e289 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-backend.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-backend.tex @@ -437,15 +437,15 @@ value. The list of possible operand types and associated \LUA\ value types is: -\starttabulate[|lT|p|] -\NC integer \NC <number> \NC \NR -\NC real \NC <number> \NC \NR -\NC boolean \NC <boolean> \NC \NR -\NC name \NC <string> \NC \NR -\NC operator \NC <string> \NC \NR -\NC string \NC <string> \NC \NR -\NC array \NC <table> \NC \NR -\NC dict \NC <table> \NC \NR +\starttabulate[|l|c|] +\NC \type{integer} \NC <number> \NC \NR +\NC \type{real} \NC <number> \NC \NR +\NC \type{boolean} \NC <boolean> \NC \NR +\NC \type{name} \NC <string> \NC \NR +\NC \type{operator} \NC <string> \NC \NR +\NC \type{string} \NC <string> \NC \NR +\NC \type{array} \NC <table> \NC \NR +\NC \type{dict} \NC <table> \NC \NR \stoptabulate In case of \type {integer} or \type {real}, the value is always a \LUA\ (floating @@ -469,15 +469,15 @@ values are \type {pop} return values. There are few more methods defined that you can ask \type {scanner}: -\starttabulate[|lT|p|] -\NC pop \NC as explained above \NC \NR -\NC popNumber \NC return only the value of a \type {real} or \type {integer} \NC \NR -\NC popName \NC return only the value of a \type {name} \NC \NR -\NC popString \NC return only the value of a \type {string} \NC \NR -\NC popArray \NC return only the value of a \type {array} \NC \NR -\NC popDict \NC return only the value of a \type {dict} \NC \NR -\NC popBool \NC return only the value of a \type {boolean} \NC \NR -\NC done \NC abort further processing of this \type {scan()} call \NC \NR +\starttabulate[|l|p|] +\NC \type{pop} \NC as explained above \NC \NR +\NC \type{popNumber} \NC return only the value of a \type {real} or \type {integer} \NC \NR +\NC \type{popName} \NC return only the value of a \type {name} \NC \NR +\NC \type{popString} \NC return only the value of a \type {string} \NC \NR +\NC \type{popArray} \NC return only the value of a \type {array} \NC \NR +\NC \type{popDict} \NC return only the value of a \type {dict} \NC \NR +\NC \type{popBool} \NC return only the value of a \type {boolean} \NC \NR +\NC \type{done} \NC abort further processing of this \type {scan()} call \NC \NR \stoptabulate The \type {popXXX} are convenience functions, and come in handy when you know the @@ -501,9 +501,55 @@ functionality is being used since long time to embed \PDF\ files. The \type {epdf} library allows to scrutinize an external \PDF\ file. It gives access to its document structure: catalog, cross|-|reference table, individual pages, objects, annotations, info, and metadata. The \type {epdf} library only provides -read|-|only acess. At some point we might decide to limit the interface to a +read|-|only access. At some point we might decide to limit the interface to a reasonable subset. +\start \em + +The following functions will be removed in a next version. This is partly due to +a change in the api of the used library and partly due to the fact that write +access is not needed at all. + +\starttabulate[|T|T||] +\NC Annot \NC getAppearance \NC gone \NC \NR +\NC \NC getBorder \NC gone \NC \NR +\NC AnnotBorderStyle \NC getWidth \NC gone \NC \NR +\NC Array \NC incRef \NC gone \NC \NR +\NC \NC decRef \NC gone \NC \NR +\NC \NC add \NC will go \NC \NR +\NC Attribute \NC setRevision \NC will go \NC \NR +\NC \NC setHidden \NC will go \NC \NR +\NC \NC setFormattedValue \NC will go \NC \NR +\NC EmbFile \NC save \NC will go \NC \NR +\NC Dict \NC incRef \NC gone \NC \NR +\NC \NC decRef \NC gone \NC \NR +\NC \NC add \NC will go \NC \NR +\NC \NC set \NC will go \NC \NR +\NC \NC remove \NC will go \NC \NR +\NC Object \NC initBool \NC will go \NC \NR +\NC \NC initInt \NC will go \NC \NR +\NC \NC initReal \NC will go \NC \NR +\NC \NC initString \NC will go \NC \NR +\NC \NC initName \NC will go \NC \NR +\NC \NC initNull \NC will go \NC \NR +\NC \NC initArray \NC will go \NC \NR +\NC \NC initDict \NC will go \NC \NR +\NC \NC initStream \NC will go \NC \NR +\NC \NC initRef \NC will go \NC \NR +\NC \NC initCmd \NC will go \NC \NR +\NC \NC initError \NC will go \NC \NR +\NC \NC initEOF \NC will go \NC \NR +\NC \NC dictAdd \NC will go \NC \NR +\NC \NC dictSet \NC will go \NC \NR +\NC \NC streamReset \NC will go \NC \NR +\NC StructElement \NC setRevision \NC will go \NC \NR +\NC \NC appendChild \NC will go \NC \NR +\NC \NC appendAttribute \NC will go \NC \NR +\NC StructTreeRoot \NC appendChild \NC will go \NC \NR +\stoptabulate + +\stop + For a start, a \PDF\ file is opened by \type {epdf.open()} with file name, e.g.: \starttyping @@ -561,26 +607,32 @@ These are the object constructors: <Array> = epdf.Array(<XRef>) <Attribute> = epdf.Attribute(<Type>,<Object>)| epdf.Attribute(<string>, <int>, <Object>) <Dict> = epdf.Dict(<XRef>) -<Object> = epdf.Object() +<Object> = epdf.Object()|epdf.Object(<Type>)|epdf.Object(<Object_Type>,<string>)| <PDFRectangle> = epdf.PDFRectangle() \stopfunctioncall -The functions \type {StructElement_Type}, \type {Attribute_Type} and \type +There is a new API for the \type {Object} constructors: the old \type {init<ObjType>} constructors +are still present but they are deprecated. They will disappear after the next \TeX Live. +The functions \type {StructElement_Type}, \type {Object_Type}, \type {Attribute_Type} and \type {AttributeOwner_Type} return a hash table \type {{<string>,<integer>}}. +The hash table \type {Object_Type} is useful for the +\type {epdf.Object(<Object_Type>,<string>)} \type {Object} constructor, where \type {<Object_Type>} is an +integer. \type {Annot} methods: + \startfunctioncall <boolean> = <Annot>:isOK() -<Object> = <Annot>:getAppearance() -<AnnotBorder> = <Annot>:getBorder() <boolean> = <Annot>:match(<Ref>) +<Object> = <Annot>:getAppearance() -- gone +<AnnotBorder> = <Annot>:getBorder() -- gone \stopfunctioncall -\type {AnnotBorderStyle} methods: +\type {AnnotBorderStyle} methods (gone): \startfunctioncall -<number> = <AnnotBorderStyle>:getWidth() +<number> = <AnnotBorderStyle>:getWidth() -- gone \stopfunctioncall \type {Annots} methods: @@ -593,10 +645,10 @@ The functions \type {StructElement_Type}, \type {Attribute_Type} and \type \type {Array} methods: \startfunctioncall - <Array>:incRef() - <Array>:decRef() + <Array>:incRef() -- gone + <Array>:decRef() -- gone + <Array>:add(<Object>) -- will go <integer> = <Array>:getLength() - <Array>:add(<Object>) <Object> = <Array>:get(<integer>) <Object> = <Array>:getNF(<integer>) <string> = <Array>:getString(<integer>) @@ -614,11 +666,11 @@ The functions \type {StructElement_Type}, \type {Attribute_Type} and \type <Object> = <Attribute>:getDefaultValue <string> = <Attribute>:getName() <integer> = <Attribute>:getRevision() - <Attribute>:setRevision(<unsigned integer>) -<boolean> = <Attribute>:istHidden() - <Attribute>:setHidden(<boolean>) + <Attribute>:setRevision(<unsigned integer>) -- will go +<boolean> = <Attribute>:isHidden() + <Attribute>:setHidden(<boolean>) -- will go <string> = <Attribute>:getFormattedValue() -<string> = <Attribute>:setFormattedValue(<string>) +<string> = <Attribute>:setFormattedValue(<string>) -- will go \stopfunctioncall \type {Catalog} methods: @@ -645,26 +697,37 @@ The functions \type {StructElement_Type}, \type {Attribute_Type} and \type \type {EmbFile} methods: \startfunctioncall -<string> = <EmbFile>:name() -<string> = <EmbFile>:description() <integer> = <EmbFile>:size() <string> = <EmbFile>:modDate() <string> = <EmbFile>:createDate() <string> = <EmbFile>:checksum() <string> = <EmbFile>:mimeType() -<Object> = <EmbFile>:streamObject() <boolean> = <EmbFile>:isOk() +<string> = <EmbFile>:name() -- not (yet) implemented +<string> = <EmbFile>:description() -- not (yet) implemented +<Object> = <EmbFile>:streamObject() -- not (yet) implemented +<boolean> = <EmbFile>:save() -- will go +\stopfunctioncall + +\type {FileSpec} methods: + +\startfunctioncall +<boolean> = <FileSpec>:isOk() +<string> = <FileSpec>:getFileName() +<string> = <FileSpec>:getFileNameForPlatform() +<string> = <FileSpec>:getDescription() +<EmbFile> = <FileSpec>:getEmbeddedFile() \stopfunctioncall \type {Dict} methods: \startfunctioncall - <Dict>:incRef() - <Dict>:decRef() + <Dict>:incRef() -- will go + <Dict>:decRef() -- will go + <Dict>:add(<string>, <Object>) -- will go + <Dict>:set(<string>, <Object>) -- will go + <Dict>:remove(<string>) -- will go <integer> = <Dict>:getLength() - <Dict>:add(<string>, <Object>) - <Dict>:set(<string>, <Object>) - <Dict>:remove(<string>) <boolean> = <Dict>:is(<string>) <Object> = <Dict>:lookup(<string>) <Object> = <Dict>:lookupNF(<string>) @@ -675,12 +738,12 @@ The functions \type {StructElement_Type}, \type {Attribute_Type} and \type <boolean> = <Dict>:hasKey(<string>) \stopfunctioncall -\type {Link} methods: +% \type {Link} methods: -\startfunctioncall -<boolean> = <Link>:isOK() -<boolean> = <Link>:inRect(<number>, <number>) -\stopfunctioncall +% \startfunctioncall +% <boolean> = <Link>:isOK() +% <boolean> = <Link>:inRect(<number>, <number>) +% \stopfunctioncall \type {LinkDest} methods: @@ -703,27 +766,29 @@ The functions \type {StructElement_Type}, \type {Attribute_Type} and \type \type {Links} methods: +% <Link> = <Links>:getLink(<integer>) + \startfunctioncall <integer> = <Links>:getNumLinks() -<Link> = <Links>:getLink(<integer>) \stopfunctioncall \type {Object} methods: \startfunctioncall - <Object>:initBool(<boolean>) - <Object>:initInt(<integer>) - <Object>:initReal(<number>) - <Object>:initString(<string>) - <Object>:initName(<string>) - <Object>:initNull() - <Object>:initArray(<XRef>) - <Object>:initDict(<XRef>) - <Object>:initStream(<Stream>) - <Object>:initRef(<integer> object number, <integer> object generation) - <Object>:initCmd(<string>) - <Object>:initError() - <Object>:initEOF() + <Object>:initBool(<boolean>) -- will go + <Object>:initInt(<integer>) -- will go + <Object>:initReal(<number>) -- will go + <Object>:initString(<string>) -- will go + <Object>:initName(<string>) -- will go + <Object>:initNull() -- will go + <Object>:initArray(<XRef>) -- will go + <Object>:initDict(<XRef>) -- will go + <Object>:initStream(<Stream>) -- will go + <Object>:initRef(<integer> object number, + <integer> object generation) -- will go + <Object>:initCmd(<string>) -- will go + <Object>:initError() -- will go + <Object>:initEOF() -- will go <Object> = <Object>:fetch(<XRef>) <integer> = <Object>:getType() <string> = <Object>:getTypeName() @@ -756,19 +821,19 @@ The functions \type {StructElement_Type}, \type {Attribute_Type} and \type <integer> = <Object>:getRefGen() <string> = <Object>:getCmd() <integer> = <Object>:arrayGetLength() - = <Object>:arrayAdd(<Object>) + = <Object>:arrayAdd(<Object>) -- will go <Object> = <Object>:arrayGet(<integer>) <Object> = <Object>:arrayGetNF(<integer>) <integer> = <Object>:dictGetLength(<integer>) - = <Object>:dictAdd(<string>, <Object>) - = <Object>:dictSet(<string>, <Object>) + = <Object>:dictAdd(<string>, <Object>) -- will go + = <Object>:dictSet(<string>, <Object>) -- will go <Object> = <Object>:dictLookup(<string>) <Object> = <Object>:dictLookupNF(<string>) <string> = <Object>:dictgetKey(<integer>) <Object> = <Object>:dictgetVal(<integer>) <Object> = <Object>:dictgetValNF(<integer>) <boolean> = <Object>:streamIs(<string>) - = <Object>:streamReset() + = <Object>:streamReset() -- will go <integer> = <Object>:streamGetChar() <integer> = <Object>:streamLookChar() <integer> = <Object>:streamGetPos() @@ -820,7 +885,8 @@ The functions \type {StructElement_Type}, \type {Attribute_Type} and \type <integer> = <PDFDoc>:getNumPages() <string> = <PDFDoc>:readMetadata() <Object> = <PDFDoc>:getStructTreeRoot() -<integer> = <PDFDoc>:findPage(<integer> object number, <integer> object generation) +<integer> = <PDFDoc>:findPage(<integer> object number, + <integer> object generation) <Links> = <PDFDoc>:getLinks(<integer>) <LinkDest> = <PDFDoc>:findDest(<string>) <boolean> = <PDFDoc>:isEncrypted() @@ -838,7 +904,7 @@ The functions \type {StructElement_Type}, \type {Attribute_Type} and \type \type {PDFRectangle} methods: \startfunctioncall -<boolean> = <PDFRectangle>:isValid() +<boolean> = <PDFRectangle>:isValid() -- setindex/newindex will go \stopfunctioncall %\type {Ref} methods: @@ -884,16 +950,17 @@ The functions \type {StructElement_Type}, \type {Attribute_Type} and \type <string> = <StructElement>:getID() <string> = <StructElement>:getLanguage() <integer> = <StructElement>:getRevision() - <StructElement>:setRevision(<unsigned integer>) + <StructElement>:setRevision(<unsigned integer>) -- will go <string> = <StructElement>:getTitle() <string> = <StructElement>:getExpandedAbbr() <integer> = <StructElement>:getNumChildren() <StructElement> = <StructElement>:getChild() - = <StructElement>:appendChild<StructElement>) + = <StructElement>:appendChild<StructElement>) -- will go <integer> = <StructElement>:getNumAttributes() -<Attribute> = <StructElement>:geAttribute(<integer>) -<string> = <StructElement>:appendAttribute(<Attribute>) -<Attribute> = <StructElement>:findAttribute(<Attribute::Type>,boolean,Attribute::Owner) +<Attribute> = <StructElement>:getAttribute(<integer>) +<string> = <StructElement>:appendAttribute(<Attribute>) -- will go +<Attribute> = <StructElement>:findAttribute(<Attribute::Type>, + boolean,Attribute::Owner) <string> = <StructElement>:getAltText() <string> = <StructElement>:getActualText() <string> = <StructElement>:getText(<boolean>) @@ -909,7 +976,7 @@ The functions \type {StructElement_Type}, \type {Attribute_Type} and \type <Dict> = <StructTreeRoot>:getClassMap <integer> = <StructTreeRoot>:getNumChildren <StructElement> = <StructTreeRoot>:getChild - <StructTreeRoot>:appendChild + <StructTreeRoot>:appendChild -- will go <StructElement> = <StructTreeRoot>:findParentElement \stopfunctioncall @@ -934,7 +1001,8 @@ The functions \type {StructElement_Type}, \type {Attribute_Type} and \type <boolean> = <XRef>:okToAccessibility() <boolean> = <XRef>:okToAssemble() <Object> = <XRef>:getCatalog() -<Object> = <XRef>:fetch(<integer> object number, <integer> object generation) +<Object> = <XRef>:fetch(<integer> object number, + <integer> object generation) <Object> = <XRef>:getDocInfo() <Object> = <XRef>:getDocInfoNF() <integer> = <XRef>:getNumObjects() diff --git a/Master/texmf-dist/doc/luatex/base/luatex-callbacks.tex b/Master/texmf-dist/doc/luatex/base/luatex-callbacks.tex index 37213eb7343..cad7ad7c6f8 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-callbacks.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-callbacks.tex @@ -45,8 +45,8 @@ instead of a function for clearing the callback. For some minor speed gain, you can assign the boolean \type {false} to the non|-|file related callbacks, doing so will prevent \LUATEX\ from executing 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! +all). Be warned: this may cause all sorts of grief unless you know \notabene +{exactly} what you are doing! \startfunctioncall <table> info = @@ -317,17 +317,17 @@ reading problem. The list of functions is as follows: -\starttabulate[|lT|p|] -\NC read_font_file \NC ofm or tfm files \NC \NR -\NC read_vf_file \NC virtual fonts \NC \NR -\NC read_map_file \NC map files \NC \NR -\NC read_enc_file \NC encoding files \NC \NR -\NC read_sfd_file \NC subfont definition files \NC \NR -\NC read_pk_file \NC pk bitmap files \NC \NR -\NC read_data_file \NC embedded files (as is possible with \PDF\ objects) \NC \NR -\NC read_truetype_file \NC \TRUETYPE\ font files \NC \NR -\NC read_type1_file \NC \TYPEONE\ font files \NC \NR -\NC read_opentype_file \NC \OPENTYPE\ font files \NC \NR +\starttabulate[|l|p|] +\NC \type{read_font_file} \NC ofm or tfm files \NC \NR +\NC \type{read_vf_file} \NC virtual fonts \NC \NR +\NC \type{read_map_file} \NC map files \NC \NR +\NC \type{read_enc_file} \NC encoding files \NC \NR +\NC \type{read_sfd_file} \NC subfont definition files \NC \NR +\NC \type{read_pk_file} \NC pk bitmap files \NC \NR +\NC \type{read_data_file} \NC embedded files (as is possible with \PDF\ objects) \NC \NR +\NC \type{read_truetype_file} \NC \TRUETYPE\ font files \NC \NR +\NC \type{read_type1_file} \NC \TYPEONE\ font files \NC \NR +\NC \type{read_opentype_file} \NC \OPENTYPE\ font files \NC \NR \stoptabulate \section{Data processing callbacks} @@ -397,12 +397,12 @@ end The string reports the group code. From this you can deduce from what list you can give a treat. -\starttabulate[|lT|p|] -\NC \rmbf value \NC \bf explanation \NC \NR -\NC pre_box \NC interline material is being added \NC \NR -\NC pre_adjust \NC \type {\vadjust} material is being added \NC \NR -\NC box \NC a typeset box is being added (always called) \NC \NR -\NC adjust \NC \type {\vadjust} material is being added \NC \NR +\starttabulate[|l|p|] +\BC value \BC explanation \NC \NR +\NC \type{pre_box} \NC interline material is being added \NC \NR +\NC \type{pre_adjust} \NC \type {\vadjust} material is being added \NC \NR +\NC \type{box} \NC a typeset box is being added (always called) \NC \NR +\NC \type{adjust} \NC \type {\vadjust} material is being added \NC \NR \stoptabulate \subsection{\type {buildpage_filter}} @@ -420,18 +420,18 @@ The string \type {extrainfo} gives some additional information about what \TEX's state is with respect to the \quote {current page}. The possible values for the \type {buildpage_filter} callback are: -\starttabulate[|lT|p|] -\NC \rmbf value \NC \bf explanation \NC \NR -\NC alignment \NC a (partial) alignment is being added \NC \NR -\NC after_output \NC an output routine has just finished \NC \NR -\NC new_graf \NC the beginning of a new paragraph \NC \NR -\NC vmode_par \NC \type {\par} was found in vertical mode \NC \NR -\NC hmode_par \NC \type {\par} was found in horizontal mode \NC \NR -\NC insert \NC an insert is added \NC \NR -\NC penalty \NC a penalty (in vertical mode) \NC \NR -\NC before_display \NC immediately before a display starts \NC \NR -\NC after_display \NC a display is finished \NC \NR -\NC end \NC \LUATEX\ is terminating (it's all over) \NC \NR +\starttabulate[|l|p|] +\BC value \BC explanation \NC \NR +\NC \type{alignment} \NC a (partial) alignment is being added \NC \NR +\NC \type{after_output} \NC an output routine has just finished \NC \NR +\NC \type{new_graf} \NC the beginning of a new paragraph \NC \NR +\NC \type{vmode_par} \NC \type {\par} was found in vertical mode \NC \NR +\NC \type{hmode_par} \NC \type {\par} was found in horizontal mode \NC \NR +\NC \type{insert} \NC an insert is added \NC \NR +\NC \type{penalty} \NC a penalty (in vertical mode) \NC \NR +\NC \type{before_display} \NC immediately before a display starts \NC \NR +\NC \type{after_display} \NC a display is finished \NC \NR +\NC \type{end} \NC \LUATEX\ is terminating (it's all over) \NC \NR \stoptabulate \subsection{\type {build_page_insert}} @@ -449,10 +449,10 @@ end with -\starttabulate[|lT|p|] -\NC \rmbf value \NC \bf explanation \NC \NR -\NC n \NC the insert class \NC \NR -\NC i \NC the order of the insert \NC \NR +\starttabulate[|l|p|] +\BC value \BC explanation \NC \NR +\NC \type{n} \NC the insert class \NC \NR +\NC \type{i} \NC the order of the insert \NC \NR \stoptabulate The return value is a number indicating the skip register to use for the @@ -478,22 +478,22 @@ not all of those can actually appear in \type {pre_linebreak_filter}, some are for the \type {hpack_filter} and \type {vpack_filter} callbacks that will be explained in the next two paragraphs. -\starttabulate[|lT|p|] -\NC \rmbf value \NC \bf explanation \NC \NR -\NC <empty> \NC main vertical list \NC \NR -\NC hbox \NC \type {\hbox} in horizontal mode \NC \NR -\NC adjusted_hbox \NC \type {\hbox} in vertical mode \NC \NR -\NC vbox \NC \type {\vbox} \NC \NR -\NC vtop \NC \type {\vtop} \NC \NR -\NC align \NC \type {\halign} or \type {\valign} \NC \NR -\NC disc \NC discretionaries \NC \NR -\NC insert \NC packaging an insert \NC \NR -\NC vcenter \NC \type {\vcenter} \NC \NR -\NC local_box \NC \type {\localleftbox} or \type {\localrightbox} \NC \NR -\NC split_off \NC top of a \type {\vsplit} \NC \NR -\NC split_keep \NC remainder of a \type {\vsplit} \NC \NR -\NC align_set \NC alignment cell \NC \NR -\NC fin_row \NC alignment row \NC \NR +\starttabulate[|l|p|] +\BC value \BC explanation \NC \NR +\NC \type{<empty>} \NC main vertical list \NC \NR +\NC \type{hbox} \NC \type {\hbox} in horizontal mode \NC \NR +\NC \type{adjusted_hbox} \NC \type {\hbox} in vertical mode \NC \NR +\NC \type{vbox} \NC \type {\vbox} \NC \NR +\NC \type{vtop} \NC \type {\vtop} \NC \NR +\NC \type{align} \NC \type {\halign} or \type {\valign} \NC \NR +\NC \type{disc} \NC discretionaries \NC \NR +\NC \type{insert} \NC packaging an insert \NC \NR +\NC \type{vcenter} \NC \type {\vcenter} \NC \NR +\NC \type{local_box} \NC \type {\localleftbox} or \type {\localrightbox} \NC \NR +\NC \type{split_off} \NC top of a \type {\vsplit} \NC \NR +\NC \type{split_keep} \NC remainder of a \type {\vsplit} \NC \NR +\NC \type{align_set} \NC alignment cell \NC \NR +\NC \type{fin_row} \NC alignment row \NC \NR \stoptabulate As for all the callbacks that deal with nodes, the return value can be one of @@ -875,6 +875,12 @@ This callback replaces the call to an external editor when \quote{E} is pressed in reply to an error message. Processing will end immediately after the callback returns control to the main program. +\subsection{\type {finish_synctex_callback}} + +This callback can be used to wrap up alternative synctex methods. It kicks in +after the normal synctex finalizer (that happens to remove the synctex files +after a run when native synctex is not enabled). + \section{PDF-related callbacks} \subsection{\type {finish_pdffile}} @@ -936,6 +942,17 @@ 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 loading completely but will nevertheless generate errors. +\subsection{\type {glyph_not_found}} + +This callback kicks in when the backend cannot insert a glyph. When no callback +is defined a message is written to the log. + +\startfunctioncall +function(<number> id, <number> char) + -- do something with font id and char code +end +\stopfunctioncall + \stopchapter \stopcomponent diff --git a/Master/texmf-dist/doc/luatex/base/luatex-enhancements.tex b/Master/texmf-dist/doc/luatex/base/luatex-enhancements.tex index 19f88234a53..d1da33878e0 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-enhancements.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-enhancements.tex @@ -55,7 +55,7 @@ chapters on fonts and math we discuss a few more new ones. There are three new primitives to test the version of \LUATEX: \starttabulate[|l|pl|pl|] -\NC \bf primitive \NC \bf explanation \NC \bf value \NC \NR +\BC primitive \BC explanation \BC value \NC \NR \NC \type {\luatexbanner} \NC the banner reported on the command line \NC \luatexbanner \NC \NR \NC \type {\luatexversion} \NC a combination of major and minor number \NC \the\luatexversion \NC \NR \NC \type {\luatexrevision} \NC the revision number, the current value is \NC \luatexrevision \NC \NR @@ -550,6 +550,16 @@ $ x + 1 = a $ \stoptyping +\subsection{\type {\suppressprimitiveerror}} + +When set to a non|-|zero value the following command will not issue an error: + +\starttyping +\suppressprimitiveerror = 1 + +\primitive\notaprimitive +\stoptyping + \section {Math} \subsection{Extensions} @@ -881,6 +891,20 @@ ignores the value. This allows for embedded spaces, without the need for double quotes. Macro expansion takes place inside the argument. +The \type {\tracingfonts} primitive that has been inherited from \PDFTEX\ has +been adapted to support variants in reporting the font. The reason for this +extension is that a csname not always makes sense. The zero case is the default. + +\starttabulate[|T||] +\NC 0 \EQ \type{\foo xyz} \NC \NR +\NC 1 \EQ \type{\foo (bar)} \NC \NR +\NC 2 \EQ \type{<bar> xyz} \NC \NR +\NC 3 \EQ \type{<bar @ ..pt> xyz} \NC \NR +\NC 4 \EQ \type{<id>} \NC \NR +\NC 5 \EQ \type{<id: bar>} \NC \NR +\NC 6 \EQ \type{<id: bar @ ..pt> xyz} \NC \NR +\stoptabulate + \subsection{Writing to file} You can now open upto 127 files with \type {\openout}. When no file is open diff --git a/Master/texmf-dist/doc/luatex/base/luatex-export-titlepage.tex b/Master/texmf-dist/doc/luatex/base/luatex-export-titlepage.tex new file mode 100644 index 00000000000..54a24c2e7bd --- /dev/null +++ b/Master/texmf-dist/doc/luatex/base/luatex-export-titlepage.tex @@ -0,0 +1,32 @@ +\environment luatex-style +\environment luatex-logos + +\startcomponent luatex-export-titlepage + +\setupexport + [cssfile=extra-styles.css] + +\settaggedmetadata + [ title={LuaTeX Reference Manual}, + copyright={LuaTeX Development Team}, + version={\documentvariable{version}}, + status={\documentvariable{status}}, + snapshot={\documentvariable{snapshot}}, + date={\rawdate[weekday,day,month,year]}, + url={www.luatex.org}] + +\setupbackgrounds + [leftpage] + [setups=pagenumber:left] + +\setupbackgrounds + [rightpage] + [setups=pagenumber:right] + +\startpreamble + This document is derived from the original manual. When examples are given, + they assume processing by \LUATEX\ and therefore will not show up as + intended. The \PDF\ version is the real reference. +\stoppreamble + +\stopcomponent diff --git a/Master/texmf-dist/doc/luatex/base/luatex-fontloader.tex b/Master/texmf-dist/doc/luatex/base/luatex-fontloader.tex index 7f7a6fc493a..c2d82cbba36 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-fontloader.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-fontloader.tex @@ -29,16 +29,16 @@ small tables (in the case of a \TRUETYPE\ collection). The returned table(s) wil contain some fairly interesting information items from the font(s) defined by the file: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC fontname \NC string \NC the \POSTSCRIPT\ name of the font\NC \NR -\NC fullname \NC string \NC the formal name of the font\NC \NR -\NC familyname \NC string \NC the family name this font belongs to\NC \NR -\NC weight \NC string \NC a string indicating the color value of the font\NC \NR -\NC version \NC string \NC the internal font version\NC \NR -\NC italicangle \NC float \NC the slant angle\NC \NR -\NC units_per_em \NC number \NC 1000 for \POSTSCRIPT-based fonts, usually 2048 for \TRUETYPE\NC \NR -\NC pfminfo \NC table \NC (see \in{section}[fontloaderpfminfotable])\NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{fontname} \NC string \NC the \POSTSCRIPT\ name of the font\NC \NR +\NC \type{fullname} \NC string \NC the formal name of the font\NC \NR +\NC \type{familyname} \NC string \NC the family name this font belongs to\NC \NR +\NC \type{weight} \NC string \NC a string indicating the color value of the font\NC \NR +\NC \type{version} \NC string \NC the internal font version\NC \NR +\NC \type{italicangle} \NC float \NC the slant angle\NC \NR +\NC \type{units_per_em} \NC number \NC 1000 for \POSTSCRIPT-based fonts, usually 2048 for \TRUETYPE\NC \NR +\NC \type{pfminfo} \NC table \NC (see \in{section}[fontloaderpfminfotable])\NC \NR \stoptabulate Getting information through this function is (sometimes much) more efficient than @@ -270,83 +270,83 @@ local fields = fontloader.fields(f.glyphs[0]) The top|-|level keys in the returned table are (the explanations in this part of the documentation are not yet finished): -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC table_version \NC number \NC indicates the metrics version (currently~0.3)\NC \NR -\NC fontname \NC string \NC \POSTSCRIPT\ font name\NC \NR -\NC fullname \NC string \NC official (human-oriented) font name\NC \NR -\NC familyname \NC string \NC family name\NC \NR -\NC weight \NC string \NC weight indicator\NC \NR -\NC copyright \NC string \NC copyright information\NC \NR -\NC filename \NC string \NC the file name\NC \NR -\NC version \NC string \NC font version\NC \NR -\NC italicangle \NC float \NC slant angle\NC \NR -\NC units_per_em \NC number \NC 1000 for \POSTSCRIPT-based fonts, usually 2048 for \TRUETYPE\NC \NR -\NC ascent \NC number \NC height of ascender in \type {units_per_em}\NC \NR -\NC descent \NC number \NC depth of descender in \type {units_per_em}\NC \NR -\NC upos \NC float \NC \NC \NR -\NC uwidth \NC float \NC \NC \NR -\NC uniqueid \NC number \NC \NC \NR -\NC glyphs \NC array \NC \NC \NR -\NC glyphcnt \NC number \NC number of included glyphs\NC \NR -\NC glyphmax \NC number \NC maximum used index the glyphs array\NC \NR -\NC glyphmin \NC number \NC minimum used index the glyphs array\NC \NR -\NC notdef_loc \NC number \NC location of the \type {.notdef} glyph - or \type {-1} when not present \NC \NR -\NC hasvmetrics \NC number \NC \NC \NR -\NC onlybitmaps \NC number \NC \NC \NR -\NC serifcheck \NC number \NC \NC \NR -\NC isserif \NC number \NC \NC \NR -\NC issans \NC number \NC \NC \NR -\NC encodingchanged \NC number \NC \NC \NR -\NC strokedfont \NC number \NC \NC \NR -\NC use_typo_metrics \NC number \NC \NC \NR -\NC weight_width_slope_only \NC number \NC \NC \NR -\NC head_optimized_for_cleartype \NC number \NC \NC \NR -\NC uni_interp \NC enum \NC \type {unset}, \type {none}, \type {adobe}, - \type {greek}, \type {japanese}, \type {trad_chinese}, - \type {simp_chinese}, \type {korean}, \type {ams}\NC \NR -\NC origname \NC string \NC the file name, as supplied by the user\NC \NR -\NC map \NC table \NC \NC \NR -\NC private \NC table \NC \NC \NR -\NC xuid \NC string \NC \NC \NR -\NC pfminfo \NC table \NC \NC \NR -\NC names \NC table \NC \NC \NR -\NC cidinfo \NC table \NC \NC \NR -\NC subfonts \NC array \NC \NC \NR -\NC commments \NC string \NC \NC \NR -\NC fontlog \NC string \NC \NC \NR -\NC cvt_names \NC string \NC \NC \NR -\NC anchor_classes \NC table \NC \NC \NR -\NC ttf_tables \NC table \NC \NC \NR -\NC ttf_tab_saved \NC table \NC \NC \NR -\NC kerns \NC table \NC \NC \NR -\NC vkerns \NC table \NC \NC \NR -\NC texdata \NC table \NC \NC \NR -\NC lookups \NC table \NC \NC \NR -\NC gpos \NC table \NC \NC \NR -\NC gsub \NC table \NC \NC \NR -\NC mm \NC table \NC \NC \NR -\NC chosenname \NC string \NC \NC \NR -\NC macstyle \NC number \NC \NC \NR -\NC fondname \NC string \NC \NC \NR -%NC design_size \NC number \NC \NC \NR -\NC fontstyle_id \NC number \NC \NC \NR -\NC fontstyle_name \NC table \NC \NC \NR -%NC design_range_bottom \NC number \NC \NC \NR -%NC design_range_top \NC number \NC \NC \NR -\NC strokewidth \NC float \NC \NC \NR -\NC mark_classes \NC table \NC \NC \NR -\NC creationtime \NC number \NC \NC \NR -\NC modificationtime \NC number \NC \NC \NR -\NC os2_version \NC number \NC \NC \NR -\NC sfd_version \NC number \NC \NC \NR -\NC math \NC table \NC \NC \NR -\NC validation_state \NC table \NC \NC \NR -\NC horiz_base \NC table \NC \NC \NR -\NC vert_base \NC table \NC \NC \NR -\NC extrema_bound \NC number \NC \NC \NR -\NC truetype \NC boolean \NC signals a \TRUETYPE\ font \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \NC explanation \NC \NR +\NC \type{table_version} \NC number \NC indicates the metrics version (currently~0.3)\NC \NR +\NC \type{fontname} \NC string \NC \POSTSCRIPT\ font name\NC \NR +\NC \type{fullname} \NC string \NC official (human-oriented) font name\NC \NR +\NC \type{familyname} \NC string \NC family name\NC \NR +\NC \type{weight} \NC string \NC weight indicator\NC \NR +\NC \type{copyright} \NC string \NC copyright information\NC \NR +\NC \type{filename} \NC string \NC the file name\NC \NR +\NC \type{version} \NC string \NC font version\NC \NR +\NC \type{italicangle} \NC float \NC slant angle\NC \NR +\NC \type{units_per_em} \NC number \NC 1000 for \POSTSCRIPT-based fonts, usually 2048 for \TRUETYPE\NC \NR +\NC \type{ascent} \NC number \NC height of ascender in \type {units_per_em}\NC \NR +\NC \type{descent} \NC number \NC depth of descender in \type {units_per_em}\NC \NR +\NC \type{upos} \NC float \NC \NC \NR +\NC \type{uwidth} \NC float \NC \NC \NR +\NC \type{uniqueid} \NC number \NC \NC \NR +\NC \type{glyphs} \NC array \NC \NC \NR +\NC \type{glyphcnt} \NC number \NC number of included glyphs\NC \NR +\NC \type{glyphmax} \NC number \NC maximum used index the glyphs array\NC \NR +\NC \type{glyphmin} \NC number \NC minimum used index the glyphs array\NC \NR +\NC \type{notdef_loc} \NC number \NC location of the \type {.notdef} glyph + or \type {-1} when not present \NC \NR +\NC \type{hasvmetrics} \NC number \NC \NC \NR +\NC \type{onlybitmaps} \NC number \NC \NC \NR +\NC \type{serifcheck} \NC number \NC \NC \NR +\NC \type{isserif} \NC number \NC \NC \NR +\NC \type{issans} \NC number \NC \NC \NR +\NC \type{encodingchanged} \NC number \NC \NC \NR +\NC \type{strokedfont} \NC number \NC \NC \NR +\NC \type{use_typo_metrics} \NC number \NC \NC \NR +\NC \type{weight_width_slope_only} \NC number \NC \NC \NR +\NC \type{head_optimized_for_cleartype} \NC number \NC \NC \NR +\NC \type{uni_interp} \NC enum \NC \type {unset}, \type {none}, \type {adobe}, + \type {greek}, \type {japanese}, \type {trad_chinese}, + \type {simp_chinese}, \type {korean}, \type {ams}\NC \NR +\NC \type{origname} \NC string \NC the file name, as supplied by the user\NC \NR +\NC \type{map} \NC table \NC \NC \NR +\NC \type{private} \NC table \NC \NC \NR +\NC \type{xuid} \NC string \NC \NC \NR +\NC \type{pfminfo} \NC table \NC \NC \NR +\NC \type{names} \NC table \NC \NC \NR +\NC \type{cidinfo} \NC table \NC \NC \NR +\NC \type{subfonts} \NC array \NC \NC \NR +\NC \type{commments} \NC string \NC \NC \NR +\NC \type{fontlog} \NC string \NC \NC \NR +\NC \type{cvt_names} \NC string \NC \NC \NR +\NC \type{anchor_classes} \NC table \NC \NC \NR +\NC \type{ttf_tables} \NC table \NC \NC \NR +\NC \type{ttf_tab_saved} \NC table \NC \NC \NR +\NC \type{kerns} \NC table \NC \NC \NR +\NC \type{vkerns} \NC table \NC \NC \NR +\NC \type{texdata} \NC table \NC \NC \NR +\NC \type{lookups} \NC table \NC \NC \NR +\NC \type{gpos} \NC table \NC \NC \NR +\NC \type{gsub} \NC table \NC \NC \NR +\NC \type{mm} \NC table \NC \NC \NR +\NC \type{chosenname} \NC string \NC \NC \NR +\NC \type{macstyle} \NC number \NC \NC \NR +\NC \type{fondname} \NC string \NC \NC \NR +%NC \type{design_size} \NC number \NC \NC \NR +\NC \type{fontstyle_id} \NC number \NC \NC \NR +\NC \type{fontstyle_name} \NC table \NC \NC \NR +%NC \type{design_range_bottom} \NC number \NC \NC \NR +%NC \type{design_range_top} \NC number \NC \NC \NR +\NC \type{strokewidth} \NC float \NC \NC \NR +\NC \type{mark_classes} \NC table \NC \NC \NR +\NC \type{creationtime} \NC number \NC \NC \NR +\NC \type{modificationtime} \NC number \NC \NC \NR +\NC \type{os2_version} \NC number \NC \NC \NR +\NC \type{sfd_version} \NC number \NC \NC \NR +\NC \type{math} \NC table \NC \NC \NR +\NC \type{validation_state} \NC table \NC \NC \NR +\NC \type{horiz_base} \NC table \NC \NC \NR +\NC \type{vert_base} \NC table \NC \NC \NR +\NC \type{extrema_bound} \NC number \NC \NC \NR +\NC \type{truetype} \NC boolean \NC signals a \TRUETYPE\ font \NC \NR \stoptabulate \subsection{Glyph items} @@ -354,33 +354,33 @@ the documentation are not yet finished): The \type {glyphs} is an array containing the per|-|character information (quite a few of these are only present if nonzero). -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC name \NC string \NC the glyph name \NC \NR -\NC unicode \NC number \NC unicode code point, or -1 \NC \NR -\NC boundingbox \NC array \NC array of four numbers, see note below \NC \NR -\NC width \NC number \NC only for horizontal fonts \NC \NR -\NC vwidth \NC number \NC only for vertical fonts \NC \NR -\NC tsidebearing \NC number \NC only for vertical ttf/otf fonts, and only if nonzero \NC \NR -\NC lsidebearing \NC number \NC only if nonzero and not equal to boundingbox[1] \NC \NR -\NC class \NC string \NC one of "none", "base", "ligature", "mark", "component" - (if not present, the glyph class is \quote {automatic}) \NC \NR -\NC kerns \NC array \NC only for horizontal fonts, if set \NC \NR -\NC vkerns \NC array \NC only for vertical fonts, if set \NC \NR -\NC dependents \NC array \NC linear array of glyph name strings, only if nonempty\NC \NR -\NC lookups \NC table \NC only if nonempty \NC \NR -\NC ligatures \NC table \NC only if nonempty \NC \NR -\NC anchors \NC table \NC only if set \NC \NR -\NC comment \NC string \NC only if set \NC \NR -\NC tex_height \NC number \NC only if set \NC \NR -\NC tex_depth \NC number \NC only if set \NC \NR -\NC italic_correction \NC number \NC only if set \NC \NR -\NC top_accent \NC number \NC only if set \NC \NR -\NC is_extended_shape \NC number \NC only if this character is part of a math extension list \NC \NR -\NC altuni \NC table \NC alternate \UNICODE\ items \NC \NR -\NC vert_variants \NC table \NC \NC \NR -\NC horiz_variants \NC table \NC \NC \NR -\NC mathkern \NC table \NC \NC \NR +\starttabulate[|l|l|p|] +\BC \type{key} \BC type \BC explanation \NC \NR +\NC \type{name} \NC string \NC the glyph name \NC \NR +\NC \type{unicode} \NC number \NC unicode code point, or -1 \NC \NR +\NC \type{boundingbox} \NC array \NC array of four numbers, see note below \NC \NR +\NC \type{width} \NC number \NC only for horizontal fonts \NC \NR +\NC \type{vwidth} \NC number \NC only for vertical fonts \NC \NR +\NC \type{tsidebearing} \NC number \NC only for vertical ttf/otf fonts, and only if nonzero \NC \NR +\NC \type{lsidebearing} \NC number \NC only if nonzero and not equal to boundingbox[1] \NC \NR +\NC \type{class} \NC string \NC one of "none", "base", "ligature", "mark", "component" + (if not present, the glyph class is \quote {automatic}) \NC \NR +\NC \type{kerns} \NC array \NC only for horizontal fonts, if set \NC \NR +\NC \type{vkerns} \NC array \NC only for vertical fonts, if set \NC \NR +\NC \type{dependents} \NC array \NC linear array of glyph name strings, only if nonempty\NC \NR +\NC \type{lookups} \NC table \NC only if nonempty \NC \NR +\NC \type{ligatures} \NC table \NC only if nonempty \NC \NR +\NC \type{anchors} \NC table \NC only if set \NC \NR +\NC \type{comment} \NC string \NC only if set \NC \NR +\NC \type{tex_height} \NC number \NC only if set \NC \NR +\NC \type{tex_depth} \NC number \NC only if set \NC \NR +\NC \type{italic_correction} \NC number \NC only if set \NC \NR +\NC \type{top_accent} \NC number \NC only if set \NC \NR +\NC \type{is_extended_shape} \NC number \NC only if this character is part of a math extension list \NC \NR +\NC \type{altuni} \NC table \NC alternate \UNICODE\ items \NC \NR +\NC \type{vert_variants} \NC table \NC \NC \NR +\NC \type{horiz_variants} \NC table \NC \NC \NR +\NC \type{mathkern} \NC table \NC \NC \NR \stoptabulate On \type {boundingbox}: The boundingbox information for \TRUETYPE\ fonts and @@ -397,44 +397,45 @@ it. The \type {kerns} and \type {vkerns} are linear arrays of small hashes: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC char \NC string \NC \NC \NR -\NC off \NC number \NC \NC \NR -\NC lookup \NC string \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{char} \NC string \NC \NC \NR +\NC \type{off} \NC number \NC \NC \NR +\NC \type{lookup} \NC string \NC \NC \NR \stoptabulate The \type {lookups} is a hash, based on lookup subtable names, with the value of each key inside that a linear array of small hashes: % TODO: fix this description -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC type \NC enum \NC \type {position}, \type {pair}, \type - {substitution}, \type {alternate}, \type - {multiple}, \type {ligature}, \type {lcaret}, - \type {kerning}, \type {vkerning}, \type - {anchors}, \type {contextpos}, \type - {contextsub}, \type {chainpos}, \type - {chainsub}, \type {reversesub}, \type {max}, - \type {kernback}, \type {vkernback} \NC \NR -\NC specification \NC table \NC extra data \NC \NR + +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{type} \NC enum \NC \type {position}, \type {pair}, \type + {substitution}, \type {alternate}, \type + {multiple}, \type {ligature}, \type {lcaret}, + \type {kerning}, \type {vkerning}, \type + {anchors}, \type {contextpos}, \type + {contextsub}, \type {chainpos}, \type + {chainsub}, \type {reversesub}, \type {max}, + \type {kernback}, \type {vkernback} \NC \NR +\NC \type{specification} \NC table \NC extra data \NC \NR \stoptabulate For the first seven values of \type {type}, there can be additional sub|-|information, stored in the sub-table \type {specification}: -\starttabulate[|lT|l|p|] -\NC \rmbf value \NC \bf type \NC \bf explanation \NC \NR -\NC position \NC table \NC a table of the \type {offset_specs} type \NC \NR -\NC pair \NC table \NC one string: \type {paired}, and an array of one - or two \type {offset_specs} tables: \type - {offsets} \NC \NR -\NC substitution \NC table \NC one string: \type {variant} \NC \NR -\NC alternate \NC table \NC one string: \type {components} \NC \NR -\NC multiple \NC table \NC one string: \type {components} \NC \NR -\NC ligature \NC table \NC two strings: \type {components}, \type {char} \NC \NR -\NC lcaret \NC array \NC linear array of numbers \NC \NR +\starttabulate[|l|l|p|] +\BC value \BC type \BC explanation \NC \NR +\NC \type{position} \NC table \NC a table of the \type {offset_specs} type \NC \NR +\NC \type{pair} \NC table \NC one string: \type {paired}, and an array of one + or two \type {offset_specs} tables: \type + {offsets} \NC \NR +\NC \type{substitution} \NC table \NC one string: \type {variant} \NC \NR +\NC \type{alternate} \NC table \NC one string: \type {components} \NC \NR +\NC \type{multiple} \NC table \NC one string: \type {components} \NC \NR +\NC \type{ligature} \NC table \NC two strings: \type {components}, \type {char} \NC \NR +\NC \type{lcaret} \NC array \NC linear array of numbers \NC \NR \stoptabulate Tables for \type {offset_specs} contain up to four number|-|valued fields: \type @@ -443,37 +444,37 @@ width correction) and \type {v} (an advance height correction). The \type {ligatures} is a linear array of small hashes: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC lig \NC table \NC uses the same substructure as a single item in - the \type {lookups} table explained above \NC \NR -\NC char \NC string \NC \NC \NR -\NC components \NC array \NC linear array of named components \NC \NR -\NC ccnt \NC number \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{lig} \NC table \NC uses the same substructure as a single item in + the \type {lookups} table explained above \NC \NR +\NC \type{char} \NC string \NC \NC \NR +\NC \type{components} \NC array \NC linear array of named components \NC \NR +\NC \type{ccnt} \NC number \NC \NC \NR \stoptabulate The \type {anchor} table is indexed by a string signifying the anchor type, which is one of -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC mark \NC table \NC placement mark \NC \NR -\NC basechar \NC table \NC mark for attaching combining items to a base char \NC \NR -\NC baselig \NC table \NC mark for attaching combining items to a ligature \NC \NR -\NC basemark \NC table \NC generic mark for attaching combining items to connect to \NC \NR -\NC centry \NC table \NC cursive entry point \NC \NR -\NC cexit \NC table \NC cursive exit point \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{mark} \NC table \NC placement mark \NC \NR +\NC \type{basechar} \NC table \NC mark for attaching combining items to a base char \NC \NR +\NC \type{baselig} \NC table \NC mark for attaching combining items to a ligature \NC \NR +\NC \type{basemark} \NC table \NC generic mark for attaching combining items to connect to \NC \NR +\NC \type{centry} \NC table \NC cursive entry point \NC \NR +\NC \type{cexit} \NC table \NC cursive exit point \NC \NR \stoptabulate The content of these is a short array of defined anchors, with the entry keys being the anchor names. For all except \type {baselig}, the value is a single table with this definition: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC x \NC number \NC x location \NC \NR -\NC y \NC number \NC y location \NC \NR -\NC ttf_pt_index \NC number \NC truetype point index, only if given \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{x} \NC number \NC x location \NC \NR +\NC \type{y} \NC number \NC y location \NC \NR +\NC \type{ttf_pt_index} \NC number \NC truetype point index, only if given \NC \NR \stoptabulate For \type {baselig}, the value is a small array of such anchor sets sets, one for @@ -504,53 +505,53 @@ Note: The \type {baselig} table can be sparse! The top|-|level map is a list of encoding mappings. Each of those is a table itself. -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC enccount \NC number \NC \NC \NR -\NC encmax \NC number \NC \NC \NR -\NC backmax \NC number \NC \NC \NR -\NC remap \NC table \NC \NC \NR -\NC map \NC array \NC non|-|linear array of mappings\NC \NR -\NC backmap \NC array \NC non|-|linear array of backward mappings\NC \NR -\NC enc \NC table \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{enccount} \NC number \NC \NC \NR +\NC \type{encmax} \NC number \NC \NC \NR +\NC \type{backmax} \NC number \NC \NC \NR +\NC \type{remap} \NC table \NC \NC \NR +\NC \type{map} \NC array \NC non|-|linear array of mappings\NC \NR +\NC \type{backmap} \NC array \NC non|-|linear array of backward mappings\NC \NR +\NC \type{enc} \NC table \NC \NC \NR \stoptabulate The \type {remap} table is very small: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC firstenc \NC number \NC \NC \NR -\NC lastenc \NC number \NC \NC \NR -\NC infont \NC number \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{firstenc} \NC number \NC \NC \NR +\NC \type{lastenc} \NC number \NC \NC \NR +\NC \type{infont} \NC number \NC \NC \NR \stoptabulate The \type {enc} table is a bit more verbose: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC enc_name \NC string \NC \NC \NR -\NC char_cnt \NC number \NC \NC \NR -\NC char_max \NC number \NC \NC \NR -\NC unicode \NC array \NC of \UNICODE\ position numbers\NC \NR -\NC psnames \NC array \NC of \POSTSCRIPT\ glyph names\NC \NR -\NC builtin \NC number \NC \NC \NR -\NC hidden \NC number \NC \NC \NR -\NC only_1byte \NC number \NC \NC \NR -\NC has_1byte \NC number \NC \NC \NR -\NC has_2byte \NC number \NC \NC \NR -\NC is_unicodebmp \NC number \NC only if nonzero\NC \NR -\NC is_unicodefull \NC number \NC only if nonzero\NC \NR -\NC is_custom \NC number \NC only if nonzero\NC \NR -\NC is_original \NC number \NC only if nonzero\NC \NR -\NC is_compact \NC number \NC only if nonzero\NC \NR -\NC is_japanese \NC number \NC only if nonzero\NC \NR -\NC is_korean \NC number \NC only if nonzero\NC \NR -\NC is_tradchinese \NC number \NC only if nonzero [name?]\NC \NR -\NC is_simplechinese \NC number \NC only if nonzero\NC \NR -\NC low_page \NC number \NC \NC \NR -\NC high_page \NC number \NC \NC \NR -\NC iconv_name \NC string \NC \NC \NR -\NC iso_2022_escape \NC string \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{enc_name} \NC string \NC \NC \NR +\NC \type{char_cnt} \NC number \NC \NC \NR +\NC \type{char_max} \NC number \NC \NC \NR +\NC \type{unicode} \NC array \NC of \UNICODE\ position numbers\NC \NR +\NC \type{psnames} \NC array \NC of \POSTSCRIPT\ glyph names\NC \NR +\NC \type{builtin} \NC number \NC \NC \NR +\NC \type{hidden} \NC number \NC \NC \NR +\NC \type{only_1byte} \NC number \NC \NC \NR +\NC \type{has_1byte} \NC number \NC \NC \NR +\NC \type{has_2byte} \NC number \NC \NC \NR +\NC \type{is_unicodebmp} \NC number \NC only if nonzero\NC \NR +\NC \type{is_unicodefull} \NC number \NC only if nonzero\NC \NR +\NC \type{is_custom} \NC number \NC only if nonzero\NC \NR +\NC \type{is_original} \NC number \NC only if nonzero\NC \NR +\NC \type{is_compact} \NC number \NC only if nonzero\NC \NR +\NC \type{is_japanese} \NC number \NC only if nonzero\NC \NR +\NC \type{is_korean} \NC number \NC only if nonzero\NC \NR +\NC \type{is_tradchinese} \NC number \NC only if nonzero [name?]\NC \NR +\NC \type{is_simplechinese} \NC number \NC only if nonzero\NC \NR +\NC \type{low_page} \NC number \NC \NC \NR +\NC \type{high_page} \NC number \NC \NC \NR +\NC \type{iconv_name} \NC string \NC \NC \NR +\NC \type{iso_2022_escape} \NC string \NC \NC \NR \stoptabulate \subsection{private table} @@ -560,138 +561,138 @@ both strings. \subsection{cidinfo table} -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC registry \NC string \NC \NC \NR -\NC ordering \NC string \NC \NC \NR -\NC supplement \NC number \NC \NC \NR -\NC version \NC number \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{registry} \NC string \NC \NC \NR +\NC \type{ordering} \NC string \NC \NC \NR +\NC \type{supplement} \NC number \NC \NC \NR +\NC \type{version} \NC number \NC \NC \NR \stoptabulate \subsection[fontloaderpfminfotable]{pfminfo table} The \type {pfminfo} table contains most of the OS/2 information: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC pfmset \NC number \NC \NC \NR -\NC winascent_add \NC number \NC \NC \NR -\NC windescent_add \NC number \NC \NC \NR -\NC hheadascent_add \NC number \NC \NC \NR -\NC hheaddescent_add \NC number \NC \NC \NR -\NC typoascent_add \NC number \NC \NC \NR -\NC typodescent_add \NC number \NC \NC \NR -\NC subsuper_set \NC number \NC \NC \NR -\NC panose_set \NC number \NC \NC \NR -\NC hheadset \NC number \NC \NC \NR -\NC vheadset \NC number \NC \NC \NR -\NC pfmfamily \NC number \NC \NC \NR -\NC weight \NC number \NC \NC \NR -\NC width \NC number \NC \NC \NR -\NC avgwidth \NC number \NC \NC \NR -\NC firstchar \NC number \NC \NC \NR -\NC lastchar \NC number \NC \NC \NR -\NC fstype \NC number \NC \NC \NR -\NC linegap \NC number \NC \NC \NR -\NC vlinegap \NC number \NC \NC \NR -\NC hhead_ascent \NC number \NC \NC \NR -\NC hhead_descent \NC number \NC \NC \NR -\NC os2_typoascent \NC number \NC \NC \NR -\NC os2_typodescent \NC number \NC \NC \NR -\NC os2_typolinegap \NC number \NC \NC \NR -\NC os2_winascent \NC number \NC \NC \NR -\NC os2_windescent \NC number \NC \NC \NR -\NC os2_subxsize \NC number \NC \NC \NR -\NC os2_subysize \NC number \NC \NC \NR -\NC os2_subxoff \NC number \NC \NC \NR -\NC os2_subyoff \NC number \NC \NC \NR -\NC os2_supxsize \NC number \NC \NC \NR -\NC os2_supysize \NC number \NC \NC \NR -\NC os2_supxoff \NC number \NC \NC \NR -\NC os2_supyoff \NC number \NC \NC \NR -\NC os2_strikeysize \NC number \NC \NC \NR -\NC os2_strikeypos \NC number \NC \NC \NR -\NC os2_family_class \NC number \NC \NC \NR -\NC os2_xheight \NC number \NC \NC \NR -\NC os2_capheight \NC number \NC \NC \NR -\NC os2_defaultchar \NC number \NC \NC \NR -\NC os2_breakchar \NC number \NC \NC \NR -\NC os2_vendor \NC string \NC \NC \NR -\NC codepages \NC table \NC A two-number array of encoded code pages\NC \NR -\NC unicoderages \NC table \NC A four-number array of encoded unicode ranges\NC \NR -\NC panose \NC table \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{pfmset} \NC number \NC \NC \NR +\NC \type{winascent_add} \NC number \NC \NC \NR +\NC \type{windescent_add} \NC number \NC \NC \NR +\NC \type{hheadascent_add} \NC number \NC \NC \NR +\NC \type{hheaddescent_add} \NC number \NC \NC \NR +\NC \type{typoascent_add} \NC number \NC \NC \NR +\NC \type{typodescent_add} \NC number \NC \NC \NR +\NC \type{subsuper_set} \NC number \NC \NC \NR +\NC \type{panose_set} \NC number \NC \NC \NR +\NC \type{hheadset} \NC number \NC \NC \NR +\NC \type{vheadset} \NC number \NC \NC \NR +\NC \type{pfmfamily} \NC number \NC \NC \NR +\NC \type{weight} \NC number \NC \NC \NR +\NC \type{width} \NC number \NC \NC \NR +\NC \type{avgwidth} \NC number \NC \NC \NR +\NC \type{firstchar} \NC number \NC \NC \NR +\NC \type{lastchar} \NC number \NC \NC \NR +\NC \type{fstype} \NC number \NC \NC \NR +\NC \type{linegap} \NC number \NC \NC \NR +\NC \type{vlinegap} \NC number \NC \NC \NR +\NC \type{hhead_ascent} \NC number \NC \NC \NR +\NC \type{hhead_descent} \NC number \NC \NC \NR +\NC \type{os2_typoascent} \NC number \NC \NC \NR +\NC \type{os2_typodescent} \NC number \NC \NC \NR +\NC \type{os2_typolinegap} \NC number \NC \NC \NR +\NC \type{os2_winascent} \NC number \NC \NC \NR +\NC \type{os2_windescent} \NC number \NC \NC \NR +\NC \type{os2_subxsize} \NC number \NC \NC \NR +\NC \type{os2_subysize} \NC number \NC \NC \NR +\NC \type{os2_subxoff} \NC number \NC \NC \NR +\NC \type{os2_subyoff} \NC number \NC \NC \NR +\NC \type{os2_supxsize} \NC number \NC \NC \NR +\NC \type{os2_supysize} \NC number \NC \NC \NR +\NC \type{os2_supxoff} \NC number \NC \NC \NR +\NC \type{os2_supyoff} \NC number \NC \NC \NR +\NC \type{os2_strikeysize} \NC number \NC \NC \NR +\NC \type{os2_strikeypos} \NC number \NC \NC \NR +\NC \type{os2_family_class} \NC number \NC \NC \NR +\NC \type{os2_xheight} \NC number \NC \NC \NR +\NC \type{os2_capheight} \NC number \NC \NC \NR +\NC \type{os2_defaultchar} \NC number \NC \NC \NR +\NC \type{os2_breakchar} \NC number \NC \NC \NR +\NC \type{os2_vendor} \NC string \NC \NC \NR +\NC \type{codepages} \NC table \NC A two-number array of encoded code pages \NC \NR +\NC \type{unicoderages} \NC table \NC A four-number array of encoded unicode ranges \NC \NR +\NC \type{panose} \NC table \NC \NC \NR \stoptabulate The \type {panose} subtable has exactly 10 string keys: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC familytype \NC string \NC Values as in the \OPENTYPE\ font - specification: \type {Any}, \type {No Fit}, - \type {Text and Display}, \type {Script}, - \type {Decorative}, \type {Pictorial} \NC - \NR -\NC serifstyle \NC string \NC See the \OPENTYPE\ font specification for - values \NC \NR -\NC weight \NC string \NC id. \NC \NR -\NC proportion \NC string \NC id. \NC \NR -\NC contrast \NC string \NC id. \NC \NR -\NC strokevariation \NC string \NC id. \NC \NR -\NC armstyle \NC string \NC id. \NC \NR -\NC letterform \NC string \NC id. \NC \NR -\NC midline \NC string \NC id. \NC \NR -\NC xheight \NC string \NC id. \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{familytype} \NC string \NC Values as in the \OPENTYPE\ font + specification: \type {Any}, \type {No Fit}, + \type {Text and Display}, \type {Script}, + \type {Decorative}, \type {Pictorial} \NC + \NR +\NC \type{serifstyle} \NC string \NC See the \OPENTYPE\ font specification for + values \NC \NR +\NC \type{weight} \NC string \NC idem \NC \NR +\NC \type{proportion} \NC string \NC idem \NC \NR +\NC \type{contrast} \NC string \NC idem \NC \NR +\NC \type{strokevariation} \NC string \NC idem \NC \NR +\NC \type{armstyle} \NC string \NC idem \NC \NR +\NC \type{letterform} \NC string \NC idem \NC \NR +\NC \type{midline} \NC string \NC idem \NC \NR +\NC \type{xheight} \NC string \NC idem \NC \NR \stoptabulate \subsection[fontloadernamestable]{names table} Each item has two top|-|level keys: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC lang \NC string \NC language for this entry \NC \NR -\NC names \NC table \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{lang} \NC string \NC language for this entry \NC \NR +\NC \type{names} \NC table \NC \NC \NR \stoptabulate The \type {names} keys are the actual \TRUETYPE\ name strings. The possible keys are: -\starttabulate[|lT|p|] -\NC \rmbf key \NC \bf explanation \NC \NR -\NC copyright \NC \NC \NR -\NC family \NC \NC \NR -\NC subfamily \NC \NC \NR -\NC uniqueid \NC \NC \NR -\NC fullname \NC \NC \NR -\NC version \NC \NC \NR -\NC postscriptname \NC \NC \NR -\NC trademark \NC \NC \NR -\NC manufacturer \NC \NC \NR -\NC designer \NC \NC \NR -\NC descriptor \NC \NC \NR -\NC venderurl \NC \NC \NR -\NC designerurl \NC \NC \NR -\NC license \NC \NC \NR -\NC licenseurl \NC \NC \NR -\NC idontknow \NC \NC \NR -\NC preffamilyname \NC \NC \NR -\NC prefmodifiers \NC \NC \NR -\NC compatfull \NC \NC \NR -\NC sampletext \NC \NC \NR -\NC cidfindfontname \NC \NC \NR -\NC wwsfamily \NC \NC \NR -\NC wwssubfamily \NC \NC \NR +\starttabulate[|l|p|] +\BC key \BC explanation \NC \NR +\NC \type{copyright} \NC \NC \NR +\NC \type{family} \NC \NC \NR +\NC \type{subfamily} \NC \NC \NR +\NC \type{uniqueid} \NC \NC \NR +\NC \type{fullname} \NC \NC \NR +\NC \type{version} \NC \NC \NR +\NC \type{postscriptname} \NC \NC \NR +\NC \type{trademark} \NC \NC \NR +\NC \type{manufacturer} \NC \NC \NR +\NC \type{designer} \NC \NC \NR +\NC \type{descriptor} \NC \NC \NR +\NC \type{venderurl} \NC \NC \NR +\NC \type{designerurl} \NC \NC \NR +\NC \type{license} \NC \NC \NR +\NC \type{licenseurl} \NC \NC \NR +\NC \type{idontknow} \NC \NC \NR +\NC \type{preffamilyname} \NC \NC \NR +\NC \type{prefmodifiers} \NC \NC \NR +\NC \type{compatfull} \NC \NC \NR +\NC \type{sampletext} \NC \NC \NR +\NC \type{cidfindfontname} \NC \NC \NR +\NC \type{wwsfamily} \NC \NC \NR +\NC \type{wwssubfamily} \NC \NC \NR \stoptabulate \subsection{anchor_classes table} The anchor_classes classes: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC name \NC string \NC a descriptive id of this anchor class\NC \NR -\NC lookup \NC string \NC \NC \NR -\NC type \NC string \NC one of \type {mark}, \type {mkmk}, \type {curs}, \type {mklg} \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{name} \NC string \NC a descriptive id of this anchor class\NC \NR +\NC \type{lookup} \NC string \NC \NC \NR +\NC \type{type} \NC string \NC one of \type {mark}, \type {mkmk}, \type {curs}, \type {mklg} \NC \NR \stoptabulate % type is actually a lookup subtype, not a feature name. Officially, these @@ -702,66 +703,66 @@ The anchor_classes classes: The \type {gpos} table has one array entry for each lookup. (The \type {gpos_} prefix is somewhat redundant.) -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC type \NC string \NC one of \type {gpos_single}, \type {gpos_pair}, - \type {gpos_cursive}, \type {gpos_mark2base},\crlf - \type {gpos_mark2ligature}, \type - {gpos_mark2mark}, \type {gpos_context},\crlf \type - {gpos_contextchain} \NC \NR -\NC flags \NC table \NC \NC \NR -\NC name \NC string \NC \NC \NR -\NC features \NC array \NC \NC \NR -\NC subtables \NC array \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{type} \NC string \NC one of \type {gpos_single}, \type {gpos_pair}, + \type {gpos_cursive}, \type {gpos_mark2base},\crlf + \type {gpos_mark2ligature}, \type + {gpos_mark2mark}, \type {gpos_context},\crlf \type + {gpos_contextchain} \NC \NR +\NC \type{flags} \NC table \NC \NC \NR +\NC \type{name} \NC string \NC \NC \NR +\NC \type{features} \NC array \NC \NC \NR +\NC \type{subtables} \NC array \NC \NC \NR \stoptabulate The flags table has a true value for each of the lookup flags that is actually set: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC r2l \NC boolean \NC \NC \NR -\NC ignorebaseglyphs \NC boolean \NC \NC \NR -\NC ignoreligatures \NC boolean \NC \NC \NR -\NC ignorecombiningmarks \NC boolean \NC \NC \NR -\NC mark_class \NC string \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{r2l} \NC boolean \NC \NC \NR +\NC \type{ignorebaseglyphs} \NC boolean \NC \NC \NR +\NC \type{ignoreligatures} \NC boolean \NC \NC \NR +\NC \type{ignorecombiningmarks} \NC boolean \NC \NC \NR +\NC \type{mark_class} \NC string \NC \NC \NR \stoptabulate The features subtable items of gpos have: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC tag \NC string \NC \NC \NR -\NC scripts \NC table \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{tag} \NC string \NC \NC \NR +\NC \type{scripts} \NC table \NC \NC \NR \stoptabulate The scripts table within features has: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC script \NC string \NC \NC \NR -\NC langs \NC array of strings \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{script} \NC string \NC \NC \NR +\NC \type{langs} \NC array of strings \NC \NC \NR \stoptabulate The subtables table has: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC name \NC string \NC \NC \NR -\NC suffix \NC string \NC (only if used)\NC \NR % used by gpos_single to get a default -\NC anchor_classes \NC number \NC (only if used)\NC \NR -\NC vertical_kerning \NC number \NC (only if used)\NC \NR -\NC kernclass \NC table \NC (only if used)\NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{name} \NC string \NC \NC \NR +\NC \type{suffix} \NC string \NC (only if used)\NC \NR % used by gpos_single to get a default +\NC \type{anchor_classes} \NC number \NC (only if used)\NC \NR +\NC \type{vertical_kerning} \NC number \NC (only if used)\NC \NR +\NC \type{kernclass} \NC table \NC (only if used)\NC \NR \stoptabulate The kernclass with subtables table has: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC firsts \NC array of strings \NC \NC \NR -\NC seconds \NC array of strings \NC \NC \NR -\NC lookup \NC string or array \NC associated lookup(s) \NC \NR -\NC offsets \NC array of numbers \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{firsts} \NC array of strings \NC \NC \NR +\NC \type{seconds} \NC array of strings \NC \NC \NR +\NC \type{lookup} \NC string or array \NC associated lookup(s) \NC \NR +\NC \type{offsets} \NC array of numbers \NC \NC \NR \stoptabulate Note: the kernclass (as far as we can see) always has one entry so it could be one level @@ -773,9 +774,9 @@ internals so we keep that too. This has identical layout to the \type {gpos} table, except for the type: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC type \NC string \NC one of \type {gsub_single}, \type {gsub_multiple}, +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{type} \NC string \NC one of \type {gsub_single}, \type {gsub_multiple}, \type {gsub_alternate}, \type {gsub_ligature},\crlf \type {gsub_context}, \type {gsub_contextchain}, \type @@ -784,37 +785,37 @@ type: \subsection{ttf_tables and ttf_tab_saved tables} -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC tag \NC string \NC \NC \NR -\NC len \NC number \NC \NC \NR -\NC maxlen \NC number \NC \NC \NR -\NC data \NC number \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{tag} \NC string \NC \NC \NR +\NC \type{len} \NC number \NC \NC \NR +\NC \type{maxlen} \NC number \NC \NC \NR +\NC \type{data} \NC number \NC \NC \NR \stoptabulate \subsection{mm table} -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC axes \NC table \NC array of axis names \NC \NR -\NC instance_count \NC number \NC \NC \NR -\NC positions \NC table \NC array of instance positions - (\#axes * instances )\NC \NR -\NC defweights \NC table \NC array of default weights for instances \NC \NR -\NC cdv \NC string \NC \NC \NR -\NC ndv \NC string \NC \NC \NR -\NC axismaps \NC table \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{axes} \NC table \NC array of axis names \NC \NR +\NC \type{instance_count} \NC number \NC \NC \NR +\NC \type{positions} \NC table \NC array of instance positions + (\#axes * instances )\NC \NR +\NC \type{defweights} \NC table \NC array of default weights for instances \NC \NR +\NC \type{cdv} \NC string \NC \NC \NR +\NC \type{ndv} \NC string \NC \NC \NR +\NC \type{axismaps} \NC table \NC \NC \NR \stoptabulate The \type {axismaps}: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC blends \NC table \NC an array of blend points \NC \NR -\NC designs \NC table \NC an array of design values \NC \NR -\NC min \NC number \NC \NC \NR -\NC def \NC number \NC \NC \NR -\NC max \NC number \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{blends} \NC table \NC an array of blend points \NC \NR +\NC \type{designs} \NC table \NC an array of design values \NC \NR +\NC \type{min} \NC number \NC \NC \NR +\NC \type{def} \NC number \NC \NC \NR +\NC \type{max} \NC number \NC \NC \NR \stoptabulate \subsection{mark_classes table} @@ -824,110 +825,110 @@ space|-|separated string of glyph names in this class. \subsection{math table} -\starttabulate[|lT|p|] -\NC ScriptPercentScaleDown \NC \NC \NR -\NC ScriptScriptPercentScaleDown \NC \NC \NR -\NC DelimitedSubFormulaMinHeight \NC \NC \NR -\NC DisplayOperatorMinHeight \NC \NC \NR -\NC MathLeading \NC \NC \NR -\NC AxisHeight \NC \NC \NR -\NC AccentBaseHeight \NC \NC \NR -\NC FlattenedAccentBaseHeight \NC \NC \NR -\NC SubscriptShiftDown \NC \NC \NR -\NC SubscriptTopMax \NC \NC \NR -\NC SubscriptBaselineDropMin \NC \NC \NR -\NC SuperscriptShiftUp \NC \NC \NR -\NC SuperscriptShiftUpCramped \NC \NC \NR -\NC SuperscriptBottomMin \NC \NC \NR -\NC SuperscriptBaselineDropMax \NC \NC \NR -\NC SubSuperscriptGapMin \NC \NC \NR -\NC SuperscriptBottomMaxWithSubscript \NC \NC \NR -\NC SpaceAfterScript \NC \NC \NR -\NC UpperLimitGapMin \NC \NC \NR -\NC UpperLimitBaselineRiseMin \NC \NC \NR -\NC LowerLimitGapMin \NC \NC \NR -\NC LowerLimitBaselineDropMin \NC \NC \NR -\NC StackTopShiftUp \NC \NC \NR -\NC StackTopDisplayStyleShiftUp \NC \NC \NR -\NC StackBottomShiftDown \NC \NC \NR -\NC StackBottomDisplayStyleShiftDown \NC \NC \NR -\NC StackGapMin \NC \NC \NR -\NC StackDisplayStyleGapMin \NC \NC \NR -\NC StretchStackTopShiftUp \NC \NC \NR -\NC StretchStackBottomShiftDown \NC \NC \NR -\NC StretchStackGapAboveMin \NC \NC \NR -\NC StretchStackGapBelowMin \NC \NC \NR -\NC FractionNumeratorShiftUp \NC \NC \NR -\NC FractionNumeratorDisplayStyleShiftUp \NC \NC \NR -\NC FractionDenominatorShiftDown \NC \NC \NR -\NC FractionDenominatorDisplayStyleShiftDown \NC \NC \NR -\NC FractionNumeratorGapMin \NC \NC \NR -\NC FractionNumeratorDisplayStyleGapMin \NC \NC \NR -\NC FractionRuleThickness \NC \NC \NR -\NC FractionDenominatorGapMin \NC \NC \NR -\NC FractionDenominatorDisplayStyleGapMin \NC \NC \NR -\NC SkewedFractionHorizontalGap \NC \NC \NR -\NC SkewedFractionVerticalGap \NC \NC \NR -\NC OverbarVerticalGap \NC \NC \NR -\NC OverbarRuleThickness \NC \NC \NR -\NC OverbarExtraAscender \NC \NC \NR -\NC UnderbarVerticalGap \NC \NC \NR -\NC UnderbarRuleThickness \NC \NC \NR -\NC UnderbarExtraDescender \NC \NC \NR -\NC RadicalVerticalGap \NC \NC \NR -\NC RadicalDisplayStyleVerticalGap \NC \NC \NR -\NC RadicalRuleThickness \NC \NC \NR -\NC RadicalExtraAscender \NC \NC \NR -\NC RadicalKernBeforeDegree \NC \NC \NR -\NC RadicalKernAfterDegree \NC \NC \NR -\NC RadicalDegreeBottomRaisePercent \NC \NC \NR -\NC MinConnectorOverlap \NC \NC \NR -\NC FractionDelimiterSize \NC \NC \NR -\NC FractionDelimiterDisplayStyleSize \NC \NC \NR +\starttabulate[|l|p|] +\NC \type{ScriptPercentScaleDown} \NC \NC \NR +\NC \type{ScriptScriptPercentScaleDown} \NC \NC \NR +\NC \type{DelimitedSubFormulaMinHeight} \NC \NC \NR +\NC \type{DisplayOperatorMinHeight} \NC \NC \NR +\NC \type{MathLeading} \NC \NC \NR +\NC \type{AxisHeight} \NC \NC \NR +\NC \type{AccentBaseHeight} \NC \NC \NR +\NC \type{FlattenedAccentBaseHeight} \NC \NC \NR +\NC \type{SubscriptShiftDown} \NC \NC \NR +\NC \type{SubscriptTopMax} \NC \NC \NR +\NC \type{SubscriptBaselineDropMin} \NC \NC \NR +\NC \type{SuperscriptShiftUp} \NC \NC \NR +\NC \type{SuperscriptShiftUpCramped} \NC \NC \NR +\NC \type{SuperscriptBottomMin} \NC \NC \NR +\NC \type{SuperscriptBaselineDropMax} \NC \NC \NR +\NC \type{SubSuperscriptGapMin} \NC \NC \NR +\NC \type{SuperscriptBottomMaxWithSubscript} \NC \NC \NR +\NC \type{SpaceAfterScript} \NC \NC \NR +\NC \type{UpperLimitGapMin} \NC \NC \NR +\NC \type{UpperLimitBaselineRiseMin} \NC \NC \NR +\NC \type{LowerLimitGapMin} \NC \NC \NR +\NC \type{LowerLimitBaselineDropMin} \NC \NC \NR +\NC \type{StackTopShiftUp} \NC \NC \NR +\NC \type{StackTopDisplayStyleShiftUp} \NC \NC \NR +\NC \type{StackBottomShiftDown} \NC \NC \NR +\NC \type{StackBottomDisplayStyleShiftDown} \NC \NC \NR +\NC \type{StackGapMin} \NC \NC \NR +\NC \type{StackDisplayStyleGapMin} \NC \NC \NR +\NC \type{StretchStackTopShiftUp} \NC \NC \NR +\NC \type{StretchStackBottomShiftDown} \NC \NC \NR +\NC \type{StretchStackGapAboveMin} \NC \NC \NR +\NC \type{StretchStackGapBelowMin} \NC \NC \NR +\NC \type{FractionNumeratorShiftUp} \NC \NC \NR +\NC \type{FractionNumeratorDisplayStyleShiftUp} \NC \NC \NR +\NC \type{FractionDenominatorShiftDown} \NC \NC \NR +\NC \type{FractionDenominatorDisplayStyleShiftDown} \NC \NC \NR +\NC \type{FractionNumeratorGapMin} \NC \NC \NR +\NC \type{FractionNumeratorDisplayStyleGapMin} \NC \NC \NR +\NC \type{FractionRuleThickness} \NC \NC \NR +\NC \type{FractionDenominatorGapMin} \NC \NC \NR +\NC \type{FractionDenominatorDisplayStyleGapMin} \NC \NC \NR +\NC \type{SkewedFractionHorizontalGap} \NC \NC \NR +\NC \type{SkewedFractionVerticalGap} \NC \NC \NR +\NC \type{OverbarVerticalGap} \NC \NC \NR +\NC \type{OverbarRuleThickness} \NC \NC \NR +\NC \type{OverbarExtraAscender} \NC \NC \NR +\NC \type{UnderbarVerticalGap} \NC \NC \NR +\NC \type{UnderbarRuleThickness} \NC \NC \NR +\NC \type{UnderbarExtraDescender} \NC \NC \NR +\NC \type{RadicalVerticalGap} \NC \NC \NR +\NC \type{RadicalDisplayStyleVerticalGap} \NC \NC \NR +\NC \type{RadicalRuleThickness} \NC \NC \NR +\NC \type{RadicalExtraAscender} \NC \NC \NR +\NC \type{RadicalKernBeforeDegree} \NC \NC \NR +\NC \type{RadicalKernAfterDegree} \NC \NC \NR +\NC \type{RadicalDegreeBottomRaisePercent} \NC \NC \NR +\NC \type{MinConnectorOverlap} \NC \NC \NR +\NC \type{FractionDelimiterSize} \NC \NC \NR +\NC \type{FractionDelimiterDisplayStyleSize} \NC \NC \NR \stoptabulate \subsection{validation_state table} -\starttabulate[|lT|p|] -\NC \rmbf key \NC \bf explanation \NC \NR -\NC bad_ps_fontname \NC \NC \NR -\NC bad_glyph_table \NC \NC \NR -\NC bad_cff_table \NC \NC \NR -\NC bad_metrics_table \NC \NC \NR -\NC bad_cmap_table \NC \NC \NR -\NC bad_bitmaps_table \NC \NC \NR -\NC bad_gx_table \NC \NC \NR -\NC bad_ot_table \NC \NC \NR -\NC bad_os2_version \NC \NC \NR -\NC bad_sfnt_header \NC \NC \NR +\starttabulate[|l|p|] +\BC key \BC explanation \NC \NR +\NC \type{bad_ps_fontname} \NC \NC \NR +\NC \type{bad_glyph_table} \NC \NC \NR +\NC \type{bad_cff_table} \NC \NC \NR +\NC \type{bad_metrics_table} \NC \NC \NR +\NC \type{bad_cmap_table} \NC \NC \NR +\NC \type{bad_bitmaps_table} \NC \NC \NR +\NC \type{bad_gx_table} \NC \NC \NR +\NC \type{bad_ot_table} \NC \NC \NR +\NC \type{bad_os2_version} \NC \NC \NR +\NC \type{bad_sfnt_header} \NC \NC \NR \stoptabulate \subsection{horiz_base and vert_base table} -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC tags \NC table \NC an array of script list tags\NC \NR -\NC scripts \NC table \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{tags} \NC table \NC an array of script list tags\NC \NR +\NC \type{scripts} \NC table \NC \NC \NR \stoptabulate The \type {scripts} subtable: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC baseline \NC table \NC \NC \NR -\NC default_baseline \NC number \NC \NC \NR -\NC lang \NC table \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{baseline} \NC table \NC \NC \NR +\NC \type{default_baseline} \NC number \NC \NC \NR +\NC \type{lang} \NC table \NC \NC \NR \stoptabulate The \type {lang} subtable: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC tag \NC string \NC a script tag \NC \NR -\NC ascent \NC number \NC \NC \NR -\NC descent \NC number \NC \NC \NR -\NC features \NC table \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{tag} \NC string \NC a script tag \NC \NR +\NC \type{ascent} \NC number \NC \NC \NR +\NC \type{descent} \NC number \NC \NC \NR +\NC \type{features} \NC table \NC \NC \NR \stoptabulate The \type {features} points to an array of tables with the same layout except @@ -937,49 +938,48 @@ that in those nested tables, the tag represents a language. An array of alternate \UNICODE\ values. Inside that array are hashes with: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC unicode \NC number \NC this glyph is also used for this unicode \NC \NR -\NC variant \NC number \NC the alternative is driven by this unicode selector \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{unicode} \NC number \NC this glyph is also used for this unicode \NC \NR +\NC \type{variant} \NC number \NC the alternative is driven by this unicode selector \NC \NR \stoptabulate \subsection{vert_variants and horiz_variants table} -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC variants \NC string \NC \NC \NR -\NC italic_correction \NC number \NC \NC \NR -\NC parts \NC table \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{variants} \NC string \NC \NC \NR +\NC \type{italic_correction} \NC number \NC \NC \NR +\NC \type{parts} \NC table \NC \NC \NR \stoptabulate The \type {parts} table is an array of smaller tables: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC component \NC string \NC \NC \NR -\NC extender \NC number \NC \NC \NR -\NC start \NC number \NC \NC \NR -\NC end \NC number \NC \NC \NR -\NC advance \NC number \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{component} \NC string \NC \NC \NR +\NC \type{extender} \NC number \NC \NC \NR +\NC \type{start} \NC number \NC \NC \NR +\NC \type{end} \NC number \NC \NC \NR +\NC \type{advance} \NC number \NC \NC \NR \stoptabulate - \subsection{mathkern table} -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC top_right \NC table \NC \NC \NR -\NC bottom_right \NC table \NC \NC \NR -\NC top_left \NC table \NC \NC \NR -\NC bottom_left \NC table \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{top_right} \NC table \NC \NC \NR +\NC \type{bottom_right} \NC table \NC \NC \NR +\NC \type{top_left} \NC table \NC \NC \NR +\NC \type{bottom_left} \NC table \NC \NC \NR \stoptabulate Each of the subtables is an array of small hashes with two keys: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC height \NC number \NC \NC \NR -\NC kern \NC number \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{height} \NC number \NC \NC \NR +\NC \type{kern} \NC number \NC \NC \NR \stoptabulate \subsection{kerns table} @@ -992,10 +992,10 @@ Substructure is identical to the per|-|glyph subtable. \subsection{texdata table} -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC type \NC string \NC \type {unset}, \type {text}, \type {math}, \type {mathext} \NC \NR -\NC params \NC array \NC 22 font numeric parameters \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{type} \NC string \NC \type {unset}, \type {text}, \type {math}, \type {mathext} \NC \NR +\NC \type{params} \NC array \NC 22 font numeric parameters \NC \NR \stoptabulate \subsection{lookups table} @@ -1004,63 +1004,63 @@ 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 dictionary tables. -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC type \NC string \NC \NC \NR -\NC format \NC enum \NC one of \type {glyphs}, \type {class}, \type {coverage}, \type {reversecoverage} \NC \NR -\NC tag \NC string \NC \NC \NR -\NC current_class \NC array \NC \NC \NR -\NC before_class \NC array \NC \NC \NR -\NC after_class \NC array \NC \NC \NR -\NC rules \NC array \NC an array of rule items\NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{type} \NC string \NC \NC \NR +\NC \type{format} \NC enum \NC one of \type {glyphs}, \type {class}, \type {coverage}, \type {reversecoverage} \NC \NR +\NC \type{tag} \NC string \NC \NC \NR +\NC \type{current_class} \NC array \NC \NC \NR +\NC \type{before_class} \NC array \NC \NC \NR +\NC \type{after_class} \NC array \NC \NC \NR +\NC \type{rules} \NC array \NC an array of rule items\NC \NR \stoptabulate Rule items have one common item and one specialized item: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC lookups \NC array \NC a linear array of lookup names\NC \NR -\NC glyphs \NC array \NC only if the parent's format is \type {glyphs}\NC \NR -\NC class \NC array \NC only if the parent's format is \type {class}\NC \NR -\NC coverage \NC array \NC only if the parent's format is \type {coverage}\NC \NR -\NC reversecoverage \NC array \NC only if the parent's format is \type {reversecoverage}\NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{lookups} \NC array \NC a linear array of lookup names\NC \NR +\NC \type{glyphs} \NC array \NC only if the parent's format is \type {glyphs}\NC \NR +\NC \type{class} \NC array \NC only if the parent's format is \type {class}\NC \NR +\NC \type{coverage} \NC array \NC only if the parent's format is \type {coverage}\NC \NR +\NC \type{reversecoverage} \NC array \NC only if the parent's format is \type {reversecoverage}\NC \NR \stoptabulate A glyph table is: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC names \NC string \NC \NC \NR -\NC back \NC string \NC \NC \NR -\NC fore \NC string \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{names} \NC string \NC \NC \NR +\NC \type{back} \NC string \NC \NC \NR +\NC \type{fore} \NC string \NC \NC \NR \stoptabulate A class table is: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC current \NC array \NC of numbers \NC \NR -\NC before \NC array \NC of numbers \NC \NR -\NC after \NC array \NC of numbers \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{current} \NC array \NC of numbers \NC \NR +\NC \type{before} \NC array \NC of numbers \NC \NR +\NC \type{after} \NC array \NC of numbers \NC \NR \stoptabulate coverage: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC current \NC array \NC of strings \NC \NR -\NC before \NC array \NC of strings\NC \NR -\NC after \NC array \NC of strings \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{current} \NC array \NC of strings \NC \NR +\NC \type{before} \NC array \NC of strings\NC \NR +\NC \type{after} \NC array \NC of strings \NC \NR \stoptabulate reversecoverage: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC current \NC array \NC of strings \NC \NR -\NC before \NC array \NC of strings\NC \NR -\NC after \NC array \NC of strings \NC \NR -\NC replacements \NC string \NC \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{current} \NC array \NC of strings \NC \NR +\NC \type{before} \NC array \NC of strings\NC \NR +\NC \type{after} \NC array \NC of strings \NC \NR +\NC \type{replacements} \NC string \NC \NC \NR \stoptabulate \stopchapter diff --git a/Master/texmf-dist/doc/luatex/base/luatex-fonts.tex b/Master/texmf-dist/doc/luatex/base/luatex-fonts.tex index 221c0ce852c..6d72364839a 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-fonts.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-fonts.tex @@ -22,92 +22,106 @@ The column \quote {\VF} means that this key will be created by the \type The top|-|level keys in the table are as follows: -\starttabulate[|Tl|c|c|c|l|p|] -\NC \rmbf key \NC \bf vf \NC \bf tfm \NC \bf used \NC \bf value type \NC \bf description \NC \NR -\NC name \NC yes \NC yes \NC yes \NC string \NC metric (file) name \NC \NR -\NC area \NC no \NC yes \NC yes \NC string \NC (directory) location, typically empty \NC \NR -\NC used \NC no \NC yes \NC yes \NC boolean\NC indicates usage (initial: false) \NC \NR -\NC characters \NC yes \NC yes \NC yes \NC table \NC the defined glyphs of this font \NC \NR -\NC checksum \NC yes \NC yes \NC no \NC number \NC default: 0 \NC \NR -\NC designsize \NC no \NC yes \NC yes \NC number \NC expected size (default: 655360 == 10pt) \NC \NR -\NC direction \NC no \NC yes \NC yes \NC number \NC default: 0 \NC \NR -\NC encodingbytes \NC no \NC no \NC yes \NC number \NC default: depends on \type {format} \NC \NR -\NC encodingname \NC no \NC no \NC yes \NC string \NC encoding name \NC \NR -\NC fonts \NC yes \NC no \NC yes \NC table \NC locally used fonts \NC \NR -\NC psname \NC no \NC no \NC yes \NC string \NC This is the \POSTSCRIPT\ fontname in the incoming font - source, and it's used as fontname identifier in the \PDF\ - output. This has to be a valid string, e.g.\ no spaces - and such, as the backend will not do a cleanup. This gives - complete control to the loader. \NC \NR -\NC fullname \NC no \NC no \NC yes \NC string \NC output font name, used as a fallback in the \PDF\ output - if the \type {psname} is not set \NC \NR -\NC header \NC yes \NC no \NC no \NC string \NC header comments, if any \NC \NR -\NC hyphenchar \NC no \NC no \NC yes \NC number \NC default: \TEX's \type {\hyphenchar} \NC \NR -\NC parameters \NC no \NC yes \NC yes \NC hash \NC default: 7 parameters, all zero \NC \NR -\NC size \NC no \NC yes \NC yes \NC number \NC loaded (at) size. (default: same as designsize) \NC \NR -\NC skewchar \NC no \NC no \NC yes \NC number \NC default: \TEX's \type {\skewchar} \NC \NR -\NC type \NC yes \NC no \NC yes \NC string \NC basic type of this font \NC \NR -\NC format \NC no \NC no \NC yes \NC string \NC disk format type \NC \NR -\NC embedding \NC no \NC no \NC yes \NC string \NC \PDF\ inclusion \NC \NR -\NC filename \NC no \NC no \NC yes \NC string \NC the name of the font on disk \NC \NR -\NC tounicode \NC no \NC yes \NC yes \NC number \NC When this is set to~1 \LUATEX\ assumes per|-|glyph - tounicode entries are present in the font. \NC \NR -\NC stretch \NC no \NC no \NC yes \NC number \NC the \quote {stretch} value from \type - {\expandglyphsinfont} \NC \NR -\NC shrink \NC no \NC no \NC yes \NC number \NC the \quote {shrink} value from \type - {\expandglyphsinfont} \NC \NR -\NC step \NC no \NC no \NC yes \NC number \NC the \quote {step} value from \type - {\expandglyphsinfont} \NC \NR -\NC auto_expand \NC no \NC no \NC yes \NC boolean\NC the \quote {autoexpand} keyword from \crlf - \type {\expandglyphsinfont} \NC \NR -\NC expansion_factor \NC no \NC no \NC no \NC number \NC the actual expansion factor of an expanded font \NC \NR -\NC attributes \NC no \NC no \NC yes \NC string \NC 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 - \TEX\ end where \type {yes} means: use a reference to - the table that is passed to \LUATEX\ (this is the - default), and no \type {no} means: don't store the - table reference, don't cache any \LUA\ data for this - font while \type {renew} means: 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. - 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. \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, then \LUATEX\ will not check the - character entries for math|-|specific keys. \NC \NR -\NC oldmath \NC no \NC no \NC yes \NC boolean\NC This key flags a font as representing an old school \TEX\ - math font and disables the \OPENTYPE\ code path. \NC \NR -\NC slant \NC no \NC no \NC yes \NC number \NC This has the same semantics as the \type {SlantFont} - operator in font map files. \NC \NR -\NC extent \NC no \NC no \NC yes \NC number \NC This has the same semantics as the \type {ExtendFont} - operator in font map files. \NC \NR +\starttabulate[|l|c|c|c|l|p|] +\BC key \BC vf \BC tfm \BC used \BC value type \BC description \NC \NR +\NC \type{name} \NC yes \NC yes \NC yes \NC string \NC metric (file) name \NC \NR +\NC \type{area} \NC no \NC yes \NC yes \NC string \NC (directory) location, typically empty \NC \NR +\NC \type{used} \NC no \NC yes \NC yes \NC boolean \NC indicates usage (initial: false) \NC \NR +\NC \type{characters} \NC yes \NC yes \NC yes \NC table \NC the defined glyphs of this font \NC \NR +\NC \type{checksum} \NC yes \NC yes \NC no \NC number \NC default: 0 \NC \NR +\NC \type{designsize} \NC no \NC yes \NC yes \NC number \NC expected size (default: 655360 == 10pt) \NC \NR +\NC \type{direction} \NC no \NC yes \NC yes \NC number \NC default: 0 \NC \NR +\NC \type{encodingbytes} \NC no \NC no \NC yes \NC number \NC default: depends on \type {format} \NC \NR +\NC \type{encodingname} \NC no \NC no \NC yes \NC string \NC encoding name \NC \NR +\NC \type{fonts} \NC yes \NC no \NC yes \NC table \NC locally used fonts \NC \NR +\NC \type{psname} \NC no \NC no \NC yes \NC string \NC This is the \POSTSCRIPT\ fontname in the incoming font + source, and it's used as fontname identifier in the \PDF\ + output. This has to be a valid string, e.g.\ no spaces + and such, as the backend will not do a cleanup. This gives + complete control to the loader. \NC \NR +\NC \type{fullname} \NC no \NC no \NC yes \NC string \NC output font name, used as a fallback in the \PDF\ output + if the \type {psname} is not set \NC \NR +\NC \type{header} \NC yes \NC no \NC no \NC string \NC header comments, if any \NC \NR +\NC \type{hyphenchar} \NC no \NC no \NC yes \NC number \NC default: \TEX's \type {\hyphenchar} \NC \NR +\NC \type{parameters} \NC no \NC yes \NC yes \NC hash \NC default: 7 parameters, all zero \NC \NR +\NC \type{size} \NC no \NC yes \NC yes \NC number \NC loaded (at) size. (default: same as designsize) \NC \NR +\NC \type{skewchar} \NC no \NC no \NC yes \NC number \NC default: \TEX's \type {\skewchar} \NC \NR +\NC \type{type} \NC yes \NC no \NC yes \NC string \NC basic type of this font \NC \NR +\NC \type{format} \NC no \NC no \NC yes \NC string \NC disk format type \NC \NR +\NC \type{embedding} \NC no \NC no \NC yes \NC string \NC \PDF\ inclusion \NC \NR +\NC \type{filename} \NC no \NC no \NC yes \NC string \NC the name of the font on disk \NC \NR +\NC \type{tounicode} \NC no \NC yes \NC yes \NC number \NC When this is set to~1 \LUATEX\ assumes per|-|glyph + tounicode entries are present in the font. \NC \NR +\NC \type{stretch} \NC no \NC no \NC yes \NC number \NC the \quote {stretch} value from \type + {\expandglyphsinfont} \NC \NR +\NC \type{shrink} \NC no \NC no \NC yes \NC number \NC the \quote {shrink} value from \type + {\expandglyphsinfont} \NC \NR +\NC \type{step} \NC no \NC no \NC yes \NC number \NC the \quote {step} value from \type + {\expandglyphsinfont} \NC \NR +\NC \type{expansion_factor} \NC no \NC no \NC no \NC number \NC the actual expansion factor of an expanded font \NC \NR +\NC \type{attributes} \NC no \NC no \NC yes \NC string \NC the \type {\pdffontattr} \NC \NR +\NC \type{cache} \NC no \NC no \NC yes \NC string \NC This key controls caching of the \LUA\ table on the + \TEX\ end where \type {yes} means: use a reference to + the table that is passed to \LUATEX\ (this is the + default), and no \type {no} means: don't store the + table reference, don't cache any \LUA\ data for this + font while \type {renew} means: 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. + 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. \NC \NR +\NC \type{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, then \LUATEX\ will not check the + character entries for math|-|specific keys. \NC \NR +\NC \type{oldmath} \NC no \NC no \NC yes \NC boolean \NC This key flags a font as representing an old school \TEX\ + math font and disables the \OPENTYPE\ code path. \NC \NR +\NC \type{slant} \NC no \NC no \NC yes \NC number \NC This has the same semantics as the \type {SlantFont} + operator in font map files. \NC \NR +\NC \type{extent} \NC no \NC no \NC yes \NC number \NC This has the same semantics as the \type {ExtendFont} + operator in font map files. \NC \NR \stoptabulate The key \type {name} is always required. The keys \type {stretch}, \type -{shrink}, \type {step} and optionally \type {auto_expand} only have meaning when -used together: they can be used to replace a post|-|loading \type -{\expandglyphsinfont} command. The \type {expansion_factor} is value that can be -present inside a font in \type {font.fonts}. It is the actual expansion factor (a -value between \type {-shrink} and \type {stretch}, with step \type {step}) of a -font that was automatically generated by the font expansion algorithm. The key -\type {attributes} can be used to set font attributes in the \PDF\ file. The key -\type {used} is set by the engine when a font is actively in use, this makes sure -that the font's definition is written to the output file (\DVI\ or \PDF). The -\TFM\ reader sets it to false. The \type {direction} is a number signalling the -\quote {normal} direction for this font. There are sixteen possibilities: - -\starttabulate[|Tc|Tc|Tc|Tc|] -\NC \rmbf number \NC \rmbf meaning \NC \rmbf number \NC \rmbf meaning \NC\NR -\NC 0 \NC LT \NC 8 \NC TT \NC\NR -\NC 1 \NC LL \NC 9 \NC TL \NC\NR -\NC 2 \NC LB \NC 10 \NC TB \NC\NR -\NC 3 \NC LR \NC 11 \NC TR \NC\NR -\NC 4 \NC RT \NC 12 \NC BT \NC\NR -\NC 5 \NC RL \NC 13 \NC BL \NC\NR -\NC 6 \NC RB \NC 14 \NC BB \NC\NR -\NC 7 \NC RR \NC 15 \NC BR \NC\NR +{shrink}, \type {step} only have meaning when used together: they can be used to +replace a post|-|loading \type {\expandglyphsinfont} command. The \type +{auto_expand} option is not supported in \LUATEX. In fact, the primitives +that create expanded or protruding copies are probably only useful when used with +traditional fonts because all these extra \OPENTYPE\ properties are kept out of +the picture. The \type {expansion_factor} is value that can be present inside a +font in \type {font.fonts}. It is the actual expansion factor (a value between +\type {-shrink} and \type {stretch}, with step \type {step}) of a font that was +automatically generated by the font expansion algorithm. + +Because we store the actual state of expansion with each glyph and don't have +special font instances, we can change some font related parameters before lines +are constructed, like: + +\starttyping +font.setexpansion(font.current(),100,100,20) +\stoptyping + +This is mostly meant for experiments (or an optimizing routing written in \LUA) +so there is no primitive. + +The key \type {attributes} can be used to set font attributes in the \PDF\ file. +The key \type {used} is set by the engine when a font is actively in use, this +makes sure that the font's definition is written to the output file (\DVI\ or +\PDF). The \TFM\ reader sets it to false. The \type {direction} is a number +signalling the \quote {normal} direction for this font. There are sixteen +possibilities: + +\starttabulate[|c|c|c|c|] +\BC number \BC meaning \BC number \BC meaning \NC \NR +\NC \type{0} \NC \type{LT} \NC \type {8} \NC \type{TT} \NC \NR +\NC \type{1} \NC \type{LL} \NC \type {9} \NC \type{TL} \NC \NR +\NC \type{2} \NC \type{LB} \NC \type{10} \NC \type{TB} \NC \NR +\NC \type{3} \NC \type{LR} \NC \type{11} \NC \type{TR} \NC \NR +\NC \type{4} \NC \type{RT} \NC \type{12} \NC \type{BT} \NC \NR +\NC \type{5} \NC \type{RL} \NC \type{13} \NC \type{BL} \NC \NR +\NC \type{6} \NC \type{RB} \NC \type{14} \NC \type{BB} \NC \NR +\NC \type{7} \NC \type{RR} \NC \type{15} \NC \type{BR} \NC \NR \stoptabulate These are \OMEGA|-|style direction abbreviations: the first character indicates @@ -123,15 +137,15 @@ gives a nicer user interface. The names and their internal remapping are: -\starttabulate[|lT|c|] -\NC \rmbf name \NC \rmbf remapping \NC\NR -\NC slant \NC 1 \NC\NR -\NC space \NC 2 \NC\NR -\NC space_stretch \NC 3 \NC\NR -\NC space_shrink \NC 4 \NC\NR -\NC x_height \NC 5 \NC\NR -\NC quad \NC 6 \NC\NR -\NC extra_space \NC 7 \NC\LR +\starttabulate[|l|c|] +\BC name \BC remapping \NC \NR +\NC \type {slant} \NC 1 \NC \NR +\NC \type {space} \NC 2 \NC \NR +\NC \type {space_stretch} \NC 3 \NC \NR +\NC \type {space_shrink} \NC 4 \NC \NR +\NC \type {x_height} \NC 5 \NC \NR +\NC \type {quad} \NC 6 \NC \NR +\NC \type {extra_space} \NC 7 \NC \NR \stoptabulate The keys \type {type}, \type {format}, \type {embedding}, \type {fullname} and @@ -182,29 +196,29 @@ Each character hash itself is a hash. For example, here is the character \quote The following top|-|level keys can be present inside a character hash: -\starttabulate[|lT|c|c|c|l|p|] -\NC \rmbf key \NC \bf vf \NC \bf tfm \NC \bf used \NC \bf type \NC \bf description \NC\NR -\NC width \NC yes \NC yes \NC yes \NC number \NC character's width, in sp (default 0) \NC\NR -\NC height \NC no \NC yes \NC yes \NC number \NC character's height, in sp (default 0) \NC\NR -\NC depth \NC no \NC yes \NC yes \NC number \NC character's depth, in sp (default 0) \NC\NR -\NC italic \NC no \NC yes \NC yes \NC number \NC character's italic correction, in sp (default zero) \NC\NR -\NC top_accent \NC no \NC no \NC maybe \NC number \NC character's top accent alignment place, in sp (default zero) \NC\NR -\NC bot_accent \NC no \NC no \NC maybe \NC number \NC character's bottom accent alignment place, in sp (default zero) \NC\NR -\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 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 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 -\NC name \NC no \NC no \NC no \NC string \NC the character (\POSTSCRIPT) name \NC\NR -\NC index \NC no \NC no \NC yes \NC number \NC the (\OPENTYPE\ or \TRUETYPE) font glyph index \NC\NR -\NC used \NC no \NC yes \NC yes \NC boolean \NC typeset already (default: false)? \NC\NR -\NC mathkern \NC no \NC no \NC yes \NC table \NC math cut-in specifications \NC\NR +\starttabulate[|l|c|c|c|l|p|] +\BC key \BC vf \BC tfm \BC used \BC type \BC description \NC\NR +\NC \type{width} \NC yes \NC yes \NC yes \NC number \NC character's width, in sp (default 0) \NC\NR +\NC \type{height} \NC no \NC yes \NC yes \NC number \NC character's height, in sp (default 0) \NC\NR +\NC \type{depth} \NC no \NC yes \NC yes \NC number \NC character's depth, in sp (default 0) \NC\NR +\NC \type{italic} \NC no \NC yes \NC yes \NC number \NC character's italic correction, in sp (default zero) \NC\NR +\NC \type{top_accent} \NC no \NC no \NC maybe \NC number \NC character's top accent alignment place, in sp (default zero) \NC\NR +\NC \type{bot_accent} \NC no \NC no \NC maybe \NC number \NC character's bottom accent alignment place, in sp (default zero) \NC\NR +\NC \type{left_protruding} \NC no \NC no \NC maybe \NC number \NC character's \type {\lpcode} \NC\NR +\NC \type{right_protruding} \NC no \NC no \NC maybe \NC number \NC character's \type {\rpcode} \NC\NR +\NC \type{expansion_factor} \NC no \NC no \NC maybe \NC number \NC character's \type {\efcode} \NC\NR +\NC \type{tounicode} \NC no \NC no \NC maybe \NC string \NC character's \UNICODE\ equivalent(s), in \UTF|-|16BE hexadecimal format \NC\NR +\NC \type{next} \NC no \NC yes \NC yes \NC number \NC the \quote {next larger} character index \NC\NR +\NC \type{extensible} \NC no \NC yes \NC yes \NC table \NC the constituent parts of an extensible recipe \NC\NR +\NC \type{vert_variants} \NC no \NC no \NC yes \NC table \NC constituent parts of a vertical variant set \NC \NR +\NC \type{horiz_variants} \NC no \NC no \NC yes \NC table \NC constituent parts of a horizontal variant set \NC \NR +\NC \type{kerns} \NC no \NC yes \NC yes \NC table \NC kerning information \NC\NR +\NC \type{ligatures} \NC no \NC yes \NC yes \NC table \NC ligaturing information \NC\NR +\NC \type{commands} \NC yes \NC no \NC yes \NC array \NC virtual font commands \NC\NR +\NC \type{name} \NC no \NC no \NC no \NC string \NC the character (\POSTSCRIPT) name \NC\NR +\NC \type{index} \NC no \NC no \NC yes \NC number \NC the (\OPENTYPE\ or \TRUETYPE) font glyph index \NC\NR +\NC \type{used} \NC no \NC yes \NC yes \NC boolean \NC typeset already (default: false)? \NC\NR +\NC \type{mathkern} \NC no \NC no \NC yes \NC table \NC math cut-in specifications \NC\NR \stoptabulate The values of \type {top_accent}, \type {bot_accent} and \type {mathkern} are @@ -236,26 +250,26 @@ present. It in in turn can be overruled by \type {vert_variants}. The \type {extensible} table is very simple: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf description \NC\NR -\NC top \NC number \NC top character index \NC\NR -\NC mid \NC number \NC middle character index \NC\NR -\NC bot \NC number \NC bottom character index \NC\NR -\NC rep \NC number \NC repeatable character index \NC\NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC description \NC\NR +\NC \type{top} \NC number \NC top character index \NC\NR +\NC \type{mid} \NC number \NC middle character index \NC\NR +\NC \type{bot} \NC number \NC bottom character index \NC\NR +\NC \type{rep} \NC number \NC repeatable character index \NC\NR \stoptabulate The \type {horiz_variants} and \type {vert_variants} are arrays of components. Each of those components is itself a hash of up to five keys: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC\NR -\NC glyph \NC number \NC The character index. Note that this is an encoding number, not a name. \NC \NR -\NC extender \NC number \NC One (1) if this part is repeatable, zero (0) otherwise. \NC \NR -\NC start \NC number \NC The maximum overlap at the starting side (in scaled points). \NC \NR -\NC end \NC number \NC The maximum overlap at the ending side (in scaled points). \NC \NR -\NC advance \NC number \NC The total advance width of this item. It can be zero or missing, - then the natural size of the glyph for character \type {component} - is used. \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{glyph} \NC number \NC The character index. Note that this is an encoding number, not a name. \NC \NR +\NC \type{extender} \NC number \NC One (1) if this part is repeatable, zero (0) otherwise. \NC \NR +\NC \type{start} \NC number \NC The maximum overlap at the starting side (in scaled points). \NC \NR +\NC \type{end} \NC number \NC The maximum overlap at the ending side (in scaled points). \NC \NR +\NC \type{advance} \NC number \NC The total advance width of this item. It can be zero or missing, + then the natural size of the glyph for character \type {component} + is used. \NC \NR \stoptabulate The \type {kerns} table is a hash indexed by character index (and \quote @@ -268,10 +282,10 @@ The \type {ligatures} table is a hash indexed by character index (and \quote value \type {right_boundary}), with the values being yet another small hash, with two fields: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf description \NC \NR -\NC type \NC number \NC the type of this ligature command, default 0 \NC \NR -\NC char \NC number \NC the character index of the resultant ligature \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC description \NC \NR +\NC \type{type} \NC number \NC the type of this ligature command, default 0 \NC \NR +\NC \type{char} \NC number \NC the character index of the resultant ligature \NC \NR \stoptabulate The \type {char} field in a ligature is required. @@ -285,15 +299,15 @@ forward one or two places. The glyph that ends up to the right of the insertion point will become the next \quote {left}. \starttabulate[|l|c|l|l|] -\NC \bf textual (Knuth) \NC \bf number \NC \bf string \NC result \NC\NR -\NC \type{l + r =: n} \NC 0 \NC \type{=:} \NC \type{|n} \NC\NR -\NC \type{l + r =:| n} \NC 1 \NC \type{=:|} \NC \type{|nr} \NC\NR -\NC \type{l + r |=: n} \NC 2 \NC \type{|=:} \NC \type{|ln} \NC\NR -\NC \type{l + r |=:| n} \NC 3 \NC \type{|=:|} \NC \type{|lnr} \NC\NR -\NC \type{l + r =:|> n} \NC 5 \NC \type{=:|>} \NC \type{n|r} \NC\NR -\NC \type{l + r |=:> n} \NC 6 \NC \type{|=:>} \NC \type{l|n} \NC\NR -\NC \type{l + r |=:|> n} \NC 7 \NC \type{|=:|>} \NC \type{l|nr} \NC\NR -\NC \type{l + r |=:|>> n} \NC 11 \NC \type{|=:|>>} \NC \type{ln|r} \NC\NR +\BC textual (Knuth) \BC number \BC string \BC result \NC\NR +\NC \type{l + r =: n} \NC 0 \NC \type{=:} \NC \type{|n} \NC\NR +\NC \type{l + r =:| n} \NC 1 \NC \type{=:|} \NC \type{|nr} \NC\NR +\NC \type{l + r |=: n} \NC 2 \NC \type{|=:} \NC \type{|ln} \NC\NR +\NC \type{l + r |=:| n} \NC 3 \NC \type{|=:|} \NC \type{|lnr} \NC\NR +\NC \type{l + r =:|> n} \NC 5 \NC \type{=:|>} \NC \type{n|r} \NC\NR +\NC \type{l + r |=:> n} \NC 6 \NC \type{|=:>} \NC \type{l|n} \NC\NR +\NC \type{l + r |=:|> n} \NC 7 \NC \type{|=:|>} \NC \type{l|nr} \NC\NR +\NC \type{l + r |=:|>> n} \NC 11 \NC \type{|=:|>>} \NC \type{ln|r} \NC\NR \stoptabulate The default value is~0, and can be left out. That signifies a \quote {normal} @@ -310,10 +324,10 @@ structure. If the value is \type {real}, then this is a proper font, and the inclusion mechanism will attempt to add the needed font object definitions to the \PDF. Values for \type {type} are: -\starttabulate[|Tl|p|] -\NC \rmbf value \NC \rmbf description \NC\NR -\NC real \NC this is a base font \NC\NR -\NC virtual \NC this is a virtual font \NC\NR +\starttabulate[|l|p|] +\BC value \BC description \NC\NR +\NC \type{real} \NC this is a base font \NC\NR +\NC \type{virtual} \NC this is a virtual font \NC\NR \stoptabulate The actions to be taken depend on a number of different variables: @@ -354,12 +368,12 @@ the separate characters. Values for \type {format} are: -\starttabulate[|Tl|p|] -\NC \rmbf value \NC \rmbf description \NC \NR -\NC type1 \NC this is a \POSTSCRIPT\ \TYPEONE\ font \NC \NR -\NC type3 \NC this is a bitmapped (\PK) font \NC \NR -\NC truetype \NC this is a \TRUETYPE\ or \TRUETYPE|-|based \OPENTYPE\ font \NC \NR -\NC opentype \NC this is a \POSTSCRIPT|-|based \OPENTYPE\ font \NC \NR +\starttabulate[|l|p|] +\BC value \BC description \NC \NR +\NC \type{type1} \NC this is a \POSTSCRIPT\ \TYPEONE\ font \NC \NR +\NC \type{type3} \NC this is a bitmapped (\PK) font \NC \NR +\NC \type{truetype} \NC this is a \TRUETYPE\ or \TRUETYPE|-|based \OPENTYPE\ font \NC \NR +\NC \type{opentype} \NC this is a \POSTSCRIPT|-|based \OPENTYPE\ font \NC \NR \stoptabulate \type {type3} fonts are provided for backward compatibility only, and do not @@ -367,11 +381,11 @@ support the new wide encoding options. Values for \type {embedding} are: -\starttabulate[|Tl|p|] -\NC \rmbf value \NC \rmbf description \NC \NR -\NC no \NC don't embed the font at all \NC \NR -\NC subset \NC include and atttempt to subset the font \NC \NR -\NC full \NC include this font in its entirety \NC \NR +\starttabulate[|l|p|] +\BC value \BC description \NC \NR +\NC \type{no} \NC don't embed the font at all \NC \NR +\NC \type{subset} \NC include and atttempt to subset the font \NC \NR +\NC \type{full} \NC include this font in its entirety \NC \NR \stoptabulate The other fields are used as follows: The \type {fullname} will be the @@ -453,25 +467,28 @@ The \type {commands} array is a hash where each item is another small array, with the first entry representing a command and the extra items being the parameters to that command. The allowed commands and their arguments are: -\starttabulate[|Tl|l|l|p|] -\NC \rmbf command name \NC \bf arguments \NC \bf type \NC \bf description \NC\NR -\NC font \NC 1 \NC number \NC select a new font from the local \type {fonts} table\NC\NR -\NC char \NC 1 \NC number \NC typeset this character number from the current font, - and move right by the character's width\NC\NR -\NC node \NC 1 \NC node \NC output this node (list), and move right - by the width of this list\NC\NR -\NC slot \NC 2 \NC number \NC a shortcut for the combination of a font and char command\NC\NR -\NC push \NC 0 \NC \NC save current position\NC\NR -\NC nop \NC 0 \NC \NC do nothing \NC\NR -\NC pop \NC 0 \NC \NC pop position \NC\NR -\NC rule \NC 2 \NC 2 numbers \NC output a rule $ht*wd$, and move right.\NC\NR -\NC down \NC 1 \NC number \NC move down on the page\NC\NR -\NC right \NC 1 \NC number \NC move right on the page\NC\NR -\NC special \NC 1 \NC string \NC output a \type {\special} command\NC\NR -\NC lua \NC 1 \NC string \NC execute a \LUA\ script (at \type {\latelua} time)\NC\NR -\NC image \NC 1 \NC image \NC output an image (the argument can be either an \type - {<image>} variable or an \type {image_spec} table)\NC\NR -\NC comment \NC any \NC any \NC the arguments of this command are ignored\NC\NR +\starttabulate[|l|l|l|p|] +\BC command name \BC arguments \BC type \BC description \NC \NR +\NC \type{font} \NC 1 \NC number \NC select a new font from the local \type {fonts} table \NC \NR +\NC \type{char} \NC 1 \NC number \NC typeset this character number from the current font, + and move right by the character's width \NC \NR +\NC \type{node} \NC 1 \NC node \NC output this node (list), and move right + by the width of this list\NC \NR +\NC \type{slot} \NC 2 \NC 2 numbers \NC a shortcut for the combination of a font and char command\NC \NR +\NC \type{push} \NC 0 \NC \NC save current position\NC \NR +\NC \type{nop} \NC 0 \NC \NC do nothing \NC \NR +\NC \type{pop} \NC 0 \NC \NC pop position \NC \NR +\NC \type{rule} \NC 2 \NC 2 numbers \NC output a rule $ht*wd$, and move right. \NC \NR +\NC \type{down} \NC 1 \NC number \NC move down on the page \NC \NR +\NC \type{right} \NC 1 \NC number \NC move right on the page \NC \NR +\NC \type{special} \NC 1 \NC string \NC output a \type {\special} command \NC \NR +\NC \type{pdf} \NC 2 \NC 2 strings \NC output a \PDF\ literal, the first string is one of \type {origin}, + \type {page}, \type {direct} or \type {raw}; if you have one string + only \type {origin} is assumed \NC \NR +\NC \type{lua} \NC 1 \NC string \NC execute a \LUA\ script (at \type {\latelua} time) \NC \NR +\NC \type{image} \NC 1 \NC image \NC output an image (the argument can be either an \type + {<image>} variable or an \type {image_spec} table) \NC \NR +\NC \type{comment} \NC any \NC any \NC the arguments of this command are ignored \NC \NR \stoptabulate When a font id is set to~0 then it will be replaced by the currently assigned @@ -484,15 +501,17 @@ Here is a rather elaborate glyph commands example: \starttyping ... commands = { - { 'push' }, -- remember where we are - { 'right', 5000 }, -- move right about 0.08pt - { 'font', 3 }, -- select the fonts[3] entry - { 'char', 97 }, -- place character 97 (ASCII 'a') - { 'pop' }, -- go all the way back - { 'down', -200000 }, -- move upwards by about 3pt - { 'special', 'pdf: 1 0 0 rg' } -- switch to red color - { 'rule', 500000, 20000 } -- draw a bar - { 'special','pdf: 0 g' } -- back to black + { "push" }, -- remember where we are + { "right", 5000 }, -- move right about 0.08pt + { "font", 3 }, -- select the fonts[3] entry + { "char", 97 }, -- place character 97 (ASCII 'a') + { "pop" }, -- go all the way back + { "down", -200000 }, -- move upwards by about 3pt + { "special", "pdf: 1 0 0 rg" } -- switch to red color + -- { "pdf", "origin", "1 0 0 rg" } -- switch to red color (alternative) + { "rule", 500000, 20000 } -- draw a bar + { "special", "pdf: 0 g" } -- back to black + -- { "pdf", "origin", "0 g" } -- back to black (alternative) } ... \stoptyping @@ -511,6 +530,10 @@ output pointer will always move by exactly the width that was given in the \type {width} key of the character hash. Any movements that take place inside the \type {commands} array are ignored on the upper level. +The special can have a \type {pdf:}, \type {pdf:origin:}, \type {pdf:page:}, +\type {pdf:direct:} or \type {pdf:raw:} prefix. When you have to concatenate +strings using the \type {pdf} command might be more efficient. + \subsection{Artificial fonts} Even in a \quote {real} font, there can be virtual characters. When \LUATEX\ @@ -662,7 +685,32 @@ You can define your own font into \type {font.fonts} by calling this function: The return value is the internal id number of the defined font (the index into \type {font.fonts}). If the font creation fails, an error is raised. The table -is a font structure, as explained in \in {chapter} [fonts]. +is a font structure, as explained in \in {chapter} [fonts]. An alternative call +is: + +\startfunctioncall +<number> i = + font.define(<number> n, <table> f) +\stopfunctioncall + +Where the first argument is a reserved font id (see below). + +\subsection{Extending a font} + +Within reasonable bounds you can extend a font after it has been defined. Because +some properties are best left unchanged this is limited to adding characters. + +\startfunctioncall +font.addcharacters(<number n>, <table> f) +\stopfunctioncall + +The table passed can have the fields \type {characters} which is a (sub)table +like the one used in define, and for virtual fonts a \type {fonts} table can be +added. The characters defined in the \type {characters} table are added (when not +yet present) or replace an existing entry. Keep in mind that replacing can have +side effects because a character already can have been used. Instead of posing +restrictions we expect the user to be careful. (The \type {setfont} helper is +a more drastic replacer.) \subsection{Projected next font id} @@ -673,7 +721,14 @@ is a font structure, as explained in \in {chapter} [fonts]. This returns the font id number that would be returned by a \type {font.define} call if it was executed at this spot in the code flow. This is useful for virtual -fonts that need to reference themselves. +fonts that need to reference themselves. If you pass \type {true} as argument, +the id gets reserved and you can pass to \type {font.define} as first argument. +This can be handy when you create complex virtual fonts. + +\startfunctioncall +<number> i = + font.nextid(true) +\stopfunctioncall \subsection{Font id} diff --git a/Master/texmf-dist/doc/luatex/base/luatex-graphics.tex b/Master/texmf-dist/doc/luatex/base/luatex-graphics.tex index 916d962b2ac..56da90071b5 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-graphics.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-graphics.tex @@ -84,45 +84,45 @@ This function returns a list of all the possible \type {image_spec} keys, both user-supplied and automatic ones. % hahe: i need to add r/w ro column... -\starttabulate[|Tl|l|p|] -\NC \bf field name \NC \bf type \NC description \NC \NR -\NC attr \NC string \NC the image attributes for \LUATEX \NC \NR -\NC bbox \NC table \NC table with 4 boundingbox dimensions \type - {llx}, \type {lly}, \type {urx} and \type - {ury} overruling the \type {pagebox} entry \NC \NR -\NC colordepth \NC number \NC the number of bits used by the color space \NC \NR -\NC colorspace \NC number \NC the color space object number \NC \NR -\NC depth \NC number \NC the image depth for \LUATEX \NC \NR -\NC filename \NC string \NC the image file name \NC \NR -\NC filepath \NC string \NC the full (expanded) file name of the image\NC \NR -\NC height \NC number \NC the image height for \LUATEX \NC \NR -\NC imagetype \NC string \NC one of \type {pdf}, \type {png}, \type {jpg}, - \type {jp2} or \type {jbig2} \NC \NR -\NC index \NC number \NC the \PDF\ image name suffix \NC \NR -\NC objnum \NC number \NC the \PDF\ image object number \NC \NR -\NC page \NC number \NC the identifier for the requested image page \NC \NR -\NC pagebox \NC string \NC the requested bounding box, one of - \type {none}, \type {media}, \type {crop}, - \type {bleed}, \type {trim}, \type {art} \NC \NR -\NC pages \NC number \NC the total number of available pages \NC \NR -\NC rotation \NC number \NC the image rotation from included \PDF\ file, - in multiples of 90~deg. \NC \NR -\NC stream \NC string \NC the raw stream data for an \type {/Xobject} - \type {/Form} object\NC \NR -\NC transform \NC number \NC the image transform, integer number 0..7 \NC \NR -\NC orientation \NC number \NC the (jpeg) image orientation, integer number 1..8 (0 for unset) \NC \NR -\NC width \NC number \NC the image width for \LUATEX \NC \NR -\NC xres \NC number \NC the horizontal natural image resolution - (in \DPI) \NC \NR -\NC xsize \NC number \NC the natural image width \NC \NR -\NC yres \NC number \NC the vertical natural image resolution - (in \DPI) \NC \NR -\NC ysize \NC number \NC the natural image height \NC \NR -\NC visiblefileame \NC string \NC when set, this name will find its way in the - \PDF\ file as \type {PTEX} specification; when - an empty string is assigned nothing is written - to file; otherwise the natural filename is - taken \NC \NR +\starttabulate[|l|l|p|] +\BC field name \BC type \BC description \NC \NR +\NC \type{attr} \NC string \NC the image attributes for \LUATEX \NC \NR +\NC \type{bbox} \NC table \NC table with 4 boundingbox dimensions \type + {llx}, \type {lly}, \type {urx} and \type + {ury} overruling the \type {pagebox} entry \NC \NR +\NC \type{colordepth} \NC number \NC the number of bits used by the color space \NC \NR +\NC \type{colorspace} \NC number \NC the color space object number \NC \NR +\NC \type{depth} \NC number \NC the image depth for \LUATEX \NC \NR +\NC \type{filename} \NC string \NC the image file name \NC \NR +\NC \type{filepath} \NC string \NC the full (expanded) file name of the image\NC \NR +\NC \type{height} \NC number \NC the image height for \LUATEX \NC \NR +\NC \type{imagetype} \NC string \NC one of \type {pdf}, \type {png}, \type {jpg}, + \type {jp2} or \type {jbig2} \NC \NR +\NC \type{index} \NC number \NC the \PDF\ image name suffix \NC \NR +\NC \type{objnum} \NC number \NC the \PDF\ image object number \NC \NR +\NC \type{page} \NC number \NC the identifier for the requested image page \NC \NR +\NC \type{pagebox} \NC string \NC the requested bounding box, one of + \type {none}, \type {media}, \type {crop}, + \type {bleed}, \type {trim}, \type {art} \NC \NR +\NC \type{pages} \NC number \NC the total number of available pages \NC \NR +\NC \type{rotation} \NC number \NC the image rotation from included \PDF\ file, + in multiples of 90~deg. \NC \NR +\NC \type{stream} \NC string \NC the raw stream data for an \type {/Xobject} + \type {/Form} object\NC \NR +\NC \type{transform} \NC number \NC the image transform, integer number 0..7 \NC \NR +\NC \type{orientation} \NC number \NC the (jpeg) image orientation, integer number 1..8 (0 for unset) \NC \NR +\NC \type{width} \NC number \NC the image width for \LUATEX \NC \NR +\NC \type{xres} \NC number \NC the horizontal natural image resolution + (in \DPI) \NC \NR +\NC \type{xsize} \NC number \NC the natural image width \NC \NR +\NC \type{yres} \NC number \NC the vertical natural image resolution + (in \DPI) \NC \NR +\NC \type{ysize} \NC number \NC the natural image height \NC \NR +\NC \type{visiblefileame} \NC string \NC when set, this name will find its way in the + \PDF\ file as \type {PTEX} specification; when + an empty string is assigned nothing is written + to file; otherwise the natural filename is + taken \NC \NR \stoptabulate A running (undefined) dimension in \type {width}, \type {height}, or \type @@ -312,23 +312,23 @@ To create a new \METAPOST\ instance, call This creates the \type {mp} instance object. The argument hash can have a number of different fields, as follows: -\starttabulate[|lT|l|p|p|] -\NC \rmbf name \NC \bf type \NC \bf description \NC \bf default \NC \NR -\NC error_line \NC number \NC error line width \NC 79 \NC \NR -\NC print_line \NC number \NC line length in ps output \NC 100 \NC \NR -\NC random_seed \NC number \NC the initial random seed \NC variable \NC \NR -\NC math_mode \NC string \NC the number system to use: - \type {double}, - \type {scaled}, - \type {binary} or - \type {decimal} \NC \type {scaled} \NC \NR -\NC interaction \NC string \NC the interaction mode: - \type {batch}, - \type {nonstop}, - \type {scroll} or - \type {errorstop} \NC \type {errorstop} \NC \NR -\NC job_name \NC string \NC \type {--jobname} \NC \type {mpout} \NC \NR -\NC find_file \NC function \NC a function to find files \NC only local files \NC \NR +\starttabulate[|l|l|p|p|] +\BC name \BC type \BC description \BC default \NC \NR +\NC \type{error_line} \NC number \NC error line width \NC 79 \NC \NR +\NC \type{print_line} \NC number \NC line length in ps output \NC 100 \NC \NR +\NC \type{random_seed} \NC number \NC the initial random seed \NC variable \NC \NR +\NC \type{math_mode} \NC string \NC the number system to use: + \type {double}, + \type {scaled}, + \type {binary} or + \type {decimal} \NC \type {scaled} \NC \NR +\NC \type{interaction} \NC string \NC the interaction mode: + \type {batch}, + \type {nonstop}, + \type {scroll} or + \type {errorstop} \NC \type {errorstop} \NC \NR +\NC \type{job_name} \NC string \NC \type {--jobname} \NC \type {mpout} \NC \NR +\NC \type{find_file} \NC function \NC a function to find files \NC only local files \NC \NR \stoptabulate The \type {find_file} function should be of this form: @@ -339,11 +339,11 @@ The \type {find_file} function should be of this form: with: -\starttabulate[|lT|l|p|] -\NC \bf name \NC \bf the requested file \NC \NR -\NC mode \NC the file mode: \type {r} or \type {w} \NC \NR -\NC type \NC the kind of file, one of: \type {mp}, \type {tfm}, \type {map}, - \type {pfb}, \type {enc} \NC \NR +\starttabulate[|l|p|] +\BC name \BC the requested file \NC \NR +\NC \type{mode} \NC the file mode: \type {r} or \type {w} \NC \NR +\NC \type{type} \NC the kind of file, one of: \type {mp}, \type {tfm}, \type {map}, + \type {pfb}, \type {enc} \NC \NR \stoptabulate Return either the full path name of the found file, or \type {nil} if the file @@ -365,11 +365,11 @@ This function returns the vital statistics for an \MPLIB\ instance. There are four fields, giving the maximum number of used items in each of four allocated object classes: -\starttabulate[|lT|l|p|] -\NC main_memory \NC number \NC memory size \NC \NR -\NC hash_size \NC number \NC hash size\NC \NR -\NC param_size \NC number \NC simultaneous macro parameters\NC \NR -\NC max_in_open \NC number \NC input file nesting levels\NC \NR +\starttabulate[|l|l|p|] +\NC \type{main_memory} \NC number \NC memory size \NC \NR +\NC \type{hash_size} \NC number \NC hash size\NC \NR +\NC \type{param_size} \NC number \NC simultaneous macro parameters\NC \NR +\NC \type{max_in_open} \NC number \NC input file nesting levels\NC \NR \stoptabulate Note that in the new version of \MPLIB, this is informational only. The objects @@ -392,8 +392,8 @@ 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 stand alone \type {mpost} command, there is {\em no} -implied \quote{input} at the start of the first chunk. +In contrast with the normal stand alone \type {mpost} command, there is +\notabene {no} implied \quote{input} at the start of the first chunk. \subsection{\type {mp:finish}} @@ -412,17 +412,17 @@ output streams. The return value of \type {mp:execute} and \type {mp:finish} is a table with a few possible keys (only \type {status} is always guaranteed to be present). -\starttabulate[|Tl|l|p|] -\NC log \NC string \NC output to the \quote {log} stream \NC \NR -\NC term \NC string \NC output to the \quote {term} stream \NC \NR -\NC error \NC string \NC output to the \quote {error} stream - (only used for \quote {out of memory}) \NC \NR -\NC status \NC number \NC the return value: - \type {0} = good, - \type {1} = warning, - \type {2} = errors, - \type {3} = fatal error \NC \NR -\NC fig \NC table \NC an array of generated figures (if any) \NC \NR +\starttabulate[|l|l|p|] +\NC \type{log} \NC string \NC output to the \quote {log} stream \NC \NR +\NC \type{term} \NC string \NC output to the \quote {term} stream \NC \NR +\NC \type{error} \NC string \NC output to the \quote {error} stream + (only used for \quote {out of memory}) \NC \NR +\NC \type{status} \NC number \NC the return value: + \type {0} = good, + \type {1} = warning, + \type {2} = errors, + \type {3} = fatal error \NC \NR +\NC \type{fig} \NC table \NC an array of generated figures (if any) \NC \NR \stoptabulate When \type {status} equals~3, you should stop using this \MPLIB\ instance @@ -432,30 +432,30 @@ If it is present, each of the entries in the \type {fig} array is a userdata representing a figure object, and each of those has a number of object methods you can call: -\starttabulate[|Tl|l|p|] -\NC boundingbox \NC function \NC returns the bounding box, as an array of 4 - values\NC \NR -\NC postscript \NC function \NC returns a string that is the ps output of the - \type {fig}. this function accepts two optional - integer arguments for specifying the values of - \type {prologues} (first argument) and \type - {procset} (second argument)\NC \NR -\NC svg \NC function \NC returns a string that is the svg output of the - \type {fig}. This function accepts an optional - integer argument for specifying the value of - \type {prologues}\NC \NR -\NC objects \NC function \NC returns the actual array of graphic objects in - this \type {fig} \NC \NR -\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 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 -\NC depth \NC function \NC the \type {fontchardp} value \NC \NR -\NC italcorr \NC function \NC the \type {fontcharit} value \NC \NR -\NC charcode \NC function \NC the (rounded) \type {charcode} value \NC \NR +\starttabulate[|l|l|p|] +\NC \type{boundingbox} \NC function \NC returns the bounding box, as an array of 4 + values \NC \NR +\NC \type{postscript} \NC function \NC returns a string that is the ps output of the + \type {fig}. this function accepts two optional + integer arguments for specifying the values of + \type {prologues} (first argument) and \type + {procset} (second argument) \NC \NR +\NC \type{svg} \NC function \NC returns a string that is the svg output of the + \type {fig}. This function accepts an optional + integer argument for specifying the value of + \type {prologues} \NC \NR +\NC \type{objects} \NC function \NC returns the actual array of graphic objects in + this \type {fig} \NC \NR +\NC \type{copy_objects} \NC function \NC returns a deep copy of the array of graphic + objects in this \type {fig} \NC \NR +\NC \type{filename} \NC function \NC the filename this \type {fig}'s \POSTSCRIPT\ + output would have written to in stand alone + mode \NC \NR +\NC \type{width} \NC function \NC the \type {fontcharwd} value \NC \NR +\NC \type{height} \NC function \NC the \type {fontcharht} value \NC \NR +\NC \type{depth} \NC function \NC the \type {fontchardp} value \NC \NR +\NC \type{italcorr} \NC function \NC the \type {fontcharit} value \NC \NR +\NC \type{charcode} \NC function \NC the (rounded) \type {charcode} value \NC \NR \stoptabulate Note: you can call \type {fig:objects()} only once for any one \type {fig} @@ -481,15 +481,15 @@ point number, unless stated otherwise. Field values that are of type \type \subsubsection{fill} -\starttabulate[|Tl|l|p|] -\NC path \NC table \NC the list of knots \NC \NR -\NC htap \NC table \NC the list of knots for the reversed trajectory \NC \NR -\NC pen \NC table \NC knots of the pen \NC \NR -\NC color \NC table \NC the object's color \NC \NR -\NC linejoin \NC number \NC line join style (bare number)\NC \NR -\NC miterlimit \NC number \NC miterlimit\NC \NR -\NC prescript \NC string \NC the prescript text \NC \NR -\NC postscript \NC string \NC the postscript text \NC \NR +\starttabulate[|l|l|p|] +\NC \type{path} \NC table \NC the list of knots \NC \NR +\NC \type{htap} \NC table \NC the list of knots for the reversed trajectory \NC \NR +\NC \type{pen} \NC table \NC knots of the pen \NC \NR +\NC \type{color} \NC table \NC the object's color \NC \NR +\NC \type{linejoin} \NC number \NC line join style (bare number)\NC \NR +\NC \type{miterlimit} \NC number \NC miterlimit\NC \NR +\NC \type{prescript} \NC string \NC the prescript text \NC \NR +\NC \type{postscript} \NC string \NC the postscript text \NC \NR \stoptabulate The entries \type {htap} and \type {pen} are optional. @@ -498,57 +498,57 @@ There is helper function (\type {mplib.pen_info(obj)}) that returns a table containing a bunch of vital characteristics of the used pen (all values are floats): -\starttabulate[|Tl|l|p|] -\NC width \NC number \NC width of the pen \NC \NR -\NC sx \NC number \NC $x$ scale \NC \NR -\NC rx \NC number \NC $xy$ multiplier \NC \NR -\NC ry \NC number \NC $yx$ multiplier \NC \NR -\NC sy \NC number \NC $y$ scale \NC \NR -\NC tx \NC number \NC $x$ offset \NC \NR -\NC ty \NC number \NC $y$ offset \NC \NR +\starttabulate[|l|l|p|] +\NC \type{width} \NC number \NC width of the pen \NC \NR +\NC \type{sx} \NC number \NC $x$ scale \NC \NR +\NC \type{rx} \NC number \NC $xy$ multiplier \NC \NR +\NC \type{ry} \NC number \NC $yx$ multiplier \NC \NR +\NC \type{sy} \NC number \NC $y$ scale \NC \NR +\NC \type{tx} \NC number \NC $x$ offset \NC \NR +\NC \type{ty} \NC number \NC $y$ offset \NC \NR \stoptabulate \subsubsection{outline} -\starttabulate[|Tl|l|p|] -\NC path \NC table \NC the list of knots \NC \NR -\NC pen \NC table \NC knots of the pen \NC \NR -\NC color \NC table \NC the object's color \NC \NR -\NC linejoin \NC number \NC line join style (bare number) \NC \NR -\NC miterlimit \NC number \NC miterlimit \NC \NR -\NC linecap \NC number \NC line cap style (bare number) \NC \NR -\NC dash \NC table \NC representation of a dash list \NC \NR -\NC prescript \NC string \NC the prescript text \NC \NR -\NC postscript \NC string \NC the postscript text \NC \NR +\starttabulate[|l|l|p|] +\NC \type{path} \NC table \NC the list of knots \NC \NR +\NC \type{pen} \NC table \NC knots of the pen \NC \NR +\NC \type{color} \NC table \NC the object's color \NC \NR +\NC \type{linejoin} \NC number \NC line join style (bare number) \NC \NR +\NC \type{miterlimit} \NC number \NC miterlimit \NC \NR +\NC \type{linecap} \NC number \NC line cap style (bare number) \NC \NR +\NC \type{dash} \NC table \NC representation of a dash list \NC \NR +\NC \type{prescript} \NC string \NC the prescript text \NC \NR +\NC \type{postscript} \NC string \NC the postscript text \NC \NR \stoptabulate The entry \type {dash} is optional. \subsubsection{text} -\starttabulate[|Tl|l|p|] -\NC text \NC string \NC the text \NC \NR -\NC font \NC string \NC font tfm name \NC \NR -\NC dsize \NC number \NC font size \NC \NR -\NC color \NC table \NC the object's color \NC \NR -\NC width \NC number \NC \NC \NR -\NC height \NC number \NC \NC \NR -\NC depth \NC number \NC \NC \NR -\NC transform \NC table \NC a text transformation \NC \NR -\NC prescript \NC string \NC the prescript text \NC \NR -\NC postscript \NC string \NC the postscript text \NC \NR +\starttabulate[|l|l|p|] +\NC \type{text} \NC string \NC the text \NC \NR +\NC \type{font} \NC string \NC font tfm name \NC \NR +\NC \type{dsize} \NC number \NC font size \NC \NR +\NC \type{color} \NC table \NC the object's color \NC \NR +\NC \type{width} \NC number \NC \NC \NR +\NC \type{height} \NC number \NC \NC \NR +\NC \type{depth} \NC number \NC \NC \NR +\NC \type{transform} \NC table \NC a text transformation \NC \NR +\NC \type{prescript} \NC string \NC the prescript text \NC \NR +\NC \type{postscript} \NC string \NC the postscript text \NC \NR \stoptabulate \subsubsection{special} -\starttabulate[|Tl|l|p|] -\NC prescript \NC string \NC special text \NC \NR +\starttabulate[|l|l|p|] +\NC \type{prescript} \NC string \NC special text \NC \NR \stoptabulate \subsubsection{start_bounds, start_clip} -\starttabulate[|Tl|l|p|] -\NC path \NC table \NC the list of knots \NC \NR +\starttabulate[|l|l|p|] +\NC \type{path} \NC table \NC the list of knots \NC \NR \stoptabulate \subsubsection{stop_bounds, stop_clip} @@ -563,15 +563,15 @@ Paths and pens (that are really just a special type of paths as far as \MPLIB\ i concerned) are represented by an array where each entry is a table that represents a knot. -\starttabulate[|lT|l|p|] -\NC left_type \NC string \NC when present: endpoint, but usually absent \NC \NR -\NC right_type \NC string \NC like \type {left_type} \NC \NR -\NC x_coord \NC number \NC X coordinate of this knot \NC \NR -\NC y_coord \NC number \NC Y coordinate of this knot \NC \NR -\NC left_x \NC number \NC X coordinate of the precontrol point of this knot \NC \NR -\NC left_y \NC number \NC Y coordinate of the precontrol point of this knot \NC \NR -\NC right_x \NC number \NC X coordinate of the postcontrol point of this knot \NC \NR -\NC right_y \NC number \NC Y coordinate of the postcontrol point of this knot \NC \NR +\starttabulate[|l|l|p|] +\NC \type{left_type} \NC string \NC when present: endpoint, but usually absent \NC \NR +\NC \type{right_type} \NC string \NC like \type {left_type} \NC \NR +\NC \type{x_coord} \NC number \NC X coordinate of this knot \NC \NR +\NC \type{y_coord} \NC number \NC Y coordinate of this knot \NC \NR +\NC \type{left_x} \NC number \NC X coordinate of the precontrol point of this knot \NC \NR +\NC \type{left_y} \NC number \NC Y coordinate of the precontrol point of this knot \NC \NR +\NC \type{right_x} \NC number \NC X coordinate of the postcontrol point of this knot \NC \NR +\NC \type{right_y} \NC number \NC Y coordinate of the postcontrol point of this knot \NC \NR \stoptabulate There is one special case: pens that are (possibly transformed) ellipses have an @@ -582,11 +582,11 @@ array part containing the knot list. A color is an integer array with 0, 1, 3 or 4 values: -\starttabulate[|Tl|l|p|] -\NC 0 \NC marking only \NC no values \NC \NR -\NC 1 \NC greyscale \NC one value in the range $(0,1)$, \quote {black} is $0$ \NC \NR -\NC 3 \NC \RGB \NC three values in the range $(0,1)$, \quote {black} is $0,0,0$ \NC \NR -\NC 4 \NC \CMYK \NC four values in the range $(0,1)$, \quote {black} is $0,0,0,1$ \NC \NR +\starttabulate[|l|l|p|] +\NC \type{0} \NC marking only \NC no values \NC \NR +\NC \type{1} \NC greyscale \NC one value in the range $(0,1)$, \quote {black} is $0$ \NC \NR +\NC \type{3} \NC \RGB \NC three values in the range $(0,1)$, \quote {black} is $0,0,0$ \NC \NR +\NC \type{4} \NC \CMYK \NC four values in the range $(0,1)$, \quote {black} is $0,0,0,1$ \NC \NR \stoptabulate If the color model of the internal object was \type {uninitialized}, then it was @@ -597,13 +597,13 @@ initialized to the values representing \quote {black} in the colorspace \type Each transform is a six|-|item array. -\starttabulate[|Tl|l|p|] -\NC 1 \NC number \NC represents x \NC \NR -\NC 2 \NC number \NC represents y \NC \NR -\NC 3 \NC number \NC represents xx \NC \NR -\NC 4 \NC number \NC represents yx \NC \NR -\NC 5 \NC number \NC represents xy \NC \NR -\NC 6 \NC number \NC represents yy \NC \NR +\starttabulate[|l|l|p|] +\NC \type{1} \NC number \NC represents x \NC \NR +\NC \type{2} \NC number \NC represents y \NC \NR +\NC \type{3} \NC number \NC represents xx \NC \NR +\NC \type{4} \NC number \NC represents yx \NC \NR +\NC \type{5} \NC number \NC represents xy \NC \NR +\NC \type{6} \NC number \NC represents yy \NC \NR \stoptabulate Note that the translation (index 1 and 2) comes first. This differs from the @@ -615,9 +615,9 @@ Each \type {dash} is two-item hash, using the same model as \POSTSCRIPT\ for the representation of the dashlist. \type {dashes} is an array of \quote {on} and \quote {off}, values, and \type {offset} is the phase of the pattern. -\starttabulate[|Tl|l|p|] -\NC dashes \NC hash \NC an array of on-off numbers \NC \NR -\NC offset \NC number \NC the starting offset value \NC \NR +\starttabulate[|l|l|p|] +\NC \type{dashes} \NC hash \NC an array of on-off numbers \NC \NR +\NC \type{offset} \NC number \NC the starting offset value \NC \NR \stoptabulate \subsection{Character size information} diff --git a/Master/texmf-dist/doc/luatex/base/luatex-introduction.tex b/Master/texmf-dist/doc/luatex/base/luatex-introduction.tex index 196a9af4ffa..d0899147da2 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-introduction.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-introduction.tex @@ -72,11 +72,10 @@ code in \TEX\ engines (especially code that is not needed any longer). \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}. + We currently use \LUA\ 5.3.*. 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. + \TEX. We also keep the \LUA\ 5.2 \type {bit32} library around. \stopitem \startitem There are various \TEX\ extensions but only those that cannot be done diff --git a/Master/texmf-dist/doc/luatex/base/luatex-languages.tex b/Master/texmf-dist/doc/luatex/base/luatex-languages.tex index 990a8dcc038..365e87f266c 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-languages.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-languages.tex @@ -224,46 +224,180 @@ node. But by default also a hlist, vlist, rule, dir, whatsit, ins, and adjust no 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 +\starttabulate[|l|l|] +\NC \type{0} \NC not strict \NC \NR +\NC \type{1} \NC strict start \NC \NR +\NC \type{2} \NC strict end \NC \NR +\NC \type{3} \NC strict start and strict end \NC \NR \stoptabulate The word start is determined as follows: -\starttabulate[|Bl|l|] -\NC boundary \NC yes when wordboundary \NC \NR -\NC hlist \NC when hyphenationbounds 1 or 3 \NC \NR -\NC vlist \NC when hyphenationbounds 1 or 3 \NC \NR -\NC rule \NC when hyphenationbounds 1 or 3 \NC \NR -\NC dir \NC when hyphenationbounds 1 or 3 \NC \NR -\NC whatsit \NC when hyphenationbounds 1 or 3 \NC \NR -\NC glue \NC yes \NC \NR -\NC math \NC skipped \NC \NR -\NC glyph \NC exhyphenchar (one only) : yes (so no -- ---) \NC \NR -\NC otherwise \NC yes \NC \NR +\starttabulate[|l|l|] +\BC boundary \NC yes when wordboundary \NC \NR +\BC hlist \NC when hyphenationbounds 1 or 3 \NC \NR +\BC vlist \NC when hyphenationbounds 1 or 3 \NC \NR +\BC rule \NC when hyphenationbounds 1 or 3 \NC \NR +\BC dir \NC when hyphenationbounds 1 or 3 \NC \NR +\BC whatsit \NC when hyphenationbounds 1 or 3 \NC \NR +\BC glue \NC yes \NC \NR +\BC math \NC skipped \NC \NR +\BC glyph \NC exhyphenchar (one only) : yes (so no -- ---) \NC \NR +\BC otherwise \NC yes \NC \NR \stoptabulate The word end is determined as follows: -\starttabulate[|Bl|l|] -\NC boundary \NC yes \NC \NR -\NC glyph \NC yes when different language \NC \NR -\NC glue \NC yes \NC \NR -\NC penalty \NC yes \NC \NR -\NC kern \NC yes when not italic (for some historic reason) \NC \NR -\NC hlist \NC when hyphenationbounds 2 or 3 \NC \NR -\NC vlist \NC when hyphenationbounds 2 or 3 \NC \NR -\NC rule \NC when hyphenationbounds 2 or 3 \NC \NR -\NC dir \NC when hyphenationbounds 2 or 3 \NC \NR -\NC whatsit \NC when hyphenationbounds 2 or 3 \NC \NR -\NC ins \NC when hyphenationbounds 2 or 3 \NC \NR -\NC adjust \NC when hyphenationbounds 2 or 3 \NC \NR +\starttabulate[|l|l|] +\BC boundary \NC yes \NC \NR +\BC glyph \NC yes when different language \NC \NR +\BC glue \NC yes \NC \NR +\BC penalty \NC yes \NC \NR +\BC kern \NC yes when not italic (for some historic reason) \NC \NR +\BC hlist \NC when hyphenationbounds 2 or 3 \NC \NR +\BC vlist \NC when hyphenationbounds 2 or 3 \NC \NR +\BC rule \NC when hyphenationbounds 2 or 3 \NC \NR +\BC dir \NC when hyphenationbounds 2 or 3 \NC \NR +\BC whatsit \NC when hyphenationbounds 2 or 3 \NC \NR +\BC ins \NC when hyphenationbounds 2 or 3 \NC \NR +\BC adjust \NC when hyphenationbounds 2 or 3 \NC \NR \stoptabulate -(Future versions of \LUATEX\ might provide more granularity.) +\in{Figures}[hb:1] upto \in[hb:5] show some examples. In all cases we set the min +values to 1 and make sure that the words hyphenate at each character. + +\hyphenation{o-n-e t-w-o} + +\def\SomeTest#1#2% + {\lefthyphenmin \plusone + \righthyphenmin \plusone + \parindent \zeropoint + \everypar \emptytoks + \dontcomplain + \hbox to 2cm {% + \vtop {% + \hsize 1pt + \hyphenationbounds#1 + #2 + \par}}} + +\startplacefigure[reference=hb:1,title={\type{one}}] + \startcombination[4*1] + {\SomeTest{0}{one}} {\type{0}} + {\SomeTest{1}{one}} {\type{1}} + {\SomeTest{2}{one}} {\type{2}} + {\SomeTest{3}{one}} {\type{3}} + \stopcombination +\stopplacefigure +\startplacefigure[reference=hb:2,title={\type{one\null two}}] + \startcombination[4*1] + {\SomeTest{0}{one\null two}} {\type{0}} + {\SomeTest{1}{one\null two}} {\type{1}} + {\SomeTest{2}{one\null two}} {\type{2}} + {\SomeTest{3}{one\null two}} {\type{3}} + \stopcombination +\stopplacefigure +\startplacefigure[reference=hb:3,title={\type{\null one\null two}}] + \startcombination[4*1] + {\SomeTest{0}{\null one\null two}} {\type{0}} + {\SomeTest{1}{\null one\null two}} {\type{1}} + {\SomeTest{2}{\null one\null two}} {\type{2}} + {\SomeTest{3}{\null one\null two}} {\type{3}} + \stopcombination +\stopplacefigure +\startplacefigure[reference=hb:4,title={\type{one\null two\null}}] + \startcombination[4*1] + {\SomeTest{0}{one\null two\null}} {\type{0}} + {\SomeTest{1}{one\null two\null}} {\type{1}} + {\SomeTest{2}{one\null two\null}} {\type{2}} + {\SomeTest{3}{one\null two\null}} {\type{3}} + \stopcombination +\stopplacefigure +\startplacefigure[reference=hb:5,title={\type{\null one\null two\null}}] + \startcombination[4*1] + {\SomeTest{0}{\null one\null two\null}} {\type{0}} + {\SomeTest{1}{\null one\null two\null}} {\type{1}} + {\SomeTest{2}{\null one\null two\null}} {\type{2}} + {\SomeTest{3}{\null one\null two\null}} {\type{3}} + \stopcombination +\stopplacefigure + +% (Future versions of \LUATEX\ might provide more granularity.) + +In traditional \TEX\ ligature building and hyphenation are interwoven with the +line break mechanism. In \LUATEX\ these phases are isolated. As a consequence we +deal differently with (a sequence of) explicit hyphens. We already have added +some control over aspects of the hyphenation and yet another one concerns +automatic hyphens (e.g.\ \type {-} characters in the input). + +When \type {\automatichyphenmode} has a value of 0, a hyphen will be turned into +an automatic discretionary. The snippets before and after it will not be +hyphenated. A side effect is that a leading hyphen can lead to a split but one +will seldom run into that situation. Setting a pre and post character makes this +more prominent. A value of 1 will prevent this side effect and a value of 2 will +not turn the hyphen into a discretionary. Experiments with other options, like +permitting hyphenation of the words on both sides were discarded. + +\startbuffer[a] +before-after \par +before--after \par +before---after \par +\stopbuffer + +\startbuffer[b] +-before \par +after- \par +--before \par +after-- \par +---before \par +after--- \par +\stopbuffer + +\startbuffer[c] +before-after \par +before--after \par +before---after \par +\stopbuffer + +We show three samples: + +Input A: \typebuffer[a] +Input B: \typebuffer[b] +Input C: \typebuffer[c] + +\startbuffer[demo] +\startcombination[nx=4,ny=3,location=top] + {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\zerocount \hsize6em \getbuffer[a]}} {A~0~6em} + {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\zerocount \hsize2pt \getbuffer[a]}} {A~0~2pt} + {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\plusone \hsize2pt \getbuffer[a]}} {A~1~2pt} + {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\plustwo \hsize2pt \getbuffer[a]}} {A~2~2pt} + {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\zerocount \hsize6em \getbuffer[b]}} {B~0~6em} + {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\zerocount \hsize2pt \getbuffer[b]}} {B~0~2pt} + {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\plusone \hsize2pt \getbuffer[b]}} {B~1~2pt} + {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\plustwo \hsize2pt \getbuffer[b]}} {B~2~2pt} + {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\zerocount \hsize6em \getbuffer[c]}} {C~0~6em} + {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\zerocount \hsize2pt \getbuffer[c]}} {C~0~2pt} + {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\plusone \hsize2pt \getbuffer[c]}} {C~1~2pt} + {\framed[align=normal,strut=no,top=\vskip.5ex,bottom=\vskip.5ex]{\automatichyphenmode\plustwo \hsize2pt \getbuffer[c]}} {C~2~2pt} +\stopcombination +\stopbuffer + +\startplacefigure[reference=automatic:1,title={The automatic modes \type {0} (default), \type {1} and \type {2}, with a \type {\hsize} +of 6em and 2pt (which triggers a linebreak).}] + \dontcomplain \tt \getbuffer[demo] +\stopplacefigure + +\startplacefigure[reference=automatic:2,title={The automatic modes \type {0} (default), \type {1} and \type {2}, with \type +{\preexhyphenchar} and \type {\postexhyphenchar} set to characters \type {A} and \type {B}.}] + \postexhyphenchar`A\relax + \preexhyphenchar `B\relax + \dontcomplain \tt \getbuffer[demo] +\stopplacefigure + +As with primitive companions of other single character commands, the \type {\-} +command has a more verbose primitive version in \type {\explicitdiscretionary} +and the normally intercepted in the hyphenator character \type {-} (or whatever +is configured) is available as \type {\automaticdiscretionary}. \section{The main control loop} @@ -357,18 +491,18 @@ have been added: The first parameter has the following consequences for automatic discs (the ones resulting from an \type {\exhyphenchar}: -\starttabulate[|Tc|l|l|] -\BC mode \BC automatic disc \type{-} \BC explicit disc \type{\-} \NC \NR +\starttabulate[|c|l|l|] +\BC mode \BC automatic disc \type{-} \BC explicit disc \type{\-} \NC \NR \HL -\NC 0 \NC \type {\exhyphenpenalty} \NC \type {\exhyphenpenalty} \NC \NR -\NC 1 \NC \type {\hyphenpenalty} \NC \type {\hyphenpenalty} \NC \NR -\NC 2 \NC \type {\exhyphenpenalty} \NC \type {\hyphenpenalty} \NC \NR -\NC 3 \NC \type {\hyphenpenalty} \NC \type {\exhyphenpenalty} \NC \NR -\NC 4 \NC \type {\automatichyphenpenalty} \NC \type {\explicithyphenpenalty} \NC \NR -\NC 5 \NC \type {\exhyphenpenalty} \NC \type {\explicithyphenpenalty} \NC \NR -\NC 6 \NC \type {\hyphenpenalty} \NC \type {\explicithyphenpenalty} \NC \NR -\NC 7 \NC \type {\automatichyphenpenalty} \NC \type {\exhyphenpenalty} \NC \NR -\NC 8 \NC \type {\automatichyphenpenalty} \NC \type {\hyphenpenalty} \NC \NR +\NC \type{0} \NC \type {\exhyphenpenalty} \NC \type {\exhyphenpenalty} \NC \NR +\NC \type{1} \NC \type {\hyphenpenalty} \NC \type {\hyphenpenalty} \NC \NR +\NC \type{2} \NC \type {\exhyphenpenalty} \NC \type {\hyphenpenalty} \NC \NR +\NC \type{3} \NC \type {\hyphenpenalty} \NC \type {\exhyphenpenalty} \NC \NR +\NC \type{4} \NC \type {\automatichyphenpenalty} \NC \type {\explicithyphenpenalty} \NC \NR +\NC \type{5} \NC \type {\exhyphenpenalty} \NC \type {\explicithyphenpenalty} \NC \NR +\NC \type{6} \NC \type {\hyphenpenalty} \NC \type {\explicithyphenpenalty} \NC \NR +\NC \type{7} \NC \type {\automatichyphenpenalty} \NC \type {\exhyphenpenalty} \NC \NR +\NC \type{8} \NC \type {\automatichyphenpenalty} \NC \type {\hyphenpenalty} \NC \NR \stoptabulate other values do what we always did in \LUATEX: insert \type {\exhyphenpenalty}. @@ -413,9 +547,9 @@ listed items. It is important to note that the keys in an exception dictionary can always be generated from the values. Here are a few examples: \starttabulate[|l|l|l|] -\NC \bf value \NC \bf implied key (input) \NC \bf effect \NC\NR -\NC \type {ta-ble} \NC table \NC \type {ta\-ble} ($=$ \type {ta\discretionary{-}{}{}ble}) \NC\NR -\NC \type {ba{k-}{}{c}ken} \NC backen \NC \type {ba\discretionary{k-}{}{c}ken} \NC\NR +\BC value \BC implied key (input) \NC effect \NC\NR +\NC \type {ta-ble} \NC table \NC \type {ta\-ble} ($=$ \type {ta\discretionary{-}{}{}ble}) \NC\NR +\NC \type {ba{k-}{}{c}ken} \NC backen \NC \type {ba\discretionary{k-}{}{c}ken} \NC\NR \stoptabulate The resultant patterns and exception dictionary will be stored under the language @@ -575,10 +709,10 @@ For example, take the word \type {office}, hyphenated \type {of-fice}, using a type ligatures: \starttabulate[|l|l|] -\NC Initial: \NC \type {{o}{f}{f}{i}{c}{e}} \NC\NR -\NC After hyphenation: \NC \type {{o}{f}{{-},{},{}}{f}{i}{c}{e}} \NC\NR -\NC First ligature stage: \NC \type {{o}{{f-},{f},{<ff>}}{i}{c}{e}} \NC\NR -\NC Final result: \NC \type {{o}{{f-},{<fi>},{<ffi>}}{c}{e}} \NC\NR +\NC initial \NC \type {{o}{f}{f}{i}{c}{e}} \NC\NR +\NC after hyphenation \NC \type {{o}{f}{{-},{},{}}{f}{i}{c}{e}} \NC\NR +\NC first ligature stage \NC \type {{o}{{f-},{f},{<ff>}}{i}{c}{e}} \NC\NR +\NC final result \NC \type {{o}{{f-},{<fi>},{<ffi>}}{c}{e}} \NC\NR \stoptabulate That's bad enough, but let us assume that there is also a hyphenation point @@ -600,25 +734,25 @@ the top-level discretionary that resulted from the first hyphenation point. Here is that nested solution again, in a different representation: -\starttabulate[|l|l|l|l|] -\NC \NC pre \NC post \NC replace \NC \NR -\NC topdisc \NC \type {f-}$^1$ \NC sub1 \NC sub2 \NC \NR -\NC sub1 \NC \type {f-}$^2$ \NC \type {i}$^3$ \NC \type {<fi>}$^4$ \NC \NR -\NC sub2 \NC \type {<ff>-}$^5$\NC \type {i}$^6$ \NC \type {<ffi>}$^7$ \NC \NR +\starttabulate[|l|c|c|c|c|c|c|] +\NC \BC pre \BC \BC post \BC \BC replace \BC \NC \NR +\NC topdisc \NC \type {f-} \NC (1) \NC \NC sub 1 \NC \NC sub 2 \NC \NR +\NC sub 1 \NC \type {f-} \NC (2) \NC \type {i} \NC (3) \NC \type {<fi>} \NC (4) \NC \NR +\NC sub 2 \NC \type {<ff>-} \NC (5) \NC \type {i} \NC (6) \NC \type {<ffi>} \NC (7) \NC \NR \stoptabulate When line breaking is choosing its breakpoints, the following fields will eventually be selected: -\starttabulate[|l|l|l|] -\NC \type {of-f-ice} \NC \type {f-}$^1$ \NC \NR -\NC \NC \type {f-}$^2$ \NC \NR -\NC \NC \type {i}$^3$ \NC \NR -\NC \type {of-fice} \NC \type {f-}$^1$ \NC \NR -\NC \NC \type {<fi>}$^4$ \NC \NR -\NC \type {off-ice} \NC \type {<ff>-}$^5$ \NC \NR -\NC \NC \type {i}$^6$ \NC \NR -\NC \type {office} \NC \type {<ffi>}$^7$ \NC \NR +\starttabulate[|l|c|c|] +\NC \type {of-f-ice} \NC \type {f-} \NC (1) \NC \NR +\NC \NC \type {f-} \NC (2) \NC \NR +\NC \NC \type {i} \NC (3) \NC \NR +\NC \type {of-fice} \NC \type {f-} \NC (1) \NC \NR +\NC \NC \type {<fi>} \NC (4) \NC \NR +\NC \type {off-ice} \NC \type {<ff>-} \NC (5) \NC \NR +\NC \NC \type {i} \NC (6) \NC \NR +\NC \type {office} \NC \type {<ffi>} \NC (7) \NC \NR \stoptabulate The current solution in \LUATEX\ is not able to handle nested discretionaries, @@ -636,14 +770,14 @@ make the whole stuff fit into just two discretionary nodes. The mapping of the seven list fields to the six fields in this discretionary node pair is as follows: -\starttabulate[|l|p|] -\NC \bf field \NC \bf description \NC \NR -\NC \type {disc1.pre} \NC \type {f-}$^1$ \NC \NR -\NC \type {disc1.post} \NC \type {<fi>}$^4$ \NC \NR -\NC \type {disc1.replace} \NC \type {<ffi>}$^7$ \NC \NR -\NC \type {disc2.pre} \NC \type {f-}$^2$ \NC \NR -\NC \type {disc2.post} \NC \type {i}$^{3{,}6}$\NC \NR -\NC \type {disc2.replace} \NC \type {<ff>-}$^5$\NC \NR +\starttabulate[|l|c|c|] +\BC field \BC description \NC \NC \NR +\NC \type {disc1.pre} \NC \type {f-} \NC (1) \NC \NR +\NC \type {disc1.post} \NC \type {<fi>} \NC (4) \NC \NR +\NC \type {disc1.replace} \NC \type {<ffi>} \NC (7) \NC \NR +\NC \type {disc2.pre} \NC \type {f-} \NC (2) \NC \NR +\NC \type {disc2.post} \NC \type {i} \NC (3,6) \NC \NR +\NC \type {disc2.replace} \NC \type {<ff>-} \NC (5) \NC \NR \stoptabulate What is actually generated after ligaturing has been applied is therefore: diff --git a/Master/texmf-dist/doc/luatex/base/luatex-lua.tex b/Master/texmf-dist/doc/luatex/base/luatex-lua.tex index 0960f803206..82b060440b1 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-lua.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-lua.tex @@ -55,33 +55,33 @@ option. If there is no \type {--lua} option, the command line is interpreted in similar fashion as the other \TEX\ engines. Some options are accepted but have no consequence. The following command|-|line options are understood: -\starttabulate[|lT|p|] -\NC --credits \NC display credits and exit \NC \NR -\NC --debug-format \NC enable format debugging \NC \NR -\NC --draftmode \NC switch on draft mode i.e.\ generate no output in \PDF\ mode \NC \NR -\NC --[no-]file-line-error \NC disable/enable \type {file:line:error} style messages \NC \NR -\NC --[no-]file-line-error-style \NC aliases of \type {--[no-]file-line-error} \NC \NR -\NC --fmt=FORMAT \NC load the format file \type {FORMAT} \NC\NR -\NC --halt-on-error \NC stop processing at the first error\NC \NR -\NC --help \NC display help and exit \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 --jobname=STRING \NC set the job name to \type {STRING} \NC \NR -\NC --kpathsea-debug=NUMBER \NC set path searching debugging flags according to the bits of \type {NUMBER} \NC \NR -\NC --lua=FILE \NC load and execute a \LUA\ initialization script \NC\NR -\NC --[no-]mktex=FMT \NC disable/enable \type {mktexFMT} generation with \type {FMT} is \type {tex} or \type {tfm} \NC \NR -\NC --nosocket \NC disable the \LUA\ socket library \NC\NR -\NC --output-comment=STRING \NC use \type {STRING} for \DVI\ file comment instead of date (no effect for \PDF) \NC \NR -\NC --output-directory=DIR \NC use \type {DIR} as the directory to write files to \NC \NR -\NC --output-format=FORMAT \NC use \type {FORMAT} for job output; \type {FORMAT} is \type {dvi} or \type {pdf} \NC \NR -\NC --progname=STRING \NC set the program name to \type {STRING} \NC \NR -\NC --recorder \NC enable filename recorder \NC \NR -\NC --safer \NC disable easily exploitable \LUA\ commands \NC\NR -\NC --[no-]shell-escape \NC disable/enable system calls \NC \NR -\NC --shell-restricted \NC restrict system calls to a list of commands given in \type {texmf.cnf} \NC \NR -\NC --synctex=NUMBER \NC enable \type {synctex} \NC \NR -\NC --utc \NC use utc times when applicable \NC \NR -\NC --version \NC display version and exit \NC \NR +\starttabulate[|l|p|] +\NC \type{--credits} \NC display credits and exit \NC \NR +\NC \type{--debug-format} \NC enable format debugging \NC \NR +\NC \type{--draftmode} \NC switch on draft mode i.e.\ generate no output in \PDF\ mode \NC \NR +\NC \type{--[no-]file-line-error} \NC disable/enable \type {file:line:error} style messages \NC \NR +\NC \type{--[no-]file-line-error-style} \NC aliases of \type {--[no-]file-line-error} \NC \NR +\NC \type{--fmt=FORMAT} \NC load the format file \type {FORMAT} \NC\NR +\NC \type{--halt-on-error} \NC stop processing at the first error\NC \NR +\NC \type{--help} \NC display help and exit \NC\NR +\NC \type{--ini} \NC be \type {iniluatex}, for dumping formats \NC\NR +\NC \type{--interaction=STRING} \NC set interaction mode: \type {batchmode}, \type {nonstopmode}, \type {scrollmode} or \type {errorstopmode} \NC \NR +\NC \type{--jobname=STRING} \NC set the job name to \type {STRING} \NC \NR +\NC \type{--kpathsea-debug=NUMBER} \NC set path searching debugging flags according to the bits of \type {NUMBER} \NC \NR +\NC \type{--lua=FILE} \NC load and execute a \LUA\ initialization script \NC\NR +\NC \type{--[no-]mktex=FMT} \NC disable/enable \type {mktexFMT} generation with \type {FMT} is \type {tex} or \type {tfm} \NC \NR +\NC \type{--nosocket} \NC disable the \LUA\ socket library \NC\NR +\NC \type{--output-comment=STRING} \NC use \type {STRING} for \DVI\ file comment instead of date (no effect for \PDF) \NC \NR +\NC \type{--output-directory=DIR} \NC use \type {DIR} as the directory to write files to \NC \NR +\NC \type{--output-format=FORMAT} \NC use \type {FORMAT} for job output; \type {FORMAT} is \type {dvi} or \type {pdf} \NC \NR +\NC \type{--progname=STRING} \NC set the program name to \type {STRING} \NC \NR +\NC \type{--recorder} \NC enable filename recorder \NC \NR +\NC \type{--safer} \NC disable easily exploitable \LUA\ commands \NC\NR +\NC \type{--[no-]shell-escape} \NC disable/enable system calls \NC \NR +\NC \type{--shell-restricted} \NC restrict system calls to a list of commands given in \type {texmf.cnf} \NC \NR +\NC \type{--synctex=NUMBER} \NC enable \type {synctex} \NC \NR +\NC \type{--utc} \NC use utc times when applicable \NC \NR +\NC \type{--version} \NC display version and exit \NC \NR \stoptabulate Some of the traditional flags are just ignored: \type {--etex}, \type @@ -141,7 +141,7 @@ Then it checks the various safety switches. You can use those to disable some \type {--safer} \type {nil}s the following functions: \starttabulate[|l|l|] -\NC \bf library \NC \bf functions \NC \NR +\BC library \BC functions \NC \NR \NC \type {os} \NC \type {execute} \type {exec} \type {spawn} \type {setenv} \type {rename} \type {remove} \type {tmpdir} \NC \NR \NC \type {io} \NC \type {popen} \type {output} \type {tmpfile} \NC \NR \NC \type {lfs} \NC \type {rmdir} \type {mkdir} \type {chdir} \type {lock} \type {touch} \NC \NR @@ -179,8 +179,7 @@ deal with typesetting, like \type {tex}, \type {token}, \type {node} and 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] -for more information about the \LUATEX-specific \LUA\ extension tables. +not even know its \type {\jobname} yet at this point). Everything you do in the \LUA\ initialization script will remain visible during the rest of the run, with the exception of the \TEX\ specific libraries like @@ -214,7 +213,7 @@ the right|-|hand side of an assignment to a \type {\dimen} or \type {\count}. Loading dynamic \LUA\ libraries will fail if there are two \LUA\ libraries loaded at the same time (which will typically happen on \type {win32}, because there is -one \LUA\ 5.2 inside \LUATEX, and another will likely be linked to the \DLL\ file +one \LUA\ 5.3 inside \LUATEX, and another will likely be linked to the \DLL\ file of the module itself). \LUATEX\ is able to use the kpathsea library to find \type {require()}d modules. @@ -304,17 +303,17 @@ piecemeal: \type {string.utfcharacters(s)}: a string with a single \UTF-8 token in it \stopitem \startitem - \type {string.characters(s)} \NC a string containing one byte + \type {string.characters(s)}: a string containing one byte \stopitem \startitem - \type {string.characterpairs(s)} two strings each containing one byte or an + \type {string.characterpairs(s)}: two strings each containing one byte or an empty second string if the string length was odd \stopitem \startitem - \type {string.bytes(s)} a single byte value + \type {string.bytes(s)}: a single byte value \stopitem \startitem - \type {string.bytepairs(s)} two byte values or nil instead of a number as + \type {string.bytepairs(s)}: two byte values or nil instead of a number as its second return value if the string length was odd \stopitem \stopitemize @@ -336,8 +335,28 @@ always returns byte positions in a string, and \type {unicode.utf8.match} and are} \UNICODE|-|aware, they fall|-|back to non|-|\UNICODE|-|aware behavior when using the empty capture \type {()} but other captures work as expected. For the interpretation of character classes in \type {unicode.utf8} functions refer to -the library sources at \hyphenatedurl {http://luaforge.net/projects/sln}. Version -5.3 of \LUA\ will provide some native \UTF8 support. +the library sources at \hyphenatedurl {http://luaforge.net/projects/sln}. + +Version 5.3 of \LUA\ provides some native \UTF8 support but we have added a few +similar helpers too: + +\startitemize +\startitem + \type {string.utfvalue(s)}: returns the codepoints of the characters in the + given string +\stopitem +\startitem + \type {string.utfcharacter(c,...)}: returns a string with the characters of + the given code points +\stopitem +\startitem + \type {string.utflength(s)}: returns the length oif the given string +\stopitem +\stopitemize + +These three functions are relative fast and don't do much checking. They can be used +as building blocks for other helpers. + \blank @@ -405,7 +424,7 @@ The \type {os} library has a few extra functions and variables: \startitem \type {os.env} is a hash table containing a dump of the variables and values in the process environment at the start of the run. It is writeable, - but the actual environment is {\em not\/} updated automatically. + but the actual environment is \notabene {not} updated automatically. \stopitem \startitem @@ -560,12 +579,17 @@ When Universal Time is needed, you can pass the flag \type {utc} to the engine. property also works when the date and time are set by \LUATEX\ itself. It has a complementary entry \type {use_utc_time} in the \type {texconfig} table. -{\em To some extend a cleaner solution would be to have a flag that disables all -variable data in one go (like filenames and so) but we just follow the method -implemented in \PDFTEX\ where primitives are used to influence other properties.} - -{\em In \CONTEXT\ we provide the command line argument \type {--nodates} that -does bit more disabling of dates.} +\startnotabene + To some extend a cleaner solution would be to have a flag that disables all + variable data in one go (like filenames and so) but we just follow the method + implemented in \PDFTEX\ where primitives are used to influence other + properties. +\stopnotabene + +\startnotabene + In \CONTEXT\ we provide the command line argument \type {--nodates} that does + bit more disabling of dates. +\stopnotabene \stopchapter diff --git a/Master/texmf-dist/doc/luatex/base/luatex-math.tex b/Master/texmf-dist/doc/luatex/base/luatex-math.tex index 3c29d960975..f29a3aed0a6 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-math.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-math.tex @@ -168,20 +168,20 @@ The input for such primitives would look like this: The altered \TEX82 primitives are: \starttabulate[|l|l|r|c|l|r|] -\NC \bf primitive \NC \bf min \NC \bf max \NC \kern 2em \NC \bf min \NC \bf max \NC \NR -\NC \type {\mathcode} \NC 0 \NC 10FFFF \NC = \NC 0 \NC 8000 \NC \NR -\NC \type {\delcode} \NC 0 \NC 10FFFF \NC = \NC 0 \NC FFFFFF \NC \NR +\BC primitive \BC min \BC max \BC \kern 2em \BC min \BC max \NC \NR +\NC \type {\mathcode} \NC 0 \NC 10FFFF \NC = \NC 0 \NC 8000 \NC \NR +\NC \type {\delcode} \NC 0 \NC 10FFFF \NC = \NC 0 \NC FFFFFF \NC \NR \stoptabulate The unaltered ones are: \starttabulate[|l|l|r|] -\NC \bf primitive \NC \bf min \NC \bf max \NC \NR -\NC \type {\mathchardef} \NC 0 \NC 8000 \NC \NR -\NC \type {\mathchar} \NC 0 \NC 7FFF \NC \NR -\NC \type {\mathaccent} \NC 0 \NC 7FFF \NC \NR -\NC \type {\delimiter} \NC 0 \NC 7FFFFFF \NC \NR -\NC \type {\radical} \NC 0 \NC 7FFFFFF \NC \NR +\BC primitive \BC min \BC max \NC \NR +\NC \type {\mathchardef} \NC 0 \NC 8000 \NC \NR +\NC \type {\mathchar} \NC 0 \NC 7FFF \NC \NR +\NC \type {\mathaccent} \NC 0 \NC 7FFF \NC \NR +\NC \type {\delimiter} \NC 0 \NC 7FFFFFF \NC \NR +\NC \type {\radical} \NC 0 \NC 7FFFFFF \NC \NR \stoptabulate For practical reasons \type {\mathchardef} will silently accept values larger @@ -193,18 +193,18 @@ The following new primitives are compatible with \XETEX: % somewhat fuzzy: \starttabulate[|l|l|r|c|l|r|] -\NC \bf primitive \NC \bf min \NC \bf max \NC \kern 2em \NC \bf min \NC \bf max \NC \NR -\NC \type {\Umathchardef} \NC 0+0+0 \NC 7+FF+10FFFF\rlap{\high{1}} \NC \NC \NC \NC \NR -\NC \type {\Umathcharnumdef}\rlap{\high{5}} \NC -80000000 \NC 7FFFFFFF\rlap{\high{3}} \NC \NC \NC \NC \NR -\NC \type {\Umathcode} \NC 0 \NC 10FFFF \NC = \NC 0+0+0 \NC 7+FF+10FFFF\rlap{\high{1}} \NC \NR -\NC \type {\Udelcode} \NC 0 \NC 10FFFF \NC = \NC 0+0 \NC FF+10FFFF\rlap{\high{2}} \NC \NR -\NC \type {\Umathchar} \NC 0+0+0 \NC 7+FF+10FFFF \NC \NC \NC \NC \NR -\NC \type {\Umathaccent} \NC 0+0+0 \NC 7+FF+10FFFF\rlap{\high{2,4}} \NC \NC \NC \NC \NR -\NC \type {\Udelimiter} \NC 0+0+0 \NC 7+FF+10FFFF\rlap{\high{2}} \NC \NC \NC \NC \NR -\NC \type {\Uradical} \NC 0+0 \NC FF+10FFFF\rlap{\high{2}} \NC \NC \NC \NC \NR -\NC \type {\Umathcharnum} \NC -80000000 \NC 7FFFFFFF\rlap{\high{3}} \NC \NC \NC \NC \NR -\NC \type {\Umathcodenum} \NC 0 \NC 10FFFF \NC = \NC -80000000 \NC 7FFFFFFF\rlap{\high{3}} \NC \NR -\NC \type {\Udelcodenum} \NC 0 \NC 10FFFF \NC = \NC -80000000 \NC 7FFFFFFF\rlap{\high{3}} \NC \NR +\BC primitive \BC min \BC max \BC \kern 2em \BC min \BC max \NC \NR +\NC \type {\Umathchardef} \NC 0+0+0 \NC 7+FF+10FFFF\rlap{\high{1}} \NC \NC \NC \NC \NR +\NC \type {\Umathcharnumdef}\rlap{\high{5}} \NC -80000000 \NC 7FFFFFFF\rlap{\high{3}} \NC \NC \NC \NC \NR +\NC \type {\Umathcode} \NC 0 \NC 10FFFF \NC = \NC 0+0+0 \NC 7+FF+10FFFF\rlap{\high{1}} \NC \NR +\NC \type {\Udelcode} \NC 0 \NC 10FFFF \NC = \NC 0+0 \NC FF+10FFFF\rlap{\high{2}} \NC \NR +\NC \type {\Umathchar} \NC 0+0+0 \NC 7+FF+10FFFF \NC \NC \NC \NC \NR +\NC \type {\Umathaccent} \NC 0+0+0 \NC 7+FF+10FFFF\rlap{\high{2,4}} \NC \NC \NC \NC \NR +\NC \type {\Udelimiter} \NC 0+0+0 \NC 7+FF+10FFFF\rlap{\high{2}} \NC \NC \NC \NC \NR +\NC \type {\Uradical} \NC 0+0 \NC FF+10FFFF\rlap{\high{2}} \NC \NC \NC \NC \NR +\NC \type {\Umathcharnum} \NC -80000000 \NC 7FFFFFFF\rlap{\high{3}} \NC \NC \NC \NC \NR +\NC \type {\Umathcodenum} \NC 0 \NC 10FFFF \NC = \NC -80000000 \NC 7FFFFFFF\rlap{\high{3}} \NC \NR +\NC \type {\Udelcodenum} \NC 0 \NC 10FFFF \NC = \NC -80000000 \NC 7FFFFFFF\rlap{\high{3}} \NC \NR \stoptabulate Specifications typically look like: @@ -238,13 +238,13 @@ details. New primitives that exist in \LUATEX\ only (all of these will be explained in following sections): -\starttabulate[|l|l|l|l|] -\NC \bf primitive \NC \bf value range (in hex) \NC \NR -\NC \type {\Uroot} \NC 0+0--FF+10FFFF$^2$ \NC \NR -\NC \type {\Uoverdelimiter} \NC 0+0--FF+10FFFF$^2$ \NC \NR -\NC \type {\Uunderdelimiter} \NC 0+0--FF+10FFFF$^2$ \NC \NR -\NC \type {\Udelimiterover} \NC 0+0--FF+10FFFF$^2$ \NC \NR -\NC \type {\Udelimiterunder} \NC 0+0--FF+10FFFF$^2$ \NC \NR +\starttabulate[|l|l|] +\BC primitive \BC value range (in hex) \NC \NR +\NC \type {\Uroot} \NC 0+0--FF+10FFFF$^2$ \NC \NR +\NC \type {\Uoverdelimiter} \NC 0+0--FF+10FFFF$^2$ \NC \NR +\NC \type {\Uunderdelimiter} \NC 0+0--FF+10FFFF$^2$ \NC \NR +\NC \type {\Udelimiterover} \NC 0+0--FF+10FFFF$^2$ \NC \NR +\NC \type {\Udelimiterunder} \NC 0+0--FF+10FFFF$^2$ \NC \NR \stoptabulate \section{Cramped math styles} @@ -336,7 +336,7 @@ now accessible via primitive commands. In fact, refactoring of the math engine has resulted in many more parameters than were accessible before. \starttabulate -\NC \bf primitive name \NC \bf description \NC \NR +\BC primitive name \BC description \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 @@ -412,8 +412,8 @@ 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 1 \NC always \NC \NR +\NC 0 \NC normal \TEX\ behaviour \NC \NR +\NC 1 \NC always (same as 0) \NC \NR \NC 2 \NC only when not zero \NC \NR \NC 3 \NC never, not even when not zero \NC \NR \stoptabulate @@ -447,7 +447,7 @@ dimension parameter. For math fonts, this should be set to zero. \switchtobodyfont[8pt] \starttabulate[|l|l|l|p|] -\NC \bf variable \NC \bf style \NC \bf default value opentype \NC \bf default value tfm \NC \NR +\BC variable \BC style \BC default value opentype \BC default value tfm \NC \NR \NC \type {\Umathaxis} \NC -- \NC AxisHeight \NC axis_height \NC \NR \NC \type {\Umathoperatorsize} \NC D, D' \NC DisplayOperatorMinHeight \NC $^6$ \NC \NR \NC \type {\Umathfractiondelsize} \NC D, D' \NC FractionDelimiterDisplayStyleSize$^9$ \NC delim1 \NC \NR @@ -579,7 +579,7 @@ kerns assume correction too. Anyway, with this parameter one can control it. \NC \mathnolimitsmode8000 $\displaystyle\int\nolimits^0_1$ \NC \NR \TB - \NC \bf mode + \BC mode \NC \tttf 0 \NC \tttf 1 \NC \tttf 2 @@ -587,7 +587,7 @@ kerns assume correction too. Anyway, with this parameter one can control it. \NC \tttf 4 \NC \tttf 8000 \NC \NR - \NC \bf superscript + \BC superscript \NC 0 \NC font \NC 0 @@ -595,7 +595,7 @@ kerns assume correction too. Anyway, with this parameter one can control it. \NC +ic/2 \NC 0 \NC \NR - \NC \bf subscript + \BC subscript \NC -ic \NC font \NC 0 @@ -617,26 +617,110 @@ experimenting. The \type {\mathitalicsmode} parameter can be set to~1 to force italic correction before noads that represent some more complex structure (read: everything -that is not an ord, bin, rel, open, close, punct or inner). +that is not an ord, bin, rel, open, close, punct or inner). We show a Cambria +example. \starttexdefinition Whatever #1 - \NC \type{\mathitalicsmode=#1} + \NC \type{\mathitalicsmode = #1} \NC \mathitalicsmode#1\ruledhbox{$\left|T^1\right|$} \NC \mathitalicsmode#1\ruledhbox{$\left|T\right|$} \NC \mathitalicsmode#1\ruledhbox{$T+1$} \NC \mathitalicsmode#1\ruledhbox{$T{1\over2}$} \NC \mathitalicsmode#1\ruledhbox{$T\sqrt{1}$} - \NR \NR + \NC \NR \stoptexdefinition -\starttabulate[|c|c|c|c|c|c|] - \Whatever0 - \Whatever1 -\stoptabulate +\start + \switchtobodyfont[cambria] + \starttabulate[|c|c|c|c|c|c|] + \Whatever{0}% + \Whatever{1}% + \stoptabulate +\stop This kind of parameters relate to the fact that italic correction in \OPENTYPE\ math is bound to fuzzy rules. So, control is the solution. +\section{Script boxes} + +If you want typeset text in math macro packages often provide something \type +{\text} which obeys the script sizes. As the definition can be anything there is +a good change that the kerning doesn't come out well when used in a script. Given +that the first glyph ends up in an \type {\hbox} we have some control over this. +And, as a bonus we also added control over the normal sublist kerning. The \type +{\mathscriptboxmode} parameter defaults to~1. + +\starttabulate[|l|l|] +\NC \type {0} \NC forget about kerning \NC \NR +\NC \type {1} \NC kern math sub lists with a valid glyph \NC \NR +\NC \type {2} \NC also kern math sub boxes that have a valid glyph \NC \NR +\NC \type {2} \NC only kern math sub boxes with a boundary node present\NC \NR +\stoptabulate + +Here we show some examples. Of course this doesn't solve all our problems, if +only because some fonts have characters with bounding boxes that compensate for +italics, while other fonts can lack kerns. + +\startbuffer[1] + $T_{\tf fluff}$ +\stopbuffer + +\startbuffer[2] + $T_{\text{fluff}}$ +\stopbuffer + +\startbuffer[3] + $T_{\text{\boundary1 fluff}}$ +\stopbuffer + +\unexpanded\def\Show#1#2#3% + {\doifelsenothing{#3} + {\small\typeinlinebuffer[#1]} + {\doifelse{#3}{-} + {\small\type{mode #2}} + {\switchtobodyfont[#3]\showfontkerns\showglyphs\mathscriptboxmode#2\relax\inlinebuffer[#1]}}} + +\starttabulate[|lT|c|c|c|c|c|] + \NC \NC \Show{1}{0}{} \NC\Show{1}{1}{} \NC \Show{2}{1}{} \NC \Show{2}{2}{} \NC \Show{3}{3}{} \NC \NR + \NC \NC \Show{1}{0}{-} \NC\Show{1}{1}{-} \NC \Show{2}{1}{-} \NC \Show{2}{2}{-} \NC \Show{3}{3}{-} \NC \NR + \NC modern \NC \Show{1}{0}{modern} \NC\Show{1}{1}{modern} \NC \Show{2}{1}{modern} \NC \Show{2}{2}{modern} \NC \Show{3}{3}{modern} \NC \NR + \NC lucidaot \NC \Show{1}{0}{lucidaot} \NC\Show{1}{1}{lucidaot} \NC \Show{2}{1}{lucidaot} \NC \Show{2}{2}{lucidaot} \NC \Show{3}{3}{lucidaot} \NC \NR + \NC pagella \NC \Show{1}{0}{pagella} \NC\Show{1}{1}{pagella} \NC \Show{2}{1}{pagella} \NC \Show{2}{2}{pagella} \NC \Show{3}{3}{pagella} \NC \NR + \NC cambria \NC \Show{1}{0}{cambria} \NC\Show{1}{1}{cambria} \NC \Show{2}{1}{cambria} \NC \Show{2}{2}{cambria} \NC \Show{3}{3}{cambria} \NC \NR + \NC dejavu \NC \Show{1}{0}{dejavu} \NC\Show{1}{1}{dejavu} \NC \Show{2}{1}{dejavu} \NC \Show{2}{2}{dejavu} \NC \Show{3}{3}{dejavu} \NC \NR +\stoptabulate + +\section{Unscaled fences} + +The \type {\mathdelimitersmode} primitive is experimental and deals with the +following (potential) problems. Three bits can be set. The first bit prevents +an unwanted shift when the fence symbol is not scaled (a cambria side effect). The +second bit forces italic correction between a preceding character ordinal and +the fenced subformula, while the third bit turns that subformula into a ordinary +so that the same spacing applies as with unfenced variants. Here we show Cambria +(with \type {\mathitalicsmode} enabled). + +\starttexdefinition Whatever #1 + \NC \type{\mathdelimitersmode = #1} + \NC \mathitalicsmode1\mathdelimitersmode#1\ruledhbox{\showglyphs\showfontkerns\showfontitalics$f(x)$} + \NC \mathitalicsmode1\mathdelimitersmode#1\ruledhbox{\showglyphs\showfontkerns\showfontitalics$f\left(x\right)$} + \NC \NR +\stoptexdefinition + +\start + \switchtobodyfont[cambria] + \starttabulate[|l|l|l|] + \Whatever{0}\Whatever{1}\Whatever{2}\Whatever{3}% + \Whatever{4}\Whatever{5}\Whatever{6}\Whatever{7}% + \stoptabulate +\stop + +So, when set to 7 fenced subformulas with unscaled delimiters come out the same +as unfenced ones. This can be handy for cases where one is forced to use \type +{\left} and \type {\right} always because of unpredictable content. As said, it's +an experimental features (which somehow fits in the exceptional way fences are +dealt with in the engine). + \section{Math spacing setting} Besides the parameters mentioned in the previous sections, there are also 64 new @@ -1033,8 +1117,8 @@ get the length of the last line, the following will often work too: \LUATEX\ defines six new primitives that have the same function as \type {^}, \type {_}, \type {$}, and \type {$$}: -\starttabulate[|l|l|l|l|] -\NC \bf primitive \NC \bf explanation \NC \NR +\starttabulate[|l|l|] +\BC primitive \BC explanation \NC \NR \NC \type {\Usuperscript} \NC Duplicates the functionality of \type {^} \NC \NR \NC \type {\Usubscript} \NC Duplicates the functionality of \type {_} \NC \NR \NC \type {\Ustartmath} \NC Duplicates the functionality of \type {$}, % $ @@ -1051,6 +1135,25 @@ The \type {\Ustopmath} and \type {\Ustopdisplaymath} primitives check if the cur math mode is the correct one (inline vs.\ displayed), but you can freely intermix the four mathon|/|mathoff commands with explicit dollar sign(s). +\subsection{Script commands \type {\Unosuperscript} and \type {\Unosubscript}} + +These two commands result in super- and subscripts but with the current style (at the +time of rendering). So, + +\startbuffer[script] +$ + x\Usuperscript {1}\Usubscript {2} = + x\Unosuperscript{1}\Unosubscript{2} = + x\Usuperscript {1}\Unosubscript{2} = + x\Unosuperscript{1}\Usubscript {2} +$ +\stopbuffer + +\typebuffer + +results in \inlinebuffer[script]. + + \subsection{Allowed math commands in non-math modes} The commands \type {\mathchar}, and \type {\Umathchar} and control sequences that @@ -1071,9 +1174,7 @@ with zero being the default behaviour. \start \def\OneLiner#1#2% - {\NC #1 -% \NC \ruledhbox{\mathsurroundmode#1\relax\hsize 100pt x$x$x} -% \NC \ruledhbox{\mathsurroundmode#1\relax\hsize 100pt x $x$ x} + {\NC \type{#1} \NC \dontleavehmode\inframed[align=normal,offset=0pt,frame=off]{\mathsurroundmode#1\relax\hsize 100pt x$x$x} \NC \dontleavehmode\inframed[align=normal,offset=0pt,frame=off]{\mathsurroundmode#1\relax\hsize 100pt x $x$ x} \NC #2 @@ -1086,7 +1187,7 @@ with zero being the default behaviour. \typebuffer \getbuffer -\starttabulate[|Tc|c|c|pl|] +\starttabulate[|c|c|c|pl|] \HL \BC mode \BC \type {x$x$x} \BC \type {x $x$ x} \BC effect \NC \NR \HL @@ -1105,7 +1206,7 @@ with zero being the default behaviour. Method six omits the surround glue when there is (x)spacing glue present while method seven does the opposite, the glue is only applied when there is (x)space -glue present too. Anything more fance, like checking the begining or end of a +glue present too. Anything more fancy, like checking the begining or end of a paragraph (or edges of a box) would not be robust anyway. If you want that you can write a callback that runs over a list and analyzes a paragraph. Actually, in that case you could also inject glue (or set the properties of a math node) @@ -1175,7 +1276,7 @@ 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 -influence the spacing. +influence the spacing. The numbers are the same as for character classes. \subsection{Fixed scripts} @@ -1196,13 +1297,13 @@ effects. {$\mathscriptsmode#1\mathupright CH_2 + CH^+_2 + CH^2_2$} \starttabulate[|c|c|c|l|] -\NC \bf mode \NC \bf down \NC \bf up \NC \NC \NR -\NC 0 \NC dynamic \NC dynamic \NC \SampleMath{0} \NC \NR -\NC 1 \NC $d$ \NC $u$ \NC \SampleMath{1} \NC \NR -\NC 2 \NC $s$ \NC $u$ \NC \SampleMath{2} \NC \NR -\NC 3 \NC $s$ \NC $u + s - d$ \NC \SampleMath{3} \NC \NR -\NC 4 \NC $d + (s-d)/2$ \NC $u + (s-d)/2$ \NC \SampleMath{4} \NC \NR -\NC 5 \NC $d$ \NC $u + s - d$ \NC \SampleMath{5} \NC \NR +\BC mode \BC down \BC up \BC \NC \NR +\NC 0 \NC dynamic \NC dynamic \NC \SampleMath{0} \NC \NR +\NC 1 \NC $d$ \NC $u$ \NC \SampleMath{1} \NC \NR +\NC 2 \NC $s$ \NC $u$ \NC \SampleMath{2} \NC \NR +\NC 3 \NC $s$ \NC $u + s - d$ \NC \SampleMath{3} \NC \NR +\NC 4 \NC $d + (s-d)/2$ \NC $u + (s-d)/2$ \NC \SampleMath{4} \NC \NR +\NC 5 \NC $d$ \NC $u + s - d$ \NC \SampleMath{5} \NC \NR \stoptabulate The value of this parameter obeys grouping but applies to the whole current @@ -1210,6 +1311,28 @@ formula. % if needed we can put the value in stylenodes but maybe more should go there +\subsection{Penalties: \type {\mathpenaltiesmode}} + +Only in inline math penalties will be added in a math list. You can force +penalties (also in display math) by setting: + +\starttyping +\mathpenaltiesmode = 1 +\stoptyping + +This primnitive is not really needed in \LUATEX\ because you can use the callback +\type {mlist_to_hlist} to force penalties by just calling the regular routine +with forced penalties. However, as part of opening up and control this primitive +makes sense. As a bonus we also provide two extra penalties: + +\starttyping +\prebinoppenalty = -100 % example value +\prerelpenalty = 900 % example value +\stoptyping + +They default to inifinite which signals that they don't need to be inserted. When +set they are injected before a binop or rel noad. This is an experimental feature. + \subsection {Tracing} Because there are quite some math related parameters and values, it is possible diff --git a/Master/texmf-dist/doc/luatex/base/luatex-modifications.tex b/Master/texmf-dist/doc/luatex/base/luatex-modifications.tex index 2857603ea0f..ee9a51de6e7 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-modifications.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-modifications.tex @@ -326,7 +326,7 @@ provide the ability to use content that has been rendered in several places, and images are also common. For that reason we also changed the names: \starttabulate[|l|l|] -\NC \bf new name \NC \bf old name \NC \NR +\BC new name \BC old name \NC \NR \NC \type {\saveboxresource} \NC \type {\pdfxform} \NC \NR \NC \type {\saveimageresource} \NC \type {\pdfximage} \NC \NR \NC \type {\useboxresource} \NC \type {\pdfrefxform} \NC \NR @@ -1063,20 +1063,57 @@ 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. +Glue after a dir node is ignored in the linebreak decision but you can bypass that +by setting \type {\breakafterdirmode} to~\type {1}. The following table shows the +difference. Watch your spaces. + +\def\ShowSome#1{% + \BC + \type{#1} + \NC + \breakafterdirmode = 0 + \hsize 0pt + #1 + \NC + \NC + \breakafterdirmode = 1 + \hsize 0pt + #1 + \NC + \NC \NR \HL +} +\starttabulate[|l|Tp(0pt)|w(5em)|Tp(0pt)|p|] + \HL + \BC \type{\breakafterdirmode} + \BC \type{0} + \NC + \BC \type{1} + \NC + \NC \NR + \HL + \ShowSome{pre {\textdir TLT xxx} post} + \ShowSome{pre {\textdir TLT xxx }post} + \ShowSome{pre{ \textdir TLT xxx} post} + \ShowSome{pre{ \textdir TLT xxx }post} + \ShowSome{pre { \textdir TLT xxx } post} + \ShowSome{pre {\textdir TLT\relax\space xxx} post} +\stoptabulate + + 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 +\starttabulate[|c|c|c|] +\BC \BC \type {\hangindent} \BC \type {\parshape} \NC \NR +\BC \type{0} \NC normal \NC normal \NC \NR +\BC \type{1} \NC mirrored \NC normal \NC \NR +\BC \type{2} \NC normal \NC mirrored \NC \NR +\BC \type{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 +after the paragraph is done with. You can use negative values to prevent this. In \in {figure} [fig:shapemode] a few examples are given. @@ -1217,6 +1254,28 @@ previous code (that mostly used \type {getc} calls), it can be quite a bit faste \stopsubsection +\startsubsection[title=Tabs and spaces] + +We conform to the way other \TEX\ engines handle trailing tabs and spaces. For +decades trailing tabs and spaces (before a newline) were removed from the input +but this behaviour was changed in September 2017 to only handle spaces. We are +aware that this can introduce compatibility issues in existing workflows but +because we don't want too many differences with upstream \TEXLIVE\ we just follow +up on that patch (which is a functional one and not really a fix). It is up to +macro packages maintainers to deal with possible compatibility issues and in +\LUATEX\ they can do so via the callbacks that deal with reading from files. + +The previous behaviour was a known side effect and (as that kind of input +normally comes from generated sources) it was normally dealt with by adding a +comment token to the line in case the spaces and|/|or tabs were intentional and +to be kept. We are aware of the fact that this contradicts some of our other +choices but consistency with other engines and the fact that in \KPSE\ mode a +common file \IO\ layer is used can have a side effect of breaking compatibility. +We still stick to our view that at the log level we can (and might be) more +incompatible. + +\stopsubsection + \stopsection \stopchapter diff --git a/Master/texmf-dist/doc/luatex/base/luatex-nodes.tex b/Master/texmf-dist/doc/luatex/base/luatex-nodes.tex index 21f1789e5a9..16488dbbb85 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-nodes.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-nodes.tex @@ -48,9 +48,9 @@ the low|-|level interface. An \type {attribute_list} item is used as a head pointer for a list of attribute items. It has only one user-visible field: -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC next \NC node \NC pointer to the first attribute \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{next} \NC node \NC pointer to the first attribute \NC \NR \stoptabulate \subsubsection{attribute nodes} @@ -60,11 +60,11 @@ A normal node's attribute field will point to an item of type \type defined \quote {attribute} item, whose \type {next} will point to the second \quote {attribute} item, etc. -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC next \NC node \NC pointer to the next attribute \NC \NR -\NC number \NC number \NC the attribute type id \NC \NR -\NC value \NC number \NC the attribute value \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{next} \NC node \NC pointer to the next attribute \NC \NR +\NC \type{number} \NC number \NC the attribute type id \NC \NR +\NC \type{value} \NC number \NC the attribute value \NC \NR \stoptabulate As mentioned it's better to use the official helpers rather than edit these @@ -76,11 +76,11 @@ and there is no double linked list. These are the nodes that comprise actual typesetting commands. A few fields are present in all nodes regardless of their type, these are: -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC next \NC node \NC the next node in a list, or nil \NC \NR -\NC id \NC number \NC the node's type (\type {id}) number \NC \NR -\NC subtype \NC number \NC the node \type {subtype} identifier \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{next} \NC node \NC the next node in a list, or nil \NC \NR +\NC \type{id} \NC number \NC the node's type (\type {id}) number \NC \NR +\NC \type{subtype} \NC number \NC the node \type {subtype} identifier \NC \NR \stoptabulate The \type {subtype} is sometimes just a stub entry. Not all nodes actually use @@ -98,19 +98,19 @@ internal magic uses a leading \type {temp} nodes to temporarily store a state. \subsubsection{hlist nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC subtype \NC number \NC \showsubtypes{list} \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC width \NC number \NC the width of the box \NC \NR -\NC height \NC number \NC the height of the box \NC \NR -\NC depth \NC number \NC the depth of the box \NC \NR -\NC shift \NC number \NC a displacement perpendicular to the character progression direction \NC \NR -\NC glue_order \NC number \NC a number in the range $[0,4]$, indicating the glue order \NC \NR -\NC glue_set \NC number \NC the calculated glue ratio \NC \NR -\NC glue_sign \NC number \NC 0 = \type {normal}, 1 = \type {stretching}, 2 = \type {shrinking} \NC \NR -\NC head/list \NC node \NC the first node of the body of this list \NC \NR -\NC dir \NC string \NC the direction of this box, see~\in[dirnodes] \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{subtype} \NC number \NC \showsubtypes{list} \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{width} \NC number \NC the width of the box \NC \NR +\NC \type{height} \NC number \NC the height of the box \NC \NR +\NC \type{depth} \NC number \NC the depth of the box \NC \NR +\NC \type{shift} \NC number \NC a displacement perpendicular to the character progression direction \NC \NR +\NC \type{glue_order} \NC number \NC a number in the range $[0,4]$, indicating the glue order \NC \NR +\NC \type{glue_set} \NC number \NC the calculated glue ratio \NC \NR +\NC \type{glue_sign} \NC number \NC 0 = \type {normal}, 1 = \type {stretching}, 2 = \type {shrinking} \NC \NR +\NC \type{head/list} \NC node \NC the first node of the body of this list \NC \NR +\NC \type{dir} \NC string \NC the direction of this box, see~\in[dirnodes] \NC \NR \stoptabulate A warning: never assign a node list to the \type {head} field unless you are sure @@ -132,27 +132,27 @@ Contrary to traditional \TEX, \LUATEX\ has more subtypes because we also use rules to store reuseable objects and images. User nodes are invisible and can be intercepted by a callback. -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC subtype \NC number \NC \showsubtypes{rule} \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC width \NC number \NC the width of the rule where the special value $-1073741824$ is used for \quote {running} glue dimensions \NC \NR -\NC height \NC number \NC the height of the rule (can be negative) \NC \NR -\NC depth \NC number \NC the depth of the rule (can be negative) \NC \NR -\NC dir \NC string \NC the direction of this rule, see~\in[dirnodes] \NC \NR -\NC index \NC number \NC an optional index that can be referred to \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{subtype} \NC number \NC \showsubtypes{rule} \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{width} \NC number \NC the width of the rule where the special value $-1073741824$ is used for \quote {running} glue dimensions \NC \NR +\NC \type{height} \NC number \NC the height of the rule (can be negative) \NC \NR +\NC \type{depth} \NC number \NC the depth of the rule (can be negative) \NC \NR +\NC \type{dir} \NC string \NC the direction of this rule, see~\in[dirnodes] \NC \NR +\NC \type{index} \NC number \NC an optional index that can be referred to \NC \NR \stoptabulate \subsubsection{ins nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC subtype \NC number \NC the insertion class \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC cost \NC number \NC the penalty associated with this insert \NC \NR -\NC height \NC number \NC height of the insert \NC \NR -\NC depth \NC number \NC depth of the insert \NC \NR -\NC head/list \NC node \NC the first node of the body of this insert \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{subtype} \NC number \NC the insertion class \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{cost} \NC number \NC the penalty associated with this insert \NC \NR +\NC \type{height} \NC number \NC height of the insert \NC \NR +\NC \type{depth} \NC number \NC depth of the insert \NC \NR +\NC \type{head/list} \NC node \NC the first node of the body of this insert \NC \NR \stoptabulate There is a set of extra fields that concern the associated glue: \type {width}, @@ -166,21 +166,21 @@ names and both names are equally sensible). \subsubsection{mark nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC subtype \NC number \NC unused \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC class \NC number \NC the mark class \NC \NR -\NC mark \NC table \NC a table representing a token list \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{subtype} \NC number \NC unused \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{class} \NC number \NC the mark class \NC \NR +\NC \type{mark} \NC table \NC a table representing a token list \NC \NR \stoptabulate \subsubsection{adjust nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC subtype \NC number \NC \showsubtypes{adjust} \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC head/list \NC node \NC adjusted material \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{subtype} \NC number \NC \showsubtypes{adjust} \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{head/list} \NC node \NC adjusted material \NC \NR \stoptabulate A warning: never assign a node list to the \type {head} field unless you are sure @@ -188,14 +188,14 @@ its internal link structure is correct, otherwise an error may be result. \subsubsection{disc nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC subtype \NC number \NC \showsubtypes{disc} \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC pre \NC node \NC pointer to the pre|-|break text \NC \NR -\NC post \NC node \NC pointer to the post|-|break text \NC \NR -\NC replace \NC node \NC pointer to the no|-|break text \NC \NR -\NC penalty \NC number \NC the penalty associated with the break, normally \type {\hyphenpenalty} or \type {\exhyphenpenalty} \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{subtype} \NC number \NC \showsubtypes{disc} \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{pre} \NC node \NC pointer to the pre|-|break text \NC \NR +\NC \type{post} \NC node \NC pointer to the post|-|break text \NC \NR +\NC \type{replace} \NC node \NC pointer to the no|-|break text \NC \NR +\NC \type{penalty} \NC number \NC the penalty associated with the break, normally \type {\hyphenpenalty} or \type {\exhyphenpenalty} \NC \NR \stoptabulate The subtype numbers~4 and~5 belong to the \quote {of-f-ice} explanation given @@ -223,11 +223,11 @@ freeing it again might crash \LUATEX). \subsubsection{math nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC subtype \NC number \NC \showsubtypes{math} \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC surround \NC number \NC width of the \type {\mathsurround} kern \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{subtype} \NC number \NC \showsubtypes{math} \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{surround} \NC number \NC width of the \type {\mathsurround} kern \NC \NR \stoptabulate There is a set of extra fields that concern the associated glue: \type {width}, @@ -240,13 +240,13 @@ Skips are about the only type of data objects in traditional \TEX\ that are not simple value. The structure that represents the glue components of a skip is called a \type {glue_spec}, and it has the following accessible fields: -\starttabulate[|lT|l|p|] -\NC \rmbf key \NC \bf type \NC \bf explanation \NC \NR -\NC width \NC number \NC the horizontal or vertical displacement \NC \NR -\NC stretch \NC number \NC extra (positive) displacement or stretch amount \NC \NR -\NC stretch_order \NC number \NC factor applied to stretch amount \NC \NR -\NC shrink \NC number \NC extra (negative) displacement or shrink amount\NC \NR -\NC shrink_order \NC number \NC factor applied to shrink amount \NC \NR +\starttabulate[|l|l|p|] +\BC key \BC type \BC explanation \NC \NR +\NC \type{width} \NC number \NC the horizontal or vertical displacement \NC \NR +\NC \type{stretch} \NC number \NC extra (positive) displacement or stretch amount \NC \NR +\NC \type{stretch_order} \NC number \NC factor applied to stretch amount \NC \NR +\NC \type{shrink} \NC number \NC extra (negative) displacement or shrink amount\NC \NR +\NC \type{shrink_order} \NC number \NC factor applied to shrink amount \NC \NR \stoptabulate The effective width of some glue subtypes depends on the stretch or shrink needed @@ -273,11 +273,11 @@ a field can result in a new copy). So in the end the advantages of sharing are not that high (and nowadays memory is less an issue, also given that a glue node is only a few memory words larger than a spec). -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC subtype \NC number \NC \showsubtypes{glue} \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC leader \NC node \NC pointer to a box or rule for leaders \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{subtype} \NC number \NC \showsubtypes{glue} \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{leader} \NC node \NC pointer to a box or rule for leaders \NC \NR \stoptabulate In addition there are the \type {width}, \type {stretch} \type {stretch_order}, @@ -290,42 +290,46 @@ a \type {userskip} with subtype zero). \subsubsection{kern nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC subtype \NC number \NC \showsubtypes{kern} \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC kern \NC number \NC fixed horizontal or vertical advance \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{subtype} \NC number \NC \showsubtypes{kern} \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{kern} \NC number \NC fixed horizontal or vertical advance \NC \NR \stoptabulate \subsubsection{penalty nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC subtype \NC number \NC not used \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC penalty \NC number \NC the penalty value \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{subtype} \NC number \NC \showsubtypes{penalty} \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{penalty} \NC number \NC the penalty value \NC \NR \stoptabulate +The subtypes are just informative and \TEX\ itself doesn't use them. When you +run into an \type {linebreakpenalty} you need to keep in mind that it's a +accumulation of \type {club}, \type{widow} and other relevant penalties. + \subsubsection[glyphnodes]{glyph nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \rmbf type \NC \rmbf explanation \NC \NR -\NC subtype \NC number \NC bitfield \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC char \NC number \NC the chatacter index in the font \NC \NR -\NC font \NC number \NC the font identifier \NC \NR -\NC lang \NC number \NC the language identifier \NC \NR -\NC left \NC number \NC the frozen \type {\lefthyphenmnin} value \NC \NR -\NC right \NC number \NC the frozen \type {\righthyphenmnin} value \NC \NR -\NC uchyph \NC boolean \NC the frozen \type {\uchyph} value \NC \NR -\NC components \NC node \NC pointer to ligature components \NC \NR -\NC xoffset \NC number \NC a virtual displacement in horizontal direction \NC \NR -\NC yoffset \NC number \NC a virtual displacement in vertical direction \NC \NR -\NC xadvance \NC number \NC an additional advance after the glyph (experimental) \NC \NR -\NC width \NC number \NC the (original) width of the character \NC \NR -\NC height \NC number \NC the (original) height of the character\NC \NR -\NC depth \NC number \NC the (original) depth of the character\NC \NR -\NC expansion_factor \NC number \NC the to be applied expansion_factor \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{subtype} \NC number \NC bitfield \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{char} \NC number \NC the chatacter index in the font \NC \NR +\NC \type{font} \NC number \NC the font identifier \NC \NR +\NC \type{lang} \NC number \NC the language identifier \NC \NR +\NC \type{left} \NC number \NC the frozen \type {\lefthyphenmnin} value \NC \NR +\NC \type{right} \NC number \NC the frozen \type {\righthyphenmnin} value \NC \NR +\NC \type{uchyph} \NC boolean \NC the frozen \type {\uchyph} value \NC \NR +\NC \type{components} \NC node \NC pointer to ligature components \NC \NR +\NC \type{xoffset} \NC number \NC a virtual displacement in horizontal direction \NC \NR +\NC \type{yoffset} \NC number \NC a virtual displacement in vertical direction \NC \NR +%NC \type{xadvance} \NC number \NC an additional advance after the glyph (experimental) \NC \NR +\NC \type{width} \NC number \NC the (original) width of the character \NC \NR +\NC \type{height} \NC number \NC the (original) height of the character\NC \NR +\NC \type{depth} \NC number \NC the (original) depth of the character\NC \NR +\NC \type{expansion_factor} \NC number \NC the to be applied expansion_factor \NC \NR \stoptabulate The \type {width}, \type {height} and \type {depth} values are read|-|only. The @@ -336,12 +340,12 @@ its internal link structure is correct, otherwise an error may be result. Valid bits for the \type {subtype} field are: \starttabulate[|c|l|] -\NC \rmbf bit \NC \bf meaning \NC \NR -\NC 0 \NC character \NC \NR -\NC 1 \NC ligature \NC \NR -\NC 2 \NC ghost \NC \NR -\NC 3 \NC left \NC \NR -\NC 4 \NC right \NC \NR +\BC bit \BC meaning \NC \NR +\NC 0 \NC character \NC \NR +\NC 1 \NC ligature \NC \NR +\NC 2 \NC ghost \NC \NR +\NC 3 \NC left \NC \NR +\NC 4 \NC right \NC \NR \stoptabulate See \in {section} [charsandglyphs] for a detailed description of the \type @@ -364,15 +368,16 @@ 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. +making more readable tests. The \type {uses_font} helpers takes a node +and font id and returns true when a glyph or disc node references that font. \subsubsection{boundary nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC subtype \NC number \NC \showsubtypes{boundary} \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC value \NC number \NC values 0--255 are reserved \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{subtype} \NC number \NC \showsubtypes{boundary} \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{value} \NC number \NC values 0--255 are reserved \NC \NR \stoptabulate This node relates to the \type {\noboundary}, \type {\boundary}, \type @@ -380,16 +385,16 @@ This node relates to the \type {\noboundary}, \type {\boundary}, \type \subsubsection{local_par nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC pen_inter \NC number \NC local interline penalty (from \type {\localinterlinepenalty}) \NC \NR -\NC pen_broken \NC number \NC local broken penalty (from \type {\localbrokenpenalty}) \NC \NR -\NC dir \NC string \NC the direction of this par. see~\in [dirnodes] \NC \NR -\NC box_left \NC node \NC the \type {\localleftbox} \NC \NR -\NC box_left_width \NC number \NC width of the \type {\localleftbox} \NC \NR -\NC box_right \NC node \NC the \type {\localrightbox} \NC \NR -\NC box_right_width \NC number \NC width of the \type {\localrightbox} \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{pen_inter} \NC number \NC local interline penalty (from \type {\localinterlinepenalty}) \NC \NR +\NC \type{pen_broken} \NC number \NC local broken penalty (from \type {\localbrokenpenalty}) \NC \NR +\NC \type{dir} \NC string \NC the direction of this par. see~\in [dirnodes] \NC \NR +\NC \type{box_left} \NC node \NC the \type {\localleftbox} \NC \NR +\NC \type{box_left_width} \NC number \NC width of the \type {\localleftbox} \NC \NR +\NC \type{box_right} \NC node \NC the \type {\localrightbox} \NC \NR +\NC \type{box_right_width} \NC number \NC width of the \type {\localrightbox} \NC \NR \stoptabulate A warning: never assign a node list to the \type {box_left} or \type {box_right} @@ -398,11 +403,11 @@ error may be result. \subsubsection[dirnodes]{dir nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \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 +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{dir} \NC string \NC the direction (but see below) \NC \NR +\NC \type{level} \NC number \NC nesting level of this direction whatsit \NC \NR \stoptabulate A note on \type {dir} strings. Direction specifiers are three|-|letter @@ -432,12 +437,12 @@ or popped from the direction stack. \subsubsection{margin_kern nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC subtype \NC number \NC \showsubtypes{margin_kern} \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC width \NC number \NC the advance of the kern \NC \NR -\NC glyph \NC node \NC the glyph to be used \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{subtype} \NC number \NC \showsubtypes{margin_kern} \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{width} \NC number \NC the advance of the kern \NC \NR +\NC \type{glyph} \NC node \NC the glyph to be used \NC \NR \stoptabulate \subsection{Math nodes} @@ -457,11 +462,11 @@ The \type {next} and \type {prev} fields for these subnodes are unused. \subsubsubsection{math_char and math_text_char subnodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC char \NC number \NC the character index \NC \NR -\NC fam \NC number \NC the family number \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{char} \NC number \NC the character index \NC \NR +\NC \type{fam} \NC number \NC the family number \NC \NR \stoptabulate The \type {math_char} is the simplest subnode field, it contains the character @@ -471,10 +476,10 @@ conversion (its sole function is to suppress a following italic correction). \subsubsubsection{sub_box and sub_mlist subnodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC head/list \NC node \NC list of nodes \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{head/list} \NC node \NC list of nodes \NC \NR \stoptabulate These two subnode types are used for subsidiary list items. For \type {sub_box}, @@ -491,13 +496,13 @@ before, the \type {next} and \type {prev} fields are unused. \subsubsubsection{delim subnodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC small_char \NC number \NC character index of base character \NC \NR -\NC small_fam \NC number \NC family number of base character \NC \NR -\NC large_char \NC number \NC character index of next larger character \NC \NR -\NC large_fam \NC number \NC family number of next larger character \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{small_char} \NC number \NC character index of base character \NC \NR +\NC \type{small_fam} \NC number \NC family number of base character \NC \NR +\NC \type{large_char} \NC number \NC character index of next larger character \NC \NR +\NC \type{large_fam} \NC number \NC family number of next larger character \NC \NR \stoptabulate The fields \type {large_char} and \type {large_fam} can be zero, in that case the @@ -511,50 +516,68 @@ 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. +Some noads have an option field. The values in this bitset are common: + +\starttabulate[|l|r|] +\NC set \NC \type{0x08} \NC \NR +\NC internal \NC \type{0x00} + \type{0x08} \NC \NR +\NC internal \NC \type{0x01} + \type{0x08} \NC \NR +\NC axis \NC \type{0x02} + \type{0x08} \NC \NR +\NC no axis \NC \type{0x04} + \type{0x08} \NC \NR +\NC exact \NC \type{0x10} + \type{0x08} \NC \NR +\NC left \NC \type{0x11} + \type{0x08} \NC \NR +\NC middle \NC \type{0x12} + \type{0x08} \NC \NR +\NC right \NC \type{0x14} + \type{0x08} \NC \NR +\NC no sub script \NC \type{0x21} + \type{0x08} \NC \NR +\NC no super script \NC \type{0x22} + \type{0x08} \NC \NR +\NC no script \NC \type{0x23} + \type{0x08} \NC \NR +\stoptabulate + \subsubsubsection{simple nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC subtype \NC number \NC \showsubtypes{noad} \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC nucleus \NC kernel node \NC base \NC \NR -\NC sub \NC kernel node \NC subscript \NC \NR -\NC sup \NC kernel node \NC superscript \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{subtype} \NC number \NC \showsubtypes{noad} \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{nucleus} \NC kernel node \NC base \NC \NR +\NC \type{sub} \NC kernel node \NC subscript \NC \NR +\NC \type{sup} \NC kernel node \NC superscript \NC \NR +\NC \type{options} \NC number \NC bitset of rendering options \NC \NR \stoptabulate \subsubsubsection{accent nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC subtype \NC number \NC \showsubtypes{accent} \NC \NR -\NC nucleus \NC kernel node \NC base \NC \NR -\NC sub \NC kernel node \NC subscript \NC \NR -\NC sup \NC kernel node \NC superscript \NC \NR -\NC accent \NC kernel node \NC top accent \NC \NR -\NC bot_accent \NC kernel node \NC bottom accent \NC \NR -\NC fraction \NC number \NC larger step criterium (divided by 1000) \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{subtype} \NC number \NC \showsubtypes{accent} \NC \NR +\NC \type{nucleus} \NC kernel node \NC base \NC \NR +\NC \type{sub} \NC kernel node \NC subscript \NC \NR +\NC \type{sup} \NC kernel node \NC superscript \NC \NR +\NC \type{accent} \NC kernel node \NC top accent \NC \NR +\NC \type{bot_accent} \NC kernel node \NC bottom accent \NC \NR +\NC \type{fraction} \NC number \NC larger step criterium (divided by 1000) \NC \NR \stoptabulate \subsubsubsection{style nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC style \NC string \NC contains the style \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{style} \NC string \NC contains the style \NC \NR \stoptabulate -There are eight possibilities for the string value: one of \quote {display}, -\quote {text}, \quote {script}, or \quote {scriptscript}. Each of these can have -a trailing \type {'} to signify \quote {cramped} styles. +There are eight possibilities for the string value: one of \type {display}, +\type {text}, \type {script}, or \type {scriptscript}. Each of these can have +be prefixed by \type {cramped}. \subsubsubsection{choice nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC display \NC node \NC list of display size alternatives \NC \NR -\NC text \NC node \NC list of text size alternatives \NC \NR -\NC script \NC node \NC list of scriptsize alternatives \NC \NR -\NC scriptscript \NC node \NC list of scriptscriptsize alternatives \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{display} \NC node \NC list of display size alternatives \NC \NR +\NC \type{text} \NC node \NC list of text size alternatives \NC \NR +\NC \type{script} \NC node \NC list of scriptsize alternatives \NC \NR +\NC \type{scriptscript} \NC node \NC list of scriptscriptsize alternatives \NC \NR \stoptabulate Warning: never assign a node list to the \type {display}, \type {text}, \type @@ -563,17 +586,17 @@ structure is correct, otherwise an error may be result. \subsubsubsection{radical nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC subtype \NC number \NC \showsubtypes{radical} \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC nucleus \NC kernel node \NC base \NC \NR -\NC sub \NC kernel node \NC subscript \NC \NR -\NC sup \NC kernel node \NC superscript \NC \NR -\NC left \NC delimiter node \NC \NC \NR -\NC degree \NC kernel node \NC only set by \type {\Uroot} \NC \NR -\NC width \NC number \NC required width \NC \NR -\NC options \NC number \NC bitset of rendering options \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{subtype} \NC number \NC \showsubtypes{radical} \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{nucleus} \NC kernel node \NC base \NC \NR +\NC \type{sub} \NC kernel node \NC subscript \NC \NR +\NC \type{sup} \NC kernel node \NC superscript \NC \NR +\NC \type{left} \NC delimiter node \NC \NC \NR +\NC \type{degree} \NC kernel node \NC only set by \type {\Uroot} \NC \NR +\NC \type{width} \NC number \NC required width \NC \NR +\NC \type{options} \NC number \NC bitset of rendering options \NC \NR \stoptabulate Warning: never assign a node list to the \type {nucleus}, \type {sub}, \type @@ -582,16 +605,16 @@ link structure is correct, otherwise an error may be result. \subsubsubsection{fraction nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC width \NC number \NC (optional) width of the fraction \NC \NR -\NC num \NC kernel node \NC numerator \NC \NR -\NC denom \NC kernel node \NC denominator \NC \NR -\NC left \NC delimiter node \NC left side symbol \NC \NR -\NC right \NC delimiter node \NC right side symbol \NC \NR -\NC middle \NC delimiter node \NC middle symbol \NC \NR -\NC options \NC number \NC bitset of rendering options \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{width} \NC number \NC (optional) width of the fraction \NC \NR +\NC \type{num} \NC kernel node \NC numerator \NC \NR +\NC \type{denom} \NC kernel node \NC denominator \NC \NR +\NC \type{left} \NC delimiter node \NC left side symbol \NC \NR +\NC \type{right} \NC delimiter node \NC right side symbol \NC \NR +\NC \type{middle} \NC delimiter node \NC middle symbol \NC \NR +\NC \type{options} \NC number \NC bitset of rendering options \NC \NR \stoptabulate Warning: never assign a node list to the \type {num}, or \type {denom} field @@ -600,16 +623,16 @@ may be result. \subsubsubsection{fence nodes} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC subtype \NC number \NC \showsubtypes{fence} \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC delim \NC delimiter node \NC delimiter specification \NC \NR -\NC italic \NC number \NC italic correction \NC \NR -\NC height \NC number \NC required height \NC \NR -\NC depth \NC number \NC required depth \NC \NR -\NC options \NC number \NC bitset of rendering options \NC \NR -\NC class \NC number \NC spacing related class \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{subtype} \NC number \NC \showsubtypes{fence} \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{delim} \NC delimiter node \NC delimiter specification \NC \NR +\NC \type{italic} \NC number \NC italic correction \NC \NR +\NC \type{height} \NC number \NC required height \NC \NR +\NC \type{depth} \NC number \NC required depth \NC \NR +\NC \type{options} \NC number \NC bitset of rendering options \NC \NR +\NC \type{class} \NC number \NC spacing related class \NC \NR \stoptabulate Warning: some of these fields are used by the renderer and might get adapted in @@ -633,30 +656,30 @@ Whatsit nodes come in many subtypes that you can ask for by running \subsubsubsection{open whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC stream \NC number \NC \TEX's stream id number \NC \NR -\NC name \NC string \NC file name \NC \NR -\NC ext \NC string \NC file extension \NC \NR -\NC area \NC string \NC file area (this may become obsolete) \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{stream} \NC number \NC \TEX's stream id number \NC \NR +\NC \type{name} \NC string \NC file name \NC \NR +\NC \type{ext} \NC string \NC file extension \NC \NR +\NC \type{area} \NC string \NC file area (this may become obsolete) \NC \NR \stoptabulate \subsubsubsection{write whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC stream \NC number \NC \TEX's stream id number \NC \NR -\NC data \NC table \NC a table representing the token list to be written \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{stream} \NC number \NC \TEX's stream id number \NC \NR +\NC \type{data} \NC table \NC a table representing the token list to be written \NC \NR \stoptabulate \subsubsubsection{close whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC stream \NC number \NC \TEX's stream id number \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{stream} \NC number \NC \TEX's stream id number \NC \NR \stoptabulate \subsubsubsection{user_defined whatsits} @@ -665,46 +688,46 @@ User|-|defined whatsit nodes can only be created and handled from \LUA\ code. In effect, they are an extension to the extension mechanism. The \LUATEX\ engine will simply step over such whatsits without ever looking at the contents. -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC user_id \NC number \NC id number \NC \NR -\NC type \NC number \NC type of the value \NC \NR -\NC value \NC number \NC a \LUA\ number \NC \NR -\NC \NC node \NC a node list \NC \NR -\NC \NC string \NC a \LUA\ string \NC \NR -\NC \NC table \NC a \LUA\ table \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{user_id} \NC number \NC id number \NC \NR +\NC \type{type} \NC number \NC type of the value \NC \NR +\NC \type{value} \NC number \NC a \LUA\ number \NC \NR +\NC \NC node \NC a node list \NC \NR +\NC \NC string \NC a \LUA\ string \NC \NR +\NC \NC table \NC a \LUA\ table \NC \NR \stoptabulate The \type {type} can have one of six distinct values. The number is the \ASCII\ value if the first character if the type name (so you can use string.byte("l") instead of \type {108}). -\starttabulate[|lT|lT|p|] -\NC \rmbf value \NC \bf meaning \NC \bf explanation \NC \NR -\NC 97 \NC a \NC list of attributes (a node list) \NC \NR -\NC 100 \NC d \NC a \LUA\ number \NC \NR -\NC 108 \NC l \NC a \LUA\ value (table, number, boolean, etc) \NC \NR -\NC 110 \NC n \NC a node list \NC \NR -\NC 115 \NC s \NC a \LUA\ string \NC \NR -\NC 116 \NC t \NC a \LUA\ token list in \LUA\ table form (a list of triplets) \NC \NR +\starttabulate[|r|c|p|] +\BC value \BC meaning \BC explanation \NC \NR +\NC 97 \NC a \NC list of attributes (a node list) \NC \NR +\NC 100 \NC d \NC a \LUA\ number \NC \NR +\NC 108 \NC l \NC a \LUA\ value (table, number, boolean, etc) \NC \NR +\NC 110 \NC n \NC a node list \NC \NR +\NC 115 \NC s \NC a \LUA\ string \NC \NR +\NC 116 \NC t \NC a \LUA\ token list in \LUA\ table form (a list of triplets) \NC \NR \stoptabulate \subsubsubsection{save_pos whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR \stoptabulate \subsubsubsection{late_lua whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \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 +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{data} \NC string \NC data to execute \NC \NR +\NC \type{string} \NC string \NC data to execute \NC \NR +\NC \type{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 @@ -715,31 +738,31 @@ The difference between \type {data} and \type {string} is that on assignment, th \subsubsection{special whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC data \NC string \NC the \type {\special} information \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{data} \NC string \NC the \type {\special} information \NC \NR \stoptabulate \subsubsection{\PDF\ backend whatsits} \subsubsubsection{pdf_literal whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC mode \NC number \NC the \quote {mode} setting of this literal \NC \NR -\NC data \NC string \NC the \type {\pdfliteral} information \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{mode} \NC number \NC the \quote {mode} setting of this literal \NC \NR +\NC \type{data} \NC string \NC the \type {\pdfliteral} information \NC \NR \stoptabulate Possible mode values are: -\starttabulate[|lT|p|] -\NC \rmbf value \NC \rmbf \PDFTEX\ keyword \NC \NR -\NC 0 \NC setorigin \NC \NR -\NC 1 \NC page \NC \NR -\NC 2 \NC direct \NC \NR -\NC 3 \NC raw \NC \NR +\starttabulate[|l|p|] +\BC value \BC \PDFTEX\ keyword \NC \NR +\NC 0 \NC \type{setorigin} \NC \NR +\NC 1 \NC \type{page} \NC \NR +\NC 2 \NC \type{direct} \NC \NR +\NC 3 \NC \type{raw} \NC \NR \stoptabulate The higher the number, the less checking and the more you can run into troubles. @@ -748,58 +771,58 @@ what you generate. \subsubsubsection{pdf_refobj whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC objnum \NC number \NC the referenced \PDF\ object number \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{objnum} \NC number \NC the referenced \PDF\ object number \NC \NR \stoptabulate \subsubsubsection{pdf_annot whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC width \NC number \NC the width (not used in calculations) \NC \NR -\NC height \NC number \NC the height (not used in calculations) \NC \NR -\NC depth \NC number \NC the depth (not used in calculations) \NC \NR -\NC objnum \NC number \NC the referenced \PDF\ object number \NC \NR -\NC data \NC string \NC the annotation data \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{width} \NC number \NC the width (not used in calculations) \NC \NR +\NC \type{height} \NC number \NC the height (not used in calculations) \NC \NR +\NC \type{depth} \NC number \NC the depth (not used in calculations) \NC \NR +\NC \type{objnum} \NC number \NC the referenced \PDF\ object number \NC \NR +\NC \type{data} \NC string \NC the annotation data \NC \NR \stoptabulate \subsubsubsection{pdf_start_link whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC width \NC number \NC the width (not used in calculations) \NC \NR -\NC height \NC number \NC the height (not used in calculations) \NC \NR -\NC depth \NC number \NC the depth (not used in calculations) \NC \NR -\NC objnum \NC number \NC the referenced \PDF\ object number \NC \NR -\NC link_attr \NC table \NC the link attribute token list \NC \NR -\NC action \NC node \NC the action to perform \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{width} \NC number \NC the width (not used in calculations) \NC \NR +\NC \type{height} \NC number \NC the height (not used in calculations) \NC \NR +\NC \type{depth} \NC number \NC the depth (not used in calculations) \NC \NR +\NC \type{objnum} \NC number \NC the referenced \PDF\ object number \NC \NR +\NC \type{link_attr} \NC table \NC the link attribute token list \NC \NR +\NC \type{action} \NC node \NC the action to perform \NC \NR \stoptabulate \subsubsubsection{pdf_end_link whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC \NC \NR \stoptabulate \subsubsubsection{pdf_dest whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC width \NC number \NC the width (not used in calculations) \NC \NR -\NC height \NC number \NC the height (not used in calculations) \NC \NR -\NC depth \NC number \NC the depth (not used in calculations) \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 -\NC xyz_zoom \NC number \NC the zoom factor (times 1000) \NC \NR -\NC objnum \NC number \NC the \PDF\ object number \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{width} \NC number \NC the width (not used in calculations) \NC \NR +\NC \type{height} \NC number \NC the height (not used in calculations) \NC \NR +\NC \type{depth} \NC number \NC the depth (not used in calculations) \NC \NR +\NC \type{named_id} \NC number \NC is the \type {dest_id} a string value? \NC \NR +\NC \type{dest_id} \NC number \NC the destination id \NC \NR +\NC \NC string \NC the destination name \NC \NR +\NC \type{dest_type} \NC number \NC type of destination \NC \NR +\NC \type{xyz_zoom} \NC number \NC the zoom factor (times 1000) \NC \NR +\NC \type{objnum} \NC number \NC the \PDF\ object number \NC \NR \stoptabulate \subsubsubsection{pdf_action whatsits} @@ -807,98 +830,99 @@ what you generate. These are a special kind of item that only appears inside \PDF\ start link objects. -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC action_type \NC number \NC the kind of action involved \NC \NR -\NC action_id \NC number or string \NC token list reference or string \NC \NR -\NC named_id \NC number \NC the index of the destination \NC \NR -\NC file \NC string \NC the target filename \NC \NR -\NC new_window \NC number \NC the window state of the target \NC \NR -\NC data \NC string \NC the name of the destination \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\BC field \BC type \BC explanation \NC \NR +\NC \type{action_type} \NC number \NC the kind of action involved \NC \NR +\NC \type{action_id} \NC number or string \NC token list reference or string \NC \NR +\NC \type{named_id} \NC number \NC the index of the destination \NC \NR +\NC \type{file} \NC string \NC the target filename \NC \NR +\NC \type{new_window} \NC number \NC the window state of the target \NC \NR +\NC \type{data} \NC string \NC the name of the destination \NC \NR \stoptabulate Valid action types are: -\starttabulate[|lT|lT|] -\NC 0 \NC page \NC \NR -\NC 1 \NC goto \NC \NR -\NC 2 \NC thread \NC \NR -\NC 3 \NC user \NC \NR +\starttabulate[|l|l|] +\NC 0 \NC \type{page} \NC \NR +\NC 1 \NC \type{goto} \NC \NR +\NC 2 \NC \type{thread} \NC \NR +\NC 3 \NC \type{user} \NC \NR \stoptabulate Valid window types are: -\starttabulate[|lT|lT|] -\NC 0 \NC notset \NC \NR -\NC 1 \NC new \NC \NR -\NC 2 \NC nonew \NC \NR +\starttabulate[|l|l|] +\NC 0 \NC \type{notset} \NC \NR +\NC 1 \NC \type{new} \NC \NR +\NC 2 \NC \type{nonew} \NC \NR \stoptabulate \subsubsubsection{pdf_thread whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC width \NC number \NC the width (not used in calculations) \NC \NR -\NC height \NC number \NC the height (not used in calculations) \NC \NR -\NC depth \NC number \NC the depth (not used in calculations) \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 +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{width} \NC number \NC the width (not used in calculations) \NC \NR +\NC \type{height} \NC number \NC the height (not used in calculations) \NC \NR +\NC \type{depth} \NC number \NC the depth (not used in calculations) \NC \NR +\NC \type{named_id} \NC number \NC is \type {tread_id} a string value? \NC \NR +\NC \type{tread_id} \NC number \NC the thread id \NC \NR +\NC \NC string \NC the thread name \NC \NR +\NC \type{thread_attr} \NC number \NC extra thread information \NC \NR \stoptabulate \subsubsubsection{pdf_start_thread whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC width \NC number \NC the width (not used in calculations) \NC \NR -\NC height \NC number \NC the height (not used in calculations) \NC \NR -\NC depth \NC number \NC the depth (not used in calculations) \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 +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{width} \NC number \NC the width (not used in calculations) \NC \NR +\NC \type{height} \NC number \NC the height (not used in calculations) \NC \NR +\NC \type{depth} \NC number \NC the depth (not used in calculations) \NC \NR +\NC \type{named_id} \NC number \NC is \type {tread_id} a string value? \NC \NR +\NC \type{tread_id} \NC number \NC the thread id \NC \NR +\NC \NC string \NC the thread name \NC \NR +\NC \type{thread_attr} \NC number \NC extra thread information \NC \NR \stoptabulate \subsubsubsection{pdf_end_thread whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC \NC \NR \stoptabulate \subsubsubsection{pdf_colorstack whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC stack \NC number \NC colorstack id number \NC \NR -\NC command \NC number \NC command to execute \NC \NR -\NC data \NC string \NC data \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{stack} \NC number \NC colorstack id number \NC \NR +\NC \type{command} \NC number \NC command to execute \NC \NR +\NC \type{data} \NC string \NC data \NC \NR \stoptabulate \subsubsubsection{pdf_setmatrix whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR -\NC data \NC string \NC data \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR +\NC \type{data} \NC string \NC data \NC \NR \stoptabulate \subsubsubsection{pdf_save whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR \stoptabulate \subsubsubsection{pdf_restore whatsits} -\starttabulate[|lT|l|p|] -\NC \rmbf field \NC \bf type \NC \bf explanation \NC \NR -\NC attr \NC node \NC list of attributes \NC \NR +\starttabulate[|l|l|p|] +\BC field \BC type \BC explanation \NC \NR +\NC \type{attr} \NC node \NC list of attributes \NC \NR \stoptabulate \section{The \type {node} library} @@ -1537,26 +1561,29 @@ 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). -\subsubsection{\type {node.unprotect_glyphs}} +\subsubsection{\type {node.unprotect_glyphs} and \type {node.unprotect_glyph}} \startfunctioncall -node.unprotect_glyphs(<node> n) +node.unprotect_glyph(<node> n) +node.unprotect_glyphs(<node> n,[<node> n]) \stopfunctioncall Subtracts 256 from all glyph node subtypes. This and the next function are helpers to convert from \type {characters} to \type {glyphs} during node -processing. +processing. The second argument is option and indicates the end of a range. \subsubsection{\type {node.protect_glyphs} and \type {node.protect_glyph}} \startfunctioncall -node.protect_glyphs(<node> n) +node.protect_glyph(<node> n) +node.protect_glyphs(<node> n,[<node> n]) \stopfunctioncall Adds 256 to all glyph node subtypes in the node list starting at \type {n}, except that if the value is 1, it adds only 255. The special handling of 1 means that \type {characters} will become \type {glyphs} after subtraction of 256. A -single character can be marked by the singular call. +single character can be marked by the singular call. The second argument is +option and indicates the end of a range. \subsubsection{\type {node.last_node}} @@ -1600,8 +1627,7 @@ node.setglue(<node> n) node.setglue(<node> n,width,stretch,shrink,stretch_order,shrink_order) \stopfunctioncall -When you pass values, only arguments that are numbers -are assigned so +When you pass values, only arguments that are numbers are assigned so \starttyping node.setglue(n,655360,false,65536) @@ -1609,6 +1635,8 @@ node.setglue(n,655360,false,65536) will only adapt the width and shrink. +When a list node is passed, you set the glue, order and sign instead. + \subsubsection{\type {node.getglue}} The next call will return 5 values (or northing when no glue is passed). @@ -1621,6 +1649,9 @@ The next call will return 5 values (or northing when no glue is passed). When the second argument is false, only the width is returned (this is consistent with \type {tex.get}). +When a list node is passed, you get back the glue that is set, the order of that +glue and the sign. + \subsubsection{\type {node.is_zero_glue}} This function returns \type {true} when the width, stretch and shrink properties @@ -1677,7 +1708,7 @@ node.set_attribute(<node> n, <number> id, <number> val) \stopfunctioncall Sets the attribute with number \type {id} to the value \type {val}. Duplicate -assignments are ignored. {\em [needs explanation]} +assignments are ignored. \subsubsection{\type {node.unset_attribute}} @@ -1705,6 +1736,13 @@ tail node. node.slide(<node> n) \stopfunctioncall +After some callbacks automatic sliding takes place. This feature can be turned +off with \type {node.fix_node_lists(false)} but you better make sure then that +you don't mess up lists. In most cases \TEX\ itself only uses \type {next} +pointers but your other callbacks might expect proper \type {prev} pointers too. +Future versions of \LUATEX\ can add more checking but this will not influence +usage. + \subsubsection{\type {node.check_discretionary} and \type {node.check_discretionaries}} When you fool around with disc nodes you need to be aware of the fact that they @@ -1722,6 +1760,15 @@ node.check_discretionaries(<node> head) The plural variant runs over all disc nodes in a list, the singular variant checks one node only (it also checks if the node is a disc node). +\subsubsection{\type {node.flatten_discretionaries}} + +This function will remove the discretionaries in the list and inject the replace +field when set. + +\startfunctioncall +<node> head, count = node.flatten_discretionaries(<node> n) +\stopfunctioncall + \subsubsection{\type {node.family_font}} When you pass it a proper family identifier the next helper will return the font @@ -1733,6 +1780,22 @@ font field or getter because it will resolve the family automatically for noads. node.family_font(<integer> fam) \stopfunctioncall +\subsubsection{\type {node.set_synctex_fields} and \type {node.get_synctex_fields}} + +You can set and query the synctex fields, a file number aka tag and a line +number, for a glue, kern, hlist, vlist, rule and math nodes as well as glyph +nodes (although this last one are not used in native synctex). + +\startfunctioncall +node.set_synctex_fields(<integer> f, <integer> l) +<integer> f, <integer> l = + node.get_synctex_fields(<node> n) +\stopfunctioncall + +Of course you need to know what you're doing as no checking on sane values takes +place. Also, the synctex interpreter used in editors is rather peculiar and has +some assumptions (heuristics). + \section{Two access models} Deep down in \TEX\ a node has a number which is an numeric entry in a memory @@ -1801,24 +1864,24 @@ end Some accessors are used frequently and for these we provide more efficient helpers: -\starttabulate[|T|p|] -\NC getnext \NC parsing nodelist always involves this one \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 \OPENTYPE\ handling (glyph nodes are consulted a lot) \NC \NR -\NC getchar \NC idem and also in other places \NC \NR -\NC getwhd \NC returns the \type {width}, \type {height} and \type {depth} of a list, rule or - (unexpanded) glyph as well as glue (its spec is looked at) and unset nodes\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 -\NC getlist \NC we often parse nested lists so this is a convenient one too \NC \NR -\NC getleader \NC comparable to list, seldom used in \TEX\ (but needs frequent consulting - like lists; leaders could have been made a dedicated node type) \NC \NR -\NC getfield \NC generic getter, sufficient for the rest (other field names are - often shared so a specific getter makes no sense then) \NC \NR -\NC getbox \NC gets the given box (a list node) \NC \NR +\starttabulate[|t|p|] +\NC \type{getnext} \NC parsing nodelist always involves this one \NC \NR +\NC \type{getprev} \NC used less but is logical companion to \type {getnext} \NC \NR +\NC \type{getboth} \NC returns the next and prev pointer of a node \NC \NR +\NC \type{getid} \NC consulted a lot \NC \NR +\NC \type{getsubtype} \NC consulted less but also a topper \NC \NR +\NC \type{getfont} \NC used a lot in \OPENTYPE\ handling (glyph nodes are consulted a lot) \NC \NR +\NC \type{getchar} \NC idem and also in other places \NC \NR +\NC \type{getwhd} \NC returns the \type {width}, \type {height} and \type {depth} of a list, rule or + (unexpanded) glyph as well as glue (its spec is looked at) and unset nodes\NC \NR +\NC \type{getdisc} \NC returns the \type {pre}, \type {post} and \type {replace} fields and + optionally when true is passed also the tail fields. \NC \NR +\NC \type{getlist} \NC we often parse nested lists so this is a convenient one too \NC \NR +\NC \type{getleader} \NC comparable to list, seldom used in \TEX\ (but needs frequent consulting + like lists; leaders could have been made a dedicated node type) \NC \NR +\NC \type{getfield} \NC generic getter, sufficient for the rest (other field names are + often shared so a specific getter makes no sense then) \NC \NR +\NC \type{getbox} \NC gets the given box (a list node) \NC \NR \stoptabulate In the direct namespace there are more such helpers and most of them are @@ -1846,9 +1909,9 @@ consistency. You can of course always define additional accessor using \type \def\yes{$+$} \def\nop{$-$} -\starttabulate[|T|c|c|] +\starttabulate[|l|c|c|] \HL -\NC \bf function \NC \bf node \NC \bf direct \NC \NR +\BC function \BC node \BC direct \NC \NR \HL %NC \type {do_ligature_n} \NC \yes \NC \yes \NC \NR % was never documented and experimental \NC \type {check_discretionaries}\NC \yes \NC \yes \NC \NR @@ -1875,6 +1938,7 @@ consistency. You can of course always define additional accessor using \type \NC \type {getdepth} \NC \nop \NC \yes \NC \NR \NC \type {getdir} \NC \nop \NC \yes \NC \NR \NC \type {getdisc} \NC \yes \NC \yes \NC \NR +\NC \type {getfam} \NC \nop \NC \yes \NC \NR \NC \type {getfield} \NC \yes \NC \yes \NC \NR \NC \type {getfont} \NC \yes \NC \yes \NC \NR \NC \type {getglue} \NC \yes \NC \yes \NC \NR @@ -1966,10 +2030,13 @@ consistency. You can of course always define additional accessor using \type \NC \type {unprotect_glyphs} \NC \yes \NC \yes \NC \NR \NC \type {unset_attribute} \NC \yes \NC \yes \NC \NR \NC \type {usedlist} \NC \yes \NC \yes \NC \NR +\NC \type {uses_font} \NC \yes \NC \yes \NC \NR \NC \type {vpack} \NC \yes \NC \yes \NC \NR \NC \type {whatsitsubtypes} \NC \yes \NC \nop \NC \NR \NC \type {whatsits} \NC \yes \NC \nop \NC \NR \NC \type {write} \NC \yes \NC \yes \NC \NR +\NC \type {set_synctex_fields} \NC \yes \NC \yes \NC \NR +\NC \type {get_synctex_fields} \NC \yes \NC \yes \NC \NR \stoptabulate % \stopcolumns diff --git a/Master/texmf-dist/doc/luatex/base/luatex-style.tex b/Master/texmf-dist/doc/luatex/base/luatex-style.tex index 20e19510a8d..a277a117836 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-style.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-style.tex @@ -1,362 +1,376 @@ -\startenvironment luatex-style
-
-% todo: use \useMPlibrary[lua]
-
-\usemodule[abr-02]
-
-\setuplayout
- [height=middle,
- width=middle,
- backspace=2cm,
- topspace=10mm,
- bottomspace=10mm,
- header=10mm,
- footer=10mm,
- footerdistance=10mm,
- headerdistance=10mm]
-
-\setuppagenumbering
- [alternative=doublesided]
-
-\setuptolerance
- [stretch,tolerant]
-
-\setuptype
- [lines=hyphenated]
-
-\setuptyping
- [lines=hyphenated]
-
-\setupitemize
- [each]
- [packed]
-
-\setupwhitespace
- [medium]
-
-\startluacode
- local skipped = table.tohash { 'id', 'subtype', 'next', 'prev' }
-
- function document.functions.showfields(s)
- local t = string.split(s,',')
- 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
- end
-
- function document.functions.showid(s)
- local t = string.split(s,',')
- context('{tttf %s}',node.id(t[1]))
- if t[2] then
- context(', {tttf %s}',node.subtype(t[2]))
- end
- end
-
- function document.functions.showsubtypes(s)
- local s = node.subtypes(s)
- local d = false
- for k, v in table.sortedhash(s) do
- if d then
- context(', %s = {\\tttf %s}',k,v)
- else
- context('%s = {\\tttf %s}',k,v)
- d = true
- end
- end
- end
-\stopluacode
-
-\unexpanded\def\showfields #1{\ctxlua{document.functions.showfields("#1")}}
-\unexpanded\def\showid #1{\ctxlua{document.functions.showid("#1")}}
-\unexpanded\def\showsubtypes#1{\ctxlua{document.functions.showsubtypes("#1")}}
-
-\definecolor[blue] [b=.5]
-\definecolor[red] [r=.5]
-\definecolor[green] [g=.5]
-\definecolor[maincolor] [b=.5]
-\definecolor[keptcolor] [b=.5]
-\definecolor[othercolor][r=.5,g=.5]
-
-\setupbodyfont[modern] % we need this in examples so we predefine
-
-% \doifmodeelse {atpragma} {
-%
-% % \setupbodyfont
-% % [lucidaot,10pt]
-%
-% \setupbodyfont
-% [dejavu,10pt]
-%
-% \setuphead [chapter] [style=\bfd]
-% \setuphead [section] [style=\bfb]
-% \setuphead [subsection] [style=\bfa]
-% \setuphead [subsubsection][style=\bf]
-%
-% } {
-%
-% \definetypeface[mainfacenormal] [ss][sans] [iwona] [default]
-% \definetypeface[mainfacenormal] [rm][serif][palatino] [default]
-% \definetypeface[mainfacenormal] [tt][mono] [modern] [default][rscale=1.1]
-% \definetypeface[mainfacenormal] [mm][math] [iwona] [default]
-%
-% \definetypeface[mainfacemedium] [ss][sans] [iwona-medium][default]
-% \definetypeface[mainfacemedium] [rm][serif][palatino] [default]
-% \definetypeface[mainfacemedium] [tt][mono] [modern] [default][rscale=1.1]
-% \definetypeface[mainfacemedium] [mm][math] [iwona-medium][default]
-%
-% \setupbodyfont
-% [mainfacenormal,10pt]
-%
-% \setuphead [chapter] [style=\mainfacemedium\bfd]
-% \setuphead [section] [style=\mainfacemedium\bfb]
-% \setuphead [subsection] [style=\mainfacemedium\bfa]
-% \setuphead [subsubsection][style=\mainfacemedium\bf]
-%
-% }
-
-\writestatus{luatex manual}{we assume that dejavu math is available}
-
-\setupbodyfont % assumes dejavu-math
- [dejavu,10pt]
-
-\setuphead [chapter] [align={flushleft,broad},style=\bfd]
-\setuphead [section] [align={flushleft,broad},style=\bfb]
-\setuphead [subsection] [align={flushleft,broad},style=\bfa]
-\setuphead [subsubsection][align={flushleft,broad},style=\bf]
-
-\setuphead [chapter] [color=maincolor]
-\setuphead [section] [color=maincolor]
-\setuphead [subsection] [color=maincolor]
-\setuphead [subsubsection][color=maincolor]
-
-\definehead
- [remark]
- [subsubsubject]
-
-\setupheadertexts
- []
-
-\definemixedcolumns
- [twocolumns]
- [n=2,
- balance=yes,
- before=\blank,
- after=\blank]
-
-\definemixedcolumns
- [threecolumns]
- [twocolumns]
- [n=3]
-
-\definemixedcolumns
- [fourcolumns]
- [threecolumns]
- [n=4]
-
-% if we do this we also need to do it in table cells
-%
-% \setuptyping
-% [color=maincolor]
-%
-% \setuptype
-% [color=maincolor]
-
-\definetyping
- [functioncall]
-
-\startMPdefinitions
-
- color luaplanetcolor ; luaplanetcolor := \MPcolor{maincolor} ;
- color luaholecolor ; luaholecolor := white ;
- numeric luaextraangle ; luaextraangle := 0 ;
- numeric luaorbitfactor ; luaorbitfactor := .25 ;
-
- vardef lualogo = image (
-
- % Graphic design by A. Nakonechnyj. Copyright (c) 1998, All rights reserved.
-
- save d, r, p ; numeric d, r, p ;
-
- d := sqrt(2)/4 ; r := 1/4 ; p := r/8 ;
-
- fill fullcircle scaled 1
- withcolor luaplanetcolor ;
- draw fullcircle rotated 40.5 scaled (1+r)
- dashed evenly scaled p
- withpen pencircle scaled (p/2)
- withcolor (luaorbitfactor * luaholecolor) ;
- fill fullcircle scaled r shifted (d+1/8,d+1/8)
- rotated - luaextraangle
- withcolor luaplanetcolor ;
- fill fullcircle scaled r shifted (d-1/8,d-1/8)
- withcolor luaholecolor ;
- luaorbitfactor := .25 ;
- ) enddef ;
-
-\stopMPdefinitions
-
-\startuseMPgraphic{luapage}
- StartPage ;
-
- fill Page withcolor \MPcolor{othercolor} ;
-
- luaorbitfactor := 1 ;
- picture p ; p := lualogo xsized (3PaperWidth/5) ;
- draw p shifted center Page shifted (0,-.5ypart center ulcorner p) ;
-
- StopPage ;
-\stopuseMPgraphic
-
-% \starttexdefinition luaextraangle
-% % we can also just access the last page and so in mp directly
-% \ctxlua {
-% context(\lastpage == 0 and 0 or \realfolio*360/\lastpage)
-% }
-% \stoptexdefinition
-
-\startuseMPgraphic{luanumber}
- % luaextraangle := \luaextraangle;
- luaextraangle := if (LastPageNumber == 0) : 0 else : (RealPageNumber / LastPageNumber) * 360 fi;
- luaorbitfactor := 0.25 ;
- picture p ; p := lualogo ;
- setbounds p to boundingbox fullcircle ;
- draw p ysized 1cm ;
-\stopuseMPgraphic
-
-\definelayer
- [page]
- [width=\paperwidth,
- height=\paperheight]
-
-\setupbackgrounds
- [leftpage]
- [background=page]
-
-\setupbackgrounds
- [rightpage]
- [background=page]
-
-\startsetups pagenumber:right
- \setlayerframed
- [page]
- [preset=rightbottom,offset=1cm]
- [frame=off,height=1cm,offset=overlay]
- {\useMPgraphic{luanumber}}
- \setlayerframed
- [page]
- [preset=rightbottom,offset=1cm,x=1.5cm]
- [frame=off,height=1cm,width=1cm,offset=overlay]
- {\pagenumber}
- \setlayerframed
- [page]
- [preset=rightbottom,offset=1cm,x=2.5cm]
- [frame=off,height=1cm,offset=overlay]
- {\getmarking[chapter]}
-\stopsetups
-
-\startsetups pagenumber:left
- \setlayerframed
- [page]
- [preset=leftbottom,offset=1cm,x=2.5cm]
- [frame=off,height=1cm,offset=overlay]
- {\getmarking[chapter]}
- \setlayerframed
- [page]
- [preset=leftbottom,offset=1cm,x=1.5cm]
- [frame=off,height=1cm,width=1cm,offset=overlay]
- {\pagenumber}
- \setlayerframed
- [page]
- [preset=leftbottom,offset=1cm]
- [frame=off,height=1cm,offset=overlay]
- {\useMPgraphic{luanumber}}
-\stopsetups
-
-\unexpanded\def\nonterminal#1>{\mathematics{\langle\hbox{\rm #1}\rangle}}
-
-% taco's brainwave -) .. todo: create a typing variant so that we can avoid the !crlf
-
-\newcatcodetable\syntaxcodetable
-
-\unexpanded\def\makesyntaxcodetable
- {\begingroup
- \catcode`\<=13 \catcode`\|=12
- \catcode`\!= 0 \catcode`\\=12
- \savecatcodetable\syntaxcodetable
- \endgroup}
-
-\makesyntaxcodetable
-
-\unexpanded\def\startsyntax {\begingroup\catcodetable\syntaxcodetable \dostartsyntax}
-\unexpanded\def\syntax {\begingroup\catcodetable\syntaxcodetable \dosyntax}
- \let\stopsyntax \relax
-
-\unexpanded\def\syntaxenvbody#1%
- {\par
- \tt
- \startnarrower
- \maincolor #1
- \stopnarrower
- \par}
-
-\unexpanded\def\syntaxbody#1%
- {\begingroup
- \maincolor \tt #1%
- \endgroup}
-
-\bgroup \catcodetable\syntaxcodetable
-
-!gdef!dostartsyntax#1\stopsyntax{!let<!nonterminal!syntaxenvbody{#1}!endgroup}
-!gdef!dosyntax #1{!let<!nonterminal!syntaxbody{#1}!endgroup}
-
-!egroup
-
-\definetyping
- [texsyntax]
- [color=maincolor]
-
-% end of wave
-
-\setupinteraction
- [state=start,
- focus=standard,
- style=,
- color=,
- contrastcolor=]
-
-\placebookmarks
- [chapter,section,subsection]
-
-\setuplist
- [chapter,section,subsection,subsubsection]
- [interaction=all,
- 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
-% [option=bookmark]
-
-\stopenvironment
+\startenvironment luatex-style + +% todo: use \useMPlibrary[lua] + +\usemodule[abr-02] + +\setuplayout + [height=middle, + width=middle, + backspace=2cm, + topspace=10mm, + bottomspace=10mm, + header=10mm, + footer=10mm, + footerdistance=10mm, + headerdistance=10mm] + +\setuppagenumbering + [alternative=doublesided] + +\setuptolerance + [stretch,tolerant] + +\setuptype + [lines=hyphenated] + +\setuptyping + [lines=hyphenated] + +\setupitemize + [each] + [packed] + +\setupwhitespace + [medium] + +\startluacode + local skipped = table.tohash { 'id', 'subtype', 'next', 'prev' } + + function document.functions.showfields(s) + local t = string.split(s,',') + 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 + end + + function document.functions.showid(s) + local t = string.split(s,',') + context('{tttf %s}',node.id(t[1])) + if t[2] then + context(', {tttf %s}',node.subtype(t[2])) + end + end + + function document.functions.showsubtypes(s) + local s = node.subtypes(s) + local d = false + for k, v in table.sortedhash(s) do + if d then + context(', %s = {\\tttf %s}',k,v) + else + context('%s = {\\tttf %s}',k,v) + d = true + end + end + end +\stopluacode + +\unexpanded\def\showfields #1{\ctxlua{document.functions.showfields("#1")}} +\unexpanded\def\showid #1{\ctxlua{document.functions.showid("#1")}} +\unexpanded\def\showsubtypes#1{\ctxlua{document.functions.showsubtypes("#1")}} + +\definecolor[blue] [b=.5] +\definecolor[red] [r=.5] +\definecolor[green] [g=.5] +\definecolor[maincolor] [b=.5] +\definecolor[keptcolor] [b=.5] +\definecolor[othercolor][r=.5,g=.5] + +\usebodyfont[lucidaot] +\usebodyfont[pagella] +\usebodyfont[cambria] +%usebodyfont[dejavu] +\usebodyfont[modern] % we need this in examples so we predefine + +% \doifmodeelse {atpragma} { +% +% % \setupbodyfont +% % [lucidaot,10pt] +% +% \setupbodyfont +% [dejavu,10pt] +% +% \setuphead [chapter] [style=\bfd] +% \setuphead [section] [style=\bfb] +% \setuphead [subsection] [style=\bfa] +% \setuphead [subsubsection][style=\bf] +% +% } { +% +% \definetypeface[mainfacenormal] [ss][sans] [iwona] [default] +% \definetypeface[mainfacenormal] [rm][serif][palatino] [default] +% \definetypeface[mainfacenormal] [tt][mono] [modern] [default][rscale=1.1] +% \definetypeface[mainfacenormal] [mm][math] [iwona] [default] +% +% \definetypeface[mainfacemedium] [ss][sans] [iwona-medium][default] +% \definetypeface[mainfacemedium] [rm][serif][palatino] [default] +% \definetypeface[mainfacemedium] [tt][mono] [modern] [default][rscale=1.1] +% \definetypeface[mainfacemedium] [mm][math] [iwona-medium][default] +% +% \setupbodyfont +% [mainfacenormal,10pt] +% +% \setuphead [chapter] [style=\mainfacemedium\bfd] +% \setuphead [section] [style=\mainfacemedium\bfb] +% \setuphead [subsection] [style=\mainfacemedium\bfa] +% \setuphead [subsubsection][style=\mainfacemedium\bf] +% +% } + +\writestatus{luatex manual}{we assume that dejavu math is available} + +\setupbodyfont % assumes dejavu-math + [dejavu,10pt] + +\setuphead [chapter] [align={flushleft,broad},style=\bfd] +\setuphead [section] [align={flushleft,broad},style=\bfb] +\setuphead [subsection] [align={flushleft,broad},style=\bfa] +\setuphead [subsubsection][align={flushleft,broad},style=\bf] + +\setuphead [chapter] [color=maincolor] +\setuphead [section] [color=maincolor] +\setuphead [subsection] [color=maincolor] +\setuphead [subsubsection][color=maincolor] + +\definehead + [remark] + [subsubsubject] + +\setupheadertexts + [] + +\definemixedcolumns + [twocolumns] + [n=2, + balance=yes, + before=\blank, + after=\blank] + +\definemixedcolumns + [threecolumns] + [twocolumns] + [n=3] + +\definemixedcolumns + [fourcolumns] + [threecolumns] + [n=4] + +% if we do this we also need to do it in table cells +% +% \setuptyping +% [color=maincolor] +% +% \setuptype +% [color=maincolor] + +\definetyping + [functioncall] + +\startMPdefinitions + + color luaplanetcolor ; luaplanetcolor := \MPcolor{maincolor} ; + color luaholecolor ; luaholecolor := white ; + numeric luaextraangle ; luaextraangle := 0 ; + numeric luaorbitfactor ; luaorbitfactor := .25 ; + + vardef lualogo = image ( + + % Graphic design by A. Nakonechnyj. Copyright (c) 1998, All rights reserved. + + save d, r, p ; numeric d, r, p ; + + d := sqrt(2)/4 ; r := 1/4 ; p := r/8 ; + + fill fullcircle scaled 1 + withcolor luaplanetcolor ; + draw fullcircle rotated 40.5 scaled (1+r) + dashed evenly scaled p + withpen pencircle scaled (p/2) + withcolor (luaorbitfactor * luaholecolor) ; + fill fullcircle scaled r shifted (d+1/8,d+1/8) + rotated - luaextraangle + withcolor luaplanetcolor ; + fill fullcircle scaled r shifted (d-1/8,d-1/8) + withcolor luaholecolor ; + luaorbitfactor := .25 ; + ) enddef ; + +\stopMPdefinitions + +\startuseMPgraphic{luapage} + StartPage ; + + fill Page withcolor \MPcolor{othercolor} ; + + luaorbitfactor := 1 ; + picture p ; p := lualogo xsized (3PaperWidth/5) ; + draw p shifted center Page shifted (0,-.85ypart center ulcorner p) ; + + StopPage ; +\stopuseMPgraphic + +% \starttexdefinition luaextraangle +% % we can also just access the last page and so in mp directly +% \ctxlua { +% context(\lastpage == 0 and 0 or \realfolio*360/\lastpage) +% } +% \stoptexdefinition + +\startuseMPgraphic{luanumber} + % luaextraangle := \luaextraangle; + luaextraangle := if (LastPageNumber == 0) : 0 else : (RealPageNumber / LastPageNumber) * 360 fi; + luaorbitfactor := 0.25 ; + picture p ; p := lualogo ; + setbounds p to boundingbox fullcircle ; + draw p ysized 1cm ; +\stopuseMPgraphic + +\definelayer + [page] + [width=\paperwidth, + height=\paperheight] + +\setupbackgrounds + [leftpage] + [background=page] + +\setupbackgrounds + [rightpage] + [background=page] + +\startsetups pagenumber:right + \setlayerframed + [page] + [preset=rightbottom,offset=1cm] + [frame=off,height=1cm,offset=overlay] + {\useMPgraphic{luanumber}} + \setlayerframed + [page] + [preset=rightbottom,offset=1cm,x=1.5cm] + [frame=off,height=1cm,width=1cm,offset=overlay] + {\pagenumber} + \setlayerframed + [page] + [preset=rightbottom,offset=1cm,x=2.5cm] + [frame=off,height=1cm,offset=overlay] + {\getmarking[chapter]} +\stopsetups + +\startsetups pagenumber:left + \setlayerframed + [page] + [preset=leftbottom,offset=1cm,x=2.5cm] + [frame=off,height=1cm,offset=overlay] + {\getmarking[chapter]} + \setlayerframed + [page] + [preset=leftbottom,offset=1cm,x=1.5cm] + [frame=off,height=1cm,width=1cm,offset=overlay] + {\pagenumber} + \setlayerframed + [page] + [preset=leftbottom,offset=1cm] + [frame=off,height=1cm,offset=overlay] + {\useMPgraphic{luanumber}} +\stopsetups + +\unexpanded\def\nonterminal#1>{\mathematics{\langle\hbox{\rm #1}\rangle}} + +% taco's brainwave -) .. todo: create a typing variant so that we can avoid the !crlf + +\newcatcodetable\syntaxcodetable + +\unexpanded\def\makesyntaxcodetable + {\begingroup + \catcode`\<=13 \catcode`\|=12 + \catcode`\!= 0 \catcode`\\=12 + \savecatcodetable\syntaxcodetable + \endgroup} + +\makesyntaxcodetable + +\unexpanded\def\startsyntax {\begingroup\catcodetable\syntaxcodetable \dostartsyntax} +\unexpanded\def\syntax {\begingroup\catcodetable\syntaxcodetable \dosyntax} + \let\stopsyntax \relax + +\unexpanded\def\syntaxenvbody#1% + {\par + \tt + \startnarrower + \maincolor #1 + \stopnarrower + \par} + +\unexpanded\def\syntaxbody#1% + {\begingroup + \maincolor \tt #1% + \endgroup} + +\bgroup \catcodetable\syntaxcodetable + +!gdef!dostartsyntax#1\stopsyntax{!let<!nonterminal!syntaxenvbody{#1}!endgroup} +!gdef!dosyntax #1{!let<!nonterminal!syntaxbody{#1}!endgroup} + +!egroup + +\definetyping + [texsyntax] + [color=maincolor] + +% end of wave + +\setupinteraction + [state=start, + focus=standard, + style=, + color=, + contrastcolor=] + +\placebookmarks + [chapter,section,subsection] + +\setuplist + [chapter,section,subsection,subsubsection] + [interaction=all, + width=3em] + +\setuplist + [chapter] + [style=bold, + color=keptcolor] + +\setuplist + [subsection,subsubsection] + [margin=3em, + width=5em] + +\definestartstop + [notabene] + [style=slanted] + +\definestartstop + [preamble] + [style=normal, + before=\blank, + after=\blank] + +% Hans doesn't like the bookmarks opening by default so we comment this: +% +% \setupinteractionscreen +% [option=bookmark] + +\stopenvironment diff --git a/Master/texmf-dist/doc/luatex/base/luatex-tex.tex b/Master/texmf-dist/doc/luatex/base/luatex-tex.tex index 650f3ca056d..2dd9521c4dd 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-tex.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-tex.tex @@ -97,87 +97,87 @@ index into \type {status}. The current list is: -\starttabulate[|lT|p|] -\NC \rmbf key \NC \bf explanation \NC \NR -\NC banner \NC terminal display banner \NC \NR -\NC best_page_break \NC the current best break (a node) \NR \NR -\NC buf_size \NC current allocated size of the line buffer \NC \NR -\NC callbacks \NC total number of executed callbacks so far \NC \NR -\NC cs_count \NC number of control sequences \NC \NR -\NC dest_names_size \NC \PDF\ destination table size \NC \NR -\NC dvi_gone \NC written \DVI\ bytes \NC \NR -\NC dvi_ptr \NC not yet written \DVI\ bytes \NC \NR -\NC dyn_used \NC token (multi|-|word) memory in use \NC \NR -\NC filename \NC name of the current input file \NC \NR -\NC fix_mem_end \NC maximum number of used tokens \NC \NR -\NC fix_mem_min \NC minimum number of allocated words for tokens \NC \NR -\NC fix_mem_max \NC maximum number of allocated words for tokens \NC \NR -\NC font_ptr \NC number of active fonts \NC \NR -\NC hash_extra \NC extra allowed hash \NC \NR -\NC hash_size \NC size of hash \NC \NR -\NC indirect_callbacks \NC number of those that were themselves a result of other callbacks (e.g. file readers) \NC \NR -\NC ini_version \NC \type {true} if this is an \INITEX\ run \NC \NR -\NC init_pool_ptr \NC \INITEX\ string pool index \NC \NR -\NC init_str_ptr \NC number of \INITEX\ strings \NC \NR -\NC input_ptr \NC th elevel of input we're at \NC \NR -\NC inputid \NC numeric id of the current input \NC \NR -\NC largest_used_mark \NC max referenced marks class \NC \NR -\NC lasterrorcontext \NC last error context string (with newlines) \NC \NR -\NC lasterrorstring \NC last \TEX\ error string \NC \NR -\NC lastluaerrorstring \NC last \LUA\ error string \NC \NR -\NC lastwarningstring \NC last warning tag, normally an indication of in what part\NC \NR -\NC lastwarningtag \NC last warning string\NC \NR -\NC linenumber \NC location in the current input file \NC \NR -\NC log_name \NC name of the log file \NC \NR -\NC luabytecode_bytes \NC number of bytes in \LUA\ bytecode registers \NC \NR -\NC luabytecodes \NC number of active \LUA\ bytecode registers \NC \NR -\NC luastate_bytes \NC number of bytes in use by \LUA\ interpreters \NC \NR -\NC luatex_engine \NC the \LUATEX\ engine identifier \NC \NR -\NC luatex_hashchars \NC length to which \LUA\ hashes strings ($2^n$) \NC \NR -\NC luatex_hashtype \NC the hash method used (in \LUAJITTEX) \NC \NR -\NC luatex_revision \NC the \LUATEX\ revision string \NC \NR -\NC luatex_revision \NC the \LUATEX\ revision string \NC \NR -\NC luatex_version \NC the \LUATEX\ version number \NC \NR -\NC max_buf_stack \NC max used buffer position \NC \NR -\NC max_in_stack \NC max used input stack entries \NC \NR -\NC max_nest_stack \NC max used nesting stack entries \NC \NR -\NC max_param_stack \NC max used parameter stack entries \NC \NR -\NC max_save_stack \NC max used save stack entries \NC \NR -\NC max_strings \NC maximum allowed strings \NC \NR -\NC nest_size \NC nesting stack size \NC \NR -\NC node_mem_usage \NC a string giving insight into currently used nodes \NC \NR -\NC obj_ptr \NC max \PDF\ object pointer \NC \NR -\NC obj_tab_size \NC \PDF\ object table size \NC \NR -\NC output_active \NC \type {true} if the \type {\output} routine is active \NC \NR -\NC output_file_name \NC name of the \PDF\ or \DVI\ file \NC \NR -\NC param_size \NC parameter stack size \NC \NR -\NC pdf_dest_names_ptr \NC max \PDF\ destination pointer \NC \NR -\NC pdf_gone \NC written \PDF\ bytes \NC \NR -\NC pdf_mem_ptr \NC max \PDF\ memory used \NC \NR -\NC pdf_mem_size \NC \PDF\ memory size \NC \NR -\NC pdf_os_cntr \NC max \PDF\ object stream pointer \NC \NR -\NC pdf_os_objidx \NC \PDF\ object stream index \NC \NR -\NC pdf_ptr \NC not yet written \PDF\ bytes \NC \NR -\NC pool_ptr \NC string pool index \NC \NR -\NC pool_size \NC current size allocated for string characters \NC \NR -\NC save_size \NC save stack size \NC \NR -\NC shell_escape \NC \type {0} means disabled, \type {1} means anything is permitted and \type {2} is restricted \NC \NR -\NC safer_option \NC \type {1} means safer is enforced \NC \NR -\NC kpse_used \NC \type {1} means that kpse is used \NC \NR -\NC stack_size \NC input stack size \NC \NR -\NC str_ptr \NC number of strings \NC \NR -\NC total_pages \NC number of written pages \NC \NR -\NC var_mem_max \NC number of allocated words for nodes \NC \NR -\NC var_used \NC variable (one|-|word) memory in use \NC \NR -\NC lc_collate \NC the value of \type {LC_COLLATE} at startup time (becomes \type {C} at startup) \NC \NR -\NC lc_ctype \NC the value of \type {LC_CTYPE} at startup time (becomes \type {C} at startup) \NC \NR -%NC lc_monetary \NC the value of \type {LC_MONETARY} at startup time \NC \NR -\NC lc_numeric \NC the value of \type {LC_NUMERIC} at startup time \NC \NR -%NC lc_time \NC the value of \type {LC_TIME} at startup time (becomes \type {C} at startup) \NC \NR +\starttabulate[|l|p|] +\BC key \BC explanation \NC \NR +\NC \type{banner} \NC terminal display banner \NC \NR +\NC \type{best_page_break} \NC the current best break (a node) \NR \NR +\NC \type{buf_size} \NC current allocated size of the line buffer \NC \NR +\NC \type{callbacks} \NC total number of executed callbacks so far \NC \NR +\NC \type{cs_count} \NC number of control sequences \NC \NR +\NC \type{dest_names_size} \NC \PDF\ destination table size \NC \NR +\NC \type{dvi_gone} \NC written \DVI\ bytes \NC \NR +\NC \type{dvi_ptr} \NC not yet written \DVI\ bytes \NC \NR +\NC \type{dyn_used} \NC token (multi|-|word) memory in use \NC \NR +\NC \type{filename} \NC name of the current input file \NC \NR +\NC \type{fix_mem_end} \NC maximum number of used tokens \NC \NR +\NC \type{fix_mem_min} \NC minimum number of allocated words for tokens \NC \NR +\NC \type{fix_mem_max} \NC maximum number of allocated words for tokens \NC \NR +\NC \type{font_ptr} \NC number of active fonts \NC \NR +\NC \type{hash_extra} \NC extra allowed hash \NC \NR +\NC \type{hash_size} \NC size of hash \NC \NR +\NC \type{indirect_callbacks} \NC number of those that were themselves a result of other callbacks (e.g. file readers) \NC \NR +\NC \type{ini_version} \NC \type {true} if this is an \INITEX\ run \NC \NR +\NC \type{init_pool_ptr} \NC \INITEX\ string pool index \NC \NR +\NC \type{init_str_ptr} \NC number of \INITEX\ strings \NC \NR +\NC \type{input_ptr} \NC th elevel of input we're at \NC \NR +\NC \type{inputid} \NC numeric id of the current input \NC \NR +\NC \type{largest_used_mark} \NC max referenced marks class \NC \NR +\NC \type{lasterrorcontext} \NC last error context string (with newlines) \NC \NR +\NC \type{lasterrorstring} \NC last \TEX\ error string \NC \NR +\NC \type{lastluaerrorstring} \NC last \LUA\ error string \NC \NR +\NC \type{lastwarningstring} \NC last warning tag, normally an indication of in what part\NC \NR +\NC \type{lastwarningtag} \NC last warning string\NC \NR +\NC \type{linenumber} \NC location in the current input file \NC \NR +\NC \type{log_name} \NC name of the log file \NC \NR +\NC \type{luabytecode_bytes} \NC number of bytes in \LUA\ bytecode registers \NC \NR +\NC \type{luabytecodes} \NC number of active \LUA\ bytecode registers \NC \NR +\NC \type{luastate_bytes} \NC number of bytes in use by \LUA\ interpreters \NC \NR +\NC \type{luatex_engine} \NC the \LUATEX\ engine identifier \NC \NR +\NC \type{luatex_hashchars} \NC length to which \LUA\ hashes strings ($2^n$) \NC \NR +\NC \type{luatex_hashtype} \NC the hash method used (in \LUAJITTEX) \NC \NR +\NC \type{luatex_revision} \NC the \LUATEX\ revision string \NC \NR +\NC \type{luatex_revision} \NC the \LUATEX\ revision string \NC \NR +\NC \type{luatex_version} \NC the \LUATEX\ version number \NC \NR +\NC \type{max_buf_stack} \NC max used buffer position \NC \NR +\NC \type{max_in_stack} \NC max used input stack entries \NC \NR +\NC \type{max_nest_stack} \NC max used nesting stack entries \NC \NR +\NC \type{max_param_stack} \NC max used parameter stack entries \NC \NR +\NC \type{max_save_stack} \NC max used save stack entries \NC \NR +\NC \type{max_strings} \NC maximum allowed strings \NC \NR +\NC \type{nest_size} \NC nesting stack size \NC \NR +\NC \type{node_mem_usage} \NC a string giving insight into currently used nodes \NC \NR +\NC \type{obj_ptr} \NC max \PDF\ object pointer \NC \NR +\NC \type{obj_tab_size} \NC \PDF\ object table size \NC \NR +\NC \type{output_active} \NC \type {true} if the \type {\output} routine is active \NC \NR +\NC \type{output_file_name} \NC name of the \PDF\ or \DVI\ file \NC \NR +\NC \type{param_size} \NC parameter stack size \NC \NR +\NC \type{pdf_dest_names_ptr} \NC max \PDF\ destination pointer \NC \NR +\NC \type{pdf_gone} \NC written \PDF\ bytes \NC \NR +\NC \type{pdf_mem_ptr} \NC max \PDF\ memory used \NC \NR +\NC \type{pdf_mem_size} \NC \PDF\ memory size \NC \NR +\NC \type{pdf_os_cntr} \NC max \PDF\ object stream pointer \NC \NR +\NC \type{pdf_os_objidx} \NC \PDF\ object stream index \NC \NR +\NC \type{pdf_ptr} \NC not yet written \PDF\ bytes \NC \NR +\NC \type{pool_ptr} \NC string pool index \NC \NR +\NC \type{pool_size} \NC current size allocated for string characters \NC \NR +\NC \type{save_size} \NC save stack size \NC \NR +\NC \type{shell_escape} \NC \type {0} means disabled, \type {1} means anything is permitted, and \type {2} is restricted \NC \NR +\NC \type{safer_option} \NC \type {1} means safer is enforced \NC \NR +\NC \type{kpse_used} \NC \type {1} means that kpse is used \NC \NR +\NC \type{stack_size} \NC input stack size \NC \NR +\NC \type{str_ptr} \NC number of strings \NC \NR +\NC \type{total_pages} \NC number of written pages \NC \NR +\NC \type{var_mem_max} \NC number of allocated words for nodes \NC \NR +\NC \type{var_used} \NC variable (one|-|word) memory in use \NC \NR +\NC \type{lc_collate} \NC the value of \type {LC_COLLATE} at startup time (becomes \type {C} at startup) \NC \NR +\NC \type{lc_ctype} \NC the value of \type {LC_CTYPE} at startup time (becomes \type {C} at startup) \NC \NR +%NC \type{lc_monetary} \NC the value of \type {LC_MONETARY} at startup time \NC \NR +\NC \type{lc_numeric} \NC the value of \type {LC_NUMERIC} at startup time \NC \NR +%NC \type{lc_time} \NC the value of \type {LC_TIME} at startup time (becomes \type {C} at startup) \NC \NR \stoptabulate The error and warning messages can be wiped with the \type {resetmessages} -function. +function. A return value can be set with \type {setexitcode}. \section{The \type {tex} library} @@ -225,10 +225,13 @@ is a \type {glue_spec} node btu when you pass \type {false} as last argument to \type {tex.get} you get the width of the glue and when you pass \type {true} you get all five values. Otherwise you get a node which is a copy of the internal value so you are responsible for its freeing at the \LUA\ end. When you set a -glue quantity you can either pass a \type {glue_spec} or upto five numbers. +glue quantity you can either pass a \type {glue_spec} or upto five numbers. If +you pass \type {true} to \type {get} you get 5 values returned for a glue and +when you pass \type {false} you only get the width returned. For the registers you can use \type {getskip} (node), \type {getglue} (numbers) -\type {setskip} (node) and \type {setglue} (numbers). +\type {setskip} (node) and \type {setglue} (numbers). If you pass \type {false} +as second argument to \type {getglue} you only get the width returned. There are also dedicated setters, getters and checkers: @@ -776,13 +779,14 @@ called xforms in \PDF). You can (re)use the box with \type {\useboxresource} or by creating a rule node with subtype~2. \starttyping -local index = tex.saveboxresource(n,attributes,resources,immediate,type) +local index = tex.saveboxresource(n,attributes,resources,immediate,type,margin) \stoptyping The optional second and third arguments are strings, the fourth is a boolean. The fifth argument is a type. When set to non|-|zero the \type {/Type} entry is omitted. A value of 1 or 3 still writes a \type {/BBox}, while 2 or 3 will write -a \type {/Matrix}. +a \type {/Matrix}. The sixth argument is the (virtual) margin that extends beyond +the effective boundingbox as seen by \TEX. You can generate the reference (a rule type) with: @@ -795,9 +799,11 @@ following is just a bonus (no dimensions returned means that the resource is unknown): \starttyping -local w, h, d = tex.getboxresourcedimensions(n) +local w, h, d, m = tex.getboxresourcedimensions(n) \stoptyping +This returns the width, height, depth and margin of the resource. + You can split a box: \starttyping @@ -877,18 +883,18 @@ parameters. The virtual table \type {tex.lists} contains the set of internal registers that keep track of building page lists. -\starttabulate[|lT|p|] -\NC \bf field \NC \bf description \NC \NR -\NC page_ins_head \NC circular list of pending insertions \NC \NR -\NC contrib_head \NC the recent contributions \NC \NR -\NC page_head \NC the current page content \NC \NR -%NC temp_head \NC \NC \NR -\NC hold_head \NC used for held-over items for next page \NC \NR -\NC adjust_head \NC head of the current \type {\vadjust} list \NC \NR -\NC pre_adjust_head \NC head of the current \type {\vadjust pre} list \NC \NR -%NC align_head \NC \NC \NR -\NC page_discards_head \NC head of the discarded items of a page break \NC \NR -\NC split_discards_head \NC head of the discarded items in a vsplit \NC \NR +\starttabulate[|l|p|] +\BC field \BC description \NC \NR +\NC \type{page_ins_head} \NC circular list of pending insertions \NC \NR +\NC \type{contrib_head} \NC the recent contributions \NC \NR +\NC \type{page_head} \NC the current page content \NC \NR +%NC \type{temp_head} \NC \NC \NR +\NC \type{hold_head} \NC used for held-over items for next page \NC \NR +\NC \type{adjust_head} \NC head of the current \type {\vadjust} list \NC \NR +\NC \type{pre_adjust_head} \NC head of the current \type {\vadjust pre} list \NC \NR +%NC \type{align_head} \NC \NC \NR +\NC \type{page_discards_head} \NC head of the discarded items of a page break \NC \NR +\NC \type{split_discards_head} \NC head of the discarded items in a vsplit \NC \NR \stoptabulate \subsection{Semantic nest levels} @@ -906,31 +912,31 @@ outermost (main vertical list) level. The known fields are: -\starttabulate[|lT|l|l|p|] -\NC \rmbf key \NC \bf type \NC \bf modes \NC \bf explanation \NC \NR -\NC mode \NC number \NC all \NC a number representing the main mode at this level: - \type {0} = no mode (this happens during \type {\write}), - \type {1} = vertical, - \type {127} = horizontal, - \type {253} = display math, - \type {-1} = internal vertical, - \type {-127} = restricted horizontal, - \type {-253} = inline math \NC \NR -\NC modeline \NC number \NC all \NC source input line where this mode was entered in, - negative inside the output routine \NC \NR -\NC head \NC node \NC all \NC the head of the current list \NC \NR -\NC tail \NC node \NC all \NC the tail of the current list \NC \NR -\NC prevgraf \NC number \NC vmode \NC number of lines in the previous paragraph \NC \NR -\NC prevdepth \NC number \NC vmode \NC depth of the previous paragraph \NC \NR -\NC spacefactor \NC number \NC hmode \NC the current space factor \NC \NR -\NC dirs \NC node \NC hmode \NC used for temporary storage by the line break algorithm\NC \NR -\NC noad \NC node \NC mmode \NC used for temporary storage of a pending fraction numerator, - for \type {\over} etc. \NC \NR -\NC delimptr \NC node \NC mmode \NC used for temporary storage of the previous math delimiter, - for \type {\middle} \NC \NR -\NC mathdir \NC boolean \NC mmode \NC true when during math processing the \type {\mathdir} is not - the same as the surrounding \type {\textdir} \NC \NR -\NC mathstyle \NC number \NC mmode \NC the current \type {\mathstyle} \NC \NR +\starttabulate[|l|l|l|p|] +\BC key \BC type \BC modes \BC explanation \NC \NR +\NC \type{mode} \NC number \NC all \NC a number representing the main mode at this level: + \type {0} = no mode (this happens during \type {\write}), + \type {1} = vertical, + \type {127} = horizontal, + \type {253} = display math, + \type {-1} = internal vertical, + \type {-127} = restricted horizontal, + \type {-253} = inline math \NC \NR +\NC \type{modeline} \NC number \NC all \NC source input line where this mode was entered in, + negative inside the output routine \NC \NR +\NC \type{head} \NC node \NC all \NC the head of the current list \NC \NR +\NC \type{tail} \NC node \NC all \NC the tail of the current list \NC \NR +\NC \type{prevgraf} \NC number \NC vmode \NC number of lines in the previous paragraph \NC \NR +\NC \type{prevdepth} \NC number \NC vmode \NC depth of the previous paragraph \NC \NR +\NC \type{spacefactor} \NC number \NC hmode \NC the current space factor \NC \NR +\NC \type{dirs} \NC node \NC hmode \NC used for temporary storage by the line break algorithm\NC \NR +\NC \type{noad} \NC node \NC mmode \NC used for temporary storage of a pending fraction numerator, + for \type {\over} etc. \NC \NR +\NC \type{delimptr} \NC node \NC mmode \NC used for temporary storage of the previous math delimiter, + for \type {\middle} \NC \NR +\NC \type{mathdir} \NC boolean \NC mmode \NC true when during math processing the \type {\mathdir} is not + the same as the surrounding \type {\textdir} \NC \NR +\NC \type{mathstyle} \NC number \NC mmode \NC the current \type {\mathstyle} \NC \NR \stoptabulate \subsection[sec:luaprint]{Print functions} @@ -1172,7 +1178,7 @@ local redefinitions: it is strictly a dump of the hash table. You can use \type in a created table equals \type {123}, you have the \type {cmdname} value \type {undefined_cs}. -\subsection[luaprimitives]{Functions for dealing with primitives } +\subsection[luaprimitives]{Functions for dealing with primitives} \subsubsection{\type {tex.enableprimitives}} @@ -1252,7 +1258,7 @@ end \stopluacode \starttabulate[|l|pl|] -\NC \bf name\NC \bf values \NC \NR +\BC name \BC values \NC \NR \NC tex \NC \ctxlua{document.showprimitives('tex') } \NC \NR \NC core \NC \ctxlua{document.showprimitives('core') } \NC \NR \NC etex \NC \ctxlua{document.showprimitives('etex') } \NC \NR @@ -1307,43 +1313,37 @@ local <node> nodelist, <table> info = The understood parameters are as follows: \starttabulate[|l|l|p|] -\NC \bf name \NC \bf type \NC \bf description \NC \NR -\NC pardir \NC string \NC \NC \NR -\NC pretolerance \NC number \NC \NC \NR -\NC tracingparagraphs \NC number \NC \NC \NR -\NC tolerance \NC number \NC \NC \NR -\NC looseness \NC number \NC \NC \NR -\NC hyphenpenalty \NC number \NC \NC \NR -\NC exhyphenpenalty \NC number \NC \NC \NR -\NC pdfadjustspacing \NC number \NC \NC \NR -\NC adjdemerits \NC number \NC \NC \NR -\NC pdfprotrudechars \NC number \NC \NC \NR -\NC linepenalty \NC number \NC \NC \NR -\NC lastlinefit \NC number \NC \NC \NR -\NC doublehyphendemerits \NC number \NC \NC \NR -\NC finalhyphendemerits \NC number \NC \NC \NR -\NC hangafter \NC number \NC \NC \NR -\NC interlinepenalty \NC number or table \NC if a table, then it is an array like \type {\interlinepenalties} \NC \NR -\NC clubpenalty \NC number or table \NC if a table, then it is an array like \type {\clubpenalties} \NC \NR -\NC widowpenalty \NC number or table \NC if a table, then it is an array like \type {\widowpenalties} \NC \NR -\NC brokenpenalty \NC number \NC \NC \NR -\NC emergencystretch \NC number \NC in scaled points \NC \NR -\NC hangindent \NC number \NC in scaled points \NC \NR -\NC hsize \NC number \NC in scaled points \NC \NR -\NC leftskip \NC glue_spec node \NC \NC \NR -\NC rightskip \NC glue_spec node \NC \NC \NR -\NC pdfignoreddimen \NC number \NC in scaled points \NC \NR -\NC parshape \NC table \NC \NC \NR +\BC name \BC type \BC description \NC \NR +\NC \type{pardir} \NC string \NC \NC \NR +\NC \type{pretolerance} \NC number \NC \NC \NR +\NC \type{tracingparagraphs} \NC number \NC \NC \NR +\NC \type{tolerance} \NC number \NC \NC \NR +\NC \type{looseness} \NC number \NC \NC \NR +\NC \type{hyphenpenalty} \NC number \NC \NC \NR +\NC \type{exhyphenpenalty} \NC number \NC \NC \NR +\NC \type{pdfadjustspacing} \NC number \NC \NC \NR +\NC \type{adjdemerits} \NC number \NC \NC \NR +\NC \type{pdfprotrudechars} \NC number \NC \NC \NR +\NC \type{linepenalty} \NC number \NC \NC \NR +\NC \type{lastlinefit} \NC number \NC \NC \NR +\NC \type{doublehyphendemerits} \NC number \NC \NC \NR +\NC \type{finalhyphendemerits} \NC number \NC \NC \NR +\NC \type{hangafter} \NC number \NC \NC \NR +\NC \type{interlinepenalty} \NC number or table \NC if a table, then it is an array like \type {\interlinepenalties} \NC \NR +\NC \type{clubpenalty} \NC number or table \NC if a table, then it is an array like \type {\clubpenalties} \NC \NR +\NC \type{widowpenalty} \NC number or table \NC if a table, then it is an array like \type {\widowpenalties} \NC \NR +\NC \type{brokenpenalty} \NC number \NC \NC \NR +\NC \type{emergencystretch} \NC number \NC in scaled points \NC \NR +\NC \type{hangindent} \NC number \NC in scaled points \NC \NR +\NC \type{hsize} \NC number \NC in scaled points \NC \NR +\NC \type{leftskip} \NC glue_spec node \NC \NC \NR +\NC \type{rightskip} \NC glue_spec node \NC \NC \NR +\NC \type{parshape} \NC table \NC \NC \NR \stoptabulate Note that there is no interface for \type {\displaywidowpenalties}, you have to pass the right choice for \type {widowpenalties} yourself. -The meaning of the various keys should be fairly obvious from the table (the -names match the \TEX\ and \PDFTEX\ primitives) except for the last 5 entries. The -four \type {pdf...line...} keys are ignored if their value equals \type -{pdfignoreddimen}. - It is your own job to make sure that \type {listhead} is a proper paragraph list: this function does not add any nodes to it. To be exact, if you want to replace the core line breaking, you may have to do the following (when you are not @@ -1394,22 +1394,49 @@ tex.shipout(<number> n) Ships out box number \type {n} to the output file, and clears the box register. +\subsection[synctex]{Functions related to synctex} + +The next helpers only make sense when you implement your own synctex logic. Keep in +mind that the library used in editors assumes a certain logic and is geared for +plain and \LATEX, so after a decade users expect a certain behaviour. + +\starttabulate[|l|p|] +\NC \type{set_synctex_mode} \NC \type {0} is the default and used normal synctex + logic, \type {1} uses the values set by the next + helpers while \type {2} also sets these for glyph + nodes; \type{3} sets glyphs and glue and \type {4} + sets only glyphs \NC \NR +\NC \type{set_synctex_tag} \NC set the current tag (file) value (obeys save stack) \NC \NR +\NC \type{set_synctex_line} \NC set the current line value (obeys save stack) \NC \NR +\NC \type{force_synctex_tag} \NC overload the tag (file) value (\type {0} resets) \NC \NR +\NC \type{force_synctex_line} \NC overload the line value (\type {0} resets) \NC \NR +\NC \type{get_synctex_tag} \NC get the currently set value of tag (file) \NC \NR +\NC \type{get_synctex_line} \NC get the currently set value of line \NC \NR +\NC \type{set_synctex_no_files} \NC disable synctex file logging \NC \NR +\stoptabulate + +The last one is somewhat special. Due to the way files are registered in \SYNCTEX\ we need +to explicitly disable that feature if we provide our own alternative if we want to avoid +that overhead. Passing a value of 1 disables registering. + +This mechanism is somewhat experimental. + \section[texconfig]{The \type {texconfig} table} This is a table that is created empty. A startup \LUA\ script could fill this table with a number of settings that are read out by the executable after loading and executing the startup file. -\starttabulate[|lT|l|l|p|] -\NC \rmbf key \NC \bf type \NC \bf default \NC \bf explanation \NC \NR -\NC kpse_init \NC boolean \NC true +\starttabulate[|l|l|l|p|] +\BC key \BC type \BC default \BC explanation \NC \NR +\NC \type{kpse_init} \NC boolean \NC true \NC \type {false} totally disables \KPATHSEA\ initialisation, and enables interpretation of the following numeric key--value pairs. (only ever unset this if you implement {\it all\/} file find callbacks!) \NC \NR \NC - shell_escape \NC string \NC \type {'f'} \NC + \type{shell_escape} \NC string \NC \type {'f'} \NC Use \type {'y'} or \type {'t'} or \type {'1'} to enable \type {\write18} unconditionally, \type {'p'} to enable the commands that are listed in \type {shell_escape_commands} @@ -1421,41 +1448,40 @@ the executable after loading and executing the startup file. required command arguments by using a space, and use the \ASCII\ double quote (\type {"}) for any needed argument or path quoting \NC \NR - -\NC string_vacancies \NC number \NC 75000 \NC cf.\ web2c docs \NC \NR -\NC pool_free \NC number \NC 5000 \NC cf.\ web2c docs \NC \NR -\NC max_strings \NC number \NC 15000 \NC cf.\ web2c docs \NC \NR -\NC strings_free \NC number \NC 100 \NC cf.\ web2c docs \NC \NR -\NC nest_size \NC number \NC 50 \NC cf.\ web2c docs \NC \NR -\NC max_in_open \NC number \NC 15 \NC cf.\ web2c docs \NC \NR -\NC param_size \NC number \NC 60 \NC cf.\ web2c docs \NC \NR -\NC save_size \NC number \NC 4000 \NC cf.\ web2c docs \NC \NR -\NC stack_size \NC number \NC 300 \NC cf.\ web2c docs \NC \NR -\NC dvi_buf_size \NC number \NC 16384 \NC cf.\ web2c docs \NC \NR -\NC error_line \NC number \NC 79 \NC cf.\ web2c docs \NC \NR -\NC half_error_line \NC number \NC 50 \NC cf.\ web2c docs \NC \NR -\NC max_print_line \NC number \NC 79 \NC cf.\ web2c docs \NC \NR -\NC hash_extra \NC number \NC 0 \NC cf.\ web2c docs \NC \NR -\NC pk_dpi \NC number \NC 72 \NC cf.\ web2c docs \NC \NR -\NC trace_file_names \NC boolean \NC true +\NC \type{string_vacancies} \NC number \NC 75000 \NC cf.\ web2c docs \NC \NR +\NC \type{pool_free} \NC number \NC 5000 \NC cf.\ web2c docs \NC \NR +\NC \type{max_strings} \NC number \NC 15000 \NC cf.\ web2c docs \NC \NR +\NC \type{strings_free} \NC number \NC 100 \NC cf.\ web2c docs \NC \NR +\NC \type{nest_size} \NC number \NC 50 \NC cf.\ web2c docs \NC \NR +\NC \type{max_in_open} \NC number \NC 15 \NC cf.\ web2c docs \NC \NR +\NC \type{param_size} \NC number \NC 60 \NC cf.\ web2c docs \NC \NR +\NC \type{save_size} \NC number \NC 4000 \NC cf.\ web2c docs \NC \NR +\NC \type{stack_size} \NC number \NC 300 \NC cf.\ web2c docs \NC \NR +\NC \type{dvi_buf_size} \NC number \NC 16384 \NC cf.\ web2c docs \NC \NR +\NC \type{error_line} \NC number \NC 79 \NC cf.\ web2c docs \NC \NR +\NC \type{half_error_line} \NC number \NC 50 \NC cf.\ web2c docs \NC \NR +\NC \type{max_print_line} \NC number \NC 79 \NC cf.\ web2c docs \NC \NR +\NC \type{hash_extra} \NC number \NC 0 \NC cf.\ web2c docs \NC \NR +\NC \type{pk_dpi} \NC number \NC 72 \NC cf.\ web2c docs \NC \NR +\NC \type{trace_file_names} \NC boolean \NC true \NC \type {false} disables \TEX's normal file open|-|close feedback (the assumption is that callbacks will take care of that) \NC \NR -\NC file_line_error \NC boolean \NC false +\NC \type{file_line_error} \NC boolean \NC false \NC do \type {file:line} style error messages \NC \NR -\NC halt_on_error \NC boolean \NC false +\NC \type{halt_on_error} \NC boolean \NC false \NC abort run on the first encountered error \NC \NR -\NC formatname \NC string \NC +\NC \type{formatname} \NC string \NC \NC 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 \type{jobname} \NC string \NC \NC if no input file name was given on the command line, this key will be tested first instead of simply giving up @@ -1517,22 +1543,22 @@ they can benefit from this as the main principle behind \LUATEX\ is to provide a minimal set of tools and no solutions. The functions provided in the \type {token} namespace are given in the next table: -\starttabulate[|lT|lT|p|] -\NC \bf function \NC \bf argument \NC \bf result \NC \NR +\starttabulate[|l|l|p|] +\BC function \BC argument \BC result \NC \NR \HL -\NC is_token \NC token \NC checks if the given argument is a token userdatum \NC \NR -\NC get_next \NC \NC returns the next token in the input \NC \NR -\NC scan_keyword \NC string \NC returns true if the given keyword is gobbled \NC \NR -\NC scan_int \NC \NC returns a number \NC \NR -\NC scan_dimen \NC infinity, mu-units \NC returns a number representing a dimension and or two numbers being the filler and order \NC \NR -\NC scan_glue \NC mu-units \NC returns a glue spec node \NC \NR -\NC scan_toks \NC definer, expand \NC returns a table of tokens token list (this can become a linked list in later releases) \NC \NR -\NC scan_code \NC bitset \NC returns a character if its category is in the given bitset (representing catcodes) \NC \NR -\NC scan_string \NC \NC returns a string given between \type {{}}, as \type {\macro} or as sequence of characters with catcode 11 or 12 \NC \NR -\NC scan_word \NC \NC returns a sequence of characters with catcode 11 or 12 as string \NC \NR -\NC scan_csname \NC \NC returns \type {foo} after scanning \type {\foo} \NC \NR -\NC set_macro \NC see below \NC assign a macro \NC \NR -\NC create \NC \NC returns a userdata token object of the given control sequence name (or character); this interface can change \NC \NR +\NC \type{is_token} \NC token \NC checks if the given argument is a token userdatum \NC \NR +\NC \type{get_next} \NC \NC returns the next token in the input \NC \NR +\NC \type{scan_keyword} \NC string \NC returns true if the given keyword is gobbled \NC \NR +\NC \type{scan_int} \NC \NC returns a number \NC \NR +\NC \type{scan_dimen} \NC infinity, mu-units \NC returns a number representing a dimension and or two numbers being the filler and order \NC \NR +\NC \type{scan_glue} \NC mu-units \NC returns a glue spec node \NC \NR +\NC \type{scan_toks} \NC definer, expand \NC returns a table of tokens token list (this can become a linked list in later releases) \NC \NR +\NC \type{scan_code} \NC bitset \NC returns a character if its category is in the given bitset (representing catcodes) \NC \NR +\NC \type{scan_string} \NC \NC returns a string given between \type {{}}, as \type {\macro} or as sequence of characters with catcode 11 or 12 \NC \NR +\NC \type{scan_word} \NC \NC returns a sequence of characters with catcode 11 or 12 as string \NC \NR +\NC \type{scan_csname} \NC \NC returns \type {foo} after scanning \type {\foo} \NC \NR +\NC \type{set_macro} \NC see below \NC assign a macro \NC \NR +\NC \type{create} \NC \NC returns a userdata token object of the given control sequence name (or character); this interface can change \NC \NR \stoptabulate The scanners can be considered stable apart from the one scanning for a token. @@ -1561,9 +1587,9 @@ following definition: we get: \starttabulate[|l|Tl|l|] -\NC \type {\directlua{token.scan_string()}{foo}} \NC \directlua{context("{\\red\\type {"..token.scan_string().."}}")} {foo} \NC full expansion \NR -\NC \type {\directlua{token.scan_string()}foo} \NC \directlua{context("{\\red\\type {"..token.scan_string().."}}")} foo \NC letters and others \NR -\NC \type {\directlua{token.scan_string()}\foo} \NC \directlua{context("{\\red\\type {"..token.scan_string().."}}")}\foo \NC meaning \NR +\NC \type {\directlua{token.scan_string()}{foo}} \NC \directlua{context("{\\red\\type {"..token.scan_string().."}}")} {foo} \NC full expansion \NC \NR +\NC \type {\directlua{token.scan_string()}foo} \NC \directlua{context("{\\red\\type {"..token.scan_string().."}}")} foo \NC letters and others \NC \NR +\NC \type {\directlua{token.scan_string()}\foo} \NC \directlua{context("{\\red\\type {"..token.scan_string().."}}")}\foo \NC meaning \NC \NR \stoptabulate The \type {\foo} case only gives the meaning, but one can pass an already @@ -1591,17 +1617,17 @@ local t = token.create("relax") This gives back a token object that has the properties of the \type {\relax} primitive. The possible properties of tokens are: -\starttabulate[|lT|p|] -\NC command \NC a number representing the internal command number \NC \NR -\NC cmdname \NC the type of the command (for instance the catcode in case of a - character or the classifier that determines the internal - treatment \NC \NR -\NC csname \NC the associated control sequence (if applicable) \NC \NR -\NC id \NC the unique id of the token \NC \NR -%NC tok \NC \NC \NR % might change -\NC active \NC a boolean indicating the active state of the token \NC \NR -\NC expandable \NC a boolean indicating if the token (macro) is expandable \NC \NR -\NC protected \NC a boolean indicating if the token (macro) is protected \NC \NR +\starttabulate[|l|p|] +\NC \type {command} \NC a number representing the internal command number \NC \NR +\NC \type {cmdname} \NC the type of the command (for instance the catcode in case of a + character or the classifier that determines the internal + treatment \NC \NR +\NC \type{csname} \NC the associated control sequence (if applicable) \NC \NR +\NC \type{id} \NC the unique id of the token \NC \NR +%NC \type{tok} \NC \NC \NR % might change +\NC \type{active} \NC a boolean indicating the active state of the token \NC \NR +\NC \type{expandable} \NC a boolean indicating if the token (macro) is expandable \NC \NR +\NC \type{protected} \NC a boolean indicating if the token (macro) is protected \NC \NR \stoptabulate The numbers that represent a catcode are the same as in \TEX\ itself, so using @@ -1952,20 +1978,20 @@ It returns a string for each found file. The options match commandline arguments from \type {kpsewhich}: \starttabulate[|l|l|p|] -\NC \rmbf key \NC \rmbf type \NC \rmbf description \NC \NR -\NC debug \NC number \NC set debugging flags for this lookup\NC \NR -\NC format \NC string \NC use specific file type (see list above)\NC \NR -\NC dpi \NC number \NC use this resolution for this lookup; default 600\NC \NR -\NC path \NC string \NC search in the given path\NC \NR -\NC all \NC boolean \NC output all matches, not just the first\NC \NR -\NC mustexist \NC boolean \NC search the disk as well as ls-R if necessary\NC \NR -\NC mktexpk \NC boolean \NC disable/enable mktexpk generation for this lookup\NC \NR -\NC mktextex \NC boolean \NC disable/enable mktextex generation for this lookup\NC \NR -\NC mktexmf \NC boolean \NC disable/enable mktexmf generation for this lookup\NC \NR -\NC mktextfm \NC boolean \NC disable/enable mktextfm generation for this lookup\NC \NR -\NC subdir \NC string - or table \NC only output matches whose directory part - ends with the given string(s) \NC \NR +\BC key \BC type \BC description \NC \NR +\NC \type{debug} \NC number \NC set debugging flags for this lookup\NC \NR +\NC \type{format} \NC string \NC use specific file type (see list above)\NC \NR +\NC \type{dpi} \NC number \NC use this resolution for this lookup; default 600\NC \NR +\NC \type{path} \NC string \NC search in the given path\NC \NR +\NC \type{all} \NC boolean \NC output all matches, not just the first\NC \NR +\NC \type{mustexist} \NC boolean \NC search the disk as well as ls-R if necessary\NC \NR +\NC \type{mktexpk} \NC boolean \NC disable/enable mktexpk generation for this lookup\NC \NR +\NC \type{mktextex} \NC boolean \NC disable/enable mktextex generation for this lookup\NC \NR +\NC \type{mktexmf} \NC boolean \NC disable/enable mktexmf generation for this lookup\NC \NR +\NC \type{mktextfm} \NC boolean \NC disable/enable mktextfm generation for this lookup\NC \NR +\NC \type{subdir} \NC string + or table \NC only output matches whose directory part + ends with the given string(s) \NC \NR \stoptabulate \subsection{\type {init_prog}} diff --git a/Master/texmf-dist/doc/luatex/base/luatex-titlepage.tex b/Master/texmf-dist/doc/luatex/base/luatex-titlepage.tex index 8ab56f85dd2..307741ee115 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex-titlepage.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex-titlepage.tex @@ -21,7 +21,7 @@ [align=middle, foregroundcolor=blue, frame=off] - {Lua\TeX\\Reference} + {Lua\TeX\\Reference Manual} \definedfont[Bold*default at 18pt] \setupinterlinespace diff --git a/Master/texmf-dist/doc/luatex/base/luatex.pdf b/Master/texmf-dist/doc/luatex/base/luatex.pdf Binary files differindex 006bfc7856e..12cf14af54a 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex.pdf +++ b/Master/texmf-dist/doc/luatex/base/luatex.pdf diff --git a/Master/texmf-dist/doc/luatex/base/luatex.tex b/Master/texmf-dist/doc/luatex/base/luatex.tex index 1ccc9b7a59a..33a2327c041 100644 --- a/Master/texmf-dist/doc/luatex/base/luatex.tex +++ b/Master/texmf-dist/doc/luatex/base/luatex.tex @@ -1,6 +1,6 @@ % macros=mkvi -% author : Hans Hagen +% author : Hans Hagen with Taco Hoekwater, Luigi Scarso & Hartmut Henkel % copyright : PRAGMA ADE & ConTeXt Development Team % license : Creative Commons Attribution ShareAlike 4.0 International % reference : pragma-ade.nl | contextgarden.net | texlive (related) distributions @@ -13,9 +13,13 @@ % the manuals contain characteristic graphics and personal notes or examples that % make no sense when used out-of-context. % -% comment : Some chapters might have been published in TugBoat, the NTG Maps, the ConTeXt -% Group journal or otherwise. Thanks to the editors for corrections. Also thanks -% to users for testing, feedback and corrections. +% comment : Some (parts of) chapters might have been published in TugBoat, the NTG Maps, the +% ConTeXt Group journal or otherwise. Thanks to the editors for corrections. Also +% thanks to users for testing, feedback and corrections. +% +% 238 pages : 2017-07-06 +% luatex 9.5 sec / luajittex 7.0 sec +% Dell 7600 / i7 3840QM / passmark 1.922 / Windows 10 64 bit % \tex vs \type vs \syntax vs. \luatex % \em \it \/ @@ -23,16 +27,33 @@ % "context --nodates --nocompression luatex" can be used for comparison % runs, not that we do it +% \enabledirectives[hyphenator.flatten] + +% \setupsynctex[state=start,method=max] % adds 5 pct overhead + \environment luatex-style \environment luatex-logos +\startmode[export] + + \setupbackend + [export=luatex] + +\stopmode + \dontcomplain \startdocument - [status=intermediate release, - version=1.0.4] + [status=beta, + version=1.07.0] + +\startnotmode[*export] + \component luatex-titlepage +\stopnotmode -\component luatex-titlepage +\startmode[*export] + \component luatex-export-titlepage +\stopmode \startfrontmatter \component luatex-contents |