0

Good morning to everybody. I have a problem because all of a sudden my latex file is not uploading citations any more. I created a .bib file with citations manually and it was working untill recently.

I think the .bib file is fine, there just has to be some reason why the main latex file cannot link to .bib file anymore... One probably stupid thing that I did has been to erase all the AUX, TOC ecc... Files that the system auto generates... Could that be the reason? I don't know how to solve this. Thank you for your help, Nicola.

This is the main file text:

\documentclass[12pt,twoside,openright]{book}  % default square logo 

\usepackage[english]{babel}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{breqn}
\usepackage[section]{placeins}
\usepackage{graphicx}
\usepackage{caption}
\usepackage[utopia]{quotchap}
\usepackage[sort&compress]{natbib}
\usepackage{fancyhdr}
\setlength{\headheight}{15.2pt}
\usepackage{lipsum}
\usepackage[svgnames]{xcolor}
\usepackage{hyperref}
\usepackage{titlesec}
\usepackage{setspace}
\usepackage{layout}
\usepackage{textcase}
%\usepackage[margin=2cm]{geometry}
\usepackage{chemformula}
\usepackage{physics}
\usepackage{siunitx}
\usepackage{float}
\usepackage{comment}






\hypersetup{colorlinks=true, pdfstartview=foo, linkcolor=black, citecolor=black, plainpages=false, pdfpagelabels=true, urlcolor=blue}
\usepackage[all]{hypcap}

\captionsetup[figure]{font=small,labelfont=bf}


\title{Manipulation of SPEs}   %note \\[1ex] is a line break in the title

\author{Nicola Palombo Blascetta}             %your name


\usepackage{titlesec}

\newcommand{\chapfnt}{\fontsize{25}{19}}
\newcommand{\secfnt}{\fontsize{12}{17}}
\newcommand{\ssecfnt}{\fontsize{12}{14}}

\titleformat{\chapter}[display]
{\normalfont\chapfnt\bfseries}
{\Large\chaptertitlename\ \thechapter}{10pt}{\chapfnt}
\titlespacing*{\chapter}{0pt}{0pt}{10pt}
%[\vspace{1ex}\titlerule] %line between title and text
\def\baselinestretch{2} 


\titleformat{\section}
{\normalfont\fontsize{15pt}{14pt}\selectfont\bfseries}{\thesection}{1em}{}


\titleformat{\subsection}
%{\normalfont\ssecfnt\bfseries}{\thesubsection}{1em}{}
{\normalfont\fontsize{13pt}{14pt}\selectfont\bfseries}{\thesection}{1em}{}



%headers and footers
\pagestyle{fancy}
\fancyhf{}
\fancyhead[RO]{{\fontsize{8}{20} \selectfont\rightmark}}
\fancyhead[LE]{{\fontsize{8}{20} \selectfont\leftmark}}
\cfoot{\thepage}


\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.0pt}


%offset at top of page
%\voffset = 0.7 cm
%set margins total is nortmally 1.87580

\addtolength{\oddsidemargin}{-0.5cm}
\addtolength{\evensidemargin}{-0.5cm}

\addtolength{\textwidth}{1cm}

\addtolength{\topmargin}{-0.5cm}
\addtolength{\textheight}{1cm}



\begin{document}





    \baselineskip=18pt plus1pt

    \setcounter{secnumdepth}{3}
    \setcounter{tocdepth}{3}


    \maketitle                  % create a title page from the preamble info



\include{Abstract}





        \tableofcontents            % generate and include a table of contents







    \include{Intro/Chapter1} 
    \include{chapter2/Chapter2} 
    \include{chapter3/Chapter3} 
    \include{chapter4/Chapter4} 
    \include{chapter5/Chapter5} 
    \include{Conclusions}
    \include{ChapterPublications}
    \include{ChapterAcknowledgements}

    \addcontentsline{toc}{chapter}{Bibliography}


    \bibliographystyle{unsrt}
    \bibliography{References}  







\end{document}
moewe
  • 175,683
  • 1
    In general it is safe to remove the auto-generated auxiliary files. To properly generate a bibliography in your document it is not enough to run LaTeX. You need to run (at least) LaTeX, BibTeX, LaTeX, LaTeX (where "LaTeX" can be your favourite flavour of LaTeX: pdfLaTeX, LuaLaTeX, XeLaTeX). See https://tex.stackexchange.com/q/63852/35864 for a great explanation why that is necessary. – moewe May 15 '20 at 07:06
  • Your preamble loads a lot of packages. Do you know what they do? Do you need all of them? (\usepackage{lipsum}?) Note that hyperref should usually be loaded last (there are a few documented exceptions). Packages should only be loaded once (titlesec). – moewe May 15 '20 at 07:08
  • For future questions please note that we can not run (and thus test) the code as posted. It contains references to files we don't have (Intro/Chapter1.tex, chapter2/Chapter2.tex, whose contents are quite probably not relevant or can be replaced by a few lines of code). It is usually recommended to reduce the code posted in the question as much as possible while still reproducing the problem. See https://tex.meta.stackexchange.com/q/228/35864. – moewe May 15 '20 at 07:13
  • Now it works, very clear, thank you for your help! – Nicola May 15 '20 at 09:57

0 Answers0