\documentclass[12pt, a4paper, twoside]{Thesis}
\usepackage[export]{adjustbox}
\usepackage{graphicx}
\usepackage{bm}
\usepackage{afterpage}
\usepackage{amsmath,nccmath}
\usepackage{pifont}
\usepackage{pdfpages}
\usepackage{mciteplus}
\usepackage{fancyhdr}
\usepackage{cleveref}
\usepackage[T1]{fontenc}
\usepackage{algpseudocode}
\usepackage{algorithm}
\usepackage{tabularx}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage{setspace}
\usepackage{subcaption}
\usepackage{setspace}
\usepackage{tikz}
\usetikzlibrary{quantikz}
\pdfminorversion=7
\hypersetup{pdfauthor={Name}}
\let\Algorithm\algorithm
\renewcommand\algorithm[1][]{\Algorithm[#1]\setstretch{0.7}}
\makeatletter
\DeclareMathOperator*{\Motimes}{\text{\raisebox{0.25ex}{\scalebox{0.8}{$\bigotimes$}}}}
\renewcommand{\fnum@figure}{Fig. \thefigure}
\newcommand{\xmark}{\text{\ding{55}}}
\makeatother
\usepackage[square, sort&compress, numbers]{natbib}
\DeclareMathOperator{\csch}{csch}
\graphicspath{{Pictures/}}
\hypersetup{urlcolor=black, colorlinks=true}
\title{\ttitle}
\begin{document}
\makeatletter
\renewcommand*{\NAT@nmfmt}[1]{\textsc{#1}}
\makeatother
\frontmatter
\setstretch{1.6}
\fancyhead{}
%\rhead{\thepage}
%\cfoot{\thepage} gives page number at bottom
%\lhead{}
%\pagestyle{fancy}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\hypersetup{pdftitle={\ttitle}}
\hypersetup{pdfsubject=\subjectname}
\hypersetup{pdfauthor=\authornames}
\hypersetup{pdfkeywords=\keywordnames}
\include{Others/Titlepage1}
\clearpage
%\include{Others/Titlepage2}
\include{Others/Declaration}
\clearpage
\include{Others/Abstract}
\clearpage
\include{Others/Publications}
\clearpage
\include{Others/Acknowledge}
\clearpage
\include{Others/Dedication}
\pagestyle{plain}
\tableofcontents
\listoffigures
\listoftables
\clearpage
\mainmatter
\pagestyle{fancy}
\fancyfoot{}
\fancyhead[LE,RO]{\small\thepage}
\renewcommand{\headrulewidth}{0.6pt}
\include{Chapters/Chapter1/Chapter1}
\include{Chapters/Chapter3/Chapter3}
\include{Chapters/Chapter2/Chapter2}
\include{Chapters/Chapter4/Chapter4}
\include{Chapters/Chapter5/Chapter5}
\addtocontents{toc}{\vspace{2em}}
\addtocontents{toc}{\vspace{2em}}
\backmatter
\bibliographystyle{unsrt}
\bibliography{Bibliography}
\end{document}
I have all the references in the .bib file (Bibliography).
The issue I have is that when i compile till the 4th chapter, i.e.,
\include{Chapters/Chapter1/Chapter1}
\include{Chapters/Chapter3/Chapter3}
\include{Chapters/Chapter2/Chapter2}
\include{Chapters/Chapter4/Chapter4}
All the references are okay, but as soon as I compile including the fifth chapter, i.e.,
\include{Chapters/Chapter1/Chapter1}
\include{Chapters/Chapter3/Chapter3}
\include{Chapters/Chapter2/Chapter2}
\include{Chapters/Chapter4/Chapter4}
\include{Chapters/Chapter5/Chapter5}
There is an issue. The main problem here is that it is neither shown as a warning nor as an error by latex. The problem is that there is a reference that is cited in Chapter 1, which should have a reference number around 80, but when i include the 5th chapter this reference is coming as the First reference of the thesis. I did all kinds of permutations by running the bibliography, the compiling, then running, but to no avail. It is really very frustrating, can somebody help?
key? – Mico Jul 18 '20 at 00:27\makeatletter \let\oldcite\cite \pretocmd{\listoffigures}{\def\cite{\ignorespaces\@gobble}}{}{} \apptocmd{\listoffigures}{\let\cite\oldcite}{}{} \makeatother– Upstart Jul 18 '20 at 17:00