[latex3-commits] [git/LaTeX3-latex3-latex3] master: Document that xparse doesn't treat starred environment names specially [ci-skip] (8c95a0f)
Joseph Wright
joseph.wright at morningstar2.co.uk
Mon Mar 4 14:54:38 CET 2019
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/8c95a0fe90c8f8890aa671c853bb65afd1afbdda
>---------------------------------------------------------------
commit 8c95a0fe90c8f8890aa671c853bb65afd1afbdda
Author: Bruno Le Floch <bruno at le-floch.fr>
Date: Thu Feb 28 15:59:28 2019 +0100
Document that xparse doesn't treat starred environment names specially [ci-skip]
>---------------------------------------------------------------
8c95a0fe90c8f8890aa671c853bb65afd1afbdda
l3packages/xparse/xparse.dtx | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/l3packages/xparse/xparse.dtx b/l3packages/xparse/xparse.dtx
index 3c5a619..f70c00c 100644
--- a/l3packages/xparse/xparse.dtx
+++ b/l3packages/xparse/xparse.dtx
@@ -434,6 +434,31 @@
% Users should note that this feature is somewhat experimental. Feedback
% is therefore very welcome on the \texttt{LaTeX-L} mailing list.
%
+% \subsection{Starred environments}
+%
+% Many packages define environments with and without \texttt{*} in their
+% name, for instance \texttt{tabular} and \texttt{tabular*}. At
+% present, \pkg{xparse} does not provide specific tools to define these:
+% one should simply define the two environment separately, for instance
+% \begin{verbatim}
+% \NewDocumentEnvironment { tabular } { o +m } {...} {...}
+% \NewDocumentEnvironment { tabular* } { m o +m } {...} {...}
+% \end{verbatim}
+% Of course the implementation of these two environments, denoted
+% \enquote{\texttt{...}} in this example, can rely on the same internal
+% commands.
+%
+% Note that this situation is different from the \texttt{s} argument
+% type: if the signature of an environment starts with~\texttt{s} then
+% the star is searched for after the argument of \cs{begin}. For
+% instance, the following typesets \texttt{star}.
+% \begin{verbatim}
+% \NewDocumentEnvironment { envstar } { s }
+% {\IfBooleanTF {#1} {star} {no star}} {}
+% \begin{envstar}*
+% \end{envstar}
+% \end{verbatim}
+%
% \subsection{Backwards Compatibility}
% \label{sec:backwards}
%
More information about the latex3-commits
mailing list