引文未使用 multibib 定義的自訂前綴

引文未使用 multibib 定義的自訂前綴

我正在寫一篇論文,我需要有兩個參考書目。例如,常規參考頁面和針對特定主題的另一頁。像這樣的東西:在此輸入影像描述

我已經用 multibib 做到了。

\documentclass[sigconf]{acmart}

\usepackage[resetlabels,labeled]{multibib}
%... 
\newcites{New}{The other list}
\begin{document}
%... 

\section{test}
\citep{GM05} this is a test \citeNew{Williams2009} 
% and this as well \citeNew{Gren}

\bibliographystyle{ACM-Reference-Format}
\bibliography{sample-bibliography}

\bibliographystyleNew{plain}
\bibliographyNew{references}

\end{document}

-- 我的reference.bib 檔案的內容

@article{Williams2009,
author = {Williams, Laurie and Kudrjavets, Gunnar and Nagappan, Nachiappan},
doi = {10.1109/ISSRE.2009.32},
isbn = {9780769538785},
title = {{On the Effectiveness of Unit Test Automation at Microsoft 1}},
year = {2009}
}

@article{Gren,
author = {Gren, Lucas and Antinyan, Vard},
title = {{On the Relation Between Unit Testing and Code Quality}}
}

-- 我的sample-bibliography.bib 檔案的內容

@article{GM05,
author = {Williams, Laurie and Kudrjavets, Gunnar and Nagappan, Nachiappan},
doi = {10.1109/ISSRE.2009.32},
isbn = {9780769538785},
title = {{Example}},
year = {2009}
}

然而,引用並不正確。我希望它是“[1] 這是一個測試 [New1]“, 代替 ”[1] 這是一個測試 [1]

答案1

看起來問題不在於acmart,而在於natbib。這是您的範例article

%\documentclass[sigconf]{acmart}
\documentclass{article}
\usepackage{natbib,url}
\setcitestyle{numbers,square}
\usepackage[resetlabels,labeled]{multibib}
%... 
\newcites{New}{The other list}
\begin{document}
%... 

\section{test}
\citep{GM05} this is a test \citeNew{Williams2009} 
% and this as well \citeNew{Gren}

\bibliographystyle{plainnat}
\bibliography{sample-bibliography}

\bibliographystyleNew{plainnat}
\bibliographyNew{references}

在此輸入影像描述

作為解決方法,我將使用連續編號:

\documentclass[sigconf]{acmart}
\usepackage{multibib}
%... 
\newcites{New}{The other list}
\begin{document}
%... 

\section{test}
\citep{GM05} this is a test \citeNew{Williams2009} 
% and this as well \citeNew{Gren}

\bibliographystyle{ACM-Reference-Format}
\bibliography{sample-bibliography}

\bibliographystyleNew{ACM-Reference-Format}
\bibliographyNew{references}

\end{document}

在此輸入影像描述

相關內容