Please how can I get to use fancyhdr package with natbib package. It happens that I can't use the two in my document, what can be wrong? and how can I correct that, please?
\documentclass[12pt, a4paper]{report}
\usepackage{titling}
\usepackage{natbib}
\bibliographystyle{apalike}
\usepackage{fancyhdr}
\fancyhead{} % This clears whatever was there before
\renewcommand{\headrulewidth}{0pt} % Set to 0 if you don't want a bar at the bottom.
\fancyhead[RE, RO]{\thepage} % Right even, right odd pages.
\fancyhead[LE, LO]{\textsc \rightmark} % Right even, right odd pages.
\setlength{\headheight}{15pt}
\fancyfoot{}
\renewcommand{\footrulewidth}{0pt} % Set to 0 if you don't want a bar at the bottom.
%\fancyfoot[C]{\thepage}
\pagestyle{fancy}
\begin{document}
\begin{large}
%\begin{figure}
%\centering
%\includegraphics[scale=0.5]{UI.jpg}
%\end{figure}
\begin{titlepage}
\begin{center}
\Large{\textsc{By}} \
\vfill
\Large{\sc{A project in the department of mathematics, submitted in partial fulfillment of the requirements for the award of bachelor of science (mathematics), \ }}
\vfill
\Large{\textsc{April, 2023.}}
\end{center}
\end{titlepage}
\chapter*{\center \Huge \textbf{CERTIFICATION}}
We certify that this project was carried out by \textbf{}, in the Department of Mathematics, Faculty of Science,, under my supervision.
\vspace{5cm}
\begin{center}
\line(1,0){180}
\hspace{10cm}
(Supervisor)\
\end{center}
\addcontentsline{toc}{chapter}{Certification}
\setcounter{page}{2}
\tableofcontents
\chapter{Introduction}
Ordinary differential equations (ODEs) are commonly employed to represent the behavior of dynamic systems in various fields of science and engineering. However, ODEs have certain limitations when it comes to describing dynamics that involve discontinuities, impulses, and uncertain behaviors. Consequently, ordinary differential inclusions (ODIs) have been successfully employed as a useful approach to model such systems.\
The concept of differential inclusion was studied broadly by Jean-Pierre Aubin, a mathematician from France, during the early 1980s. Differential inclusion is a versatile mathematical tool that extends the scope of differential equations and is utilized to represent diverse phenomena in both physical and social sciences. ODIs have applications in many fields, including control theory, economics, and population dynamics, physics, etc.\[5pt]
In recent times, ODIs have gained considerable attention, and researchers have increasingly shown interest in exploring the characteristics of the solution set of ODIs, such as their properties of boundedness, uniqueness, and existence.\[5pt]
The objective of this study is to examine and review the set of solutions for ordinary differential inclusions (ODIs) and establish criteria for the existence of solutions.\[5pt]
Additionally, we apply our findings to a diverse range of examples in fields such as control theory, economics, and biology.
\citep{Doe:1966}
\citep{key}
\bibliography{MyReferences}
%\bibliography{sample}
\nocite{*}
\addcontentsline{toc}{chapter}{References}
\end{large}
\end{document}




MyReferences.bib, so we cannot see, if there is a problem with the bibliography. Please try to extend it to a minimal working example with bibliography. As it is, I do not get any error message. However there are several problems with the shown code: – cabohah Jan 13 '24 at 17:07\Largeisn't a command with argument but a font switch. So\Larger{…}does not make sense, but should be{\Larger …\par}… – cabohah Jan 13 '24 at 17:08\sc, which is also not a command with argument, but a font switch, you should use\textsc{…}or{\scshape …}… – cabohah Jan 13 '24 at 17:09\addcontentsline{toc}{chapter}{…}it usually should at least immediately after the corresponding\chapter*. The later the\addcontentslineis placed, the higher the risk that the wrong page will be entered in the table of contents. For a multi-page bibliography, an\addcontentslineafter\bibliographywould definitely be too late. In this case, thetocbibindpackage is recommended. … – cabohah Jan 13 '24 at 17:14\\or\\[5pt]at the end of a paragraph. The do not really add a new paragraph. If you want paragraphs with distance instead of indent of the first line, use packageparskip. – cabohah Jan 13 '24 at 17:15reportisoneside. Withonesidedocuments all pages are odd pages. So theREandLEoptions of\fancyheaddo not make any sense. – cabohah Jan 13 '24 at 17:20centerenvironment is atrivlistenvironment that adds extra space. It should not be misused as\centerenvironment and never without the corresponding end-command. To locally switch to centering just use\centeringinstead of\center. BTW: IMHO adding formatting commands like\centeror\Hugeto the argument of a sectioning command could be a hack, but never clean coding. – cabohah Jan 13 '24 at 17:27\chapter*{…}by default already uses\bfseries, so no need to use\textbf{…}in the argument. And withreportusing\Hugefor chapters is also a default. So no need to use\Hugeinside the argument of\chapter*{…}. – cabohah Jan 13 '24 at 17:35\begin{large}…\end{large}is not good style, because\largeis a font switch, that should not be misused as an environment. Using\begin{large}…\end{large}to try to increase the font size of the whole document is at least ugly. If you really need a larger document font than 12pt please read: How to specify font size less than 10pt (or more than 12pt)? – cabohah Jan 13 '24 at 17:41fancyhdrandnatbibis not correct. You should therefore explicitly name the actual problem and make it reproducible for us with a suitable MWE or, if necessary, MWEB. Otherwise your question stays unclear and the only thing (beside the impurities listed above) I can guess would be, that optiontwosideis missing. – cabohah Jan 13 '24 at 17:56