我想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 与其他@string
s 连接起来。但是,您当然可以按照预期使用宏。比较这两个条目:
\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}