我有几个参考书目列表,每个列表都有 ynt 排序顺序。当我从列表中引用参考文献时,我需要 [1-4] 排序,而不是 [1,3,2,4]。
\documentclass{report}
\usepackage[defernumbers=true, sorting=ynt,citestyle=numeric-comp]{biblatex}
\begin{filecontents}{bibfile.bib}
@article{Author01,
author = "Author A",
title = "Article A",
journal="J1",
year = "2001"
}
@article{Author02,
author = "Author B",
title = "Article B",
journal="J1",
year = "2002"
}
@article{Author03,
author = "Author C",
title = "Article C",
journal="J1",
year = "2003"
}
@article{Author04,
author = "Author D",
title = "Article D",
journal="J1",
year = "2004"
}
\end{filecontents}
\addbibresource{bibfile.bib}
\DeclareBibliographyCategory{A}
\addtocategory{A}{Author01,Author03}
\DeclareBibliographyCategory{B}
\addtocategory{B}{Author02,Author04}
\begin{document}
I introduce citations from the bib file \cite{Author01,Author03,Author02,Author04}
and it doesn't write [1--4].
\printbibliography[category=A,title={List A}]
\printbibliography[category=B,title={List B}]
\end{document}
我得到以下信息:
列表对我来说没问题,问题在于 cite 命令中的参考顺序。
答案1
我使用了来自biblatex - 根据数字对引用进行排序(拆分参考书目)使用关键词。由于我的 bib 文件是由 Mendeley 自动生成的,因此我使用“作者关键词”字段来标记必要的参考文献。现在引用排序正常了。