# Bibliography and citations don't work on IEEE or Vancouver style

I feel desperate and about to give up LaTeX. I am new to it but I have done well until I reach the bibliography. Now I am stuck for days and I have a deadline. I am sure I have a problem with my codes, but I keep getting different error messages. Once it worked until the \cite{author} but worked on some and not the others. Now nothing works.

\documentclass[10pt, a4paper]{article}
\bibliographystyle{IEEEtr}
\usepackage[margin=1in,left=1.5in, includefoot]{geometry}
\usepackage{amsmath}
\usepackage{authblk}
\usepackage[english]{babel}
\usepackage{indentfirst}
\usepackage{parskip}
\setlength\parindent{24pt}
\setlength{\parskip}{\baselineskip}
\renewcommand{\baselinestretch}{1.08}
\usepackage{wrapfig}
\usepackage{caption}
\usepackage{placeins}
\usepackage{natbib}
\setcitestyle{numbers}
\usepackage{filecontents}

%Graphics preamble
\usepackage{graphicx}
\usepackage{float}
\setlength{\textfloatsep}{5pt}

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyfoot{}
\fancyfoot[R]{ \thepage\ }

%
\begin{document}
\begin{titlepage}
\centering
\huge{\bfseries  mettle}\\
\vspace{1 cm}
\large\ Author 1, Author 2, Author 3\\
\vspace{1 cm}
\textsc{mysubtitle}\\

\end{titlepage}

% Abstract page
\pagenumbering{roman}
\section*{Abstract}\label{sec:abs}

\cleardoublepage

% table of content page
\tableofcontents
\thispagestyle{empty}
\cleardoublepage

%list of figures
\listoffigures
\cleardoublepage

% Main document
\pagenumbering{arabic}
\setcounter{page}{1}
\section{Introduction}\label{sec:intro}

TEXT
\section{conclusion}
\newpage

\section{References}
\bibliography{references}{}

\cleardoublepage
\end{document}

• Welcome to TeX.SX! Your code as it stands will have no bibliography due to a lack of \cite or \nocite commands. If the issue is more than this, please add in some \cites and update your code in the question along with the associated bib entry. If you are getting errors, please either provide code (as a minimal working example with bibliography (MWEB)) which we can compile locally to replicate the errors or provide the text of the error. Feb 20 '17 at 10:48
• "Nothing works" is not a sensible problem description. Check chiark.greenend.org.uk/~sgtatham/bugs.html to learn how to improve your question. Feb 20 '17 at 10:48
• Have you run pdflatex, bibtex, and then again pdflatex twice? Please give us an example of your .bib file, I tried with an example .bib file and you code works. Feb 20 '17 at 11:08
• bibtex error message: Warning--entry type for "Eurorec" isn't style-file defined --line 18 of file references.bib Warning--I didn't find a database entry for "(Bodenheimer"
– Asma
Feb 20 '17 at 11:44
• Have you those entries in your references.bib file? Could you add how they are defined in it? Feb 20 '17 at 12:09

(too long for a comment, hence posted as an anwer)

The following, much-condensed version of your example code, "works" in the sense that a bibliographic entry and a corresponding citation call-out are produced by running pdflatex, bibtex, and pdflatex twice more.

\RequirePackage{filecontents}
\begin{filecontents}{references.bib}
@url{Eurorec,
date-modified= "2017-02-19 16:11:53 +0000",
title        = "EuroRec",
url          = "eurorec.org/whoarewe/introduction.cfm",
}
\end{filecontents}

\documentclass[10pt, a4paper]{article}
\bibliographystyle{IEEEtr}
\usepackage{url}
\usepackage{natbib}
\setcitestyle{numbers}

\begin{document}
\cite{Eurorec}
\bibliography{references}
\end{document}


Note that the formatted entry will show only 1 field: title. This is because the IEEEtr bibliography style, being slightly archaic, is not programmed to recognize the fields named url, date-added, and date-modified. It doesn't recognize the entry type @url either; however, it is programmed to treat all unrecognized entry types as being of type @misc -- the catch-all entry type.

• I am still struggling with bibliography. citations are now in place but the bib style is odd. I get a citation of g o b o Swedish. Even though the entry is as follows: @techreport{Gartner, Author = {Gartner on behalf of Swedish Ministry of Health and Social Affairs}, Date-Added = {2017-02-19 12:42:47 +0000}, Date-Modified = {2017-02-19 12:47:39 +0000}, Institution = {Swedish Ministry of Health and Social Affairs}, Title = {eHealth for a Healthier Europe!}, Year = {2009}}
– Asma
Feb 20 '17 at 15:54
• @Asma - Here's a case of a "corporate" author: Economics ncase the author field in double pairs of curly braces. Search this site for "corporate author" for more information on this subject...
– Mico
Feb 20 '17 at 17:24