Fragile Command in Moving Argument
! LaTeX Error: Command \XXX is fragile.
What this error means
Some LaTeX commands are 'fragile' and cannot be used directly in 'moving arguments' — arguments that LaTeX writes to auxiliary files (like .toc, .lof, .lot) for table of contents or captions. Examples include \footnote, \verb, and some formatting commands.
Common causes
- Using \footnote inside \section{} or \caption{}
- Using \cite or other cross-referencing commands in section titles
- Using a custom command that internally uses fragile commands in moving arguments
How to fix it
Add \protect before the fragile command to shield it: \section{My title \protect\footnote{Note}}. Alternatively, use \texorpdfstring{}{} from hyperref to provide different text for PDF bookmarks and the document.
Code examples
\documentclass{article}
\begin{document}
\section{Introduction\footnote{A note}} % Fragile!
\end{document}\documentclass{article}
\begin{document}
\section{Introduction\protect\footnote{A note}}
\end{document}Related errors
Test the fix live
Paste your LaTeX into the playground and compile instantly.

