diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/etoolbox')
-rw-r--r-- | Master/texmf-dist/tex/latex/etoolbox/etoolbox.def | 24 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/etoolbox/etoolbox.sty | 67 |
2 files changed, 68 insertions, 23 deletions
diff --git a/Master/texmf-dist/tex/latex/etoolbox/etoolbox.def b/Master/texmf-dist/tex/latex/etoolbox/etoolbox.def index 41540333b44..c9f791e4442 100644 --- a/Master/texmf-dist/tex/latex/etoolbox/etoolbox.def +++ b/Master/texmf-dist/tex/latex/etoolbox/etoolbox.def @@ -1,6 +1,6 @@ -% $Id: etoolbox.def,v 1.7 2008/06/28 18:25:41 lehman stable $ +% $Id: etoolbox.def,v 1.8 2009/08/06 16:50:04 lehman stable $ -\ProvidesFile{etoolbox.def}[2008/06/28 v1.7 etoolbox debug messages] +\ProvidesFile{etoolbox.def}[2009/08/06 v1.8 etoolbox debug messages] \begingroup \makeatletter @@ -43,18 +43,18 @@ redefining macro now} \gdef\etb@msg@s@ret{% retokenizing macro now} -\gdef\etb@msg@f@def{% - control sequence is undefined or \@backslashchar relax} +\xdef\etb@msg@f@def{% + control sequence is undefined or \string\relax} \gdef\etb@msg@f@mac{% control sequence is not a macro} -\gdef\etb@msg@f@tok{% - macro cannot be retokenized cleanly\etb@msg@ex - the macro may have been defined under a category\etb@msg@br - code regime different from the current one\etb@msg@ex - the replacement text may contain special control\etb@msg@br - sequence tokens formed with \@backslashchar - csname...\@backslashchar endcsname;\etb@msg@ex - the replacement text may contain carriage return,\etb@msg@br +\xdef\etb@msg@f@tok{% + macro cannot be retokenized cleanly\noexpand\etb@msg@ex + the macro may have been defined under a category\noexpand\etb@msg@br + code regime different from the current one\noexpand\etb@msg@ex + the replacement text may contain special control\noexpand\etb@msg@br + sequence tokens formed with + \string\csname...\string\endcsname;\noexpand\etb@msg@ex + the replacement text may contain carriage return,\noexpand\etb@msg@br newline, or similar characters} \xdef\etb@msg@f@hsh{% nested patching command and parameters in patch\noexpand\etb@msg@ex diff --git a/Master/texmf-dist/tex/latex/etoolbox/etoolbox.sty b/Master/texmf-dist/tex/latex/etoolbox/etoolbox.sty index c026d1407e0..d1292913092 100644 --- a/Master/texmf-dist/tex/latex/etoolbox/etoolbox.sty +++ b/Master/texmf-dist/tex/latex/etoolbox/etoolbox.sty @@ -1,6 +1,6 @@ -% $Id: etoolbox.sty,v 1.7 2008/06/28 18:25:41 lehman stable $ +% $Id: etoolbox.sty,v 1.8 2009/08/06 16:50:04 lehman stable $ -% Copyright (c) 2007-2008 Philipp Lehman. +% Copyright (c) 2007-2009 Philipp Lehman. % % Permission is granted to copy, distribute and/or modify this % software under the terms of the LaTeX Project Public License @@ -15,7 +15,7 @@ % particular purpose. \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{etoolbox}[2008/06/28 v1.7 e-TeX tools for LaTeX] +\ProvidesPackage{etoolbox}[2009/08/06 v1.8 e-TeX tools for LaTeX] \begingroup \@ifundefined{eTeXversion} @@ -36,12 +36,16 @@ \catcode\number`\|=\the\catcode`\|\relax \catcode\number`\:=\the\catcode`\:\relax \catcode\number`\-=\the\catcode`\-\relax + \catcode\number`\==\the\catcode`\=\relax + \catcode\number`\<=\the\catcode`\<\relax \catcode\number`\>=\the\catcode`\>\relax } \catcode`\&=3 \catcode`\|=3 \@makeother\: \@makeother\- +\@makeother\= +\@makeother\< \@makeother\> \AtEndOfPackage{% @@ -374,6 +378,50 @@ \etb@ifblank@i#1&&\@secondoftwo\@firstoftwo:} \long\def\etb@ifblank@i#1#2#4#5:{#4} +% {<numexpr>}{<comp>}{<numexpr>}{<true>}{<false>} + +\newcommand*{\ifnumcomp}[3]{% + \ifnum\numexpr#1\relax + #2\numexpr#3\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} + +% {<numexpr>}{<numexpr>}{<true>}{<false>} + +\newcommand*{\ifnumequal}[1]{% + \ifnumcomp{#1}=} + +\newcommand*{\ifnumgreater}[1]{% + \ifnumcomp{#1}>} + +\newcommand*{\ifnumless}[1]{% + \ifnumcomp{#1}<} + +% {<dimexpr>}{<comp>}{<dimexpr>}{<true>}{<false>} + +\newcommand*{\ifdimcomp}[3]{% + \ifdim\dimexpr#1\relax + #2\dimexpr#3\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi} + +% {<dimexpr>}{<dimexpr>}{<true>}{<false>} + +\newcommand*{\ifdimequal}[1]{% + \ifdimcomp{#1}=} + +\newcommand*{\ifdimgreater}[1]{% + \ifdimcomp{#1}>} + +\newcommand*{\ifdimless}[1]{% + \ifdimcomp{#1}<} + +% {<string>}{<true>}{<false>} + % {<cstoken>} \newcommand*{\expandonce}[1]{% @@ -575,19 +623,19 @@ \newrobustcmd*{\csmugdef}[1]{% \expandafter\mugdef\csname#1\endcsname} -% {<counter>}{<value>} +% {<counter>}{<numexpr>} \newrobustcmd*{\defcounter}[2]{% \ifcsundef{c@#1} {\etb@noglobal\@nocounterr{#1}}% - {\csname c@#1\endcsname\numexpr#2\relax\relax}} + {\csname c@#1\endcsname\numexpr#2\relax}} -% {<length>}{<value>} +% {<length>}{<glueexpr>} \newrobustcmd*{\deflength}[2]{% \ifundef{#1} {\etb@noglobal\etb@err@nolen{#1}}% - {#1\dimexpr#2\relax\relax}} + {#1\glueexpr#2\relax}} \protected\def\etb@err@nolen#1{% \etb@error{Length \string#1 undefined}\@eha} @@ -964,10 +1012,7 @@ \newcommand{\rmntonum}[1]{% \ifblank{#1} {} - {\expandafter\expandafter - \expandafter\etb@rti@end - \expandafter\number - \expandafter\numexpr + {\expandafter\etb@rti@end\number\numexpr \expandafter\etb@rti@prs\detokenize{#1}&\relax}} \def\etb@rti@prs#1#2{% |