LaTeX:在标题中引用 [ ] 参数
我需要“图表列表”中列出的图像来源。 为此,我想在标题参数中引用:
这有效:
\caption[Plan,\protect\cite{damluji1992}]{Plan}
这也有效,但我需要在标题参数中使用它,如下一个示例:
\cite[p.156]{damluji1992}
我需要这个不起作用:
\caption[Plan,\protect\cite[p.156]{damluji1992}]{Plan}
它给了我错误“Argument of \ HAR@dcite 有一个额外的}。” 在 *.lof 文件中,相应的行如下所示:
\contentsline {figure}{\numberline {2}{\ignorespaces Plan, \cite [S.156}}{5}{figure.caption.4}
-> { } 中的引用参数丢失!
如果没有 [ ] 中的 cite 参数,它看起来像这样:
\contentsline {figure}{\numberline {2}{\ignorespaces Plan, \cite {damluji1992}}}{5}{figure.caption.4}
I need the source of images listed in the "list of figures".
To do this I want to cite inside the caption argument:
This works:
\caption[Plan,\protect\cite{damluji1992}]{Plan}
This works too but i need it in the caption argument like in the next example:
\cite[p.156]{damluji1992}
I need this which doesn't work:
\caption[Plan,\protect\cite[p.156]{damluji1992}]{Plan}
it gives me the error "Argument of \HAR@dcite has an extra }."
In the *.lof file the corresponding line looks like this:
\contentsline {figure}{\numberline {2}{\ignorespaces Plan, \cite [S.156}}{5}{figure.caption.4}
-> the cite argument in { } is missing!
Without the cite argument in [ ] it looks like this:
\contentsline {figure}{\numberline {2}{\ignorespaces Plan, \cite {damluji1992}}}{5}{figure.caption.4}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我偶然发现这个页面有同样的问题,然后在 http://www.latex-community.org/forum/viewtopic.php?f=50&t=6225
解决方案:将大括号放在 cite 命令周围:
这是必要的原因是您在另一个可选 [] 参数内有一个可选 [] 参数。
I stumbled on this page with the same question and then found the answer at http://www.latex-community.org/forum/viewtopic.php?f=50&t=6225
The solution: put curly braces around the cite command:
The reason this is necessary is that you have an optional [] argument inside another optional [] argument.
在序言中:
在文档中:
产生:
In preamble:
in document:
produces: