summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-02-24 20:52:33 +0000
committerKarl Berry <karl@freefriends.org>2022-02-24 20:52:33 +0000
commit9b56d03fb7b3241bc831b04e814e4f4b0218efe7 (patch)
treed7b498ee03cd9974c5db8923d4f4375d57f71ffc /Master/texmf-dist/tex/latex
parentd2aa2098ae5fa2b8dac360a4efacdf84b8f76195 (diff)
atendofenv (24feb22)
git-svn-id: svn://tug.org/texlive/trunk@62164 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/atendofenv/atendofenv.sty8
1 files changed, 7 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/atendofenv/atendofenv.sty b/Master/texmf-dist/tex/latex/atendofenv/atendofenv.sty
index 0b08497e777..2e8dc4c9342 100644
--- a/Master/texmf-dist/tex/latex/atendofenv/atendofenv.sty
+++ b/Master/texmf-dist/tex/latex/atendofenv/atendofenv.sty
@@ -33,18 +33,24 @@
%% For more information, please refer to <https://unlicense.org>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{atendofenv}[2022/02/23 v0.1 Initial Version]
+\ProvidesPackage{atendofenv}[2022/02/24 v0.2 Prevent an infinite loop]
\RequirePackage{amsthm}
\RequirePackage{letltxmacro}
\newcommand{\AtEndOfEnv}[2]{
\ifcsname #1\endcsname
+ \ifcsname aeoe@old#1\endcsname\relax
+ \else
\expandafter\LetLtxMacro\csname aeoe@old#1\expandafter\endcsname\csname #1\endcsname
+ \fi
\else
\PackageError{atendofenv}{Environment #1 undefined}{Check the environment
name passed to AtEndOfEnv}
\fi
\ifcsname end#1\endcsname
+ \ifcsname aeoe@oldend#1\endcsname\relax
+ \else
\expandafter\LetLtxMacro\csname aeoe@oldend#1\expandafter\endcsname\csname end#1\endcsname
+ \fi
\else
\PackageError{atendofenv}{Environment #1 undefined}{Check the environment
name passed to AtEndOfEnv}