[latex3-commits] [git/LaTeX3-latex3-latex2e] gh963: Fail also if \end part already exists (b288b045)

PhelypeOleinik phelype.oleinik at latex-project.org
Mon Nov 28 05:32:11 CET 2022


Repository : https://github.com/latex3/latex2e
On branch  : gh963
Link       : https://github.com/latex3/latex2e/commit/b288b04543f64f29bd5adb7b8a4cc0ec0884b0c1

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

commit b288b04543f64f29bd5adb7b8a4cc0ec0884b0c1
Author: PhelypeOleinik <phelype.oleinik at latex-project.org>
Date:   Mon Nov 28 01:32:11 2022 -0300

    Fail also if \end part already exists


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

b288b04543f64f29bd5adb7b8a4cc0ec0884b0c1
 base/ltdefns.dtx | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/base/ltdefns.dtx b/base/ltdefns.dtx
index c91f6c08..d2ffc578 100644
--- a/base/ltdefns.dtx
+++ b/base/ltdefns.dtx
@@ -1734,6 +1734,9 @@
     {\@firstofone}}
 \long\def\declare at environmentcopy#1#2#3#4{%
   \def\reserved at a{#3}%
+  \@ifundefined\reserved at a
+    {\expandafter\let\csname #3\expandafter\endcsname
+                     \csname end#3\endcsname}{}%
   \@ifundefined\reserved at a{#1}{#2}%
     {\ExpandArgs{cc}\declare at commandcopy@do{#3}{#4}%
      \ExpandArgs{cc}\declare at commandcopy@do{end#3}{end#4}}}





More information about the latex3-commits mailing list.