开发者

Latex - Inserting a reference in a figure's caption

开发者 https://www.devze.com 2023-01-31 22:28 出处:网络
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}).}

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开发者_如何学Python working on any other places of the text.

Any suggestions how to do this?

Thanks


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

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


As the accepted answer seems rather hacky (and also didn't work for me) I will post my solution for the problem:

\begin{figure}
  ...
  \caption[Cap for listoffigures]{Cap below figure with cite \cite{source}}
  ...
\end{figure}

This compiles without errors and warnings.

0

精彩评论

暂无评论...
验证码 换一张
取 消