LaTeX Books


LaTeX Beginners Guide

Limited discount 50%
coupon code tDRet6Y

click here to read the whole story

LaTeX users online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 4 guests

natbib undefined citations

LaTeX Forum: BibTeX, biblatex and biber

Add tags Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.

Postby pricejn2 on Tue Jul 7th, 2009

I'm having all sorts of trouble with my BiBTeX. The main problem of course is that citations are not being properly referenced in the final document.

I'm working in Windows and when I try to build my .tex document to DVI I get multiple errors akin to this:

Package natbib Warning: Citation `number1' on page 1 undefined on input line 76.
Package natbib Warning: Empty `thebibliography' environment on input line 5.
Package natbib Warning: There were undefined citations.

A couple of notes:
(1) my .bib file has a ä character and I was getting encoding issues...current encoding is ISO-8859-1 (Latin-1) to resolve character conflicts

(2) if i run bibtex myfile from command prompt I get a I couldn't open database file references.bib

(3) of course i'm not using \begin{thebibliography} but my .bbl file looks like this:
Code: Select all  •  Open in writeLaTeX

(4) line 5 has
Code: Select all  •  Open in writeLaTeX

Trying to avoid manual entry for thesis...any help GREATLY appreciated.

Also: probably unrelated, but if I comment out \usepackage{pdfpages} in the preamble, I get: missing number treated as zero, all illegal unit of measure, and undefined control sequence errors for each *.eps figure. I don't get it...
Posts: 3
Joined: Sat Jul 4th, 2009

Postby kaiserkarl13 on Tue Jul 14th, 2009

This could be a number of things, both in the BibTeX file (.bib) and in the LaTeX file (.tex).

First, make sure your database is in a location in which BibTeX can find it (the current directory works well). This should clear up the "I couldn't open database file references.bib" message. The .aux file and .bib file must both be in BibTeX's search path (which is often different than LaTeX's search path; move it to the current directory to make sure).

Second, I recommend removing any non-ASCII files from your BibTeX database. For example, an entry with the name Koeln in it (spelled with the umlaut instead of the oe) might look like:
Code: Select all  •  Open in writeLaTeX
  author  = "K{\"o}ln, Max",
  year    = 2009

Once that's fixed, see if you've fixed your problems.
Posts: 568
Joined: Tue Mar 25th, 2008
Location: Knoxville, TN, USA

Postby kahlan on Wed Apr 14th, 2010

Dear kaiserkarl13!

I have the same prob here. Looks to me that everything is according to your advices: .aux file and .bib file are in the same folder.

I am using Latex on Linux.
Error message looks like this:

[PDFLaTex] .tex => .pdf (pdflatex)
./.bbl:8: Empty 'thebibliography' environment on input line 8.

[BibTex] .aux => .bbl (bibtex)
[BibTex] finished with exit code 2

Thanks for your help beforehand.

Posts: 3
Joined: Tue Apr 13th, 2010

Postby gmedina on Wed Apr 14th, 2010

kahlan wrote:[PDFLaTex] .tex => .pdf (pdflatex)
./.bbl:8: Empty 'thebibliography' environment on input line 8.

[BibTex] .aux => .bbl (bibtex)
[BibTex] finished with exit code 2

The message suggests that you are not using \cite commands in your document; try adding \nocite{*} (this command will include all the entries of the .bib file in the references section, even if not explicitly cited) in the body of your document.

If that was not the problem, we will need to see some of the actual code that you are using (a minimal, compilable version including only the code relevant to the problem mentioned).
User avatar
Posts: 2313
Joined: Wed Jul 11th, 2007
Location: Colombia

Postby herlimenezes on Mon Nov 8th, 2010


I got the same problem. My .bib files are in folder: /home/UserName/Area de Trabalho/Documentos/ReferenciasArtigos.bib
I put this path into command \bibliography{'/home/UserName/Area de Trabalho/Documentos/ReferenciasArtigos.bib'}. I have used quotes because of the blank spaces at Area de Trabalho folder. Got no positive results, so I moved ReferenciasArtigos.bib to the project folder (I am using Kile), nothing happens. What can I do?
BTW, I am using multiple documents im my dissertation.

Does anybody can help me?

One more thing: I am using JabRef, so that it automatically inserts citation into latex text. Appararently it works fine (when I use LyX processor...)

Thanks in advance.
Posts: 1
Joined: Mon Nov 8th, 2010

Postby john_s on Sun Dec 19th, 2010

I've been having similar problems with natbib. There was an obscure message at the end of the undefined citations suggesting that there was an inappropriate ampersand (&) in the .bbl file.

Turned out that some citations retrieved from Medline put a URL field into the .bib file, and these contain the '&' which apparently confuses natbib. Not clear whether this is sometimes used, but I just deleted these by hand and then it all worked.
Posts: 1
Joined: Sun Dec 19th, 2010

Postby elstefano on Wed Feb 23rd, 2011

Hey People,
I just had the same problem as you and, for me, the solution was very easy: I included my .bib file as follows:

Code: Select all  •  Open in writeLaTeX

... whereas the ending .bib must not be written down:


I was getting used to write everything with ending, coz I got some problems earlier on when including graphics. But here, it can cause an error.

Probably this is of help for some of you.


Last edited by cgnieder on Tue Feb 19th, 2013, edited 1 time in total.
Reason: added code markup
Posts: 1
Joined: Wed Feb 23rd, 2011

Postby Andre Staltz on Tue Jan 17th, 2012

In my case, what solved the problem was changing

Code: Select all  •  Open in writeLaTeX


Code: Select all  •  Open in writeLaTeX
Andre Staltz
Posts: 1
Joined: Tue Jan 17th, 2012

Postby DVa on Thu Jul 5th, 2012


My solution of the Bibtex error compilation is different.

I was using latex on Windows through MikTeX. No problem. I then moved to latex linux using texlive2009 and had the "[BibTex] finished with exit code 2" error message each time I compiled Bibtex. The former posts would not solve my problem in my case.

The error occured because I had a duplicate reference (with same name) in my .bib file. Apparently, with MikTeK, Bibtex can overpass this duplication but bibtex with texlive can't.

Hope this helps.
Posts: 1
Joined: Thu Jul 5th, 2012

Postby balajiSankar on Tue Feb 19th, 2013


I had the same problem . This is what solved it.
I was having entries like the one below:

Code: Select all  •  Open in writeLaTeX
   AUTHOR  = {N.K.Rizk , H.C.Mongia},
   TITLE   = {Gas Turbine combustor performance evaluation},  
   YEAR    = {1991},
   JOURNAL = {29^{th } Aerospace sciences meeting},
   NUMBER  = {AIAA-91-0640},

This was giving the undefined citations error. When i changed them to

Code: Select all  •  Open in writeLaTeX
   AUTHOR  = {"N.K.Rizk , H.C.Mongia"},
   TITLE   = {"Gas Turbine combustor performance evaluation"},  
   YEAR    = {"1991"},
   JOURNAL = {"29^{th } Aerospace sciences meeting"},
   NUMBER  = {"AIAA-91-0640"},

it worked and all were happy :-)
Last edited by cgnieder on Tue Feb 19th, 2013, edited 1 time in total.
Reason: added code markup
Posts: 1
Joined: Tue Feb 19th, 2013


Return to BibTeX, biblatex and biber

LaTeX users online

Users browsing this forum: No registered users and 4 guests