Hypertext Help with LaTeX Fragile and Robust commands
LaTeX commands are either robust or fragile. Fragile
commands need special care if they are part of a moving argument.
Arguments to some LaTeX commands are called moving arguments because
they may be "moved" to other places in the document. For example, the argument
of Sectioning comands may be moved
to the Table of Contents. Other examples
of moving arguments include:
an @ expression in the Array or
Tabular environment
A fragile command that appears in a moving argument must be preceded by a
\protect command. The \protect applies only to the
immediately following command; if arguments of this command also contain
fragile commands, the latter must be protected with their own \protect.
Some fragile commands
The following list is not exhaustive, but illustrates the kind of commands
which are fragile
All commands that have an optional argument are fragile.
Environments delimited by \begin ... \end are fragile.
Length commands are robust and should
not be preceded by a \protect command. Nor
should a \protect command be used in the argument to
\addtocounter or
\setcounter command.