diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/etoolbox/etoolbox.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/etoolbox/etoolbox.tex | 770 |
1 files changed, 455 insertions, 315 deletions
diff --git a/Master/texmf-dist/doc/latex/etoolbox/etoolbox.tex b/Master/texmf-dist/doc/latex/etoolbox/etoolbox.tex index 1e88f17e6f1..b3e94609535 100644 --- a/Master/texmf-dist/doc/latex/etoolbox/etoolbox.tex +++ b/Master/texmf-dist/doc/latex/etoolbox/etoolbox.tex @@ -1,10 +1,10 @@ -% $Id: etoolbox.tex,v 1.5 2008/04/26 18:23:00 lehman stable $ +% $Id: etoolbox.tex,v 1.6 2008/06/22 15:26:57 lehman stable $ % % This is the source of etoolbox.pdf. This file is primarily included % in the distribution for legal reasons. It will not compile as is % because it depends on unpublished classes and packages. % -\documentclass{latexdoc} +\documentclass{latexdoc}[2008/06/15] \usepackage[latin9]{inputenc} \usepackage[american]{babel} \usepackage[strict,babel=once]{csquotes} @@ -13,7 +13,7 @@ \MakeAutoQuote*{<}{>} \MakeShortVerb{\|} -\rcsid{$Id: etoolbox.tex,v 1.5 2008/04/26 18:23:00 lehman stable $} +\rcsid{$Id: etoolbox.tex,v 1.6 2008/06/22 15:26:57 lehman stable $} \titlepage{% title={The \sty{etoolbox} package}, @@ -52,7 +52,7 @@ I started to work on this package when I found myself implementing the same tool \subsection{Acknowledgments} -The \ltxcmd{ifblank} test of this package is based on code by Donald Arseneau. +The \cmd{ifblank} test of this package is based on code by Donald Arseneau. \section{User commands} \label{use} @@ -64,20 +64,20 @@ The facilities in this section are geared towards regular users as well as class \begin{ltxsyntax} -\cmd{newrobustcmd}{command}[arguments][optarg default]{replacement text} -\cmd*{newrobustcmd*}{command}[arguments][optarg default]{replacement text} +\cmditem{newrobustcmd}{command}[arguments][optarg default]{replacement text} +\cmditem*{newrobustcmd*}{command}[arguments][optarg default]{replacement text} -The syntax and behavior of this command is similar to \ltxcmd{newcommand} except that the newly defined \ltxarg{command} will be robust. This command differs from the \ltxcmd{DeclareRobustCommand} command from the \latex kernel in that it issues an error rather than just an informational message if the \ltxarg{command} is already defined. Since it uses \etex's low-level protection mechanism rather than the corresponding higher-level \latex facilities, it also does not require an additional macro to implement the <robustness>. This command itself is also robust. +The syntax and behavior of this command is similar to \cmd{newcommand} except that the newly defined \prm{command} will be robust. The behavior of this command differs from the \cmd{DeclareRobustCommand} command from the \latex kernel in that it issues an error rather than just an informational message if the \prm{command} is already defined. Since it uses \etex's low-level protection mechanism rather than the corresponding higher-level \latex facilities, it does not require an additional macro to implement the <robustness>. -\cmd{renewrobustcmd}{command}[arguments][optarg default]{replacement text} -\cmd*{renewrobustcmd*}{command}[arguments][optarg default]{replacement text} +\cmditem{renewrobustcmd}{command}[arguments][optarg default]{replacement text} +\cmditem*{renewrobustcmd*}{command}[arguments][optarg default]{replacement text} -The syntax and behavior of this command is similar to \ltxcmd{renewcommand} except that the redefined \ltxarg{command} will be robust. This command itself is also robust. +The syntax and behavior of this command is similar to \cmd{renewcommand} except that the redefined \prm{command} will be robust. -\cmd{providerobustcmd}{command}[arguments][optarg default]{replacement text} -\cmd*{providerobustcmd*}{command}[arguments][optarg default]{replacement text} +\cmditem{providerobustcmd}{command}[arguments][optarg default]{replacement text} +\cmditem*{providerobustcmd*}{command}[arguments][optarg default]{replacement text} -The syntax and behavior of this command is similar to \ltxcmd{providecommand} except that a newly defined \ltxarg{command} will be robust. Note that this command only provides a robust definition if the \ltxarg{command} is undefined. It will not make an already defined \ltxarg{command} robust. This command itself is robust. +The syntax and behavior of this command is similar to \cmd{providecommand} except that the newly defined \prm{command} will be robust. Note that this command will provide a robust definition of the \prm{command} only if it is undefined. It will not make an already defined \prm{command} robust. \end{ltxsyntax} @@ -86,47 +86,76 @@ The syntax and behavior of this command is similar to \ltxcmd{providecommand} ex \begin{ltxsyntax} -\cmd{robustify}{command} +\cmditem{robustify}{command} -Modifies an already defined \ltxarg{command} such that it is robust without altering its parameters, its prefixes, or its replacement text. If the \ltxarg{command} has been defined with \ltxcmd{DeclareRobustCommand}, this will be detected automatically. \latex's high-level protection mechanism will be replaced by the corresponding low-level \etex facility in this case. This command is robust and may only be used in the document preamble. +Modifies a \prm{command} defined with \cmd{newcommand} such that it is robust without altering its parameters, its prefixes, or its replacement text. If the \prm{command} has been defined with \cmd{DeclareRobustCommand}, this will be detected automatically. \latex's high-level protection mechanism will be replaced by the corresponding low-level \etex facility in this case. \end{ltxsyntax} \subsection[Lengths and counters]{Length and counter assignments} \label{use:cal} -The facilities in this section are replacements for \ltxcmd{setcounter} and \ltxcmd{setlength} which support arithmetic expressions. +The facilities in this section are replacements for \cmd{setcounter} and \cmd{setlength} which support arithmetic expressions. \begin{ltxsyntax} -\cmd{defcounter}{counter}{integer expression} +\cmditem{defcounter}{counter}{integer expression} -Assigns a value to a \latex \ltxarg{counter} previously initialized with \ltxcmd{newcounter}. This command is similar in concept and syntax to \ltxcmd{setcounter} except for two major differences. 1) The second argument may be an \ltxarg{integer expression} which will be processed with \ltxcmd{numexpr}. The \ltxarg{integer expression} may be any arbitrary code which is valid in this context. The value assigned to the \ltxarg{counter} will be the result of that calculation. 2) In contrast to \ltxcmd{setcounter}, the assignment is local by default but \ltxcmd{defcounter} may be prefixed with \ltxcmd{global}. The functional equivalent of \ltxcmd{setcounter} would be |\global\defcounter|. +Assigns a value to a \latex \prm{counter} previously initialized with \cmd{newcounter}. This command is similar in concept and syntax to \cmd{setcounter} except for two major differences. 1) The second argument may be an \prm{integer expression} which will be processed with \cmd{numexpr}. The \prm{integer expression} may be any arbitrary code which is valid in this context. The value assigned to the \prm{counter} will be the result of that calculation. 2) In contrast to \cmd{setcounter}, the assignment is local by default but \cmd{defcounter} may be prefixed with \cs{global}. The functional equivalent of \cmd{setcounter} would be \cs{global}\cmd{defcounter}. -\cmd{deflength}{length}{dimen expression} +\cmditem{deflength}{length}{dimen expression} -Assigns a value to a \ltxarg{length} register previously initialized with \ltxcmd{newlength}. This command is similar in concept and syntax to \ltxcmd{setlength} except that the second argument may be a \ltxarg{dimen expression} which will be processed with \ltxcmd{dimexpr}. The \ltxarg{dimen expression} may be any arbitrary code which is valid in this context. The value assigned to the \ltxarg{length} register will be the result of that calculation. The assignment is local by default but \ltxcmd{deflength} may be prefixed with \ltxcmd{global}. This command may be used as a drop-in replacement for \ltxcmd{setlength}. +Assigns a value to a \prm{length} register previously initialized with \cmd{newlength}. This command is similar in concept and syntax to \cmd{setlength} except that the second argument may be a \prm{dimen expression} which will be processed with \cmd{dimexpr}. The \prm{dimen expression} may be any arbitrary code which is valid in this context. The value assigned to the \prm{length} register will be the result of that calculation. The assignment is local by default but \cmd{deflength} may be prefixed with \cs{global}. This command may be used as a drop-in replacement for \cmd{setlength}. \end{ltxsyntax} \subsection[Predefined hooks]{Predefined all-purpose hooks} \label{use:pre} -\latex provides two hooks which defer the execution of code either to the beginning or the end of the document body. The \ltxcmd{AtBeginDocument} code is executed at the beginning of the document body, \emph{after} the main \file{aux} file has been read for the first time. The \ltxcmd{AtEndDocument} code is executed at the end of the document body, \emph{before} the main \file{aux} file is read for the second time. The hooks introduced here are similar in concept but defer the execution of their \ltxarg{code} argument to slightly different locations. The \ltxarg{code} may be arbitrary \tex code. Macro parameter characters in the \ltxarg{code} argument need not be doubled. +\latex provides two hooks which defer the execution of code either to the beginning or to the end of the document body. The \cmd{AtBeginDocument} code is executed towards the beginning of the document body, \emph{after} the main \file{aux} file has been read for the first time. The \cmd{AtEndDocument} code is executed at the end of the document body, \emph{before} the main \file{aux} file is read for the second time. The hooks introduced here are similar in concept but defer the execution of their \prm{code} argument to slightly different locations. The \prm{code} may be arbitrary \tex code. Parameter characters in the \prm{code} argument need not be doubled. To sum that up, \latex will perform the following tasks <inside> |\begin{document}|: + +\begin{itemize} +\setlength{\itemsep}{0pt} +\item Execute any \cmd{AtEndPreamble} code +\item Start initialization for document body +\item Load the main \file{aux} file written on the previous \latex pass +\item Open the main \file{aux} file for writing on the current pass +\item Continue initialization for document body +\item Execute any \cmd{AtBeginDocument} code +\item Complete initialization for document body +\item Execute any \cmd{AfterBeginDocument} code +\end{itemize} +% +Strictly speaking, \cmd{AtBeginDocument} code is neither part of the preamble nor part of the document body but located in-between these parts of a \latex document because it gets executed in the middle of the initialization sequence performed prior to typesetting. \cmd{AtEndPreamble} code, however, is part of the preamble; \cmd{AfterBeginDocument} code is part of the body and may contain printable text to be typeset as the very first thing in the document. Inside |\end{document}|, \latex will perform the following tasks: + +\begin{itemize} +\setlength{\itemsep}{0pt} +\item Execute any \cmd{AtEndDocument} code +\item Close the main \file{aux} file for writing +\item Load the main \file{aux} file written on the current \latex pass +\item Perform final tests and issue warnings, if applicable +\item Execute any \cmd{AfterEndDocument} code +\end{itemize} +% +Any \cmd{AtEndDocument} code may be considered as being part of the document body insofar as it is still possible to perform typesetting tasks and write to the main \file{aux} file when it gets executed. \cmd{AfterEndDocument} code is not part of the document body. \cmd{AtBeginDocument} and \cmd{AtEndDocument} are provided by the \latex kernel. The \sty{etoolbox} package introduces the following additional hooks: \begin{ltxsyntax} -\cmd{AtEndPreamble}{code} +\cmditem{AtEndPreamble}{code} -This hook differs from \ltxcmd{AtBeginDocument} in that the \ltxarg{code} is executed right at the end of the preamble, before the main \file{aux} file (as written during the previous \latex pass) is read and prior to any \ltxcmd{AtBeginDocument} code. It is sometimes desirable to defer code to the end of the preamble because all requested packages have been loaded at this point. Code deferred with \ltxcmd{AtBeginDocument}, however, is executed too late if it is required in the \file{aux} file. +This hook differs from \cmd{AtBeginDocument} in that the \prm{code} is executed right at the end of the preamble, before the main \file{aux} file (as written on the previous \latex pass) is read and prior to any \cmd{AtBeginDocument} code. It is sometimes desirable to defer code to the end of the preamble because all requested packages have been loaded at this point. However, \cmd{AtBeginDocument} code is executed too late if it is required in the \file{aux} file. -\cmd{AfterEndDocument}{code} +\cmditem{AfterBeginDocument}{code} -This hook differs from \ltxcmd{AtEndDocument} in that the \ltxarg{code} is executed at the very end of the document, after the main \file{aux} file (as written during the current \latex pass) has been read and after any \ltxcmd{AtEndDocument} code. This hook is useful if a package needs to evaluate any data in the \file{aux} file at the end of a \latex run. +This hook differs from \cmd{AtBeginDocument} in that the \prm{code} is executed as part of the document body, after any \cmd{AtBeginDocument} code. It is possible to perform typesetting tasks such as printing a title page at this point. -\cmd{AfterPreamble}{code} +\cmditem{AfterEndDocument}{code} -This hook is a variant of \ltxcmd{AtBeginDocument} which may be used in both the preamble and the document body. When used in the preamble, it behaves exactely like \ltxcmd{AtBeginDocument}. When used in the document body, it immediately executes its \ltxarg{code} argument (\ltxcmd{AtBeginDocument} issues an error in this case). +This hook differs from \cmd{AtEndDocument} in that the \prm{code} is executed at the very end of the document, after the main \file{aux} file (as written on the current \latex pass) has been read and after any \cmd{AtEndDocument} code. This hook is useful if a package needs to evaluate any data in the \file{aux} file at the end of a \latex run. + +\cmditem{AfterPreamble}{code} + +This hook is a variant of \cmd{AtBeginDocument} which may be used in both the preamble and the document body. When used in the preamble, it behaves exactely like \cmd{AtBeginDocument}. When used in the document body, it immediately executes its \prm{code} argument. \cmd{AtBeginDocument} would issue an error in this case. \end{ltxsyntax} @@ -134,64 +163,62 @@ This hook is a variant of \ltxcmd{AtBeginDocument} which may be used in both the The facilities in this section are geared towards class and package authors. -%\addtocontents{toc}{\protect\columnbreak} - \subsection{Definitions} \subsubsection{Macro definitions} \label{aut:def:def} -The facilities in this section are simple but frequently required shorthands which extend the scope of the \ltxcmd{@namedef} and \ltxcmd{@nameuse} macros from the \latex kernel. +The facilities in this section are simple but frequently required shorthands which extend the scope of the \cmd{@namedef} and \cmd{@nameuse} macros from the \latex kernel. \begin{ltxsyntax} -\cmd{csdef}{csname}<arguments>{replacement text} +\cmditem{csdef}{csname}<arguments>{replacement text} -Similar to the \tex primitive \ltxcmd{def} except that it takes a control sequence name as its first argument. This command is robust and corresponds to \ltxcmd{@namedef}. +Similar to the \tex primitive \cmd{def} except that it takes a control sequence name as its first argument. This command is robust and corresponds to \cmd{@namedef}. -\cmd{csgdef}{csname}<arguments>{replacement text} +\cmditem{csgdef}{csname}<arguments>{replacement text} -Similar to the \tex primitive \ltxcmd{gdef} except that it takes a control sequence name as its first argument. This command is robust. +Similar to the \tex primitive \cmd{gdef} except that it takes a control sequence name as its first argument. This command is robust. -\cmd{csedef}{csname}<arguments>{replacement text} +\cmditem{csedef}{csname}<arguments>{replacement text} -Similar to the \tex primitive \ltxcmd{edef} except that it takes a control sequence name as its first argument. This command is robust. +Similar to the \tex primitive \cmd{edef} except that it takes a control sequence name as its first argument. This command is robust. -\cmd{csxdef}{csname}<arguments>{replacement text} +\cmditem{csxdef}{csname}<arguments>{replacement text} -Similar to the \tex primitive \ltxcmd{xdef} except that it takes a control sequence name as its first argument. This command is robust. +Similar to the \tex primitive \cmd{xdef} except that it takes a control sequence name as its first argument. This command is robust. -\cmd{protected@csedef}{csname}<arguments>{replacement text} +\cmditem{protected@csedef}{csname}<arguments>{replacement text} -Similar to \ltxcmd{csedef} except that \latex's protection mechanism is temporarily enabled. To put it in other words: this command is similar to the \latex kernel command \ltxcmd{protected@edef} except that it takes a control sequence name as its first argument. This command is robust. +Similar to \cmd{csedef} except that \latex's protection mechanism is temporarily enabled. To put it in other words: this command is similar to the \latex kernel command \cmd{protected@edef} except that it takes a control sequence name as its first argument. This command is robust. -\cmd{protected@csxdef}{csname}<arguments>{replacement text} +\cmditem{protected@csxdef}{csname}<arguments>{replacement text} -Similar to \ltxcmd{csxdef} except that \latex's protection mechanism is temporarily enabled. To put it in other words: this command is similar to the \latex kernel command \ltxcmd{protected@xdef} except that it takes a control sequence name as its first argument. This command is robust. +Similar to \cmd{csxdef} except that \latex's protection mechanism is temporarily enabled. To put it in other words: this command is similar to the \latex kernel command \cmd{protected@xdef} except that it takes a control sequence name as its first argument. This command is robust. -\cmd{cslet}{csname}{command} +\cmditem{cslet}{csname}{command} -Similar to the \tex primitive \ltxcmd{let} except that the first argument is a control sequence name. This command is robust and may be prefixed with \ltxcmd{global}. +Similar to the \tex primitive \cmd{let} except that the first argument is a control sequence name. This command is robust and may be prefixed with \cs{global}. -\cmd{letcs}{command}{csname} +\cmditem{letcs}{command}{csname} -Similar to the \tex primitive \ltxcmd{let} except that the second argument is a control sequence name. This command is robust and may be prefixed with \ltxcmd{global}. +Similar to the \tex primitive \cmd{let} except that the second argument is a control sequence name. This command is robust and may be prefixed with \cs{global}. -\cmd{csletcs}{csname}{csname} +\cmditem{csletcs}{csname}{csname} -Similar to the \tex primitive \ltxcmd{let} except that both arguments are control sequence names. This command is robust and may be prefixed with \ltxcmd{global}. +Similar to the \tex primitive \cmd{let} except that both arguments are control sequence names. This command is robust and may be prefixed with \cs{global}. -\cmd{csuse}{csname} +\cmditem{csuse}{csname} -Takes a control sequence name as its argument and forms a control sequence token. This command differs from the \ltxcmd{@nameuse} macro from the \latex kernel in that it expands to an empty string if the control sequence is undefined. +Takes a control sequence name as its argument and forms a control sequence token. This command differs from the \cmd{@nameuse} macro from the \latex kernel in that it expands to an empty string if the control sequence is undefined. -\cmd{undef}<command> +\cmditem{undef}<command> -Clears a \ltxarg{command} such that \etex's \ltxcmd{ifdefined} and \ltxcmd{ifcsname} tests will consider it as undefined. This command is robust and may be prefixed with \ltxcmd{global}. +Clears a \prm{command} such that \etex's \cmd{ifdefined} and \cmd{ifcsname} tests will consider it as undefined. This command is robust and may be prefixed with \cs{global}. -\cmd{csundef}{csname} +\cmditem{csundef}{csname} -Similar to \ltxcmd{undef} except that it takes a control sequence name as its argument. This command is robust and may be prefixed with \ltxcmd{global}. +Similar to \cmd{undef} except that it takes a control sequence name as its argument. This command is robust and may be prefixed with \cs{global}. \end{ltxsyntax} @@ -202,96 +229,96 @@ The facilities in this section permit calculations using macros rather than leng \begin{ltxsyntax} -\cmd{numdef}<command>{integer expression} +\cmditem{numdef}<command>{integer expression} -Similar to \ltxcmd{edef} except that the \ltxarg{integer expression} is processed with \ltxcmd{numexpr}. The \ltxarg{integer expression} may be any arbitrary code which is valid in this context. The replacement text assigned to the \ltxarg{command} will be the result of that calculation. If the \ltxarg{command} is undefined, it will be initialized to <\texttt{0}> before the \ltxarg{integer expression} is processed. +Similar to \cmd{edef} except that the \prm{integer expression} is processed with \cmd{numexpr}. The \prm{integer expression} may be any arbitrary code which is valid in this context. The replacement text assigned to the \prm{command} will be the result of that calculation. If the \prm{command} is undefined, it will be initialized to \texttt{0} before the \prm{integer expression} is processed. -\cmd{numgdef}<command>{integer expression} +\cmditem{numgdef}<command>{integer expression} -Similar to \ltxcmd{numdef} except that the assignment is global. +Similar to \cmd{numdef} except that the assignment is global. -\cmd{csnumdef}{csname}{integer expression} +\cmditem{csnumdef}{csname}{integer expression} -Similar to \ltxcmd{numdef} except that it takes a control sequence name as its first argument. +Similar to \cmd{numdef} except that it takes a control sequence name as its first argument. -\cmd{csnumgdef}{csname}{integer expression} +\cmditem{csnumgdef}{csname}{integer expression} -Similar to \ltxcmd{numgdef} except that it takes a control sequence name as its first argument. +Similar to \cmd{numgdef} except that it takes a control sequence name as its first argument. -\cmd{dimdef}<command>{dimen expression} +\cmditem{dimdef}<command>{dimen expression} -Similar to \ltxcmd{edef} except that the \ltxarg{dimen expression} is processed with \ltxcmd{dimexpr}. The \ltxarg{dimen expression} may be any arbitrary code which is valid in this context. The replacement text assigned to the \ltxarg{command} will be the result of that calculation. If the \ltxarg{command} is undefined, it will be initialized to <\texttt{0pt}> before the \ltxarg{dimen expression} is processed. +Similar to \cmd{edef} except that the \prm{dimen expression} is processed with \cmd{dimexpr}. The \prm{dimen expression} may be any arbitrary code which is valid in this context. The replacement text assigned to the \prm{command} will be the result of that calculation. If the \prm{command} is undefined, it will be initialized to \texttt{0pt} before the \prm{dimen expression} is processed. -\cmd{dimgdef}<command>{dimen expression} +\cmditem{dimgdef}<command>{dimen expression} -Similar to \ltxcmd{dimdef} except that the assignment is global. +Similar to \cmd{dimdef} except that the assignment is global. -\cmd{csdimdef}{csname}{dimen expression} +\cmditem{csdimdef}{csname}{dimen expression} -Similar to \ltxcmd{dimdef} except that it takes a control sequence name as its first argument. +Similar to \cmd{dimdef} except that it takes a control sequence name as its first argument. -\cmd{csdimgdef}{csname}{dimen expression} +\cmditem{csdimgdef}{csname}{dimen expression} -Similar to \ltxcmd{dimgdef} except that it takes a control sequence name as its first argument. +Similar to \cmd{dimgdef} except that it takes a control sequence name as its first argument. -\cmd{gluedef}<command>{glue expression} +\cmditem{gluedef}<command>{glue expression} -Similar to \ltxcmd{edef} except that the \ltxarg{glue expression} is processed with \ltxcmd{glueexpr}. The \ltxarg{glue expression} may be any arbitrary code which is valid in this context. The replacement text assigned to the \ltxarg{command} will be the result of that calculation. If the \ltxarg{command} is undefined, it will be initialized to <\texttt{0pt plus 0pt minus 0pt}> before the \ltxarg{glue expression} is processed. +Similar to \cmd{edef} except that the \prm{glue expression} is processed with \cmd{glueexpr}. The \prm{glue expression} may be any arbitrary code which is valid in this context. The replacement text assigned to the \prm{command} will be the result of that calculation. If the \prm{command} is undefined, it will be initialized to \texttt{0pt plus 0pt minus 0pt} before the \prm{glue expression} is processed. -\cmd{gluegdef}<command>{glue expression} +\cmditem{gluegdef}<command>{glue expression} -Similar to \ltxcmd{gluedef} except that the assignment is global. +Similar to \cmd{gluedef} except that the assignment is global. -\cmd{csgluedef}{csname}{glue expression} +\cmditem{csgluedef}{csname}{glue expression} -Similar to \ltxcmd{gluedef} except that it takes a control sequence name as its first argument. +Similar to \cmd{gluedef} except that it takes a control sequence name as its first argument. -\cmd{csgluegdef}{csname}{glue expression} +\cmditem{csgluegdef}{csname}{glue expression} -Similar to \ltxcmd{gluegdef} except that it takes a control sequence name as its first argument. +Similar to \cmd{gluegdef} except that it takes a control sequence name as its first argument. -\cmd{mudef}<command>{muglue expression} +\cmditem{mudef}<command>{muglue expression} -Similar to \ltxcmd{edef} except that the \ltxarg{muglue expression} is processed with \ltxcmd{muexpr}. The \ltxarg{muglue expression} may be any arbitrary code which is valid in this context. The replacement text assigned to the \ltxarg{command} will be the result of that calculation. If the \ltxarg{command} is undefined, it will be initialized to <\texttt{0mu}> before the \ltxarg{muglue expression} is processed. +Similar to \cmd{edef} except that the \prm{muglue expression} is processed with \cmd{muexpr}. The \prm{muglue expression} may be any arbitrary code which is valid in this context. The replacement text assigned to the \prm{command} will be the result of that calculation. If the \prm{command} is undefined, it will be initialized to \texttt{0mu} before the \prm{muglue expression} is processed. -\cmd{mugdef}<command>{muglue expression} +\cmditem{mugdef}<command>{muglue expression} -Similar to \ltxcmd{mudef} except that the assignment is global. +Similar to \cmd{mudef} except that the assignment is global. -\cmd{csmudef}{csname}{muglue expression} +\cmditem{csmudef}{csname}{muglue expression} -Similar to \ltxcmd{mudef} except that it takes a control sequence name as its first argument. +Similar to \cmd{mudef} except that it takes a control sequence name as its first argument. -\cmd{csmugdef}{csname}{muglue expression} +\cmditem{csmugdef}{csname}{muglue expression} -Similar to \ltxcmd{mugdef} except that it takes a control sequence name as its first argument. +Similar to \cmd{mugdef} except that it takes a control sequence name as its first argument. \end{ltxsyntax} \subsection{Expansion control} -The facilities in this section are useful to control expansion in an \ltxcmd{edef} or a similar context. +The facilities in this section are useful to control expansion in an \cmd{edef} or a similar context. \begin{ltxsyntax} -\cmd{expandonce}<command> +\cmditem{expandonce}<command> -This command expands \ltxarg{command} once and prevents further expansion of the replacement text. +This command expands a \prm{command} once and prevents further expansion of the replacement text. -\cmd{csexpandonce}{csname} +\cmditem{csexpandonce}{csname} -Similar to \ltxcmd{expandonce} except that it takes a control sequence name as its argument. +Similar to \cmd{expandonce} except that it takes a control sequence name as its argument. -\cmd{protecting}{code} +\cmditem{protecting}{code} -This command applies \latex's protection mechanism, which normally requires prefixing each fragile command with \ltxcmd{protect}, to an entire chunk of arbitrary \ltxarg{code}. Its behavior depends on the current state of \ltxcmd{protect}. Note that the braces around the \ltxarg{code} are mandatory even if it is a single token. +This command applies \latex's protection mechanism, which normally requires prefixing each fragile command with \cmd{protect}, to an entire chunk of arbitrary \prm{code}. Its behavior depends on the current state of \cmd{protect}. Note that the braces around the \prm{code} are mandatory even if it is a single token. \end{ltxsyntax} \subsection{Hook management} \label{aut:hok} -The facilities in this section are intended for hook management. A \ltxarg{hook} in this context is a plain macro without any parameters and prefixes which is used to collect code to be executed later. These facilities may also be useful to patch simple macros by appending code to their replacement text. For more complex patching operations, see section \ref{aut:pat}. All commands in this section will initialize the \ltxarg{hook} if it is undefined. +The facilities in this section are intended for hook management. A \prm{hook} in this context is a plain macro without any parameters and prefixes which is used to collect code to be executed later. These facilities may also be useful to patch simple macros by appending code to their replacement text. For more complex patching operations, see section \ref{aut:pat}. All commands in this section will initialize the \prm{hook} if it is undefined. \subsubsection{Appending to a hook} \label{aut:hok:app} @@ -300,53 +327,53 @@ The facilities in this section append arbitrary code to a hook. \begin{ltxsyntax} -\cmd{appto}<hook>{code} +\cmditem{appto}<hook>{code} -This command appends arbitrary \ltxarg{code} to a \ltxarg{hook}. If the \ltxarg{code} contains any parameter characters, they need not be doubled. This command is robust. +This command appends arbitrary \prm{code} to a \prm{hook}. If the \prm{code} contains any parameter characters, they need not be doubled. This command is robust. -\cmd{gappto}<hook>{code} +\cmditem{gappto}<hook>{code} -Similar to \ltxcmd{appto} except that the assignment is global. This command may be used as a drop-in replacement for the \ltxcmd{g@addto@macro} command in the \latex kernel. +Similar to \cmd{appto} except that the assignment is global. This command may be used as a drop-in replacement for the \cmd{g@addto@macro} command in the \latex kernel. -\cmd{eappto}<hook>{code} +\cmditem{eappto}<hook>{code} -This command appends arbitrary \ltxarg{code} to a \ltxarg{hook}. The \ltxarg{code} is expanded at definition"=time. Only the new \ltxarg{code} is expanded, the current replacement text of the \ltxarg{hook} is not. This command is robust. +This command appends arbitrary \prm{code} to a \prm{hook}. The \prm{code} is expanded at definition"=time. Only the new \prm{code} is expanded, the current replacement text of the \prm{hook} is not. This command is robust. -\cmd{xappto}<hook>{code} +\cmditem{xappto}<hook>{code} -Similar to \ltxcmd{eappto} except that the assignment is global. +Similar to \cmd{eappto} except that the assignment is global. -\cmd{protected@eappto}<hook>{code} +\cmditem{protected@eappto}<hook>{code} -Similar to \ltxcmd{eappto} except that \latex's protection mechanism is temporarily enabled. +Similar to \cmd{eappto} except that \latex's protection mechanism is temporarily enabled. -\cmd{protected@xappto}<hook>{code} +\cmditem{protected@xappto}<hook>{code} -Similar to \ltxcmd{xappto} except that \latex's protection mechanism is temporarily enabled. +Similar to \cmd{xappto} except that \latex's protection mechanism is temporarily enabled. -\cmd{csappto}{csname}{code} +\cmditem{csappto}{csname}{code} -Similar to \ltxcmd{appto} except that it takes a control sequence name as its first argument. +Similar to \cmd{appto} except that it takes a control sequence name as its first argument. -\cmd{csgappto}{csname}{code} +\cmditem{csgappto}{csname}{code} -Similar to \ltxcmd{gappto} except that it takes a control sequence name as its first argument. +Similar to \cmd{gappto} except that it takes a control sequence name as its first argument. -\cmd{cseappto}{csname}{code} +\cmditem{cseappto}{csname}{code} -Similar to \ltxcmd{eappto} except that it takes a control sequence name as its first argument. +Similar to \cmd{eappto} except that it takes a control sequence name as its first argument. -\cmd{csxappto}{csname}{code} +\cmditem{csxappto}{csname}{code} -Similar to \ltxcmd{xappto} except that it takes a control sequence name as its first argument. +Similar to \cmd{xappto} except that it takes a control sequence name as its first argument. -\cmd{protected@cseappto}<hook>{code} +\cmditem{protected@cseappto}<hook>{code} -Similar to \ltxcmd{protected@eappto} except that it takes a control sequence name as its first argument. +Similar to \cmd{protected@eappto} except that it takes a control sequence name as its first argument. -\cmd{protected@csxappto}<hook>{code} +\cmditem{protected@csxappto}<hook>{code} -Similar to \ltxcmd{protected@xappto} except that it takes a control sequence name as its first argument. +Similar to \cmd{protected@xappto} except that it takes a control sequence name as its first argument. \end{ltxsyntax} @@ -357,178 +384,252 @@ The facilities in this section <prepend> arbitrary code to a hook, \ie the code \begin{ltxsyntax} -\cmd{preto}<hook>{code} +\cmditem{preto}<hook>{code} -Similar to \ltxcmd{appto} except that the \ltxarg{code} is prepended. +Similar to \cmd{appto} except that the \prm{code} is prepended. -\cmd{gpreto}<hook>{code} +\cmditem{gpreto}<hook>{code} -Similar to \ltxcmd{preto} except that the assignment is global. +Similar to \cmd{preto} except that the assignment is global. -\cmd{epreto}<hook>{code} +\cmditem{epreto}<hook>{code} -Similar to \ltxcmd{eappto} except that the \ltxarg{code} is prepended. +Similar to \cmd{eappto} except that the \prm{code} is prepended. -\cmd{xpreto}<hook>{code} +\cmditem{xpreto}<hook>{code} -Similar to \ltxcmd{epreto} except that the assignment is global. +Similar to \cmd{epreto} except that the assignment is global. -\cmd{protected@epreto}<hook>{code} +\cmditem{protected@epreto}<hook>{code} -Similar to \ltxcmd{epreto} except that \latex's protection mechanism is temporarily enabled. +Similar to \cmd{epreto} except that \latex's protection mechanism is temporarily enabled. -\cmd{protected@xpreto}<hook>{code} +\cmditem{protected@xpreto}<hook>{code} -Similar to \ltxcmd{xpreto} except that \latex's protection mechanism is temporarily enabled. +Similar to \cmd{xpreto} except that \latex's protection mechanism is temporarily enabled. -\cmd{cspreto}{csname}{code} +\cmditem{cspreto}{csname}{code} -Similar to \ltxcmd{preto} except that it takes a control sequence name as its first argument. +Similar to \cmd{preto} except that it takes a control sequence name as its first argument. -\cmd{csgpreto}{csname}{code} +\cmditem{csgpreto}{csname}{code} -Similar to \ltxcmd{gpreto} except that it takes a control sequence name as its first argument. +Similar to \cmd{gpreto} except that it takes a control sequence name as its first argument. -\cmd{csepreto}{csname}{code} +\cmditem{csepreto}{csname}{code} -Similar to \ltxcmd{epreto} except that it takes a control sequence name as its first argument. +Similar to \cmd{epreto} except that it takes a control sequence name as its first argument. -\cmd{csxpreto}{csname}{code} +\cmditem{csxpreto}{csname}{code} -Similar to \ltxcmd{xpreto} except that it takes a control sequence name as its first argument. +Similar to \cmd{xpreto} except that it takes a control sequence name as its first argument. -\cmd{protected@csepreto}<hook>{code} +\cmditem{protected@csepreto}<hook>{code} -Similar to \ltxcmd{protected@epreto} except that it takes a control sequence name as its first argument. +Similar to \cmd{protected@epreto} except that it takes a control sequence name as its first argument. -\cmd{protected@csxpreto}<hook>{code} +\cmditem{protected@csxpreto}<hook>{code} -Similar to \ltxcmd{protected@xpreto} except that it takes a control sequence name as its first argument. +Similar to \cmd{protected@xpreto} except that it takes a control sequence name as its first argument. \end{ltxsyntax} \subsection{Patching} \label{aut:pat} -The facilities in this section are useful to hook into or modify existing code. All commands presented here preserve the parameters and the prefixes of the patched \ltxarg{command}. Note that the patching process involves detokenizing the replacement text of the \ltxarg{command} and retokenizing it under the current category code regime after patching. The category code of <@> is temporarily set to 11. If the replacement text of the \ltxarg{command} includes any tokens with non"=standard category codes, the respective category codes must be adjusted prior to patching. If the code to be replaced or inserted refers to the parameters of the \ltxarg{command} to be patched, the parameter characters need not be doubled when invoking one of the commands below. Note that \ltxcmd{outer} commands may not be patched. +The facilities in this section are useful to hook into or modify existing code. All commands presented here preserve the parameters and the prefixes of the patched \prm{command}. Note that \cs{outer} commands may not be patched. Also note that the commands in this section will not automatically issue any error messages if patching fails. Instead, they take a \prm{failure} argument which should provide suitable fallback code or an error message. Issuing \cmd{tracingpatches} in the preamble will cause the commands to write debugging information to the transcript file. \begin{ltxsyntax} -\cmd{patchcmd}[prefix]{command}{search}{replace}{success}{failure} +\cmditem{patchcmd}[prefix]{command}{search}{replace}{success}{failure} + +This command extracts the replacement text of a \prm{command}, replaces \prm{search} with \prm{replace}, and reassembles the \prm{command}. The pattern match is category code agnostic and matches the first occurence of the \prm{search} pattern in the replacement text of the \prm{command} to be patched. Note that the patching process involves detokenizing the replacement text of the \prm{command} and retokenizing it under the current category code regime after patching. The category code of the @ sign is temporarily set to 11. If the replacement text of the \prm{command} includes any tokens with non"=standard category codes, the respective category codes must be adjusted prior to patching. If the code to be replaced or inserted refers to the parameters of the \prm{command} to be patched, the parameter characters need not be doubled. If an optional \prm{prefix} is specified, it replaces the prefixes of the \prm{command}. An empty \prm{prefix} argument strips all prefixes from the \prm{command}. The assignment is local. This command implicitly performs the equivalent of an \cmd{ifpatchable} test prior to patching. If this test succeeds, the command applies the patch and executes \prm{success}. If the test fails, it executes \prm{failure} without modifying the original \prm{command}. This command is robust. + +\cmditem{ifpatchable}{command}{search}{true}{false} + +This command executes \prm{true} if the \prm{command} may be patched with \cmd{patchcmd} and if the \prm{search} pattern is found in its replacement text, and \prm{false} otherwise. This command is robust. + +\cmditem*{ifpatchable*}{command}{true}{false} -This command extracts the replacement text of a \ltxarg{command}, replaces \ltxarg{search} with \ltxarg{replace}, and reassembles the \ltxarg{command}. The pattern match is category code agnostic and matches the first occurence of the \ltxarg{search} pattern in the replacement text of the \ltxarg{command} to be patched. If an optional \ltxarg{prefix} is specified, it replaces the prefixes of the \ltxarg{command}. An empty \ltxarg{prefix} strips all prefixes from the \ltxarg{command}. This command executes \ltxarg{success} if patching succeeds, and \ltxarg{failure} otherwise. It is robust and may only be used in the document preamble. The assignment is local. +Similar to \cmd{ifpatchable} except that the starred variant does not require a search pattern. Use this version to check if a command may be patched with \cmd{apptocmd} and \cmd{pretocmd}. -\cmd{ifpatchable}{command}{search}{true}{false} +\cmditem{apptocmd}{command}{code}{success}{failure} -This command executes \ltxarg{true} if the \ltxarg{command} is defined and the \ltxarg{search} pattern is found in its replacement text, and \ltxarg{false} otherwise. This command is robust and may only be used in the document preamble. +This command appends \prm{code} to the replacement text of a \prm{command}. If the \prm{command} is a parameterless macro, it behaves like \cmd{appto} from section \ref{aut:hok:app}. In contrast to \cmd{appto}, \cmd{apptocmd} may also be used to patch commands with parameters. In this case, it will detokenize the replacement text of the \prm{command}, apply the patch, and retokenize it under the current category code regime. The category code of the @ sign is temporarily set to 11. The \prm{code} may refer to the parameters of the \prm{command}. The assignment is local. If patching succeeds, this command executes \prm{success}. If patching fails, it executes \prm{failure} without modifying the original \prm{command}. This command is robust. -\cmd{apptocmd}{command}{code} +\cmditem{pretocmd}{command}{code}{success}{failure} -This command appends \ltxarg{code} to the replacement text of a \ltxarg{command}. In contrast to the \ltxcmd{appto} command from section \ref{aut:hok:app}, this one may be used to patch commands with an arbitrary number of parameters. The \ltxarg{code} may refer to the parameters of the \ltxarg{command} in this case. This command is robust and may only be used in the document preamble. The assignment is local. +This command is similar to \cmd{apptocmd} except that the \prm{code} is inserted at the beginning of the replacement text of the \prm{command}. If the \prm{command} is a parameterless macro, it behaves like \cmd{preto} from section \ref{aut:hok:app}. In contrast to \cmd{preto}, \cmd{pretocmd} may also be used to patch commands with parameters. In this case, it will detokenize the replacement text of the \prm{command}, apply the patch, and retokenize it under the current category code regime. The category code of the @ sign is temporarily set to 11. The \prm{code} may refer to the parameters of the \prm{command}. The assignment is local. If patching succeeds, this command executes \prm{success}. If patching fails, it executes \prm{failure} without modifying the original \prm{command}. This command is robust. -\cmd{pretocmd}{command}{code} +\csitem{tracingpatches} -This command is similar to \ltxcmd{apptocmd} except that the \ltxarg{code} is <prepended>, \ie inserted at the beginning of the replacement text of the \ltxarg{command}. In contrast to the \ltxcmd{preto} command from section \ref{aut:hok:app}, this one may be used to patch commands with an arbitrary number of parameters. The \ltxarg{code} may refer to the parameters of the \ltxarg{command} in this case. This command is robust and may only be used in the document preamble. The assignment is local. +Enables tracing for all patching commands, including \cmd{ifpatchable}. The debugging information will be written to the transcript file. This is useful if the reason why a patch is not applied or \cmd{ifpatchable} yields \prm{false} is not obvious. This command must be issued in the preamble. \end{ltxsyntax} \subsection{Generic tests} \label{aut:tst} +\subsubsection{Control sequence tests} +\label{aut:tst:def} + \begin{ltxsyntax} -\cmd{ifdef}{command}{true}{false} +\cmditem{ifdef}{control sequence}{true}{false} + +Expands to \prm{true} if the \prm{control sequence} is defined, and to \prm{false} otherwise. Note that control sequences will be considered as defined even if their meaning is \cmd{relax}. This command is a \latex wrapper for the \etex primitive \cmd{ifdefined}. + +\cmditem{ifcsdef}{csname}{true}{false} + +Similar to \cmd{ifdef} except that it takes a control sequence name as its first argument. This command is a \latex wrapper for the \etex primitive \cmd{ifcsname}. + +\cmditem{ifundef}{control sequence}{true}{false} + +Expands to \prm{true} if the \prm{control sequence} is undefined, and to \prm{false} otherwise. Apart from reversing the logic of the test, this command also differs from \cmd{ifdef} in that commands will be considered as undefined if their meaning is \cmd{relax}. + +\cmditem{ifcsundef}{csname}{true}{false} + +Similar to \cmd{ifundef} except that it takes a control sequence name as its first argument. This command may be used as a drop-in replacement for the \cmd{@ifundefined} test in the \latex kernel. + +\cmditem{ifdefmacro}{control sequence}{true}{false} + +Expands to \prm{true} if the \prm{control sequence} is defined and is a macro, and to \prm{false} otherwise. + +\cmditem{ifcsmacro}{csname}{true}{false} + +Similar to \cmd{ifdefmacro} except that it takes a control sequence name as its first argument. + +\cmditem{ifdefparam}{control sequence}{true}{false} + +Expands to \prm{true} if the \prm{control sequence} is defined and is a macro with one or more parameters, and to \prm{false} otherwise. -A \latex wrapper for the \etex primitive \ltxcmd{ifdefined}. This command expands to \ltxarg{true} if the \ltxarg{command} is defined, and to \ltxarg{false} otherwise. Note that the \ltxarg{command} is considered as defined even if its meaning is \ltxcmd{relax}. +\cmditem{ifcsparam}{csname}{true}{false} -\cmd{ifundef}{command}{true}{false} +Similar to \cmd{ifdefparam} except that it takes a control sequence name as its first argument. -Expands to \ltxarg{true} if the \ltxarg{command} is undefined, and to \ltxarg{false} otherwise. Apart from reversing the logic of the test, this command also differs from \ltxcmd{ifdef} in that the \ltxarg{command} is considered as undefined if its meaning is \ltxcmd{relax}. +\cmditem{ifdefprefix}{control sequence}{true}{false} -\cmd{ifcsdef}{csname}{true}{false} +Expands to \prm{true} if the \prm{control sequence} is defined and is a macro prefixed with \cs{long} and\slash or \cs{protected}, and to \prm{false} otherwise. Note that \cs{outer} macros may not be tested. -A \latex wrapper for the \etex primitive \ltxcmd{ifcsname}. This command expands to \ltxarg{true} if \ltxarg{csname} is defined, and to \ltxarg{false} otherwise. Note that \ltxarg{csname} is considered as defined even if its meaning is \ltxcmd{relax}. +\cmditem{ifcsprefix}{csname}{true}{false} -\cmd{ifcsundef}{csname}{true}{false} +Similar to \cmd{ifdefprefix} except that it takes a control sequence name as its first argument. -Expands to \ltxarg{true} if \ltxarg{csname} is undefined, and to \ltxarg{false} otherwise. Apart from reversing the logic of the test, this command also differs from \ltxcmd{ifcsdef} in that the \ltxarg{csname} is considered as undefined if its meaning is \ltxcmd{relax}. This command may be used as a drop-in replacement for the \ltxcmd{@ifundefined} test in the \latex kernel. +\cmditem{ifdefprotected}{control sequence}{true}{false} -\cmd{ifdefvoid}{command}{true}{false} +Expands to \prm{true} if the \prm{control sequence} is defined and is a macro prefixed with \cs{protected}, and to \prm{false} otherwise. -Expands to \ltxarg{true} if the \ltxarg{command} is undefined, its meaning is \ltxcmd{relax}, or its replacement text is empty, and to \ltxarg{false} otherwise. +\cmditem{ifcsprotected}{csname}{true}{false} -\cmd{ifcsvoid}{csname}{true}{false} +Similar to \cmd{ifdefprotected} except that it takes a control sequence name as its first argument. -Similar to \ltxcmd{ifdefvoid} except that it takes a control sequence name as its first argument. +\cmditem{ifdefltxprotect}{control sequence}{true}{false} -\cmd{ifdefequal}{command}{command}{true}{false} +Executes \prm{true} if the \prm{control sequence} is defined and is a \latex protection shell, and \prm{false} otherwise. This command is robust. It will detect commands which have been defined with \cmd{DeclareRobustCommand} or by way of a similar technique. -Compares two commands and expands to \ltxarg{true} if they are equal in the sense of the \tex primitive \ltxcmd{ifx}, and to \ltxarg{false} otherwise. In contrast to \ltxcmd{ifx}, this test will also yield \ltxarg{false} if both commands are undefined or have a meaning of \ltxcmd{relax}. +\cmditem{ifcsltxprotect}{csname}{true}{false} -\cmd{ifcsequal}{csname}{csname}{true}{false} +Similar to \cmd{ifdefltxprotect} except that it takes a control sequence name as its first argument. -Similar to \ltxcmd{ifdefequal} except that it takes control sequence names as arguments. +\cmditem{ifdefempty}{control sequence}{true}{false} -\cmd{ifdefstring}{command}{string}{true}{false} +Expands to \prm{true} if the \prm{control sequence} is defined and is a parameterless macro whose replacement text is empty, and to \prm{false} otherwise. In contrast to \cmd{ifx}, this test ignores the prefixes of the \prm{command}. -Compares the replacement text of a \ltxarg{command} to a \ltxarg{string} and executes \ltxarg{true} if they are equal, and \ltxarg{false} otherwise. Neither the \ltxarg{command} nor the \ltxarg{string} is expanded in the test and the comparison is category code agnostic. Control sequence tokens in the \ltxarg{string} argument will be detokenized and treated as strings. This command is robust. Note that it will only consider the replacement text of the \ltxarg{command}. For example, this code +\cmditem{ifcsempty}{csname}{true}{false} + +Similar to \cmd{ifdefempty} except that it takes a control sequence name as its first argument. + +\cmditem{ifdefvoid}{control sequence}{true}{false} + +Expands to \prm{true} if the \prm{control sequence} is undefined, is a macro whose meaning is \cmd{relax}, or is a parameterless macro whose replacement text is empty, and to \prm{false} otherwise. + +\cmditem{ifcsvoid}{csname}{true}{false} + +Similar to \cmd{ifdefvoid} except that it takes a control sequence name as its first argument. + +\cmditem{ifdefequal}{control sequence}{control sequence}{true}{false} + +Compares two control sequences and expands to \prm{true} if they are equal in the sense of \cmd{ifx}, and to \prm{false} otherwise. In contrast to \cmd{ifx}, this test will also yield \prm{false} if both control sequences are undefined or have a meaning of \cmd{relax}. + +\cmditem{ifcsequal}{csname}{csname}{true}{false} + +Similar to \cmd{ifdefequal} except that it takes control sequence names as arguments. + +\cmditem{ifdefstring}{command}{string}{true}{false} + +Compares the replacement text of a \prm{command} to a \prm{string} and executes \prm{true} if they are equal, and \prm{false} otherwise. Neither the \prm{command} nor the \prm{string} is expanded in the test and the comparison is category code agnostic. Control sequence tokens in the \prm{string} argument will be detokenized and treated as strings. This command is robust. Note that it will only consider the replacement text of the \prm{command}. For example, this code \begin{ltxcode} \long\def\@gobbletwo#1#2{} \ifdefstring{\@gobbletwo}{}{true}{false} \end{ltxcode} % -would yield \ltxarg{true}. The prefix and the parameters of |\@gobbletwo| are ignored. +would yield \prm{true}. The prefix and the parameters of \cmd{@gobbletwo} are ignored. -\cmd{ifcsstring}{csname}{string}{true}{false} +\cmditem{ifcsstring}{csname}{string}{true}{false} -Similar to \ltxcmd{ifdefstring} except that it takes a control sequence name as its first argument. +Similar to \cmd{ifdefstring} except that it takes a control sequence name as its first argument. -\cmd{ifstrequal}{string}{string}{true}{false} +\end{ltxsyntax} + +\subsubsection{String tests} +\label{aut:tst:str} + +\begin{ltxsyntax} -Compares two strings and executes \ltxarg{true} if they are equal, and \ltxarg{false} otherwise. The strings are not expanded in the test and the comparison is category code agnostic. Control sequence tokens in any of the \ltxarg{string} arguments will be detokenized and treated as strings. This command is robust. +\cmditem{ifstrequal}{string}{string}{true}{false} -\cmd{ifblank}{string}{true}{false} +Compares two strings and executes \prm{true} if they are equal, and \prm{false} otherwise. The strings are not expanded in the test and the comparison is category code agnostic. Control sequence tokens in any of the \prm{string} arguments will be detokenized and treated as strings. This command is robust. -Expands to \ltxarg{true} if the \ltxarg{string} is blank (empty or spaces), and to \ltxarg{false} otherwise. The \ltxarg{string} is not expanded in the test. +\cmditem{ifstrempty}{string}{true}{false} + +Expands to \prm{true} if the \prm{string} is empty, and to \prm{false} otherwise. The \prm{string} is not expanded in the test. + +\cmditem{ifblank}{string}{true}{false} + +Expands to \prm{true} if the \prm{string} is blank (empty or spaces), and to \prm{false} otherwise. The \prm{string} is not expanded in the test. \end{ltxsyntax} \subsection{Boolean switches} \label{aut:bol} -This package provides two interfaces to boolean switches which are completely independent of each other. The facilities in section \ref{aut:bo1:bol} are a \latex frontend to \ltxcmd{newif}. Those in section \ref{aut:bo1:swi} use a different mechanism. +This package provides two interfaces to boolean switches which are completely independent of each other. The facilities in section \ref{aut:bo1:bol} are a \latex frontend to \cmd{newif}. Those in section \ref{aut:bo1:swi} use a different mechanism. \subsubsection{\tex switches} \label{aut:bo1:bol} -Since the facilities in this section are based on \ltxcmd{newif} internally, they may be used to test and alter the state of switches previously defined with \ltxcmd{newif}. They are also compatible with the boolean tests of the \sty{ifthen} package. The \ltxcmd{newif} approach requires a total of three macros per switch. +Since the facilities in this section are based on \cmd{newif} internally, they may be used to test and alter the state of switches previously defined with \cmd{newif}. They are also compatible with the boolean tests of the \sty{ifthen} package. The \cmd{newif} approach requires a total of three macros per switch. \begin{ltxsyntax} -\cmd{newbool}{name} +\cmditem{newbool}{name} + +Defines a new boolean switch called \prm{name}. If the switch has already been defined, this command issues an error. The initial state of newly defined switches is \texttt{false}. This command is robust. -Defines a new boolean switch called \ltxarg{name}. If the switch has already been defined, this command issues an error. The initial state of newly defined switches is \texttt{false}. This command is robust. +\cmditem{providebool}{name} -\cmd{providebool}{name} +Defines a new boolean switch called \prm{name} unless it has already been defined. This command is robust. -Defines a new boolean switch called \ltxarg{name} unless it has already been defined. This command is robust. +\cmditem{booltrue}{name} -\cmd{booltrue}{name} +Sets the boolean switch \prm{name} to \texttt{true}. This command is robust and may be prefixed with \cs{global}. It will issue an error if the switch is undefined. -Sets the boolean switch \ltxarg{name} to \texttt{true}. This command is robust and may be prefixed with \ltxcmd{global}. It will issue an error if the switch is undefined. +\cmditem{boolfalse}{name} -\cmd{boolfalse}{name} +Sets the boolean switch \prm{name} to \texttt{false}. This command is robust and may be prefixed with \cs{global}. It will issue an error if the switch is undefined. -Sets the boolean switch \ltxarg{name} to \texttt{false}. This command is robust and may be prefixed with \ltxcmd{global}. It will issue an error if the switch is undefined. +\cmditem{setbool}{name}{value} -\cmd{ifbool}{name}{true}{false} +Sets the boolean switch \prm{name} to \prm{value} which may be either \texttt{true} or \texttt{false}. This command is robust and may be prefixed with \cs{global}. It will issue an error if the switch is undefined. -Expands to \ltxarg{true} if the state of the boolean switch \ltxarg{name} is \texttt{true}, and to \ltxarg{false} otherwise. If the switch is undefined, this command issues an error. +\cmditem{ifbool}{name}{true}{false} -\cmd{notbool}{name}{not true}{not false} +Expands to \prm{true} if the state of the boolean switch \prm{name} is \texttt{true}, and to \prm{false} otherwise. If the switch is undefined, this command issues an error. -Similar to \ltxcmd{ifbool} but reverses the logic of the test. +\cmditem{notbool}{name}{not true}{not false} + +Similar to \cmd{ifbool} but reverses the logic of the test. \end{ltxsyntax} @@ -539,29 +640,33 @@ In contrast to the switches from section \ref{aut:bo1:bol}, the facilities in th \begin{ltxsyntax} -\cmd{newtoggle}{name} +\cmditem{newtoggle}{name} + +Defines a new boolean switch called \prm{name}. If the switch has already been defined, this command issues an error. The initial state of newly defined switches is \texttt{false}. This command is robust. + +\cmditem{providetoggle}{name} -Defines a new boolean switch called \ltxarg{name}. If the switch has already been defined, this command issues an error. The initial state of newly defined switches is \texttt{false}. This command is robust. +Defines a new boolean switch called \prm{name} unless it has already been defined. This command is robust. -\cmd{providetoggle}{name} +\cmditem{toggletrue}{name} -Defines a new boolean switch called \ltxarg{name} unless it has already been defined. This command is robust. +Sets the boolean switch \prm{name} to \texttt{true}. This command is robust and may be prefixed with \cs{global}. It will issue an error if the switch is undefined. -\cmd{toggletrue}{name} +\cmditem{togglefalse}{name} -Sets the boolean switch \ltxarg{name} to \texttt{true}. This command is robust and may be prefixed with \ltxcmd{global}. It will issue an error if the switch is undefined. +Sets the boolean switch \prm{name} to \texttt{false}. This command is robust and may be prefixed with \cs{global}. It will issue an error if the switch is undefined. -\cmd{togglefalse}{name} +\cmditem{settoggle}{name}{value} -Sets the boolean switch \ltxarg{name} to \texttt{false}. This command is robust and may be prefixed with \ltxcmd{global}. It will issue an error if the switch is undefined. +Sets the boolean switch \prm{name} to \prm{value} which may be either \texttt{true} or \texttt{false}. This command is robust and may be prefixed with \cs{global}. It will issue an error if the switch is undefined. -\cmd{iftoggle}{name}{true}{false} +\cmditem{iftoggle}{name}{true}{false} -Expands to \ltxarg{true} if the state of the boolean switch \ltxarg{name} is \texttt{true}, and to \ltxarg{false} otherwise. If the switch is undefined, this command issues an error. +Expands to \prm{true} if the state of the boolean switch \prm{name} is \texttt{true}, and to \prm{false} otherwise. If the switch is undefined, this command issues an error. -\cmd{nottoggle}{name}{not true}{not false} +\cmditem{nottoggle}{name}{not true}{not false} -Similar to \ltxcmd{iftoggle} but reverses the logic of the test. +Similar to \cmd{iftoggle} but reverses the logic of the test. \end{ltxsyntax} @@ -575,13 +680,19 @@ The facilities in this section are primarily designed to handle user input. When \begin{ltxsyntax} -\cmd{DeclareListParser}{command}{separator} +\cmditem{DeclareListParser}{command}{separator} -This command defines a list parser similar to the \ltxcmd{docsvlist} command below, which is defined with <|\DeclareListParser{\docsvlist}{,}|>. Note that the list parsers are sensitive to the category code of the \ltxarg{separator}. +This command defines a list parser similar to the \cmd{docsvlist} command below, which is defined like this: -\cmd{docsvlist}{item, item, ...} +\begin{ltxcode} +\DeclareListParser{\docsvlist}{,} +\end{ltxcode} +% +Note that the list parsers are sensitive to the category code of the \prm{separator}. + +\cmditem{docsvlist}{item, item, ...} -This command loops over a comma"=separated list and executes the auxiliary command \ltxcmd{do} for every item in the list, passing the item as an argument. In contrast to the \ltxcmd{@for} loop in the \latex kernel, \ltxcmd{docsvlist} is expandable. With a suitable definition of \ltxcmd{do}, lists may be processed inside an \ltxcmd{edef} or a comparable context. You may use \ltxcmd{listbreak} at the end of the replacement text of \ltxcmd{do} to stop processing and discard the remaining items in the list. Whitespace after list separators is ignored. If an item contains a comma or starts with a space, it must be wrapped in curly braces. The braces will be removed as the list is processed. Here is a usage example which prints a comma"=separated list as an \ltxenv{itemize} environment: +This command loops over a comma"=separated list and executes the auxiliary command \cmd{do} for every item in the list, passing the item as an argument. In contrast to the \cmd{@for} loop in the \latex kernel, \cmd{docsvlist} is expandable. With a suitable definition of \cmd{do}, lists may be processed inside an \cmd{edef} or a comparable context. You may use \cmd{listbreak} at the end of the replacement text of \cmd{do} to stop processing and discard the remaining items in the list. Whitespace after list separators is ignored. If an item contains a comma or starts with a space, it must be wrapped in curly braces. The braces will be removed as the list is processed. Here is a usage example which prints a comma"=separated list as an \env{itemize} environment: \begin{ltxcode} \begin{itemize} @@ -599,7 +710,7 @@ Here is another example: \docsvlist{item1, item2, {item3a, item3b}, item4}} \end{ltxcode} % -In this example, the list is written to the log file as part of an informational message. The list processing takes place during the \ltxcmd{write} operation. +In this example, the list is written to the log file as part of an informational message. The list processing takes place during the \cmd{write} operation. \end{ltxsyntax} @@ -610,41 +721,41 @@ The facilities in this section handle internal lists of data. An <internal list> \begin{ltxsyntax} -\cmd{listadd}{listmacro}{item} +\cmditem{listadd}{listmacro}{item} -This command appends an \ltxarg{item} to a \ltxarg{listmacro}. +This command appends an \prm{item} to a \prm{listmacro}. -\cmd{listgadd}{listmacro}{item} +\cmditem{listgadd}{listmacro}{item} -Similar to \ltxcmd{listadd} except that the assignment is global. +Similar to \cmd{listadd} except that the assignment is global. -\cmd{listeadd}{listmacro}{item} +\cmditem{listeadd}{listmacro}{item} -Similar to \ltxcmd{listadd} except that the \ltxarg{item} is expanded at definition"=time. Only the new \ltxarg{item} is expanded, the current list is not. +Similar to \cmd{listadd} except that the \prm{item} is expanded at definition"=time. Only the new \prm{item} is expanded, the current list is not. -\cmd{listxadd}{listmacro}{item} +\cmditem{listxadd}{listmacro}{item} -Similar to \ltxcmd{listeadd} except that the assignment is global. +Similar to \cmd{listeadd} except that the assignment is global. -\cmd{listcsadd}{listcsname}{item} +\cmditem{listcsadd}{listcsname}{item} -Similar to \ltxcmd{listadd} except that it takes a control sequence name as its first argument. +Similar to \cmd{listadd} except that it takes a control sequence name as its first argument. -\cmd{listcsgadd}{listcsname}{item} +\cmditem{listcsgadd}{listcsname}{item} -Similar to \ltxcmd{listcsadd} except that the assignment is global. +Similar to \cmd{listcsadd} except that the assignment is global. -\cmd{listcseadd}{listcsname}{item} +\cmditem{listcseadd}{listcsname}{item} -Similar to \ltxcmd{listeadd} except that it takes a control sequence name as its first argument. +Similar to \cmd{listeadd} except that it takes a control sequence name as its first argument. -\cmd{listcsxadd}{listcsname}{item} +\cmditem{listcsxadd}{listcsname}{item} -Similar to \ltxcmd{listcseadd} except that the assignment is global. +Similar to \cmd{listcseadd} except that the assignment is global. -\cmd{dolistloop}{listmacro} +\cmditem{dolistloop}{listmacro} -This command loops over all items in a \ltxarg{listmacro} and executes the auxiliary command \ltxcmd{do} for every item in the list, passing the item as an argument. The list loop itself is expandable. You may use \ltxcmd{listbreak} at the end of the replacement text of \ltxcmd{do} to stop processing and discard the remaining items in the list. Here is a usage example which prints an internal list called \ltxcmd{mylist} as an \ltxenv{itemize} environment: +This command loops over all items in a \prm{listmacro} and executes the auxiliary command \cmd{do} for every item in the list, passing the item as an argument. The list loop itself is expandable. You may use \cmd{listbreak} at the end of the replacement text of \cmd{do} to stop processing and discard the remaining items in the list. Here is a usage example which prints an internal list called \cmd{mylist} as an \env{itemize} environment: \begin{ltxcode} \begin{itemize} @@ -653,13 +764,13 @@ This command loops over all items in a \ltxarg{listmacro} and executes the auxil \end{itemize} \end{ltxcode} -\cmd{dolistcsloop}{listcsname} +\cmditem{dolistcsloop}{listcsname} -Similar to \ltxcmd{dolistloop} except that it takes a control sequence name as its argument. +Similar to \cmd{dolistloop} except that it takes a control sequence name as its argument. -\cmd{ifinlist}{item}{listmacro} +\cmditem{ifinlist}{item}{listmacro} -This command checks if an \ltxarg{item} is included in a \ltxarg{listmacro}. Note that this test uses pattern matching based on \tex's argument scanner to check if the search string is included in the list. This means that it is usually faster than looping over all items in the list, but it also implies that the items must not include curly braces which would effectively hide them from the scanner. In other words, this macro is most useful when dealing with lists of plain strings rather than printable data. When dealing with printable text, it may be preferable to use \ltxcmd{dolistloop} to check if an item is in the list as follows: +This command checks if an \prm{item} is included in a \prm{listmacro}. Note that this test uses pattern matching based on \tex's argument scanner to check if the search string is included in the list. This means that it is usually faster than looping over all items in the list, but it also implies that the items must not include curly braces which would effectively hide them from the scanner. In other words, this macro is most useful when dealing with lists of plain strings rather than printable data. When dealing with printable text, it may be preferable to use \cmd{dolistloop} to check if an item is in the list as follows: \begin{ltxcode} \renewcommand*{\do}[1]{% @@ -669,17 +780,17 @@ This command checks if an \ltxarg{item} is included in a \ltxarg{listmacro}. Not \dolistloop{\mylist} \end{ltxcode} -\cmd{xifinlist}{item}{listmacro} +\cmditem{xifinlist}{item}{listmacro} -Similar to \ltxcmd{ifinlist} except that the \ltxarg{item} is expanded prior to the test. +Similar to \cmd{ifinlist} except that the \prm{item} is expanded prior to the test. -\cmd{ifinlistcs}{item}{listcsname} +\cmditem{ifinlistcs}{item}{listcsname} -Similar to \ltxcmd{ifinlist} except that it takes a control sequence name as its second argument. +Similar to \cmd{ifinlist} except that it takes a control sequence name as its second argument. -\cmd{xifinlistcs}{item}{listcsname} +\cmditem{xifinlistcs}{item}{listcsname} -Similar to \ltxcmd{xifinlist} except that it takes a control sequence name as its second argument. +Similar to \cmd{xifinlist} except that it takes a control sequence name as its second argument. \end{ltxsyntax} @@ -688,9 +799,9 @@ Similar to \ltxcmd{xifinlist} except that it takes a control sequence name as it \begin{ltxsyntax} -\cmd{rmntonum}{numeral} +\cmditem{rmntonum}{numeral} -The \tex primitive \ltxcmd{romannumeral} converts an integer to a Roman numeral but \tex or \latex provide no command which goes the opposite way. \ltxcmd{rmntonum} fills this gap. It takes a Roman numeral as its argument and converts it to the corresponding integer. Since it is expandable, it may also be used in counter assignments or \ltxcmd{ifnum} comparisons: +The \tex primitive \cmd{romannumeral} converts an integer to a Roman numeral but \tex or \latex provide no command which goes the opposite way. \cmd{rmntonum} fills this gap. It takes a Roman numeral as its argument and converts it to the corresponding integer. Since it is expandable, it may also be used in counter assignments or \cmd{ifnum} comparisons: \begin{ltxcode} \rmntonum{mcmxcv} @@ -698,11 +809,11 @@ The \tex primitive \ltxcmd{romannumeral} converts an integer to a Roman numeral \ifnum\rmntonum{mcmxcviii}<2000 ... \end{ltxcode} % -The \ltxarg{numeral} argument must be a literal string. It will be detokenized prior to parsing. The parsing of the numeral is case"=insensitive and whitespace in the argument is ignored. If there is an invalid token in the argument, \ltxcmd{rmntonum} will expand to~\texttt{-1}; an empty argument will yield an empty string. Note that \ltxcmd{rmntonum} will not check the numeral for formal validity. For example, both \texttt{V} and \texttt{VX} will yield~\texttt{5}. +The \prm{numeral} argument must be a literal string. It will be detokenized prior to parsing. The parsing of the numeral is case"=insensitive and whitespace in the argument is ignored. If there is an invalid token in the argument, \cmd{rmntonum} will expand to~\texttt{-1}; an empty argument will yield an empty string. Note that \cmd{rmntonum} will not check the numeral for formal validity. For example, both \texttt{V} and \texttt{VX} will yield~\texttt{5}. -\cmd{ifrmnum}{string}{true}{false} +\cmditem{ifrmnum}{string}{true}{false} -Expands to \ltxarg{true} if \ltxarg{string} is a Roman numeral, and to \ltxarg{false} otherwise. The \ltxarg{string} will be detokenized prior to performing the test. The test is case"=insensitive and ignores whitespace in the \ltxarg{string}. Note that \ltxcmd{ifrmnum} will not check the numeral for formal validity. For example, both \texttt{V} and \texttt{VXV} will yield \ltxarg{true}. Strictly speaking, what \ltxcmd{ifrmnum} does is parse the \ltxarg{string} in order to find out if it consists of characters which may form a valid Roman numeral. +Expands to \prm{true} if \prm{string} is a Roman numeral, and to \prm{false} otherwise. The \prm{string} will be detokenized prior to performing the test. The test is case"=insensitive and ignores whitespace in the \prm{string}. Note that \cmd{ifrmnum} will not check the numeral for formal validity. For example, both \texttt{V} and \texttt{VXV} will yield \prm{true}. Strictly speaking, what \cmd{ifrmnum} does is parse the \prm{string} in order to find out if it consists of characters which may form a valid Roman numeral. \end{ltxsyntax} @@ -710,14 +821,43 @@ Expands to \ltxarg{true} if \ltxarg{string} is a Roman numeral, and to \ltxarg{f \begin{changelog} +\begin{release}{1.6}{2008-06-22} + +\item Improved \cmd{robustify}\see{use:pat} +\item Improved \cmd{patchcmd} and \cmd{ifpatchable}\see{aut:pat} +\item Modified and improved \cmd{apptocmd}\see{aut:pat} +\item Modified and improved \cmd{pretocmd}\see{aut:pat} +\item Added \cmd{ifpatchable*}\see{aut:pat} +\item Added \cmd{tracingpatches}\see{aut:pat} +\item Added \cmd{AfterBeginDocument}\see{use:pre} +\item Added \cmd{ifdefmacro}\see{aut:tst:def} +\item Added \cmd{ifcsmacro}\see{aut:tst:def} +\item Added \cmd{ifdefprefix}\see{aut:tst:def} +\item Added \cmd{ifcsprefix}\see{aut:tst:def} +\item Added \cmd{ifdefparam}\see{aut:tst:def} +\item Added \cmd{ifcsparam}\see{aut:tst:def} +\item Added \cmd{ifdefprotected}\see{aut:tst:def} +\item Added \cmd{ifcsprotected}\see{aut:tst:def} +\item Added \cmd{ifdefltxprotect}\see{aut:tst:def} +\item Added \cmd{ifcsltxprotect}\see{aut:tst:def} +\item Added \cmd{ifdefempty}\see{aut:tst:def} +\item Added \cmd{ifcsempty}\see{aut:tst:def} +\item Improved \cmd{ifdefvoid}\see{aut:tst:def} +\item Improved \cmd{ifcsvoid}\see{aut:tst:def} +\item Added \cmd{ifstrempty}\see{aut:tst:str} +\item Added \cmd{setbool}\see{aut:bo1:bol} +\item Added \cmd{settoggle}\see{aut:bo1:swi} + +\end{release} + \begin{release}{1.5}{2008-04-26} -\item Added \ltxcmd{defcounter}\see{use:cal} -\item Added \ltxcmd{deflength}\see{use:cal} -\item Added \ltxcmd{ifdefstring}\see{aut:tst} -\item Added \ltxcmd{ifcsstring}\see{aut:tst} -\item Improved \ltxcmd{rmntonum}\see{aut:msc} -\item Added \ltxcmd{ifrmnum}\see{aut:msc} +\item Added \cmd{defcounter}\see{use:cal} +\item Added \cmd{deflength}\see{use:cal} +\item Added \cmd{ifdefstring}\see{aut:tst:def} +\item Added \cmd{ifcsstring}\see{aut:tst:def} +\item Improved \cmd{rmntonum}\see{aut:msc} +\item Added \cmd{ifrmnum}\see{aut:msc} \item Added extended \pdf bookmarks to this manual \item Rearranged manual slightly @@ -732,85 +872,85 @@ Expands to \ltxarg{true} if \ltxarg{string} is a Roman numeral, and to \ltxarg{f \begin{release}{1.3}{2007-10-08} \item Renamed package from \sty{elatex} to \sty{etoolbox}\see{int} -\item Renamed \ltxcmd{newswitch} to \ltxcmd{newtoggle} (name clash)\see{aut:bo1:swi} -\item Renamed \ltxcmd{provideswitch} to \ltxcmd{providetoggle} (consistency)\see{aut:bo1:swi} -\item Renamed \ltxcmd{switchtrue} to \ltxcmd{toggletrue} (consistency)\see{aut:bo1:swi} -\item Renamed \ltxcmd{switchfalse} to \ltxcmd{togglefalse} (consistency)\see{aut:bo1:swi} -\item Renamed \ltxcmd{ifswitch} to \ltxcmd{iftoggle} (consistency)\see{aut:bo1:swi} -\item Renamed \ltxcmd{notswitch} to \ltxcmd{nottoggle} (consistency)\see{aut:bo1:swi} -\item Added \ltxcmd{AtEndPreamble}\see{use:pre} -\item Added \ltxcmd{AfterEndDocument}\see{use:pre} -\item Added \ltxcmd{AfterPreamble}\see{use:pre} -\item Added \ltxcmd{undef}\see{aut:def:def} -\item Added \ltxcmd{csundef}\see{aut:def:def} -\item Added \ltxcmd{ifdefvoid}\see{aut:tst} -\item Added \ltxcmd{ifcsvoid}\see{aut:tst} -\item Added \ltxcmd{ifdefequal}\see{aut:tst} -\item Added \ltxcmd{ifcsequal}\see{aut:tst} -\item Added \ltxcmd{ifstrequal}\see{aut:tst} -\item Added \ltxcmd{listadd}\see{aut:lst:int} -\item Added \ltxcmd{listeadd}\see{aut:lst:int} -\item Added \ltxcmd{listgadd}\see{aut:lst:int} -\item Added \ltxcmd{listxadd}\see{aut:lst:int} -\item Added \ltxcmd{listcsadd}\see{aut:lst:int} -\item Added \ltxcmd{listcseadd}\see{aut:lst:int} -\item Added \ltxcmd{listcsgadd}\see{aut:lst:int} -\item Added \ltxcmd{listcsxadd}\see{aut:lst:int} -\item Added \ltxcmd{ifinlist}\see{aut:lst:int} -\item Added \ltxcmd{xifinlist}\see{aut:lst:int} -\item Added \ltxcmd{ifinlistcs}\see{aut:lst:int} -\item Added \ltxcmd{xifinlistcs}\see{aut:lst:int} -\item Added \ltxcmd{dolistloop}\see{aut:lst:int} -\item Added \ltxcmd{dolistcsloop}\see{aut:lst:int} +\item Renamed \cmd{newswitch} to \cmd{newtoggle} (name clash)\see{aut:bo1:swi} +\item Renamed \cmd{provideswitch} to \cmd{providetoggle} (consistency)\see{aut:bo1:swi} +\item Renamed \cmd{switchtrue} to \cmd{toggletrue} (consistency)\see{aut:bo1:swi} +\item Renamed \cmd{switchfalse} to \cmd{togglefalse} (consistency)\see{aut:bo1:swi} +\item Renamed \cmd{ifswitch} to \cmd{iftoggle} (consistency)\see{aut:bo1:swi} +\item Renamed \cmd{notswitch} to \cmd{nottoggle} (consistency)\see{aut:bo1:swi} +\item Added \cmd{AtEndPreamble}\see{use:pre} +\item Added \cmd{AfterEndDocument}\see{use:pre} +\item Added \cmd{AfterPreamble}\see{use:pre} +\item Added \cmd{undef}\see{aut:def:def} +\item Added \cmd{csundef}\see{aut:def:def} +\item Added \cmd{ifdefvoid}\see{aut:tst:def} +\item Added \cmd{ifcsvoid}\see{aut:tst:def} +\item Added \cmd{ifdefequal}\see{aut:tst:def} +\item Added \cmd{ifcsequal}\see{aut:tst:def} +\item Added \cmd{ifstrequal}\see{aut:tst:str} +\item Added \cmd{listadd}\see{aut:lst:int} +\item Added \cmd{listeadd}\see{aut:lst:int} +\item Added \cmd{listgadd}\see{aut:lst:int} +\item Added \cmd{listxadd}\see{aut:lst:int} +\item Added \cmd{listcsadd}\see{aut:lst:int} +\item Added \cmd{listcseadd}\see{aut:lst:int} +\item Added \cmd{listcsgadd}\see{aut:lst:int} +\item Added \cmd{listcsxadd}\see{aut:lst:int} +\item Added \cmd{ifinlist}\see{aut:lst:int} +\item Added \cmd{xifinlist}\see{aut:lst:int} +\item Added \cmd{ifinlistcs}\see{aut:lst:int} +\item Added \cmd{xifinlistcs}\see{aut:lst:int} +\item Added \cmd{dolistloop}\see{aut:lst:int} +\item Added \cmd{dolistcsloop}\see{aut:lst:int} \end{release} \begin{release}{1.2}{2007-07-13} -\item Renamed \ltxcmd{patchcommand} to \ltxcmd{patchcmd} (name clash)\see{aut:pat} -\item Renamed \ltxcmd{apptocommand} to \ltxcmd{apptocmd} (consistency)\see{aut:pat} -\item Renamed \ltxcmd{pretocommand} to \ltxcmd{pretocmd} (consistency)\see{aut:pat} -\item Added \ltxcmd{newbool}\see{aut:bo1:bol} -\item Added \ltxcmd{providebool}\see{aut:bo1:bol} -\item Added \ltxcmd{booltrue}\see{aut:bo1:bol} -\item Added \ltxcmd{boolfalse}\see{aut:bo1:bol} -\item Added \ltxcmd{ifbool}\see{aut:bo1:bol} -\item Added \ltxcmd{notbool}\see{aut:bo1:bol} -\item Added \ltxcmd{newswitch}\see{aut:bo1:swi} -\item Added \ltxcmd{provideswitch}\see{aut:bo1:swi} -\item Added \ltxcmd{switchtrue}\see{aut:bo1:swi} -\item Added \ltxcmd{switchfalse}\see{aut:bo1:swi} -\item Added \ltxcmd{ifswitch}\see{aut:bo1:swi} -\item Added \ltxcmd{notswitch}\see{aut:bo1:swi} -\item Added \ltxcmd{DeclareListParser}\see{aut:lst:inp} -\item Added \ltxcmd{docsvlist}\see{aut:lst:inp} -\item Added \ltxcmd{rmntonum}\see{aut:msc} +\item Renamed \cmd{patchcommand} to \cmd{patchcmd} (name clash)\see{aut:pat} +\item Renamed \cmd{apptocommand} to \cmd{apptocmd} (consistency)\see{aut:pat} +\item Renamed \cmd{pretocommand} to \cmd{pretocmd} (consistency)\see{aut:pat} +\item Added \cmd{newbool}\see{aut:bo1:bol} +\item Added \cmd{providebool}\see{aut:bo1:bol} +\item Added \cmd{booltrue}\see{aut:bo1:bol} +\item Added \cmd{boolfalse}\see{aut:bo1:bol} +\item Added \cmd{ifbool}\see{aut:bo1:bol} +\item Added \cmd{notbool}\see{aut:bo1:bol} +\item Added \cmd{newswitch}\see{aut:bo1:swi} +\item Added \cmd{provideswitch}\see{aut:bo1:swi} +\item Added \cmd{switchtrue}\see{aut:bo1:swi} +\item Added \cmd{switchfalse}\see{aut:bo1:swi} +\item Added \cmd{ifswitch}\see{aut:bo1:swi} +\item Added \cmd{notswitch}\see{aut:bo1:swi} +\item Added \cmd{DeclareListParser}\see{aut:lst:inp} +\item Added \cmd{docsvlist}\see{aut:lst:inp} +\item Added \cmd{rmntonum}\see{aut:msc} \end{release} \begin{release}{1.1}{2007-05-28} -\item Added \ltxcmd{protected@csedef}\see{aut:def:def} -\item Added \ltxcmd{protected@csxdef}\see{aut:def:def} -\item Added \ltxcmd{gluedef}\see{aut:def:cal} -\item Added \ltxcmd{gluegdef}\see{aut:def:cal} -\item Added \ltxcmd{csgluedef}\see{aut:def:cal} -\item Added \ltxcmd{csgluegdef}\see{aut:def:cal} -\item Added \ltxcmd{mudef}\see{aut:def:cal} -\item Added \ltxcmd{mugdef}\see{aut:def:cal} -\item Added \ltxcmd{csmudef}\see{aut:def:cal} -\item Added \ltxcmd{csmugdef}\see{aut:def:cal} -\item Added \ltxcmd{protected@eappto}\see{aut:hok:app} -\item Added \ltxcmd{protected@xappto}\see{aut:hok:app} -\item Added \ltxcmd{protected@cseappto}\see{aut:hok:app} -\item Added \ltxcmd{protected@csxappto}\see{aut:hok:app} -\item Added \ltxcmd{protected@epreto}\see{aut:hok:pre} -\item Added \ltxcmd{protected@xpreto}\see{aut:hok:pre} -\item Added \ltxcmd{protected@csepreto}\see{aut:hok:pre} -\item Added \ltxcmd{protected@csxpreto}\see{aut:hok:pre} -\item Fixed bug in \ltxcmd{newrobustcmd}\see{use:def} -\item Fixed bug in \ltxcmd{renewrobustcmd}\see{use:def} -\item Fixed bug in \ltxcmd{providerobustcmd}\see{use:def} +\item Added \cmd{protected@csedef}\see{aut:def:def} +\item Added \cmd{protected@csxdef}\see{aut:def:def} +\item Added \cmd{gluedef}\see{aut:def:cal} +\item Added \cmd{gluegdef}\see{aut:def:cal} +\item Added \cmd{csgluedef}\see{aut:def:cal} +\item Added \cmd{csgluegdef}\see{aut:def:cal} +\item Added \cmd{mudef}\see{aut:def:cal} +\item Added \cmd{mugdef}\see{aut:def:cal} +\item Added \cmd{csmudef}\see{aut:def:cal} +\item Added \cmd{csmugdef}\see{aut:def:cal} +\item Added \cmd{protected@eappto}\see{aut:hok:app} +\item Added \cmd{protected@xappto}\see{aut:hok:app} +\item Added \cmd{protected@cseappto}\see{aut:hok:app} +\item Added \cmd{protected@csxappto}\see{aut:hok:app} +\item Added \cmd{protected@epreto}\see{aut:hok:pre} +\item Added \cmd{protected@xpreto}\see{aut:hok:pre} +\item Added \cmd{protected@csepreto}\see{aut:hok:pre} +\item Added \cmd{protected@csxpreto}\see{aut:hok:pre} +\item Fixed bug in \cmd{newrobustcmd}\see{use:def} +\item Fixed bug in \cmd{renewrobustcmd}\see{use:def} +\item Fixed bug in \cmd{providerobustcmd}\see{use:def} \end{release} |