2

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}

%header and footer stuff
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\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}



\addcontentsline{toc}{section}{\numberline{}Abstract}
\cleardoublepage

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

%list of figures
\listoffigures
\addcontentsline{toc}{section}{List of Figures}
\cleardoublepage

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

TEXT
\section{heading}
\section{conclusion}
\newpage

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

\cleardoublepage
\end{document}
9
  • 1
    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.
    – Dai Bowen
    Commented Feb 20, 2017 at 10:48
  • 1
    "Nothing works" is not a sensible problem description. Check chiark.greenend.org.uk/~sgtatham/bugs.html to learn how to improve your question. Commented Feb 20, 2017 at 10:48
  • 2
    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.
    – CarLaTeX
    Commented Feb 20, 2017 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
    Commented Feb 20, 2017 at 11:44
  • Have you those entries in your references.bib file? Could you add how they are defined in it?
    – CarLaTeX
    Commented Feb 20, 2017 at 12:09

1 Answer 1

1

(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-added   = "2017-02-19 16:11:14 +0000",
  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.

2
  • 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
    Commented Feb 20, 2017 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
    Commented Feb 20, 2017 at 17:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .