diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/etoolbox/etoolbox.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/etoolbox/etoolbox.sty | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/latex/etoolbox/etoolbox.sty b/Master/texmf-dist/tex/latex/etoolbox/etoolbox.sty index 43e00958b5d..39b4a791b03 100644 --- a/Master/texmf-dist/tex/latex/etoolbox/etoolbox.sty +++ b/Master/texmf-dist/tex/latex/etoolbox/etoolbox.sty @@ -12,7 +12,7 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{etoolbox} - [2020/07/15 v2.5i e-TeX tools for LaTeX (JAW)] + [2020/08/24 v2.5j e-TeX tools for LaTeX (JAW)] \begingroup \@ifundefined{eTeXversion} @@ -878,6 +878,45 @@ \csname#2\endcsname} {\csundef{#1}}} +\ifdef\NewCommandCopy + {% + \def\etb@carsquare#1#2#3\@nil{#1#2} + % + % {<cstoken>}{<true>}{<false>} + % + \newrobustcmd*{\etb@if@robustcmd}[1]{% + \begingroup + \escapechar=`\\ + \edef\etb@tempa{% + \endgroup + \def\noexpand\etb@tempa{\noexpand\@testopt + \expandafter\noexpand\csname\string#1\endcsname}% + \def\noexpand\etb@tempb{\unexpanded\expandafter\expandafter\expandafter + {\expandafter\etb@carsquare#1{}{}\@nil}}% + }\etb@tempa + \ifx\etb@tempa\etb@tempb + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} + % + % {<cstoken>}{<cstoken>} + % + \newrobustcmd*{\etb@copy@robustcmd}[2]{% + \begingroup + \escapechar=`\\ + \edef\etb@tempa{% + \endgroup + \protected\def\noexpand#1{\noexpand\@testopt + \expandafter\noexpand\csname\string#1\endcsname + \unexpanded\expandafter\expandafter\expandafter + {\expandafter\@gobbletwo#2}}% + \let\expandafter\noexpand\csname\string#1\endcsname + \expandafter\noexpand\csname\string#2\endcsname + }\etb@tempa} + \g@addto@macro\@declarecommandcopylisthook + {{\etb@if@robustcmd\etb@copy@robustcmd}} + }{} % {<csname>} \newcommand*{\csuse}[1]{% @@ -1699,7 +1738,7 @@ \ifdef\AddToHook {% - \newrobustcmd*{\AtEndPreamble}{\AddToHook{env/document/begin}}% + \newrobustcmd*{\AtEndPreamble}{\AddToHook{begindocument/before}}% \let\AfterPreamble\AtBeginDocument \newrobustcmd*{\AfterEndPreamble}{\AddToHook{begindocument/end}}% \newrobustcmd*{\AfterEndDocument}{\AddToHook{enddocument/end}}% |