- package option(s)
presets[=none|util|test|debug|all](defaultutil)none: load no modulesutil: loadl3extrasmoduletest:utilpresets +softerrormoduledebug:utilpresets +debugandunravelmodulesall: load all modules
\zutil_set:n {⟨key-value list⟩}\zutil_load_module:n {⟨module⟩}- load a single module
- additions to the
l3kernel l3basicsextras\zutil_cs_if_function:NTF ⟨cs⟩ {⟨true code⟩} {⟨false code⟩}
\zutil_cs_if_function_p:N ⟨cs⟩- checks if the csname of
⟨cs⟩contains colon:
- checks if the csname of
\zutil_cs_function_name:N ⟨cs⟩
\zutil_cs_function_signature:N ⟨cs⟩- expands to name or signature of an expl3 function (in string); if colon not found then leaves
\q_no_value. The result is returned within\exp_not:n. See also\cs_split_function:N.
- expands to name or signature of an expl3 function (in string); if colon not found then leaves
\zutil_cs_base_function:N ⟨cs⟩- expands to base-form of an expl3 function (in
⟨token⟩); if colon not found then leaves\q_no_value. The result is returned within\exp_not:n.
- expands to base-form of an expl3 function (in
l3prgextras\zutil_cs_if_defined:NTF ⟨cs⟩ {⟨true code⟩} {⟨false code⟩}
\zutil_cs_if_defined_p:N ⟨cs⟩- variant
c(hand-tuned, no\relaxissue) - similar to
\cs_if_exist:NTFbut treats\relaxas defined
- variant
\zutil_exp_args_safe:Nc ⟨cs⟩ ⟨csname⟩- safe
c-type expansion which never defines the\⟨csname⟩to\relax; unexpandable
- safe
l3expanextras\zutil_cs_generate_variant:N ⟨cs variant⟩- similar to
\cs_generate_variant:Nnbut accepts the whole variant function, rather than its arg-spec only, as argument - example:
\zutil_cs_generate_variant:N \zutil_func:V
- similar to
\zutil_cs_generate_variant:n {⟨cs variants list⟩}- example:
\zutil_cs_generate_variant:n { \zutil_func_a:v, \zutil_func_b:e }
- example:
l3tlextras\zutil_prg_new_conditional_tl_if_in:Nnn \⟨name⟩:⟨arg spec⟩ {⟨test token list⟩} {⟨conditions⟩}- variants
Non,NVn,Nen - works like
\prg_new_conditional:N(p)nnbut specifically creates expandable conditional to test if⟨test token list⟩is in an token list - example:
\zutil_prg_new_conditional_tl_if_in:Nnn \zutil_if_colon_in:n { : } { TF }which defines expandable\zutil_if_colon_in:nTFwith usage\zutil_if_colon_in:nTF {⟨token list⟩} {⟨true code⟩} {⟨false code⟩}
- variants
l3seqextras\zutil_seq_set_split_keep_braces:Nnn ⟨seq var⟩ {⟨delimiter⟩} {⟨token list⟩}gsetversion\zutil_seq_gset_split_keep_braces:Nnn- variants
NnV - like
\seq_set_split(_keep_spaces):Nnnbut only trims surrounding spaces only, any outer braces are retained. Errors on empty⟨delimiter⟩.
- additions to the
l3kernel, involving patches l3msgextras\zutil_msg_space_safe_on: ... \zutil_msg_space_safe_off:\msg_new:nnn(n)and\msg_set:nnn(n)used in between them will respect space characters and trim spaces from both sides of all the arguments. Nestable. (If used nested, only the outer-most pair takes effect.)- restriction: to ensure the catcode change works and only works locally,
\zutil_msg_space_safe_(on|off):should be used on their own line(s). - example:
\zutil_msg_space_safe_on: \msg_new:nnn {⟨module⟩} {⟨message⟩} {⟨text⟩} ... \zutil_msg_space_safe_off:
\zutil_msg_suspend_debug: ... \zutil_msg_resume_debug:- suspend and resume debugging (the same as
\debug_suspend:and\debug_resume:) inside functions that issue messages (\msg_<type>:nn...), to make msg-based tests quicker. Nestable.
- suspend and resume debugging (the same as
- write debugging info to log; depends on the
l3extrasmodule - main functions
\zutil_debug:nn {⟨debug options⟩} {⟨debug text⟩}- adds debug info;
⟨debug text⟩is used as string - variants
ne,en,ee - example:
\zutil_debug:nn {label=a} {\ERROR}adds! debug [a] >>\ERROR <<to log, using default settings
- adds debug info;
\zutil_debug:nN {⟨debug options⟩} ⟨debug token⟩- adds debug info; uses meaning of
⟨debug token⟩as debug text - variants
nc(hand-tuned, no\relaxissue),eN,ec
- adds debug info; uses meaning of
\zutil_debug:n {⟨debug text⟩}- variant
e
- variant
\zutil_debug:N {⟨debug text⟩}- variant
c(hand-tuned, no\relaxissue)
- variant
- * Unless marked with "hand-tuned", all variants in this function family are generated with
\zutil_debug_generate_variant:Nn, in order to add appropriate collectors used by decorator functions (see below).
- LaTeX2e interfaces
\ZutilDebug [⟨debug options 1⟩] {⟨debug text⟩} [⟨debug options 2⟩]- equivalent to
\zutil_debug:nn {⟨debug options 1⟩,⟨debug options 2⟩} {⟨debug text⟩}
- equivalent to
\ZutilDebugCmd [⟨debug options 1⟩] {⟨debug token⟩} [⟨debug options 2⟩]- equivalent to
\zutil_debug:nN {⟨debug options 1⟩, ⟨debug options 2⟩} ⟨debug token⟩
- equivalent to
- the option-setting function
\zutil_debug_set:n {⟨debug options⟩}
- debug options
- label family
label=⟨label⟩: converts to string and adds the result as labele=⟨label⟩: fully expands⟨label⟩and adds the result as labelreset-labels: clear all labels; aliasreset-label; available to\zutil_debug_set:nonly- unknown keys are treated as passed to
label
- level family
+: increases indent level by 1-: decreases indent level by 1
- misc
if=⟨bool expr⟩: only add debugging info if⟨bool expr⟩evaluates to true
tabularrayintegrationtblr: short forlabel={⟨row⟩, ⟨column⟩}
- label family
- decorator functions
\zutil_debug_if:n {⟨bool expr⟩} \zutil_debug:...- used as a easy-to-comment decorator/prefix of
\zutil_debug:...; an alternative way of settingifoption
- used as a easy-to-comment decorator/prefix of
\zutil_debug_safe_if:n {⟨bool expr⟩}- similar to
\zutil_debug_if:nand safe in expansion-only circumtances
- similar to
- [unstable] helper function
\zutil_debug_generate_variant:Nn
- new
l3msgmessage classsofterror- like
error, it uses both⟨text⟩and⟨more text⟩of a message - like
warning, it doesn't interrupt processing nor prompting for user input, thus produces portable and compact messages - it's most suitable for log-based tests
- like
- full example
generates
\msg_new:nnnn { mypkg } { msg } { text } { more text } \zutil_msg_softerror:nn { mypkg } { msg }
! Package mypkg Error: text (mypkg) more text \zutil_msg_softerror:nnnnnn- variant
nneeee
- variant
\zutil_msg_softerror:nnnnn- variants
nnnee,nneee
- variants
\zutil_msg_softerror:nnnn- variants
nnVV,nnVn,nnnV,nnne,nnee
- variants
\zutil_msg_softerror:nnn- variants
nnV,nne
- variants
- provides thin wrapper for
unravelpackage \beginunravel[⟨options⟩]⟨code⟩\endunravel- equivalent to using
\unravel[⟨options⟩]{⟨code⟩}
- equivalent to using
l3buildregression-test.texextended- new features
- removed test numbering
- log number of errors and passed checks at the end of a test and the entire test file
- errors raised through
\errmessageare all counted - checks are stepped by the
\PASSEDnew expandable command
- errors raised through
- new commands
\PASSED\FAILED(undefined, can be used as\ERROR)