在LaTeX中,我想在图例中添加一个引用,例如:
\begin{figure}
...
\caption{This is the legend of this figure (reprinted from \cite{something}).}
...
\end{figure}
但是引用不允许放在说明文字中,只能放在正文中。我的参考文献可以在文本的其他地方工作。
有什么建议吗?
谢谢
\cite{ref}
改为 \protect\cite{ref}
或者更简短的写法:'{\cite{ref}}'鉴于被接受的答案似乎有点“hacky”(并且对我也不起作用),我将发布我的解决方案:
\begin{figure}
...
\caption[Cap for listoffigures]{Cap below figure with cite \cite{source}}
...
\end{figure}
这个编译没有错误和警告。
\protect{}
中也没有效果。 - Subhamoy S.{\protect\autocite{ref}}
在XeLaTeX中可以正常工作。因此,将\protect
和引用命令放在一对花括号中,即{\protect\cite{ref}}
,也可以在XeLaTeX中正常工作。 - Carlos Luis Rivera
pdflatex
时,这确实为我解决了问题。 - Tom{\protect\autocite{ref}}
在XeLaTeX中可以正常工作。因此,将\protect
和引用命令放在一对花括号中,即{\protect\cite{ref}}
,也可以在XeLaTeX中正常工作。 - Carlos Luis Rivera