[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: More space tidying (07d13e52)

Joseph Wright joseph.wright at morningstar2.co.uk
Mon Jul 25 12:37:34 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/07d13e528b20a7a559d9d0e2508625240ac7e100

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

commit 07d13e528b20a7a559d9d0e2508625240ac7e100
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Mon Jul 25 11:37:34 2022 +0100

    More space tidying


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

07d13e528b20a7a559d9d0e2508625240ac7e100
 base/doc/usrguide3.tex | 32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/base/doc/usrguide3.tex b/base/doc/usrguide3.tex
index bf506d8c..2d7f295a 100644
--- a/base/doc/usrguide3.tex
+++ b/base/doc/usrguide3.tex
@@ -433,13 +433,13 @@ only contains one or more normal blanks.
 For example
 \begin{verbatim}
 \NewDocumentCommand\foo{m!o}{\par #1:
-   \IfNoValueTF{#2}
-     {No optional}%
-     {%
-       \IfBlankTF{#2}
-         {Blanks in or empty}%
-         {Real content in}%
-      }%
+  \IfNoValueTF{#2}
+    {No optional}%
+    {%
+      \IfBlankTF{#2}
+        {Blanks in or empty}%
+        {Real content in}%
+    }%
   \space argument!}
 \foo{1}[bar] \foo{2}[  ] \foo{3}[] \foo{4}[\space] \foo{5} [x]
 \end{verbatim}
@@ -537,7 +537,7 @@ argument, all the arguments pass through that processor before being fed
 to the \meta{code}.  For example, this command
 \begin{verbatim}
 \NewDocumentCommand \foo { >{\TrimSpaces} e{_^} }
-    { [#1](#2) }
+  { [#1](#2) }
 \end{verbatim}
 applies \cs{TrimSpaces} to both arguments.
 
@@ -878,13 +878,15 @@ As an example, the following declaration provides a method to generate
 copyedit commands:
 \begin{verbatim}
 \NewDocumentCommand\newcopyedit{mO{red}}
-  {\newcounter{todo#1}%
-   \ExpandArgs{c}\NewDocumentCommand{#1}{s m}%
-     {\stepcounter{todo#1}%
-      \IfBooleanTF {##1}%
-         {\todo[color=#2!10]{\UseName{thetodo#1}: ##2}}%
-         {\todo[inline,color=#2!10]{\UseName{thetodo#1}: ##2}}%
-     }%
+  {%
+    \newcounter{todo#1}%
+    \ExpandArgs{c}\NewDocumentCommand{#1}{s m}%
+      {%
+        \stepcounter{todo#1}%
+        \IfBooleanTF {##1}%
+          {\todo[color=#2!10]{\UseName{thetodo#1}: ##2}}%
+          {\todo[inline,color=#2!10]{\UseName{thetodo#1}: ##2}}%
+      }%
   }
 \end{verbatim}
 Given that declaration you can then write





More information about the latex3-commits mailing list.