[latex3-commits] [git/LaTeX3-latex3-latex3] cs-delimited-args: Document changes (e2a9003c..9f85d0e2) [ci skip] (a134bfa79)

PhelypeOleinik tex.phelype at gmail.com
Sat Feb 29 03:48:42 CET 2020


Repository : https://github.com/latex3/latex3
On branch  : cs-delimited-args
Link       : https://github.com/latex3/latex3/commit/a134bfa7954133aa88ff2781555456a04f0b6d0f

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

commit a134bfa7954133aa88ff2781555456a04f0b6d0f
Author: PhelypeOleinik <tex.phelype at gmail.com>
Date:   Fri Feb 28 23:48:42 2020 -0300

    Document changes (e2a9003c..9f85d0e2) [ci skip]
    
    This set of commits addresses the usage of control sequence tokens as argument delimiters in xparse functions. Initially in issue #368, solved by allowing only character tokens. Since the change to allow control sequences is not too big, this feature was added. This also fixes issue #367.


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

a134bfa7954133aa88ff2781555456a04f0b6d0f
 l3packages/xparse/xparse.dtx | 34 ++++++++++++++++++----------------
 1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/l3packages/xparse/xparse.dtx b/l3packages/xparse/xparse.dtx
index d63baf5af..5f04632c4 100644
--- a/l3packages/xparse/xparse.dtx
+++ b/l3packages/xparse/xparse.dtx
@@ -130,12 +130,12 @@
 %     Regardless of the input, the argument will be passed to the
 %     internal code without the outer braces. This is the \pkg{xparse}
 %     type specifier for a normal \TeX{} argument.
-%   \item[r] Given as \texttt{r}\meta{char1}\meta{char2}, this denotes a
+%   \item[r] Given as \texttt{r}\meta{token1}\meta{token2}, this denotes a
 %     \enquote{required} delimited argument, where the delimiters are
-%     \meta{char1} and \meta{char2}. If the opening delimiter
-%     \meta{char1} is missing, the default marker |-NoValue-| will be
+%     \meta{token1} and \meta{token2}. If the opening delimiter
+%     \meta{token1} is missing, the default marker |-NoValue-| will be
 %     inserted after a suitable error.
-%   \item[R] Given as \texttt{R}\meta{char1}\meta{char2}\marg{default},
+%   \item[R] Given as \texttt{R}\meta{token1}\meta{token2}\marg{default},
 %     this is a \enquote{required} delimited argument as for~\texttt{r},
 %     but it has a user-definable recovery \meta{default} instead of
 %     |-NoValue-|.
@@ -158,30 +158,30 @@
 %   \item[o] A standard \LaTeX{} optional argument, surrounded with square
 %     brackets, which will supply
 %     the special |-NoValue-| marker if not given (as described later).
-%   \item[d] Given as \texttt{d}\meta{char1}\meta{char2}, an optional
-%     argument which is delimited by \meta{char1} and \meta{char2}.
+%   \item[d] Given as \texttt{d}\meta{token1}\meta{token2}, an optional
+%     argument which is delimited by \meta{token1} and \meta{token2}.
 %     As with \texttt{o}, if no
 %     value is given the special marker |-NoValue-| is returned.
 %   \item[O] Given as \texttt{O}\marg{default}, is like \texttt{o}, but
 %     returns \meta{default} if no value is given.
-%   \item[D] Given as \texttt{D}\meta{char1}\meta{char2}\marg{default},
+%   \item[D] Given as \texttt{D}\meta{token1}\meta{token2}\marg{default},
 %     it is as for \texttt{d}, but returns \meta{default} if no value is given.
 %     Internally, the \texttt{o}, \texttt{d} and \texttt{O} types are
 %     short-cuts to an appropriated-constructed \texttt{D} type argument.
 %   \item[s] An optional star, which will result in a value
 %     \cs{BooleanTrue} if a star is present and \cs{BooleanFalse}
 %     otherwise (as described later).
-%   \item[t] An optional \meta{char}, which will result in a value
-%     \cs{BooleanTrue} if \meta{char} is present and \cs{BooleanFalse}
-%     otherwise. Given as \texttt{t}\meta{char}.
-%   \item[e] Given as \texttt{e}\marg{chars}, a set of optional
+%   \item[t] An optional \meta{token}, which will result in a value
+%     \cs{BooleanTrue} if \meta{token} is present and \cs{BooleanFalse}
+%     otherwise. Given as \texttt{t}\meta{token}.
+%   \item[e] Given as \texttt{e}\marg{tokens}, a set of optional
 %     \emph{embellishments}, each of which requires a \emph{value}.
 %     If an embellishment is not present, |-NoValue-| is returned.  Each
 %     embellishment gives one argument, ordered as for the list of
-%     \meta{chars} in the argument specification.  All \meta{chars}
+%     \meta{tokens} in the argument specification.  All \meta{tokens}
 %     must be distinct.  \emph{This is an experimental type}.
 %   \item[E] As for \texttt{e} but returns one or more \meta{defaults}
-%     if values are not given: \texttt{E}\marg{chars}\marg{defaults}. See
+%     if values are not given: \texttt{E}\marg{tokens}\marg{defaults}. See
 %     Section~\ref{sec:embellishment} for more details.
 % \end{itemize}
 %
@@ -213,7 +213,9 @@
 %   \foo[[]         % Error: missing closing "]"
 % \end{verbatim}
 % Also note that |{| and |}| cannot be used as delimiters as they are used
-% by \TeX{} as grouping tokens. Arguments to be grabbed inside these tokens
+% by \TeX{} as grouping tokens. Implicit begin- or end-group tokens (\emph{e.g.},
+% |\bgroup| and |\egroup|) are not allowed for delimited argument tipes.
+% Arguments to be grabbed inside these tokens
 % must be created as either \texttt{m}- or \texttt{g}-type arguments.
 %
 % Within delimited arguments, non-balanced or otherwise awkward tokens may
@@ -371,13 +373,13 @@
 % \subsection{Default values for \enquote{embellishments}}
 % \label{sec:embellishment}
 %
-% The \texttt{E}-type argument allows one default value per test character.
+% The \texttt{E}-type argument allows one default value per test token.
 % This is achieved by giving a list of defaults for each entry in the
 % list, for example:
 % \begin{verbatim}
 %   E{^_}{{UP}{DOWN}}
 % \end{verbatim}
-% If the list of default values is \emph{shorter} than the list of test characters,
+% If the list of default values is \emph{shorter} than the list of test tokens,
 % the special |-NoValue-| marker will be returned (as for the \texttt{e}-type
 % argument). Thus for example
 % \begin{verbatim}





More information about the latex3-commits mailing list.