3

I've read several posts and other webpages now on using \protect in front of \cite inside \caption. They all advise using \protect in this situation, and many go as far as to say that you must use it.

Now, I've been able to use \cite inside \caption without \protect and still get no errors. For example, the following works fine:

\documentclass{article}

\begin{document}

\begin{figure}
Hello
\caption{I cite this \cite[p. 41]{lang:cyc}.}
\end{figure}

\begin{thebibliography}{1}

\bibitem{lang:cyc}
S.~Lang.
\newblock {\em Cyclotomic fields {I} and {II}}, volume 121 of {\em Graduate Texts in Mathematics}.
\newblock Springer-Verlag, New York, second edition, 1990.
\newblock With an appendix by Karl Rubin.

\end{thebibliography}

\end{document}

I'm interested to know, therefore, whether \protect is strictly necessary in this context. Could it be that it's sometimes not necessary (as in the above), but that it's best to use it anyway because you never know when some intricate circumstance might make it necessary?

Thanks for your help.

3
  • 1
    It shouldn't be necessary, unless some package redefines \cite in a “fragile” way. By default, \cite is a robust command.
    – egreg
    Commented Apr 29, 2014 at 17:38
  • 1
    I've found this one, which is an example of a package redefining \cite in a fragile way (apacite.sty).
    – egreg
    Commented Apr 29, 2014 at 17:50
  • I use \cite without problems in captions, also \ref works fine. The only occasion I had to use \protect inside a caption, was when I created a sub-figure and used \subref within the main caption. [tex.stackexchange.com/questions/62636/…
    – Dohn Joe
    Commented Apr 29, 2014 at 20:54

1 Answer 1

2

It shouldn't be necessary, because the kernel \cite command is robust. Also the main packages for managing bibliographies, such as natbib and biblatex have care to redefine \cite in a robust fashion.

Some packages, unfortunately don't, for example apacite (but natbib emulates it pretty well). In such a case, \protect would become necessary.

Adding \protect when not strictly necessary shouldn't be a problem, though.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .