我正在尝试在 overleaf 模板中添加哈佛风格的参考资料
我已经修改了 article.tex 可用这里包括以下内容
\documentclass[times, twoside, watermark]{zHenriquesLab-StyleBioRxiv}
\begin{filecontents}{\jobname.bib}
@book{thri,
author = {Thirlwal, A. P.},
year = {2011},
title = {Economics of development: theory and evidence},
edition = {9th},
publisher = {Palgrave Macmillan},
address = {New York}
}
@article{ahu61,
author={Arrow, Kenneth J. and Leonid Hurwicz and Hirofumi Uzawa},
title={Constraint qualifications in maximization problems},
journal={Naval Research Logistics Quarterly},
volume={8},
year = {1961},
pages = {175-191}
}
\end{filecontents}
\usepackage{blindtext}
% Please give the surname of the lead author for the running footer
\leadauthor{Henriques}
\usepackage[style=authoryear,backend=biber]{biblatex}
\addbibresource{\jobname.bib}
\begin{document}
\title{Henriques Lab bioRxiv template}
\shorttitle{My Template}
% Use letters for affiliations, numbers to show equal authorship (if applicable) and to indicate the corresponding author
\author[1,\Letter]{Ricardo Henriques}
\affil[1]{Quantitative Imaging and Nanobiophysics Group, MRC Laboratory for Molecular Cell Biology and Department of Cell and Developmental Biology, University College London, Gower Street, London, WC1E 6BT, United Kingdom}
\maketitle
Lorem ipsum dolor \parencite{ahu61} sit amet, consectetur adipiscing elit.
exports have been raised \parencite[42]{thri}.
\printbibliography
\end{document}
输出:生成的 pdf 文档不包含哈佛风格的参考文献。
Lorem ipsum dolor [1] sit amet, consectetur adipiscing elit.exports have been raised [2, p. 42].
有人可以检查一下此处提供的模板吗https://www.overleaf.com/latex/templates/henriqueslab-biorxiv-template/nyprsybwffws?
答案1
文档zHenriquesLab-StyleBioRxiv
类加载natbib
并使用zHenriquesLab-StyleBib.bst
文件,因此它只能与 BibTeX 一起使用,并且与 不兼容biblatex
。看起来zHenriquesLab-StyleBib.bst
文件支持 的natbib
作者年份模式。(“哈佛”风格通常只是作者年份风格的通用术语。)
biblatex
如果您从文档中删除相关命令,并\setcitestyle{authoryear}
在之前写入\begin{document}
,那么您的引用和参考列表将变成作者年份。
您必须写下\citep{...}
才能获得括号引用(Smith, 2020)
并\citet{...}
获得文本引用Smith (2020)
。
(当natbib
以模式加载时authoryear
,\cite
将表现得像\citet
默认的。但最好避免使用,\cite
正如@moewe 在评论中指出的那样:因为它会根据是否存在后记参数改变行为,这可能会造成很大的困惑。)