[latex3-commits] [latex3/latex2e] gh1463: Document space-removal of \NewDocumentEnvironment (2cb9fffad)

github at latex-project.org github at latex-project.org
Mon Oct 21 14:26:03 CEST 2024


Repository : https://github.com/latex3/latex2e
On branch  : gh1463
Link       : https://github.com/latex3/latex2e/commit/2cb9fffad5fe9e628c892c420f669996a9e2e9b9

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

commit 2cb9fffad5fe9e628c892c420f669996a9e2e9b9
Author: Joseph Wright <joseph at texdev.net>
Date:   Mon Oct 21 13:26:03 2024 +0100

    Document space-removal of \NewDocumentEnvironment


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

2cb9fffad5fe9e628c892c420f669996a9e2e9b9
 base/doc/usrguide.tex | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/base/doc/usrguide.tex b/base/doc/usrguide.tex
index 2b9e95962..994f79f67 100644
--- a/base/doc/usrguide.tex
+++ b/base/doc/usrguide.tex
@@ -43,7 +43,7 @@
     \texttt{usrguide.tex} for full details.}%
 }
 
-\date{2024-05-24}
+\date{2024-10-21}
 
 \NewDocumentCommand\cs{m}{\texttt{\textbackslash\detokenize{#1}}}
 \NewDocumentCommand\marg{m}{\arg{#1}}
@@ -265,7 +265,16 @@ These commands work in the same way as \cs{NewDocumentCommand}, etc.\@, but
 create environments (\cs{begin}\arg{env} \ldots{}
 \cs{end}\arg{env}). Both the \meta{beg-code} and \meta{end-code}
 may access the arguments as defined by \meta{arg spec}. The arguments will be
-given following \cs{begin}\arg{env}.
+given following \cs{begin}\arg{env}. Any spaces at the start and end of the
+\arg{env} are removed before the definition takes place, thus
+\begin{verbatim}
+\NewDocumentEnviornment{foo}
+\end{verbatim}
+and
+\begin{verbatim}
+\NewDocumentEnviornment{ foo }
+\end{verbatim}
+both create the same \enquote{\texttt{foo}} environment.
 
 \subsection{Optional arguments}
 \label{sec:cmd:opt}





More information about the latex3-commits mailing list.