![作者姓名和年份未以哈佛參考風格顯示?](https://rvso.com/image/392344/%E4%BD%9C%E8%80%85%E5%A7%93%E5%90%8D%E5%92%8C%E5%B9%B4%E4%BB%BD%E6%9C%AA%E4%BB%A5%E5%93%88%E4%BD%9B%E5%8F%83%E8%80%83%E9%A2%A8%E6%A0%BC%E9%A1%AF%E7%A4%BA%EF%BC%9F.png)
我使用下面給出的程式碼來獲取哈佛風格的引用。我已經使用了該包natbib
並使用了 \bibliographystyle{agsm}
。我在參考文獻部分找到了哈佛風格。然而,在文件正文中,它引用了“1「而不是所需的作者年份格式。我無法修復它。請分享您對可能的錯誤的想法。
\documentclass[review]{elsarticle}
\usepackage{natbib}
%\journal{Journal of \LaTeX\ Templates}
\begin{document}
This is a test doc \cite{testref}.
\section*{References}
\bibliographystyle{agsm}
\bibliography{ref}
\end{document}
通過以下更改,我在文本中得到了名稱,但帶有額外的括號1並且沒有年份,如下所示
\documentclass[review]{elsarticle}
\usepackage{natbib}
%\journal{Journal of \LaTeX\ Templates}
\begin{document}
This is a test doc \citet{testref}.
\section*{References}
\bibliographystyle{plainnat}
%\bibliographystyle{agsm}
\bibliography{ref}
\end{document}
答案1
該類別elsarticle
已經載入natbib
。預設情況natbib
下載入該numbers
選項,從而產生數字引用。對於作者年份引用,您可以elsarticle
使用該authoryear
選項載入。
elsarticle
文件§11 中解釋參考書目(第 13 頁)
natbib
elsarticle
包作為numbers
預設選項載入。您可以透過authoryear
在類別載入命令中新增選項來將其變更為作者年份或哈佛方案。如果你想使用套件的更多選項,你可以使用第 4 節中描述的命令natbib
來實現,\biboptions
用法。
\documentclass[review,authoryear]{elsarticle}
\begin{document}
This is a test doc \citep{sarfraz}.
As \citet{sarfraz} found.
\bibliographystyle{agsm}
\bibliography{biblatex-examples}
\end{document}
請注意,它elsarticle
帶有自己的一組.bst
文件。如果您打算向愛思唯爾期刊提交文章(恕我直言,這是使用課程elsarticle
的唯一充分理由),我建議您查看elsarticle-harv
而不是asgm
作者年份引用。
\documentclass[review,authoryear]{elsarticle}
\begin{document}
This is a test doc \citep{sarfraz}.
As \citet{sarfraz} found.
\bibliographystyle{elsarticle-harv}
\bibliography{biblatex-examples}
\end{document}