图片标题中引用参考文献

图片标题中引用参考文献

问题:

尝试在图片标题中引用参考文献时收到错误消息。不确定我做错了什么。似乎也找不到以前出现过这种情况。

最小工作示例:

\documentclass{book}
\usepackage[utf8]{inputenc}
\usepackage[pdftex]{graphicx}
\usepackage{epstopdf}
\graphicspath{{figures/}}

\usepackage{apacite}
\bibliographystyle{apacite}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{rub14,
   author = {Rubin, Jared},
   title = {Printing and {Protestants}: An empirical test of the role of printing in the {Reformation}},
   journal = {Review of Economics and Statistics},
   volume = {96},
   number = {2},
   pages = {270--286},
   year = {2014},
}
\end{filecontents}

\begin{document}
\begin{figure}[htp]
\centering
\includegraphics[width=\textwidth]{conceptdriven.eps}
\caption{\label{fig:researchscope}The process of concept-driven design approach in relation to theory and use situation, adopted from \citeA[p.~282]{rub14}} 
\end{figure}

\bibliography{\jobname}

\end{document}

期望的结果:

引用应直接位于“采用自”一词之后。

答案1

\citeA是“脆弱的”,这是 LaTeX 特有的。如果它出现在“移动参数”(更多 LaTeX 术语,抱歉)中,例如指令的参数\caption,则必须添加\protect指令前缀:

\caption{\label{fig:researchscope}The process of concept-driven 
  design approach in relation to theory and use situation, 
  adopted from \protect\citeA[p.~282]{rub14}}

有关此类型的另一个示例,请参阅帖子在标题中使用 \input{}

答案2

也有类似的问题堆栈溢出

图题中的命令的问题\cite在于它与自动创建产生冲突图片列表。因此,第一个选择是将替代标题放在括号中:

\caption[test caption]{test caption from~\cite{MyCite}}

您还可以使用\protect评论中建议的环境:

\caption{test caption from~\protect\cite{MyCite}}

至于您的最小工作示例,您可以按如下方式执行:

\documentclass{book}
  \usepackage[utf8]{inputenc}
  \usepackage[pdftex]{graphicx}
  \usepackage{epstopdf}
  \graphicspath{{figures/}}

  \usepackage{lipsum} % just for the example

  \usepackage{apacite}
  \bibliographystyle{apacite}

  \usepackage{filecontents}
  \begin{filecontents}{\jobname.bib}
  @article{rub14,
     author = {Rubin, Jared},
     title = {Printing and {Protestants}: An empirical test of the role of printing in the {Reformation}},
     journal = {Review of Economics and Statistics},
     volume = {96},
     number = {2},
     pages = {270--286},
     year = {2014},
  }
  \end{filecontents}

  \begin{document}
    \listoffigures

    \vspace{0.5cm}
    \lipsum[3]
    \begin{figure}[htp]
      \centering
      \includegraphics[width=8cm,height=5cm]{sample_pic}%
      %\includegraphics[width=\textwidth]{conceptdriven.eps}
      \caption[The process of concept-driven design approach in relation to theory and use situation]{The process of concept-driven design approach in relation to theory and use situation, adopted from~\citeA[p.~282} 
      \label{fig:researchscope}
    \end{figure}

    \lipsum[2]
    \bibliography{\jobname}

   \end{document}

输出结果如下:

MWE 输出

相关内容