summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/l3kernel/l3basics.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/l3kernel/l3basics.dtx')
-rw-r--r--macros/latex/contrib/l3kernel/l3basics.dtx75
1 files changed, 43 insertions, 32 deletions
diff --git a/macros/latex/contrib/l3kernel/l3basics.dtx b/macros/latex/contrib/l3kernel/l3basics.dtx
index 00e159d817..716b916817 100644
--- a/macros/latex/contrib/l3kernel/l3basics.dtx
+++ b/macros/latex/contrib/l3kernel/l3basics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2023-10-23}
+% \date{Released 2023-11-01}
%
% \maketitle
%
@@ -106,6 +106,9 @@
% level may be closed by a \cs{group_end:} function or by a token
% with category code $2$ (close-group), namely a ^^A{
% |}| if standard category codes apply.
+% \begin{texnote}
+% This is the \TeX{} primitive \tn{aftergroup}.
+% \end{texnote}
% \end{function}
%
% \begin{function}[added = 2021-05-11]{\group_show_list:, \group_log_list:}
@@ -116,7 +119,7 @@
% Display (to the terminal or log file) a list of the groups that are
% currently opened. This is intended for tracking down problems.
% \begin{texnote}
-% This is a wrapper around the \tn{showgroups} primitive.
+% This is a wrapper around the \eTeX{} primitive \tn{showgroups}.
% \end{texnote}
% \end{function}
%
@@ -130,8 +133,9 @@
% is therefore used as a shorthand for \enquote{replacement text}.
%
% Functions which are not \enquote{protected} are fully expanded
-% inside an \texttt{x} expansion. In contrast, \enquote{protected}
-% functions are not expanded within \texttt{x} expansions.
+% inside an \texttt{e}-type or \texttt{x}-type expansion.
+% In contrast, \enquote{protected} functions are not expanded within
+% \texttt{e} and \texttt{x} expansions.
%
% \subsection{Defining functions}
%
@@ -175,7 +179,7 @@
% Create a new function with the \texttt{protected} restriction,
% such as \cs{cs_set_protected:Npn}. The parameter may contain
% \cs{par} tokens but the function will not expand within an
-% \texttt{x}-type or \texttt{e}-type expansion.
+% \texttt{e}-type or \texttt{x}-type expansion.
% \end{description}
%
% Finally, the functions in
@@ -245,8 +249,8 @@
% Creates \meta{function} to expand to \meta{code} as replacement text.
% Within the \meta{code}, the \meta{parameters} (|#1|, |#2|,
% \emph{etc.}) will be replaced by those absorbed by the function.
-% The \meta{function} will not expand within an \texttt{x}-type or
-% or \texttt{e}-type
+% The \meta{function} will not expand within an \texttt{e}-type or
+% or \texttt{x}-type
% argument. The definition is global and an error results if the
% \meta{function} is already defined.
% \end{function}
@@ -265,7 +269,7 @@
% \emph{etc.}) will be replaced by those absorbed by the function.
% When the \meta{function} is used the \meta{parameters} absorbed
% cannot contain \cs{par} tokens. The \meta{function} will not
-% expand within an \texttt{x}-type or \texttt{e}-type argument. The definition is global
+% expand within an \texttt{e}-type or \texttt{x}-type argument. The definition is global
% and an error results if the \meta{function} is already defined.
% \end{function}
%
@@ -317,7 +321,7 @@
% \emph{etc.}) will be replaced by those absorbed by the function.
% The assignment of a meaning to the \meta{function} is restricted to
% the current \TeX{} group level. The \meta{function} will
-% not expand within an \texttt{x}-type or \texttt{e}-type argument.
+% not expand within an \texttt{e}-type or \texttt{x}-type argument.
% \end{function}
%
% \begin{function}
@@ -336,7 +340,7 @@
% cannot contain \cs{par} tokens. The assignment of a meaning
% to the \meta{function} is restricted to the current \TeX{} group
% level. The \meta{function} will not expand within an
-% \texttt{x}-type or \texttt{e}-type argument.
+% \texttt{e}-type or \texttt{x}-type argument.
% \end{function}
%
% \begin{function}
@@ -389,7 +393,7 @@
% The assignment of a meaning to the \meta{function} is \emph{not}
% restricted to the current \TeX{} group level: the assignment is
% global. The \meta{function} will not expand within an
-% \texttt{x}-type or \texttt{e}-type argument.
+% \texttt{e}-type or \texttt{x}-type argument.
% \end{function}
%
% \begin{function}
@@ -408,7 +412,7 @@
% cannot contain \cs{par} tokens. The assignment of a meaning to the
% \meta{function} is \emph{not} restricted to the current \TeX{}
% group level: the assignment is global. The \meta{function} will
-% not expand within an \texttt{x}-type or \texttt{e}-type argument.
+% not expand within an \texttt{e}-type or \texttt{x}-type argument.
% \end{function}
%
% \subsection{Defining new functions using the signature}
@@ -459,8 +463,8 @@
% Within the \meta{code}, the number of \meta{parameters} is detected
% automatically from the function signature. These \meta{parameters}
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
-% function. The \meta{function} will not expand within an \texttt{x}-type
-% or \texttt{e}-type argument. The definition is global and
+% function. The \meta{function} will not expand within an \texttt{e}-type
+% or \texttt{x}-type argument. The definition is global and
% an error results if the \meta{function} is already defined.
% \end{function}
%
@@ -478,7 +482,7 @@
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
% function. When the \meta{function} is used the \meta{parameters}
% absorbed cannot contain \cs{par} tokens. The \meta{function} will not
-% expand within an \texttt{x}-type or \texttt{e}-type argument. The definition is global and
+% expand within an \texttt{e}-type or \texttt{x}-type argument. The definition is global and
% an error results if the \meta{function} is already defined.
% \end{function}
%
@@ -529,8 +533,8 @@
% Within the \meta{code}, the number of \meta{parameters} is detected
% automatically from the function signature. These \meta{parameters}
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
-% function. The \meta{function} will not expand within an \texttt{x}-type
-% or \texttt{e}-type argument.
+% function. The \meta{function} will not expand within an \texttt{e}-type
+% or \texttt{x}-type argument.
% The assignment of a meaning to the \meta{function} is restricted to
% the current \TeX{} group level.
% \end{function}
@@ -549,7 +553,7 @@
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
% function. When the \meta{function} is used the \meta{parameters}
% absorbed cannot contain \cs{par} tokens. The \meta{function} will not
-% expand within an \texttt{x}-type or \texttt{e}-type argument.
+% expand within an \texttt{e}-type or \texttt{x}-type argument.
% The assignment of a meaning to the \meta{function} is restricted to
% the current \TeX{} group level.
% \end{function}
@@ -599,8 +603,8 @@
% Within the \meta{code}, the number of \meta{parameters} is detected
% automatically from the function signature. These \meta{parameters}
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
-% function. The \meta{function} will not expand within an \texttt{x}-type
-% or \texttt{e}-type argument.
+% function. The \meta{function} will not expand within an \texttt{e}-type
+% or \texttt{x}-type argument.
% The assignment of a meaning to the \meta{function} is global.
% \end{function}
%
@@ -618,7 +622,7 @@
% (|#1|, |#2|, \emph{etc.}) will be replaced by those absorbed by the
% function. When the \meta{function} is used the \meta{parameters}
% absorbed cannot contain \cs{par} tokens. The \meta{function} will not
-% expand within an \texttt{x}-type or \texttt{e}-type argument.
+% expand within an \texttt{e}-type or \texttt{x}-type argument.
% The assignment of a meaning to the \meta{function} is global.
% \end{function}
%
@@ -712,7 +716,7 @@
% This function expands to the \emph{meaning} of the \meta{control sequence}
% control sequence. For a macro, this includes the \meta{replacement text}.
% \begin{texnote}
-% This is \TeX{}'s \tn{meaning} primitive.
+% This is the \TeX{} primitive \tn{meaning}.
% For tokens that are not control sequences, it is more logical to
% use \cs{token_to_meaning:N}.
% The \texttt{c} variant correctly reports undefined arguments.
@@ -825,7 +829,7 @@
% of category code $10$. The result does \emph{not} include
% the current escape token, contrarily to \cs{token_to_str:N}.
% Full expansion of this function requires exactly $2$ expansion
-% steps, and so an \texttt{x}-type or \texttt{e}-type expansion, or two
+% steps, and so an \texttt{e}-type or \texttt{x}-type expansion, or two
% \texttt{o}-type expansions are required to
% convert the \meta{control sequence} to a sequence of characters
% in the input stream. In most cases, an \texttt{f}-expansion
@@ -1207,7 +1211,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}
@@ -1222,8 +1226,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}
%
@@ -1236,7 +1242,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}
%
@@ -1251,6 +1257,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}
@@ -1264,7 +1274,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}
%
@@ -1278,6 +1288,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}
@@ -2414,9 +2428,6 @@
% returned with \meta{true} for when there is a colon in the function
% and \meta{false} if there is not.
%
-% We cannot use |:| directly as it has the wrong category code so
-% an |x|-type expansion is used to force the conversion.
-%
% First ensure that we actually get a properly evaluated string by
% expanding \cs{cs_to_str:N} twice. If the function contained a
% colon, the auxiliary takes as |#1| the function name, delimited by
@@ -3245,7 +3256,7 @@
% wrapping code as otherwise we would wrongly see the definitions that
% are in place there. To get correct escape characters, set the
% \tn{escapechar} in a group; this also localizes the assignment
-% performed by \texttt{x}-expansion. The \cs{cs_show:c} and \cs{cs_log:c} commands
+% performed by \texttt{e}-expansion. The \cs{cs_show:c} and \cs{cs_log:c} commands
% convert their argument to a control sequence within a group to avoid
% showing \tn{relax} for undefined control sequences.
% \begin{macrocode}