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:
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.
- Display math environment delimited by
\[ ... \]
- Math environment \( ... \)
- However, $ ... $ is robust
- Line breaks, \\
- \item commands
- \footnote commands
Some robust commands
In general, commands which change Type face or
Type style are robust.
Length commands are robust and should
not be preceded by a \protect command. Nor
should a \protect command be used in the argument to
Return to LaTeX Table of Contents
Sheldon Green, firstname.lastname@example.org, 29 Sep 1995.