summaryrefslogtreecommitdiff
path: root/systems/doc
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-02-15 03:01:20 +0000
committerNorbert Preining <norbert@preining.info>2021-02-15 03:01:20 +0000
commit8fb1cfd3d240ef62d78c2320bd90f8f07b7916fa (patch)
tree402ab28aa933f0b5a42c2a1d9646717340fae50e /systems/doc
parent8c6ca435b3bc584eb3efe8e52417fb989e677789 (diff)
CTAN sync 202102150301
Diffstat (limited to 'systems/doc')
-rw-r--r--systems/doc/luatex/luatex-backend.tex20
-rw-r--r--systems/doc/luatex/luatex-enhancements.tex23
-rw-r--r--systems/doc/luatex/luatex-lua.tex4
-rw-r--r--systems/doc/luatex/luatex-math.tex28
-rw-r--r--systems/doc/luatex/luatex-modifications.tex2
-rw-r--r--systems/doc/luatex/luatex-tex.tex61
-rw-r--r--systems/doc/luatex/luatex.pdfbin1756085 -> 1609366 bytes
-rw-r--r--systems/doc/luatex/luatex.tex2
8 files changed, 126 insertions, 14 deletions
diff --git a/systems/doc/luatex/luatex-backend.tex b/systems/doc/luatex/luatex-backend.tex
index 2606ff3847..cfadd46f25 100644
--- a/systems/doc/luatex/luatex-backend.tex
+++ b/systems/doc/luatex/luatex-backend.tex
@@ -681,7 +681,7 @@ returns a dictionary. The first argument is to be a page dictionary.
\stoptyping
Another convenience command gives you the (bounding) box of a (normally page)
-which can be inheritted from the document itself. An example of a valid box name
+which can be inherited from the document itself. An example of a valid box name
is \type {MediaBox}.
\starttyping
@@ -690,13 +690,14 @@ pages = pdfe.getbox(<pdfe dictionary>,boxname)
\stopsubsection
-\startsubsection[title={\type {get[string|integer|number|boolean|name]}}]
+\startsubsection[title={\type {get[string|integer|number|boolean|name]}, \type{type}}]
\libindex {getstring}
\libindex {getinteger}
\libindex {getnumber}
\libindex {getboolean}
\libindex {getname}
+\libindex {type}
Common values in dictionaries and arrays are strings, integers, floats, booleans
and names (which are also strings) and these are also normal \LUA\ objects:
@@ -707,8 +708,23 @@ i = getinteger(<pdfe array|dictionary>,index|key)
n = getnumber (<pdfe array|dictionary>,index|key)
b = getboolean(<pdfe array|dictionary>,index|key)
n = getname (<pdfe array|dictionary>,index|key)
+s = type (<pdfe array|dictionary|document|reference|stream)
\stoptyping
+The \type {type} returns a string describing the type of the object,
+i.e. "pdfe.array", "pdfe.dictionary", "pdfe",
+"pdfe.reference", "pdfe.stream".
+
+The \type {getstring} function has two extra variants:
+
+\starttyping
+s, h = getstring (<pdfe array|dictionary>,index|key,false)
+s = getstring (<pdfe array|dictionary>,index|key,true)
+\stoptyping
+
+The first call returns the original string plus a boolean indicating if the
+string is hex encoded. The second call returns the unencoded string.
+
\stopsubsection
\startsubsection[title={\type {get[from][dictionary|array|stream]}}]
diff --git a/systems/doc/luatex/luatex-enhancements.tex b/systems/doc/luatex/luatex-enhancements.tex
index b81e1dbdae..537961661f 100644
--- a/systems/doc/luatex/luatex-enhancements.tex
+++ b/systems/doc/luatex/luatex-enhancements.tex
@@ -1266,6 +1266,29 @@ related primitives.
\stopsubsection
+\startsubsection[title={\prm {glyphdimensionsmode}}]
+
+Already in the early days of \LUATEX\ the decision was made to calculate the
+effective height and depth of glyphs in a way that reflected the applied vertical
+offset. The height got that offset added, the depth only when the offset was
+larger than zero. We can now control this in more detail with this mode
+parameter. An offset is added to the height and|/|or subtracted from the depth.
+The effective values are never negative. The zero mode is the default.
+
+\starttabulate[|l|pl|]
+\DB value \BC effect \NC\NR
+\TB
+\NC \type {0} \NC the old behaviour: add the offset to the height and only subtract
+ the offset only from the depth when it is positive \NC \NR
+\NC \type {1} \NC add the offset to the height and subtract it from the depth \NC \NR
+\NC \type {2} \NC add the offset to the height and subtract it from the depth but
+ keep the maxima of the current and previous results \NC \NR
+\NC \type {3} \NC use the height and depth of the glyph, so no offset is applied \NC \NR
+\LL
+\stoptabulate
+
+\stopsubsection
+
\stopsection
\startsection[title={Control and debugging}]
diff --git a/systems/doc/luatex/luatex-lua.tex b/systems/doc/luatex/luatex-lua.tex
index f9107fa1f9..625334c1b8 100644
--- a/systems/doc/luatex/luatex-lua.tex
+++ b/systems/doc/luatex/luatex-lua.tex
@@ -608,6 +608,10 @@ in addition to the regular \type {io} library functions.
\NC \type{readbytetable(f,n)} \NC \type {n} bytes\NC \NR
\stoptabulate
+There are eight additional little endian variants for the \type {cardinal[1-4]}
+and \type {integer[1-4]} readers: \type {cardinal[1-4]le} and \type
+{integer[1-4]le}.
+
\stopsubsection
\startsubsection[title={Binary input from strings with \type {sio}}]
diff --git a/systems/doc/luatex/luatex-math.tex b/systems/doc/luatex/luatex-math.tex
index e5999e72fd..89c0836ba7 100644
--- a/systems/doc/luatex/luatex-math.tex
+++ b/systems/doc/luatex/luatex-math.tex
@@ -1242,6 +1242,31 @@ $\Uhextensible width 1pt middle 0 "2194$
font metrics are involved we have a different code path for traditional fonts end
\OPENTYPE\ fonts.
+Sometimes you might want to act upon the size of a delimiter, something that is
+not really possible because of the fact that they are calculated {\em after} most
+has been typeset already. In the following example the all|-|zero specification
+is the trigger to make a fake box with the last delimiter dimensions and shift.
+It's an ugly hack but its relative simple and not intrusive implementation has no
+side effects. Any other heuristic solution would not satisfy possible demands
+anyway. Here is a rather low level example:
+
+\startbuffer
+\startformula
+\Uleft \Udelimiter 5 0 "222B
+\frac{\frac{a}{b}}{\frac{c}{d}}
+\Uright \Udelimiter 5 0 "222B
+\kern-2\fontcharwd\textfont0 "222B
+\mathlimop{\Uvextensible \Udelimiter 0 0 0}_1^2 x
+\stopformula
+\stopbuffer
+
+\typebuffer
+
+The last line, by passing zero values, results in a fake operator that has the
+dimensions of the previous delimiter. We can then backtrack over the (presumed)
+width and the two numbers become limit operators. As said, it's not pretty but it
+works.
+
\subsection{Fractions}
\topicindex {math+fractions}
@@ -1306,6 +1331,9 @@ For Latin Modern the result looks as follows:
\stoptabulate
\stop
+The keyword \type {norule} will hide the rule with the above variants while
+keeping the rule related spacing.
+
\subsection {Delimiters: \type{\Uleft}, \prm {Umiddle} and \prm {Uright}}
\topicindex {math+delimiters}
diff --git a/systems/doc/luatex/luatex-modifications.tex b/systems/doc/luatex/luatex-modifications.tex
index 747945f55f..bf4233165b 100644
--- a/systems/doc/luatex/luatex-modifications.tex
+++ b/systems/doc/luatex/luatex-modifications.tex
@@ -615,6 +615,8 @@ primitives (for as far their functionality is still around) you now can do this:
\protected\def\pdfmapline {\pdfextension mapline }
\protected\def\pdftrailer {\pdfextension trailer }
\protected\def\pdfglyphtounicode {\pdfextension glyphtounicode }
+\protected\def\pdfrunninglinkoff {\pdfextension linkstate 1 }
+\protected\def\pdfrunninglinkon {\pdfextension linkstate 0 }
\stoptyping
The introspective primitives can be defined as:
diff --git a/systems/doc/luatex/luatex-tex.tex b/systems/doc/luatex/luatex-tex.tex
index dacaec0cb9..c9ca45158c 100644
--- a/systems/doc/luatex/luatex-tex.tex
+++ b/systems/doc/luatex/luatex-tex.tex
@@ -249,7 +249,8 @@ readable (like \prm {tracingcommands} and \prm {parindent}).
\topicindex{parameters+internal}
-\libindex{set} \libindex{get}
+\libindex{set}
+\libindex{get}
For all the parameters in this section, it is possible to access them directly
using their names as index in the \type {tex} table, or by using one of the
@@ -357,6 +358,10 @@ These are read|-|only:
tex.deadcycles
tex.insertpenalties
tex.parshape
+tex.interlinepenalties
+tex.clubpenalties
+tex.widowpenalties
+tex.displaywidowpenalties
tex.prevgraf
tex.spacefactor
\stoptyping
@@ -605,6 +610,8 @@ tex.currentifbranch
\libindex{scantoks}
+\libindex{getmark}
+
\TEX's attributes (\lpr {attribute}), counters (\prm {count}), dimensions (\prm
{dimen}), skips (\prm {skip}, \prm {muskip}) and token (\prm {toks}) registers
can be accessed and written to using two times five virtual sub|-|tables of the
@@ -741,6 +748,12 @@ tex.scantoks("global",0,"$\int\limits^1_2$")
In the function|-|based interface, it is possible to define values globally by
using the string \type {global} as the first function argument.
+There is a dedicated getter for marks: \type {getmark} that takes two arguments.
+The first argument is one of \type {top}, \type {bottom}, \type {first}, \type
+{splitbottom} or \type {splitfirst}, and the second argument is a marks class
+number. When no arguments are given the current maximum number of classes is
+returned.
+
\stopsubsection
\startsubsection[title={Character code registers: \type {[get|set]*code[s]}}]
@@ -1921,24 +1934,34 @@ the executable after loading and executing the startup file.
\type {false} disables \TEX's normal file open|-|close feedback (the
assumption is that callbacks will take care of that)
\NC \NR
-\NC \type{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 \type{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 \type{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 \type{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
\NC \NR
+\NC \type{level_chr} \NC number \NC
+\NC
+ character to put in front of traced macros (see next value)
+\NC \NR
+\NC \type{level_max} \NC number \NC
+\NC
+ when larger than zero the input nesting level will be shown when \type
+ {\tracingmacros} is set; levels above this value will be clipped with
+ the level shown up front
+\NC \NR
\LL
\stoptabulate
@@ -1946,6 +1969,16 @@ Note: the numeric values that match web2c parameters are only used if \type
{kpse_init} is explicitly set to \type {false}. In all other cases, the normal
values from \type {texmf.cnf} are used.
+You can kick in your own nesting level visualizer, for instance:
+
+\stoptyping
+callback.register("input_level_string",function(n)
+ if tex.tracingmacros > 1 then
+ return "! " .. string.rep(">",n) .. " "
+ end
+end)
+\stoptyping
+
\stopsection
\startsection[title={The \type {texio} library}][library=texio]
@@ -1961,16 +1994,15 @@ and|/|or console.
\libindex{write}
\startfunctioncall
-texio.write(<string> target | <integer> stream, <string> s, ...)
+texio.write(<string> target, <string> s, ...)
texio.write(<string> s, ...)
\stopfunctioncall
Without the \type {target} argument, writes all given strings to the same
location(s) \TEX\ writes messages to at this moment. If \prm {batchmode} is in
effect, it writes only to the log, otherwise it writes to the log and the
-terminal. The optional \type {target} can be one of four possibilities: \type
-{term}, \type {log}, \type {term and log} or a valid integer of a stream
-opened for writing.
+terminal. The optional \type {target} can be one of three possibilities: \type
+{term}, \type {log} or \type {term and log}.
Note: If several strings are given, and if the first of these strings is or might
be one of the targets above, the \type {target} must be specified explicitly to
@@ -2063,8 +2095,7 @@ most intriguing.
\NC \type{scan_toks} \NC definer, expand \NC returns a table of tokens tokens \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_argument} \NC \NC this one is simular to \type {scanstring} but also accepts a \type {\cs}
- (which then get expanded) \NC \NR
+\NC \type{scan_argument} \NC boolean \NC this one is simular to \type {scanstring} but also accepts a \type {\cs} \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{scan_list} \NC \NC picks up a box specification and returns a \type {[h|v]list} node \NC \NR
@@ -2080,6 +2111,11 @@ macro, in which case the result will also provide information about what
arguments are expected and in the result this is separated from the meaning by a
separator token. The \type {expand} flag determines if the list will be expanded.
+The \type {scan_argument} function expands the given argument. When a braced
+argument is scanned, expansion can be prohibited by passing \type {false}
+(default is \type {true}). In case of a control sequence passing \type {false}
+will result in a one|-|level expansion (the meaning of the macro).
+
The string scanner scans for something between curly braces and expands on the
way, or when it sees a control sequence it will return its meaning. Otherwise it
will scan characters with catcode \type {letter} or \type {other}. So, given the
@@ -2292,6 +2328,9 @@ accepts a string and returns a boolean:
local okay = token.is_defined("foo")
\stoptyping
+When a second argument to \type {is_defined} is \type {true} the check is for an
+undefined control sequence (only), otherwise any undefined command gives true.
+
The largest character possible is returned by \type {biggest_char}, just in case you
need to know that boundary condition.
diff --git a/systems/doc/luatex/luatex.pdf b/systems/doc/luatex/luatex.pdf
index aad713bec6..8504e3bf56 100644
--- a/systems/doc/luatex/luatex.pdf
+++ b/systems/doc/luatex/luatex.pdf
Binary files differ
diff --git a/systems/doc/luatex/luatex.tex b/systems/doc/luatex/luatex.tex
index 5a14b40bfd..b4c13c4de2 100644
--- a/systems/doc/luatex/luatex.tex
+++ b/systems/doc/luatex/luatex.tex
@@ -73,7 +73,7 @@
\startdocument
[manual=Lua\TeX,
status=stable,
- version=1.12]
+ version=1.13]
\startnotmode[*export]
\component luatex-titlepage