From 8fb1cfd3d240ef62d78c2320bd90f8f07b7916fa Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 15 Feb 2021 03:01:20 +0000 Subject: CTAN sync 202102150301 --- systems/doc/luatex/luatex-tex.tex | 61 ++++++++++++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 11 deletions(-) (limited to 'systems/doc/luatex/luatex-tex.tex') 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( target | stream, s, ...) +texio.write( target, s, ...) texio.write( 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. -- cgit v1.2.3