使用 \bibliographystyle{unsrt} 编译的文档中的引用不按 .bib 文件的顺序排列。使用 Miktex 和 texstudio (Bibtex)

使用 \bibliographystyle{unsrt} 编译的文档中的引用不按 .bib 文件的顺序排列。使用 Miktex 和 texstudio (Bibtex)

我的问题是,文本中的第一个参考文献显示为 [5],并且随着我添加更多章节而变化,编号不再是 [1]。我见过许多类似的问题,也尝试过建议的解决方案,但我的问题仍然存在。我希望参考书目遵循我的文本文件的顺序。即,我的文本中的第一个参考条目是编号 [1],依此类推。虽然我的参考书目样式是 ,但参考文献似乎遵循字母顺序unsrt

我尝试了很多方法来解决我的问题,但仍然没有成功。我最近尝试\nocite{*}在参考书目命令之前插入文档,但没有成功。任何帮助都将不胜感激。我正在写一篇论文,以下是主要部分:

\documentclass[openany, a4paper,12pt]{report}
\renewcommand{\baselinestretch}{1.5}
\usepackage[margin=25mm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{amsmath} 
\usepackage{amssymb}
\usepackage{newunicodechar}
\DeclareUnicodeCharacter{00A0}{ }
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage[pdftex]{graphicx}
\usepackage[usenames]{color}
\usepackage{hyperref}
\usepackage{mathrsfs}
\usepackage{adjustbox}
\usepackage{enumitem}
\usepackage{verbatim}
\usepackage{siunitx}
\usepackage{epsfig,amssymb}
\usepackage{subcaption}
\usepackage{ragged2e}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{caption}
\usepackage{array}
\usepackage{textcomp,   % for \textlangle and \textrangle macros
    xspace}
\usepackage{titlesec}
\usepackage{textgreek}
\usepackage{tabularx} % Allows table to fit in page
\usepackage[version=4]{mhchem}
\usepackage{chemmacros}
\chemsetup{
    modules = all,
    formula = mhchem
}
\hypersetup{colorlinks=true,
citecolor=black,
filecolor=black,
linkcolor=black,
urlcolor=black}
\usepackage{natbib}
\pagestyle {plain}
%%%%%%%%%%%%%%%%%%%%%%%%%%%Defining prime for latexpdf%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand*{\myprime}{^{\prime}\mkern-1.2mu}
\newcommand*{\mydprime}{^{\prime\prime}\mkern-1.2mu}
\newcommand*{\mytrprime}{^{\prime\prime\prime}\mkern-1.2mu}
%%%%%loading the shapes.geometric and arrows library from the tikz package%%%%%%%%%
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows} 
\usepackage{physics}
\usepackage{adjustbox}
%\usepackage{cite}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\abbrlabel}[1]{\makebox[5cm][l]{\textbf{#1}\ }}%\dotfill
\newenvironment{abbreviations}{\begin{list}{}{\renewcommand{\makelabel}{\abbrlabel}}}{\end{list}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\newcommand*{\rom}[1]{\expandafter\@slowromancap\romannumeral #1@}
\makeatother
%%%%%%%%%%%%controlling chapter and sections andsubsections%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
    
\phantomsection
\input{title.tex}
\phantomsection
\pagenumbering{roman}
\setcounter{page}{1}
\input{abstract.tex}
\input{preface.tex}
\addcontentsline{toc}{section}{Abstract}
\phantomsection
\input{Declaration.tex}
\input{publications.tex}
\addcontentsline{toc}{section}{Declaration}
\phantomsection
\input{dedication.tex}
\addcontentsline{toc}{section}{Dedication}
\phantomsection
\input{acknowledge.tex}
\addcontentsline{toc}{section}{Acknowledgments}
\phantomsection
\addcontentsline{toc}{section}{Table of contents}
\tableofcontents
\phantomsection
\normalsize{\listoffigures}
\addcontentsline{toc}{section}{List of figures}
\phantomsection
\normalsize{\listoftables}
\addcontentsline{toc}{section}{List of tables}
 
 \phantomsection
 \input{Abbreviations.tex}
 
\phantomsection
\numberwithin{equation}{section}

\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}
\input{chapter1.tex}
\input{chapter22.tex}
\input{chapter3.tex}
\input{chapter4.tex}
\input{chapter5.tex}
\phantomsection 
\addcontentsline{toc}{chapter}{Bibliography} 
\bibliographystyle{unsrt}   
\bibliography{ref}
\end{document}

相关内容