![如何让参考文献在 LaTeX 中按顺序出现?](https://linux22.com/image/450889/%E5%A6%82%E4%BD%95%E8%AE%A9%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE%E5%9C%A8%20LaTeX%20%E4%B8%AD%E6%8C%89%E9%A1%BA%E5%BA%8F%E5%87%BA%E7%8E%B0%EF%BC%9F.png)
我遇到了一个众所周知的 LaTeX 问题,尽管我的情况似乎有点特殊。我尝试了“StackExchange”和其他地方建议的所有可能的解决方案,但还是没能成功解决。
实际上,我正在写一篇论文,我已经使用“比布拉特克斯' 包。一旦我打印它们,我发现它们在文本中的顺序不对(例如,应该是 [2] 的内容被提及为 [17],等等)。我在网上检查了一些解决方案,例如用替换\printbibliography
后跟\bibliographystyle{unsrt}
(\bibliography{}
用。围兜我尝试了许多其他方法,但都失败了!为了理解我做了什么,我将附上我的一部分。围兜文件的代码。
@misc{NobelFermi,
author = {NobelPrize.org. Nobel Prize Outreach AB 2022},
title = {Enrico Fermi – Biographical},
%year = {2022},
%note = {Last accessed January 2022},
url = {https://www.nobelprize.org/prizes/physics/1938/fermi/biographical/}
}
\\
@article{LucaNanni,
title={Fermi’s theory of beta decay: a first attempt at electroweak unification},
author={Luca Nanni},
journal={Advanced Studies in Theoretical Physics},
volume={13},
number={6},
pages={281--293},
year={2019},
publisher={Hikari Ltd},
doi={https://doi.org/10.12988/astp.2019.8939}
}
在文中,我使用了命令\cite
。下面,我附上了我的序言.tex文件...
\documentclass[eqn,10pt]{SelfArx} % Document font size and equations flushed left
\usepackage[english]{babel} % Specify a different language here - english by default
\usepackage[utf8]{inputenc}
\usepackage[document]{ragged2e}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{titlesec}
\usepackage{epigraph}
\usepackage[autostyle]{csquotes}
\usepackage[latin1]{inputenc}
\usepackage{caption}
\usepackage{wrapfig}
\usepackage{color}
\usepackage{multicol}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{amsbsy}
\usepackage{lettrine} %For the enlarged capital letter in the beginning
\NoAutoSpaceBeforeFDP
\usepackage{mathrsfs} %For the mathematical font style "mathscr"
\usepackage{xcolor}
\usepackage{biblatex} %For citation
\usepackage{url} %for the URL of websites
\addbibresource{Ref.bib} %To add Ref.bib file
在文档的最后,我放置了此命令...
\printbibliography
生成的文档如下所示...(红色的是我自己编写的参考文献的“逻辑”顺序,用于验证它们在文中的顺序)。
如您所见,结果看起来很混乱。
答案1
评论线程已经太长了...我发布了一个我认为你可能想要的例子,尽管如果没有适当的 MWE 就不可能分辨出来:
\documentclass{article}
% Only for debugging. If you provide your own .bib file just
% remove the filecontents part and don't forget to change
% \addbibresource{mwe.bib} below.
\begin{filecontents*}[overwrite]{mwe.bib}
@misc{NobelFermi,
title = {Enrico Fermi – Biographical},
author = {NobelPrize.org. Nobel Prize Outreach AB 2022},
year = 2022,
url = {https://www.nobelprize.org/prizes/physics/1938/fermi/biographical/},
note = {Last accessed January 2022}
}
@article{LucaNanni,
title = {Fermi’s theory of beta decay: a first attempt at electroweak unification},
author = {Luca Nanni},
year = 2019,
journal = {Advanced Studies in Theoretical Physics},
publisher = {Hikari Ltd},
volume = 13,
number = 6,
pages = {281--293},
doi = {https://doi.org/10.12988/astp.2019.8939}
}
\end{filecontents*}
\usepackage[english]{babel}
\usepackage[backend=biber,sorting=none,style=numeric-comp]{biblatex}
\addbibresource{mwe.bib}
\begin{document}
Dolor sit amet.\cite{LucaNanni}
Lorem ipsum.\cite{NobelFermi}
\printbibliography
\end{document}
当然,您也可以使用自己的 .bib 文件,如下所示:
\documentclass{article}
\usepackage[english]{babel}
\usepackage[sorting=none,style=numeric-comp]{biblatex}
\addbibresource{Ref.bib}
\begin{document}
Dolor sit amet.\cite{LucaNanni}
Lorem ipsum.\cite{NobelFermi}
\printbibliography
\end{document}