Latex - Inserting a reference in a figure's caption

Sérgio picture Sérgio · Dec 20, 2010 · Viewed 43.3k times · Source

In Latex, I want to add a reference in the legend of a figure, like:

\begin{figure}
   ...
   \caption{This is the legend of this figure (reprinted from \cite{something}).}
   ...
\end{figure}

but the citation is not allowed to be placed in the the caption, only in the text. My bibliography is working on any other places of the text.

Any suggestions how to do this?

Thanks

Answer

Sérgio picture Sérgio · May 3, 2011

Solution found: write \protect\cite{ref} instead of just \cite{ref}

Or even shorter: '{\cite{ref}}'