Latest news 2022-07-02: Ebook Sale 75% off crime/SF novel The Private Enemy and 100% (free!) off crime short story I’ve Heard the Mermaid Sing. Sale ends 31st July, 2022

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

\section{A heading\footnote{with a footnote}}
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:

\section{A heading\protect\footnote{with a footnote}}

[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).

© 2012 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.

Terms of Use Privacy Policy Cookies Site Map FAQs