使用多个参考书目时,Biblatex/biber 按类型进行非连续编号引用

使用多个参考书目时,Biblatex/biber 按类型进行非连续编号引用

我想在一个文档中包含两个参考书目。第一个是普通参考文献。后者旨在作为出版物列表,应按类型分开。

我设法将参考书目分开并包括参考文献。但是,第二份参考书目的编号是按时间顺序排列的,而不是连续编号。

例如,在下图中,您可以看到编号跳跃 1、2、5,而我希望编号为 1、2、3,然后在下一组继续为 4。

参考

我尝试再次运行编译,结果变得更糟,因为它从 9 开始编号。但在另一次编译之后,它恢复到之前的配置。

混洗引用

玩了代码后,我注意到问题出在\newrefsection生成第二个参考书目时。当我删除它并运行按类型分组的参考书目时,顺序很好。可能是什么问题?我该如何解决?是我的自定义排序有问题吗?

我使用的代码如下:

\documentclass{article}

\usepackage{filecontents}
\begin{filecontents}{ref2.bib}
@ARTICLE{R2013,
  author = {A. R},
  title = {B paper},
  year = {2013},
  journal = C,
  keywords = {publication}
}

@ARTICLE{R2012,
  author = {A. R},
  title = {L paper},
  year = {2012},
  journal = I,
  keywords = {publication}
}

@INPROCEEDINGS{R2012a,
  author = {A. R},
  title = {L paper},
  booktitle = {I},
  year = {2012},
  month = nov,
  keywords = {publication}
}

@INPROCEEDINGS{R2012b,
  author = {A. R},
  title = {R paper},
  booktitle = {I},
  year = {2012},
  month = oct,
  keywords = {publication}
}

@ARTICLE{R2012c,
  author = {A. R},
  title = {C paper},
  year = {2012},
  month = sep,
  journal = I,
  keywords = {publication}
}

@INPROCEEDINGS{R2011,
  author = {A. R},
  title = {O paper},
  booktitle = {A},
  year = {2011},
  month = aug,
  keywords = {publication}
}

@MISC{R2009,
  author = {A. R},
  title = {M thesis},
  year = {2009},
  howpublished = {B.Sc. Thesis},
  month = feb,
  keywords = {publication}
}

@ARTICLE{S2009,
  author = {C. S},
  title = {F paper},
  year = {2009},
  journal = {I}
}
\end{filecontents}

\usepackage[style=ieee,sorting=ymdtn,sortcites,defernumbers=true]{biblatex}

\DeclareSortingScheme{ymdtn}{
  \sort{
    \field{presort}
  }
  \sort[final]{
    \field{sortkey}
  }
  \sort[direction=descending]{
    \field{sortyear}
    \field{year}
    \literal{9999}
  }
  \sort[direction=descending]{
    \field[padside=left,padwidth=2,padchar=0]{month}
    \literal{99}
  }
  \sort[direction=descending]{
    \field[padside=left,padwidth=2,padchar=0]{day}
    \literal{99}
  }
  \sort{
    \field{sorttitle}
  }
  \sort[direction=descending]{
    \field[padside=left,padwidth=4,padchar=0]{volume}
    \literal{9999}
  }
  \sort{
    \name{sortname}
    \name{author}
    \name{editor}
    \name{translator}
    \field{sorttitle}
    \field{title}
  }
}

\bibliography{ref2}

\pagestyle{empty}

\begin{document}
\cite{S2009}
\printbibliography
\newrefsection
\nocite{*}
\printbibliography[keyword=publication,type=article,heading=subbibliography,title={Journals}]
\printbibliography[keyword=publication,type=inproceedings,heading=subbibliography,title={Conferences}]
\printbibliography[keyword=publication,type=misc,heading=subbibliography,title={Thesis}]

\end{document}

答案1

我认为您需要做的就是在之后的resetnumbers第一个中添加:\printbibliography\newrefsection

\printbibliography[resetnumbers=true,keyword=publication,type=article,heading=subbibliography,title={Journals}]

在此处输入图片描述

相关内容