From f1772caf425af2fe9be87b788eae63559682d51a Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Wed, 19 May 2021 18:48:15 +0200 Subject: 2021-05-19 18:21:00 --- .../documents/general/manuals/luametatex.pdf | Bin 1212208 -> 1213272 bytes doc/context/scripts/mkiv/mtx-vscode.html | 2 + doc/context/scripts/mkiv/mtx-vscode.man | 3 ++ doc/context/scripts/mkiv/mtx-vscode.xml | 2 + .../manuals/luametatex/luametatex-callbacks.tex | 29 +++++++++--- .../manuals/luametatex/luametatex-style.tex | 2 +- .../general/manuals/luametatex/luametatex-tex.tex | 51 +++++++++++++-------- 7 files changed, 64 insertions(+), 25 deletions(-) (limited to 'doc') diff --git a/doc/context/documents/general/manuals/luametatex.pdf b/doc/context/documents/general/manuals/luametatex.pdf index 98b6466b8..9fafc9690 100644 Binary files a/doc/context/documents/general/manuals/luametatex.pdf and b/doc/context/documents/general/manuals/luametatex.pdf differ diff --git a/doc/context/scripts/mkiv/mtx-vscode.html b/doc/context/scripts/mkiv/mtx-vscode.html index 32a6d5e74..f66227be7 100644 --- a/doc/context/scripts/mkiv/mtx-vscode.html +++ b/doc/context/scripts/mkiv/mtx-vscode.html @@ -40,6 +40,7 @@ flagvaluedescription --generategenerate extension in sync with current version + --programuse the given binary (e.g. codium, default: code) --startstart vscode with extension context
@@ -47,6 +48,7 @@ mtxrun --script vscode --generate e:/vscode/extensions
mtxrun --script vscode --generate
mtxrun --script vscode --start +
mtxrun --script vscode --program=codium --start

