作者姓名和年份未以哈佛參考風格顯示?

作者姓名和年份未以哈佛參考風格顯示?

我使用下面給出的程式碼來獲取哈佛風格的引用。我已經使用了該包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 頁)

natbibelsarticle包作為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}

這是一個測試文件(Sarfraz 和 Razzak,2002)。


請注意,它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}

這是一個測試文件(Sarfraz 和 Razzak,2002)。

相關內容