# What is the purpose of \protect? [duplicate]

Possible Duplicate:
What is the difference between Fragile and Robust commands?

I've never understood the purpose of the command \protect? When and why should it be used?

-

## marked as duplicate by Leo Liu, lockstep, Caramdir, Lev Bishop, Loop SpaceMar 7 '11 at 14:26

Possible duplicate question: tex.stackexchange.com/questions/4736/… – Leo Liu Mar 5 '11 at 8:28
@LeoLiu you may edit your link: it seems dead. – Manu H Nov 27 '15 at 12:23
– Leo Liu Dec 9 '15 at 6:33

To understand how to use \protect you need to understand the concept of fragile commands and to understand this concept, you need to understand what a moving argument is. Some commands called fragile commands causes an error when they use a moving argument. It's a command that expands into illegal TeX code during the save process. Some arguments are called moving arguments because they may be "moved" to other places in the document. A fragile command that appears in a moving argument must be preceded by a \protect command. For example,
• arguments of \caption commands
\caption{Beautiful picture from \protect \citeauthor{allan}