[latex3-commits] [latex3/latex3] main: Update l3basics.dtx (4dedc362e)
github at latex-project.org
github at latex-project.org
Thu Feb 15 13:50:53 CET 2024
Repository : https://github.com/latex3/latex3
On branch : main
Link : https://github.com/latex3/latex3/commit/4dedc362edb33f8bfbfaca3340bff744a2adc32b
>---------------------------------------------------------------
commit 4dedc362edb33f8bfbfaca3340bff744a2adc32b
Author: LAURENS Jérôme <jerome.laurens at u-bourgogne.fr>
Date: Thu Feb 15 13:05:21 2024 +0100
Update l3basics.dtx
Comment revisited
>---------------------------------------------------------------
4dedc362edb33f8bfbfaca3340bff744a2adc32b
l3kernel/l3basics.dtx | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/l3kernel/l3basics.dtx b/l3kernel/l3basics.dtx
index d70703270..7993b5b43 100644
--- a/l3kernel/l3basics.dtx
+++ b/l3kernel/l3basics.dtx
@@ -1251,18 +1251,23 @@
%
% \begin{function}[EXP]{\if:w, \if_charcode:w, \if_catcode:w}
% \begin{syntax}
-% "\if:w" <token_1> <token_2> <true code> "\else:" <false code> "\fi:" \\
-% "\if_catcode:w" <token_1> <token_2> <true code> "\else:" <false code> "\fi:"
-% \end{syntax}
-% These conditionals expand their following tokens until two
-% unexpandable tokens \meta{token_1} and \meta{token_2} are left;
-% any further tokens up to the next "\else" are the \meta{true code}.
+% "\if: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{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 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".
+% 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}.
More information about the latex3-commits
mailing list.