我的代码是:
\documentclass[12pt,letterpaper]{report}
\usepackage[square,sort,comma,numbers]{natbib}
\begin{document}
It is particularly notable for its flexibility, its
superb hyphenation, and its ability to choose aesthetically satisfyingline\citep{Wel03}
\bibliographystyle{apalike}
\bibliography{Bibliography}
\end{document}
我的 bib 文件是:
@Book{Tho05,
author = "Thomas F. O'Brien and Tilak V. Bommaraju and Fumio Hine",
title = {Handbook of Chlor-Alkali Technology Volume I: Fundamentals},
publisher = {Springer Science+Business Media Inc.},
year = {2005},
address = {233 Spring Street, New York, NY 10013,
USA},
}
它编译为:
在 natbib 文档中,它说 \citep{key} 结果是:
我希望拥有与文档中一样的 (作者等,年份) 格式。我需要输入什么 \cite?
答案1
要获得所需的带有圆括号的作者年份引用样式,您需要更改指令
\usepackage[square,sort,comma,numbers]{natbib}
到
\usepackage[round,authoryear]{natbib}
确保再运行 LaTeX、BibTeX 和 LaTeX 两次,以完全传播所有更改。您将获得以下外观:
\documentclass[12pt,letterpaper]{article} % changed from 'report' to 'article' for this MWE
\usepackage{filecontents}
\begin{filecontents*}{Bibliography.bib} % make this a self-contained MWE
@Book{Tho05,
author = "Thomas F. O'Brien and Tilak V. Bommaraju and Fumio Hine",
title = {Handbook of Chlor-Alkali Technology Volume I: Fundamentals},
publisher = {Springer Science$+$Business Media Inc.},
year = {2005},
address = {233 Spring Street, New York, NY 10013, USA},
}
\end{filecontents*}
\usepackage[round,authoryear]{natbib}
\begin{document}
\citep{Tho05}
\citet{Tho05}
\bibliographystyle{apalike}
\bibliography{Bibliography}
\end{document}