diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty')
-rw-r--r-- | Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty b/Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty index 9917a775167..bad9656fd11 100644 --- a/Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty +++ b/Master/texmf-dist/tex/generic/oberdiek/ltxcmds.sty @@ -87,7 +87,7 @@ \fi \expandafter\x\csname ver@ltxcmds.sty\endcsname \ProvidesPackage{ltxcmds}% - [2009/08/05 v1.0 Some LaTeX kernel commands for general use (HO)] + [2009/12/12 v1.1 LaTeX kernel commands for general use (HO)] \begingroup \catcode123 1 % { \catcode125 2 % } @@ -136,8 +136,14 @@ \lowercase{\endgroup \def\ltx@backslashchar{0}% } -\begingroup\expandafter\expandafter\expandafter\endgroup -\expandafter\ifx\csname ifcsname\endcsname\relax +\def\ltx@LocalExpandAfter{% + \begingroup + \expandafter\expandafter\expandafter + \endgroup + \expandafter +} +\ltx@LocalExpandAfter +\ifx\csname ifcsname\endcsname\relax \def\ltx@ifundefined#1{% \expandafter\ifx\csname #1\endcsname\relax \expandafter\ltx@firstoftwo @@ -145,6 +151,14 @@ \expandafter\ltx@secondoftwo \fi }% + \def\ltx@IfUndefined#1{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname #1\endcsname\relax + \expandafter\ltx@firstoftwo + \else + \expandafter\ltx@secondoftwo + \fi + }% \expandafter\ltx@gobble \else \expandafter\ltx@firstofone @@ -152,17 +166,16 @@ {% \def\ltx@ifundefined#1{% \ifcsname #1\endcsname - \expandafter\ltx@secondoftwo + \expandafter\ifx\csname #1\endcsname\relax + \expandafter\expandafter\expandafter\ltx@firstoftwo + \else + \expandafter\expandafter\expandafter\ltx@secondoftwo + \fi \else \expandafter\ltx@firstoftwo \fi }% -} -\def\ltx@LocalExpandAfter{% - \begingroup - \expandafter\expandafter\expandafter - \endgroup - \expandafter + \let\ltx@IfUndefined\ltx@ifundefined } \ltx@AtEnd \endinput |