使用 \nocite{*} 按外观对参考书目进行排序(sorting=none)

使用 \nocite{*} 按外观对参考书目进行排序(sorting=none)

我知道有很多类似的问题,但我的特定代码存在问题:

\documentclass[12pt]{report}
\usepackage[sorting=none,backend=bibtex]{biblatex}
\addbibresource{references2.bib}
\usepackage[nottoc]{tocbibind}
\nocite{*} 

\begin{document}

Hello \cite{a}. Goodbye \cite{b}.
\printbibliography

\end{document}

参考文献按文件中出现的顺序排序.bib,我想按文本中的引用顺序排序。我该怎么办?我试过了,\bibliographystyle{unsrt}但出现错误。我看到的唯一解决方案是手动对.bib文件进行排序。

答案1

确保\nocite{*}尽可能晚地发布,否则被\nocite'd 的条目将优先于文档中明确引用的条目(根据它们在.bib文件中的顺序,因为sorting=none不能考虑其他属性并且需要某种方式来打破平局)。(希望https://github.com/plk/biblatex/commit/a988fa1e3bfabf4efac5bb9af6fed2b69f1e055f使文档中的内容更清晰一些。)

\documentclass{article}
\usepackage[sorting=none, backend=bibtex]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{worman,
  author       = {Worman, Nancy},
  title        = {The Cast of Character},
  date         = 2002,
  publisher    = {University of Texas Press},
  location     = {Austin},
}
@book{nussbaum,
  author       = {Nussbaum, Martha},
  title        = {Aristotle's \mkbibquote{De Motu Animalium}},
  date         = 1978,
  publisher    = {Princeton University Press},
  location     = {Princeton},
}
@article{sigfridsson,
  author       = {Sigfridsson, Emma and Ryde, Ulf},
  title        = {Comparison of methods for deriving atomic charges from the
                  electrostatic potential and moments},
  journaltitle = {Journal of Computational Chemistry},
  date         = 1998,
  volume       = 19,
  number       = 4,
  pages        = {377-395},
  doi          = {10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P},
}
\end{filecontents}
\addbibresource{\jobname.bib}


\begin{document}
Hello \cite{sigfridsson}.
Goodbye \cite{nussbaum}.

\printbibliography
\nocite{*}
\end{document}

你好 [1]。再见 [2]。

相关内容