diff options
Diffstat (limited to 'doc/context/sources/general/manuals/luametatex')
3 files changed, 18 insertions, 3 deletions
diff --git a/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex b/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex index 3e710fe8c..d199239b1 100644 --- a/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex +++ b/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex @@ -1091,6 +1091,18 @@ or more than zero. \stopsubsection +\startsubsection[title={\lpr {ifboolean}}] + +This primitive tests for non|-|zero, so the next variants are similar + +\starttyping + \ifcase <integer>.F.\else .T.\fi +\unless\ifcase <integer>.T.\else .F.\fi + \ifboolean<integer>.T.\else .F.\fi +\stoptyping + +\stopsubsection + \startsubsection[title={\lpr {iftok} and \lpr {ifcstok}}] \topicindex {conditions+tokens} @@ -1113,8 +1125,8 @@ provided in \LUAMETATEX: \typebuffer \startpacked[blank] {\tt\nospacing\getbuffer} \stoppacked -You can check if a macro is is defined as protected with \type {\ifprotected} -while frozen macros can be tested with \type {\iffrozen}. A provisional \type +You can check if a macro is defined as protected with \type {\ifprotected} while +frozen macros can be tested with \type {\iffrozen}. A provisional \type {\ifusercmd} tests will check if a command is defined at the user level (and this one might evolve). diff --git a/doc/context/sources/general/manuals/luametatex/luametatex-primitives.tex b/doc/context/sources/general/manuals/luametatex/luametatex-primitives.tex index 825de3e12..dea7b08b3 100644 --- a/doc/context/sources/general/manuals/luametatex/luametatex-primitives.tex +++ b/doc/context/sources/general/manuals/luametatex/luametatex-primitives.tex @@ -296,6 +296,7 @@ new primitives, a summary is given below. \NC \type {iffrozen} \NC command \NC \NC \NR \NC \type {iftok} \NC \NC \NC \NR \NC \type {ifcstok} \NC \NC \NC \NR +\NC \type {ifboolean} \NC \NC \NC \NR \NC \type {internalcodesmode} \NC integer \NC \NC \NR %NC \type {ifprimitive} \NC command \NC check if the given command is a primitive \NC \NR \NC \type {immediateassigned} \NC command \NC (todo) expand the following assignment now\NC \NR diff --git a/doc/context/sources/general/manuals/luametatex/luametatex-tex.tex b/doc/context/sources/general/manuals/luametatex/luametatex-tex.tex index 56fffeafa..40e6b5a84 100644 --- a/doc/context/sources/general/manuals/luametatex/luametatex-tex.tex +++ b/doc/context/sources/general/manuals/luametatex/luametatex-tex.tex @@ -2115,7 +2115,9 @@ expanded definition (\prm {edef}'d). In the case of the braced variant one can o course use the \prm {detokenize} and \prm {unexpanded} primitives since there we do expand. -The \type {scan_word} scanner can be used to implement for instance a number scanner: +The \type {scan_word} scanner can be used to implement for instance a number +scanner. An optional boolean argument can signal that a trailing space or \type +{\relax} should be gobbled: \starttyping function token.scan_number(base) |