2.9 Moving Arguments And Fragile Commands
Certain types of commands, called fragile commands, can
seriously mess things up when they are used in what is termed a
moving argument. These types of
argument are generally those whose contents are copied to another part of the
document. For example, section headings appear at the start of a
section, but they can also appear in the table of contents. The
\footnote
command is a fragile command, so
will cause an error[An extra `}'??].
If there is no other command to use in its place, you should
use \protect
immediately before the
fragile command:
[Footnotes in LaTeX section headings]This, however, is a contrived example, because it isn't a good idea to have a footnote in a section heading, as it will also end up in the table of contents, and possibly in page headings.
This book is also available as A4 PDF or 12.8cm x 9.6cm PDF or paperback (ISBN 978-1-909440-00-5).