请帮我将文本中的参考文献从 1 开始排序,并在整个文本中增加数字(像平常一样)。现在它从 6 开始,第二个参考文献的顺序为 2。找不到原因...
\documentclass[12pt]{article}
\usepackage[numbers]{natbib}
\usepackage{hyperref}
\usepackage{indentfirst}
\begin{document}
\title{\textbf{XXX}\\ XXXXXXXX}
\author{XXX\\[1cm]{ XXX}}
\date{\today}
\maketitle
\section{XXX}
XXX.\citep{noauthor_cern_nodate}. XXXXXXXXXXXXXXX.\citep{bell_beyond_2009}
\bibliographystyle{plainnat}
\bibliography{bibliography/sample}
\end{document}
我的 bib 文件如下:
@article{bell_beyond_2009,
title = {Beyond the Data Deluge},
volume = {323},
rights = {© 2009 American Association for the Advancement of Science},
issn = {0036-8075, 1095-9203},
url = {http://science.sciencemag.org/content/323/5919/1297},
doi = {10.1126/science.1170411},
abstract = {The demands of data-intensive science represent a challenge for diverse scientific communities.
The demands of data-intensive science represent a challenge for diverse scientific communities.},
pages = {1297--1298},
number = {5919},
journal = {Science},
author = {Bell, Gordon and Hey, Tony and Szalay, Alex},
year = {2009},
langid = {english},
pmid = {19265007}
}
@article{noauthor_cern_nodate,
title = {{CERN} Data Centre passes the 200-petabyte milestone {\textbar} {CERN}},
url = {https://home.cern/news/news/computing/cern-data-centre-passes-200-petabyte-milestone},
year = {2018-12-11},
author = {Mélissa Gaillard}
}
答案1
如果您不希望参考文献按字母顺序排序,即,如果您希望参考文献按照它们在文档正文中的引用顺序出现,请执行以下操作不是使用plainnat
书目样式。相反,使用unsrtnat
书目样式——或者其他不按字母顺序排序的书目样式。
观察现在 Gaillard 进入前Bell 等人的文章在参考书目中的条目,因为 Gaillard 的文章在 Bell 等人的文章之前被引用。
请注意,您不应该使用@article
Gaillard 作品的条目类型。请改用@misc
条目类型。
\RequirePackage{filecontents}
\begin{filecontents}{sample.bib}
@article{bell_beyond_2009,
title = {Beyond the Data Deluge},
volume = {323},
rights = {© 2009 American Association for the Advancement of Science},
issn = {0036-8075, 1095-9203},
url = {http://science.sciencemag.org/content/323/5919/1297},
doi = {10.1126/science.1170411},
abstract = {The demands of data-intensive science represent a challenge for diverse scientific communities.
The demands of data-intensive science represent a challenge for diverse scientific communities.},
pages = {1297--1298},
number = {5919},
journal = {Science},
author = {Bell, Gordon and Hey, Tony and Szalay, Alex},
year = {2009},
langid = {english},
pmid = {19265007}
}
@misc{noauthor_cern_nodate,
title = {{CERN} Data Centre passes the 200-petabyte milestone~\textbar\ {CERN}},
url = {https://home.cern/news/news/computing/cern-data-centre-passes-200-petabyte-milestone},
year = {2018-12-11},
author = {Mélissa Gaillard}
}
\end{filecontents}
\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[numbers]{natbib}
\bibliographystyle{unsrtnat} % not 'plainnat'
\usepackage{indentfirst}
\usepackage[hyphens,spaces]{xurl}
\usepackage[colorlinks,allcolors=blue]{hyperref}
\begin{document}
\cite{noauthor_cern_nodate}, \cite{bell_beyond_2009}
\bibliography{sample}
\end{document}