0

I am writing a report and the brackets in my bibliography remain empty, also the citations in text are question marks. How do I get numbers in them?

This is my code:

\documentclass[pdftex,10pt,a4paper]{report}

\usepackage{minitoc} 
\usepackage{amsthm, amsmath}
\usepackage{listings} 
\usepackage{color} 
\usepackage{fancyhdr}
\usepackage{float}
\usepackage{geometry}
\usepackage[square,sort,compress,numbers]{natbib}
\usepackage[pdftex,colorlinks=true]{hyperref}
\usepackage[pdftex]{graphicx}
\usepackage{wrapfig}
\usepackage{notes}
\usepackage{watermark}
\usepackage{epstopdf}
\usepackage{sectsty,textcase}
\usepackage{blindtext}

\begin{document}
Some text \cite{carmeliet2000}. 
Extra text \cite{alberts2002}. 

\newpage
\bibliographystyle{plainnat}
\bibliography{allsources}

It shows the references in the bibliography, but does not put numbers in the brackets, in the bibliography as well as in the text.

allsources.bib looks like:

@ARTICLE {carmeliet2000,
author  = "Peter Carmeliet and Rakesh K. Jain",
title   = "Angiogenesis in cancer and other diseases",
journal = "Nature",
year    = "2000",
volume  = "407",
pages   = "249-257",
month   = "sep",
DOI     = "doi:10.1038/35025220"
}

@BOOK {alberts2002,
author    = "Alberts B. and Johnson A. and Lewis J. et al",
title     = "\textit{Blood Vessels and Endothelial Cells} in Molecular 
Biology of the Cell",
publisher = "New York: Garland Science",
year      = "2002",
edition   = "fourth"
}
  • 1
    Welcome to Tex.Se. The numbers are displaying, I have executed the same file. All you need to do this is that, run twice the source file. – Mishra S May 8 '18 at 12:49
  • I did run it several times now, but still no numbers – laura May 8 '18 at 12:54
  • Clean the auxiliary files once, then run the source file twice. – Mishra S May 8 '18 at 12:58
  • Off-topic: The author field of the second entry should be "Alberts, B. and Johnson, A. and Lewis, J. and others",`. Note the insertion of three commas between surnames and initials and the replacement of "et al" with "and others". – Mico May 8 '18 at 13:53
2

Just check the attached image. If you are using tex studio, go to Tools -> clean auxiliary files, then run the file twice.

enter image description here

  • 2
    Don't forget to provide the instruction that BibTeX needs to be run... (Not running BibTeX is what appears to be the OP's problem.) – Mico May 8 '18 at 13:47
  • As suggested by Mico, you need to run bibtex too soon after compiling your source file. – Mishra S May 8 '18 at 13:49
  • I have done all that. I use Texmaker and my quick build is PdfLatex Bibtex PdfLatex (2x) Show Pdf. It shows the references in the bibliography, but just not the numbers between the square brackets. – laura May 9 '18 at 8:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.