在參考書目條目中新增字串

在參考書目條目中新增字串

我想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}

相關內容