一直使用natbib
带plainnat
样式,所有条目均显示出来,但我想将其切换为哈佛格式(agsm
样式)。但是,一旦我更改它,一些条目就不再显示。
例如,
@techreport{lcabc_2022,
author={Frank Mittelbach and Kim Cheslak and Jim Edelson},
title={Lifecycle GHG Impacts in Building Codes},
institution ={New Buildings Institute},
year={2022},
month={01},
URL = {https://newbuildings.org/wp-content/uploads/2022/04/LifecycleGHGImpactsinBuildingCodes.pdf},
note = {Accessed: 06 Febraury 2023}
}
当它也在文中被引用并且当我改回 plainnat 样式时它就会出现吗?
答案1
(评论太长,因此作为答案发布)
让我重申一下@egreg 评论中的信息:如果我将您的代码片段扩充到最低限度可编译的测试文档中,我也无法重现您报告遇到的问题。在有问题的 bib 条目中或引用标注中肯定存在您尚未报告的内容。blg(BibTeX 日志)文件中是否有任何错误消息?
\documentclass{article}
\begin{filecontents}[overwrite]{test.bib}
@techreport{lcabc_2022,
author = {Frank Mittelbach and Kim Cheslak and Jim Edelson},
title = {Lifecycle {GHG} Impacts in Building Codes},
institution ={New Buildings Institute},
year = 2022,
month = 01,
URL = {https://newbuildings.org/wp-content/uploads/2022/04/LifecycleGHGImpactsinBuildingCodes.pdf},
note = {Accessed: 06 February 2023}
}
\end{filecontents}
\usepackage{natbib}
\bibliographystyle{agsm}
\usepackage{xurl}
\let\harvardurl\url % redefine \harvardurl
\begin{document}
\noindent
\cite{lcabc_2022}
\bibliography{test}
\end{document}