TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm writing a LaTeX file using Texlipse. So here is my LaTeX file:

\paperwidth 8.5in
\paperheight 11in
\oddsidemargin 0in
\headsep 1.3cm 
\textwidth 7in 
\textheight 9.25in
\columnsep 0.4in
\footskip 0in 

\title{\fontfamily{phv}\selectfont{\huge{\bfseries{Title here}}}} \author{
{\fontfamily{ptm}\selectfont{\large{\bfseries{author name}}}}\thanks{contact
info }}


\section*{\fontfamily{phv}\selectfont{\normalsize{\bfseries{Section name}}}}



and here is my .bib file:

   author = "Author's name",
   title = "Book's title",
   publisher = "Springer",
   year = 2011

  author =       {author's name},
  title =        {article's title},
  journal =      "EEEE",
  year =         {2011},
  volume =    {1},
  number =    {1},
  month =     {},
  pages =     {4-27},
  note =      {},
  annote =    {}

The bib file is named ref.bib and was copied to the same folder with the .tex file. However, I have nothing generated in the References section.

Here is the message in the console that I think is relevant:

pdflatex> Package natbib Warning: Empty `thebibliography' environment on input line 3.
pdflatex> )

I noticed that the document.bbl in the tmp folder is empty. Can someone please let me know where the problem is?

share|improve this question
The linked file seems to contain no \cite commands: do I understand this correctly? If so, you need some citations for LaTeX/BibTeX to actually include anything in your bibliography. – Joseph Wright Dec 9 '11 at 16:48
Thanks, I'm a newbie so it's new thing for me. – chepukha Dec 9 '11 at 16:55
up vote 11 down vote accepted

To get something in the references, you have to cite it. The generic command for this is \cite, and the argument to the command is what you have called notsurewhatitisfor in your bibfile. In other words, you want this key to be different for each entry in your bib-file, and then you can use \cite{notsurewhatitisfor} to cite that article/book/whatever.

If you don't want to put a reference in your text, just fill up the References section with all the entries in your bibfile, you can use \nocite{*}.

Another thing to note, is if one doesn't use an IDE/script that handles the compilation sequence, one has to compile the document in four steps to have the bibliography and citations show up correctly. TeXlipse does this for you, but if it didn't, you would have to go through the following sequence:

pdflatex file.tex
bibtex file.aux
pdflatex file.tex
pdflatex file.tex

Roughly what happens is this:

  1. On the first run of pdflatex (or latex, xelatex, lualatex), every occurrence of a \cite command will be written to a temporary file, called file.aux.

  2. When you run bibtex on this file (specifying the file ending, .aux isn't necessary), the BibTeX program will find all these occurrences in the .aux file, find the entries in the .bib file corresponding to them, and write a .bbl file that contains the References section, with the entries sorted according to the bibliography style you have chosen.

  3. On the second rund of pdflatex, this .bbl file will be read, and the References section will be printed in the document.

  4. On the final run of pdflatex the citations will be put in.

As mentioned, I guess TeXlipse does all of this for you automatically if necessary, but I thought it could be nice to add a quick explanation of what's happening.

share|improve this answer
Thanks a lot Torbjorn. Not only you helped me fix the error but also you helped me understand what the 'notsurewhatitisfor' is for :) – chepukha Dec 9 '11 at 16:56
@chepukha: Welcome to the wonderful world of LaTeX! The neat thing about the default behaviour is that you can have a giant bib file with everything you've ever read in it, and LaTeX with BibTeX will pick out only the relevant articles (i.e. the ones you cited with cite or asked to be put in with nocite). – qubyte Dec 9 '11 at 17:15
Thanks, Mark. So I used \cite{*} to cite everything from my .bib file and for some reason, there is a symbol '(0)' at the end of my references list. I wonder how I can get rid of that '(0)'? Any suggestion please? – chepukha Dec 9 '11 at 18:44
@chepukha As mentioned, to put everything in the bib-file in the References section, without adding citations, use \nocite{*}, not \cite{*}. I can't say why you get a "(0)" though. – Torbjørn T. Dec 9 '11 at 18:53
Thanks, Torbjorn. – chepukha Dec 9 '11 at 19:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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