diff --git a/doc/context/scripts/mkiv/mtx-vscode.man b/doc/context/scripts/mkiv/mtx-vscode.man index 7ac13328f..a7bea7d36 100644 --- a/doc/context/scripts/mkiv/mtx-vscode.man +++ b/doc/context/scripts/mkiv/mtx-vscode.man @@ -14,6 +14,9 @@ .B --generate generate extension in sync with current version .TP +.B --program +use the given binary (e.g. codium, default: code) +.TP .B --start start vscode with extension context .SH AUTHOR diff --git a/doc/context/scripts/mkiv/mtx-vscode.xml b/doc/context/scripts/mkiv/mtx-vscode.xml index c4cf3167e..4af57773a 100644 --- a/doc/context/scripts/mkiv/mtx-vscode.xml +++ b/doc/context/scripts/mkiv/mtx-vscode.xml @@ -9,6 +9,7 @@ generate extension in sync with current version + use the given binary (e.g. codium, default: code) start vscode with extension context @@ -20,6 +21,7 @@ mtxrun --script vscode --generate e:/vscode/extensions mtxrun --script vscode --generate mtxrun --script vscode --start + mtxrun --script vscode --program=codium --start diff --git a/doc/context/sources/general/manuals/luametatex/luametatex-callbacks.tex b/doc/context/sources/general/manuals/luametatex/luametatex-callbacks.tex index 4cb2add79..213081e36 100644 --- a/doc/context/sources/general/manuals/luametatex/luametatex-callbacks.tex +++ b/doc/context/sources/general/manuals/luametatex/luametatex-callbacks.tex @@ -359,6 +359,26 @@ end This callback does not replace any internal code. +\subsection{\cbk {glyph_run}} + +\topicindex{callbacks+fonts} + +When set this callback is triggered when \TEX\ normally handles the ligaturing +and kerning. In \LUATEX\ you use the \typ {hpack_filter} and \typ +{per_linebreak_filter} callbacks for that (where each passes different +arguments). This callback doesn't get triggered when there are no glyphs (in +\LUATEX\ this optimization is controlled by a a variable). + +\startfunctioncall +function( head, groupcode, direction]) + return newhead +end +\stopfunctioncall + +The traditional \TEX\ font processing is bypassed so you need to take care of that +with the helpers. (For the moment we keep the ligaturing and kerning callbacks but +they are kind of obsolete.) + \subsection{\cbk {hpack_filter}} \topicindex{callbacks+packing} @@ -368,7 +388,7 @@ material. Math items and line boxes are ignored at the moment. \startfunctioncall function( head, groupcode, size, - packtype [, direction] [, attributelist]) + packtype [, direction] [, attributelist]) return newhead end \stopfunctioncall @@ -378,9 +398,6 @@ The \type {packtype} is either \type {additional} or \type {exactly}. If \type \type {exactly}, then the \type {size} is a \type {\hbox to ...}. In both cases, the number is in scaled points. -The \type {direction} is either one of the three-letter direction specifier -strings, or \type {nil}. - This callback does not replace any internal code. \subsection{\cbk {vpack_filter}} @@ -396,7 +413,7 @@ that it is called at different moments, there is an extra variable that matches \startfunctioncall function( head, groupcode, size, packtype, - maxdepth [, direction] [, attributelist])) + maxdepth [, direction] [, attributelist])) return newhead end \stopfunctioncall @@ -461,7 +478,7 @@ This callback is called when \TEX\ is ready to start boxing the box 255 for \prm \startfunctioncall function( head, groupcode, size, packtype, - maxdepth [, direction]) + maxdepth [, direction]) return newhead end \stopfunctioncall diff --git a/doc/context/sources/general/manuals/luametatex/luametatex-style.tex b/doc/context/sources/general/manuals/luametatex/luametatex-style.tex index 1b4a8d5a1..231e15ca1 100644 --- a/doc/context/sources/general/manuals/luametatex/luametatex-style.tex +++ b/doc/context/sources/general/manuals/luametatex/luametatex-style.tex @@ -146,7 +146,7 @@ \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 [subsubsection][align={flushleft,broad},style=\bf,after=\blank,before=\blank] \setuphead [chapter] [color=maincolor] \setuphead [section] [color=maincolor] diff --git a/doc/context/sources/general/manuals/luametatex/luametatex-tex.tex b/doc/context/sources/general/manuals/luametatex/luametatex-tex.tex index decabbca7..1cb03677b 100644 --- a/doc/context/sources/general/manuals/luametatex/luametatex-tex.tex +++ b/doc/context/sources/general/manuals/luametatex/luametatex-tex.tex @@ -1685,30 +1685,45 @@ that overhead. Passing a value of 1 disables registering. 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. +and executing the startup file. Watch out: some keys are different from \LUATEX, +which is a side effect of a more granular and dynamic memory management. -\starttabulate[|l|l|l|] -\DB key \BC type \BC default \NC \NR +\starttabulate[|l|l|l|l|] +\DB key \BC type \BC default \BC comment \NC \NR \TB -\NC \type{max_strings} \NC number \NC 100000 \NC \NR -\NC \type{strings_free} \NC number \NC 100 \NC \NR -\NC \type{nest_size} \NC number \NC 50 \NC \NR -\NC \type{max_in_open} \NC number \NC 100 \NC \NR -\NC \type{param_size} \NC number \NC 60 \NC \NR -\NC \type{save_size} \NC number \NC 5000 \NC \NR -\NC \type{stack_size} \NC number \NC 500 \NC \NR -\NC \type{expand_depth} \NC number \NC 1000 \NC \NR -\NC \type{function_size} \NC number \NC 0 \NC \NR -\NC \type{error_line} \NC number \NC 79 \NC \NR -\NC \type{half_error_line} \NC number \NC 50 \NC \NR -\NC \type{hash_extra} \NC number \NC 0 \NC \NR -\NC \type{formatname} \NC string \NC \NC \NR -\NC \type{jobname} \NC string \NC \NC \NR +\NC \type{buffersize} \NC number/table \NC 1000000 \NC input buffer bytes \NC \NR +\NC \type{filesize} \NC number/table \NC 1000 \NC max number of open files \NC \NR +\NC \type{fontsize} \NC number/table \NC 250 \NC number of permitted fonts \NC \NR +\NC \type{hashsize} \NC number/table \NC 150000 \NC number of hash entries \NC \NR +\NC \type{inputsize} \NC number/table \NC 10000 \NC maximum input stack \NC \NR +\NC \type{languagesize} \NC number/table \NC 250 \NC number of permitted languages \NC \NR +\NC \type{marksize} \NC number/table \NC 50 \NC number of mark classes \NC \NR +\NC \type{nestsize} \NC number/table \NC 1000 \NC max depth of nesting \NC \NR +\NC \type{nodesize} \NC number/table \NC 1000000 \NC max node memory (various size) \NC \NR +\NC \type{parametersize} \NC number/table \NC 20000 \NC max size of parameter stack \NC \NR +\NC \type{poolsize} \NC number/table \NC 10000000 \NC max number of string bytes \NC \NR +\NC \type{savesize} \NC number/table \NC 100000 \NC mas size of save stack \NC \NR +\NC \type{stringsize} \NC number/table \NC 150000 \NC max number of strings \NC \NR +\NC \type{tokensize} \NC number/table \NC 1000000 \NC max token memory \NC \NR +\ML +\NC \type{expandsize} \NC number/table \NC 10000 \NC max expansion nesting \NC \NR +\NC \type{propertiessize} \NC number \NC 0 \NC initial size of node properties table \NC \NR +\NC \type{functionsize} \NC number \NC 0 \NC initial size of \LUA\ functions table \NC \NR +\NC \type{errorlinesize} \NC number \NC 79 \NC how much or an error is shown \NC \NR +\NC \type{halferrorlinesize} \NC number \NC 50 \NC idem \NC \NR +\ML +\NC \type{formatname} \NC string \NC \NC \NC \NR +\NC \type{jobname} \NC string \NC \NC \NC \NR \LL \stoptabulate If no format name or jobname is given on the command line, the related keys will -be tested first instead of simply quitting. +be tested first instead of simply quitting. The statistics library has methods for +tracking down how much memory is available and has been configured. The size parameters +take a number (for the maximum allocated size) or a table with three possible keys: +\type {size}, \type {plus} (for extra size) and step for the increment when more memory +is needed. They all start out with a hard coded minimum and also have an hard coded maximum, +the the configured size sits somewhere between these. \stopsection -- cgit v1.2.3