在参考书目条目中添加字符串

在参考书目条目中添加字符串

我想booktitle在某个条目之前添加以下行@inproceedings。我在 .bib 文件中将该行写入

@String {Conf. = {Proc. {IEEE} Int. Conf.} }

然后输入是

@inproceedings{key,     
 title = {},
 author = {},
 booktitle= Conf. Signal Processing
}

我希望获得如下输出Proc. IEEE Int. Conf. Signal Processing

答案1

您无法做(我认为)您希望做的事情。您必须@string仅将 s 与其他@strings 连接起来。但是,您当然可以按照预期使用宏。比较这两个条目:

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@string{ CONF = "Proc. {IEEE} Int. Conf." }
@string{ SIGPROC = " Signal Processing" }

@preamble{ "\providecommand*{\CONF}{Proc. {IEEE} Int. Conf.}" }

@inproceedings{key,
 title = {Title},
 author = {Author},
 booktitle= CONF # SIGPROC,
 year =   2000,
}

@inproceedings{key1,
 title = {Title},
 author = {Author},
 booktitle={\CONF{} Signal Processing},
 year =   2000,
}

\end{filecontents*}

\usepackage{natbib}

\begin{document}

\cite{key}
\cite{key1}
\bibliographystyle{plainnat}
\bibliography{\jobname}

\end{document}

相关内容