diff options
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3basics.dtx')
-rw-r--r-- | macros/latex/contrib/l3kernel/l3basics.dtx | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/macros/latex/contrib/l3kernel/l3basics.dtx b/macros/latex/contrib/l3kernel/l3basics.dtx index bc79956d05..0bfa11edaf 100644 --- a/macros/latex/contrib/l3kernel/l3basics.dtx +++ b/macros/latex/contrib/l3kernel/l3basics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2024-02-13} +% \date{Released 2024-02-18} % % \maketitle % @@ -1252,16 +1252,22 @@ % \begin{function}[EXP]{\if:w, \if_charcode:w, \if_catcode:w} % \begin{syntax} % "\if:w" <token(s)> <true code> "\else:" <false code> "\fi:" \\ -% "\if_catcode:w" <token(s_> <true code> "\else:" <false code> "\fi:" +% "\if_catcode:w" <token(s)> <true code> "\else:" <false code> "\fi:" % \end{syntax} +% "\if_charcode:w" is an alternative name for "\if:w". % These conditionals expand \meta{token(s)} until two -% unexpandable tokens \meta{token_1} and \meta{tokens_2} are left; -% any further tokens become part of the \meta{true code}. -% If you wish to prevent this expansion, -% prefix the token in question with "\exp_not:N". "\if_catcode:w" -% tests if the category codes of the two tokens are the same whereas -% "\if:w" tests if the character codes are -% identical. "\if_charcode:w" is an alternative name for "\if:w". +% unexpandable tokens \meta{token_1} and \meta{token_2} are found; +% any further tokens up to the next unbalanced "\else:" are the true branch, +% ending with \meta{true code}. It is executed if the condition is fulfilled, +% otherwise \meta{false code} is executed. +% You can omit "\else:" when just in front of "\fi:" and +% you can nest "\if...\else:...\fi:" constructs inside the true branch or the +% \meta{false code}. +% With "\exp_not:N", you can prevent the expansion of a token. +% +% "\if_catcode:w" +% tests if \meta{token_1} and \meta{token_2} have the same category code whereas +% "\if:w" and \cs{if_charcode:w} test if they have the same character code. % \begin{texnote} % \cs{if:w} and \cs{if_charcode:w} are both the \TeX{} primitive \tn{if}. % \cs{if_catcode:w} is the \TeX{} primitive \tn{ifcat}. |