我正在用 Latex 写一篇文档,并用命令引用\cite
。它给出的引用如下
一句话10
现在对于一些地方,我想给出引用,只用数字,没有上标,
一句话 10
为此,我创建了一个新命令
\newcommand*{\citen}[1]{%
\begingroup
\setcitestyle{numbers}%
\cite{#1}%
\endgroup
}
现在使用\citen
给出了我想要的用于普通段落位置的引用样式,但是当我在图片标题中使用它时,它会出现这个错误,
Argument of \@iforloop has an extra }. }
Paragraph ended before \@iforloop was complete. }
如何在图片标题中使用我想要的引用样式而不改变其他地方的样式/
答案1
无牙套
比布拉特克斯
\documentclass{article}
\usepackage[style=ieee]{biblatex}
\addbibresource{reference.bib}
\renewcommand{\bibopenbracket}{}
\renewcommand{\bibclosebracket}{}
\begin{document}
test\supercite{xxx}test\parencite{xxx}test\supercite{xxx}
\begin{figure}
\caption{test\supercite{xxx}test\parencite{xxx}test\supercite{xxx}}
\end{figure}
\printbibliography
\end{document}
纳特比布
\documentclass{article}
\usepackage[super]{natbib}
\makeatletter
\renewcommand\@biblabel[1]{#1}
\makeatother
\NewDocumentCommand{\parencite}{m}{\begingroup\bibpunct{}{}{,}{n}{}{,}\cite{#1}\endgroup}
\begin{document}
test\cite{xxx}test\parencite{xxx}test\cite{xxx}
\begin{figure}
\caption{test\cite{xxx}test\parencite{xxx}test\cite{xxx}}
\end{figure}
\bibliographystyle{IEEEtran}
\bibliography{reference}
\end{document}
方括号
比布拉特克斯
\documentclass{article}
\usepackage[style=ieee]{biblatex}
\addbibresource{reference.bib}
\begin{document}
test\supercite{xxx}test\parencite{xxx}test\supercite{xxx}
\begin{figure}
\caption{test\supercite{xxx}test\parencite{xxx}test\supercite{xxx}}
\end{figure}
\printbibliography
\end{document}
纳特比布
\documentclass{article}
\usepackage[super,square]{natbib}
\NewDocumentCommand{\parencite}{m}{\begingroup\citestyle{plain}\cite{#1}\endgroup}
\begin{document}
test\cite{xxx}test\parencite{xxx}test\cite{xxx}
\begin{figure}
\caption{test\cite{xxx}test\parencite{xxx}test\cite{xxx}}
\end{figure}
\bibliographystyle{IEEEtran}
\bibliography{reference}
\end{document}