I have a well-known problem in LaTeX, even though my case seems to be a little bit special. I've tried all the possible solutions suggested at "StackExchange" and elsewhere but I didn't succeed to solve it.
Actually, I am working on a paper and I've typed all the references using the 'biblatex' package. Once I printed them, I found that they are not in order in the text (e.g. what is supposed to be [2] is mentioned as [17], etc.). I've checked some solutions on the net such as replacing \printbibliography with \bibliographystyle{unsrt} followed by \bibliography{} (with the name of the .bib file inside without the extension) among many others, but all of them failed!
To understand what I've done, I will attach a part of my .bib file's code.
@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}
}
And in the text, I've used the \cite commands.
And below, I attach the preamble of my .tex file...
\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
And at the end of the document, I put this command...
\printbibliography
And the generated document looks like this...(The colored numbers in red are the "logical" order of references which I wrote myself to verify their ordering in the text).

The result seems chaotic as you can see.
\bigis a math mode command, perhaps you want\large? But it is hard to guess what you did or what error you got. – David Carlisle Jun 03 '22 at 19:06.bib-file is not the sequence in the compiled document. 2 - "\printbibliography" and "BibTeX": Are you usingBibTeXorBibLaTeX, they might use the same base.bib-file, but they are not the same. 3 - I may be wrong here, but\\in the.bibare unnecessary and you should avoid using%at the entry field, check this answer. 4 - Post your code and figure, not only figures. – FHZ Jun 04 '22 at 22:46.tex" file actually has the format of a.bibfile, and as pointed out elsewhere,%is not recognized as a comment. The lines that have no data should instead be removed. I don't remember whether such lines will result in errors in the.blgfile (the error log from bibtex), but they will certainly cause problems. Also, remove the\\lines, leaving a blank line instead. – barbara beeton Jun 05 '22 at 00:16\documentclass{article}to\end{document}. If you post a .pdf, post the exact code used to create that file. – Ingmar Jun 05 '22 at 12:12add codemultiple times, just put it all between three opening and three closing backticks, likeso. – Ingmar Jun 05 '22 at 14:50\``lang-latexand after the last line of your code append another line````. Thelang--thingie can can be changed to another language, e.g.,\``lang-texor```lang-none`. – Ulrich Diez Jun 05 '22 at 18:23