[latex3-commits] [latex3/latex3] main: Ensure each primitive conditional has a "This is the TeX primitive ..." texnote (1eb4212b0)

github at latex-project.org github at latex-project.org
Mon Oct 30 08:52:17 CET 2023


Repository : https://github.com/latex3/latex3
On branch  : main
Link       : https://github.com/latex3/latex3/commit/1eb4212b0d92774a8316d06203a5414802b770fc

>---------------------------------------------------------------

commit 1eb4212b0d92774a8316d06203a5414802b770fc
Author: Yukai Chou <muzimuzhi at gmail.com>
Date:   Mon Oct 30 07:47:48 2023 +0800

    Ensure each primitive conditional has a "This is the TeX primitive ..." texnote


>---------------------------------------------------------------

1eb4212b0d92774a8316d06203a5414802b770fc
 l3kernel/l3basics.dtx | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/l3kernel/l3basics.dtx b/l3kernel/l3basics.dtx
index 3af0645cb..6c418f49c 100644
--- a/l3kernel/l3basics.dtx
+++ b/l3kernel/l3basics.dtx
@@ -1210,7 +1210,7 @@
 % Certain conditionals deal with specific data types like boxes and
 % fonts and are described there. The ones described below are either
 % the universal conditionals or deal with control sequences. We
-% prefix primitive conditionals with |\if_|.
+% prefix primitive conditionals with |\if_|, except for \cs{if:w}.
 %
 % \begin{function}[EXP]
 %   {\if_true:, \if_false:, \else:, \fi:, \reverse_if:N}
@@ -1225,8 +1225,10 @@
 %   conditional. The function "\or:" is documented in \pkg{l3int} and
 %   used in case switches.
 %   \begin{texnote}
-%     These are equivalent to their corresponding \TeX\ primitive
-%     conditionals; \cs{reverse_if:N} is \eTeX's \tn{unless}.
+%     \cs{if_true:} and \cs{if_false:} are equivalent to their corresponding
+%     \TeX{} primitive conditionals \tn{iftrue} and \tn{iffalse};
+%     \cs{else:} and \cs{fi:} are the \TeX{} primitives \tn{else} and \tn{fi};
+%     \cs{reverse_if:N} is the \eTeX{} primitive \tn{unless}.
 %   \end{texnote}
 % \end{function}
 %
@@ -1239,7 +1241,7 @@
 %   <arg_1> and <arg_2> could be functions, variables, tokens; in all cases the
 %   \emph{unexpanded} definitions are compared.
 %   \begin{texnote}
-%     This is \TeX{}'s \tn{ifx}.
+%     This is the \TeX{} primitive \tn{ifx}.
 %   \end{texnote}
 % \end{function}
 %
@@ -1254,6 +1256,10 @@
 %   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".
+%   \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}.
+%   \end{texnote}
 % \end{function}
 %
 % \begin{function}[EXP]{\if_cs_exist:N, \if_cs_exist:w}
@@ -1267,7 +1273,7 @@
 %   "\scan_stop:"! This can be useful when dealing with control
 %   sequences which cannot be entered as a single token.
 %   \begin{texnote}
-%     These are \TeX{}'s \tn{ifdefined} and \tn{ifcsname}, respectively.
+%     These are the \TeX{} primitives \tn{ifdefined} and \tn{ifcsname}.
 %   \end{texnote}
 % \end{function}
 %
@@ -1281,6 +1287,10 @@
 %   \end{syntax}
 %   Execute <true code> if currently in horizontal mode, otherwise
 %   execute <false code>. Similar for the other functions.
+%   \begin{texnote}
+%     These are the \TeX{} primitives \tn{ifhmode}, \tn{ifvmode}, \tn{ifmmode},
+%     and~\tn{ifinner}.
+%   \end{texnote}
 % \end{function}
 %
 % \section{Starting a paragraph}





More information about the latex3-commits mailing list.