BibTeX, biblatex and bibernatbib undefined citations

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
pricejn2
Posts: 3
Joined: Sat Jul 04, 2009 7:20 pm

natbib undefined citations

Post by pricejn2 »

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

\begin{thebibliography}{0}
.
.
\end{thebibliography}
(4) line 5 has

Code: Select all

\usepackage[latin1]{inputenc}
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...

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

natbib undefined citations

Post by kaiserkarl13 »

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

@article{mykey,
  author  = "K{\"o}ln, Max",
  year    = 2009
}
Once that's fixed, see if you've fixed your problems.
kahlan
Posts: 3
Joined: Tue Apr 13, 2010 5:18 pm

Re: natbib undefined citations

Post by kahlan »

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.

Sincerely,
Kahlan
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

natbib undefined citations

Post by gmedina »

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).
1,1,2,3,5,8,13,21,34,55,89,144,233,...
herlimenezes
Posts: 1
Joined: Mon Nov 08, 2010 4:29 am

Re: natbib undefined citations

Post by herlimenezes »

Hello,

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.
john_s
Posts: 1
Joined: Sun Dec 19, 2010 4:21 pm

Re: natbib undefined citations

Post by john_s »

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.
elstefano
Posts: 1
Joined: Wed Feb 23, 2011 6:16 pm

natbib undefined citations

Post by elstefano »

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

\bibliographystyle{elsarticle-harv}
\bibliography{thesis_ref.bib}

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

\bibliographystyle{elsarticle-harv}
\bibliography{thesis_ref}
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.

Cheers,

elstefano
Last edited by cgnieder on Tue Feb 19, 2013 9:25 pm, edited 1 time in total.
Andre Staltz
Posts: 1
Joined: Tue Jan 17, 2012 2:24 pm

natbib undefined citations

Post by Andre Staltz »

.
In my case, what solved the problem was changing

Code: Select all

\bibliographystyle{plain}
\bibliography{mybibtextfile}
to

Code: Select all

\bibliographystyle{plainnat}
\bibliography{mybibtextfile}
DVa
Posts: 1
Joined: Thu Jul 05, 2012 4:15 pm

Re: natbib undefined citations

Post by DVa »

Hi!

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.
balajiSankar
Posts: 1
Joined: Tue Feb 19, 2013 12:35 pm

natbib undefined citations

Post by balajiSankar »

Hi,

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

Code: Select all

@ARTICLE{gasTurbineCombustor_GeneralMotors_AIAA}
   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

@ARTICLE{gasTurbineCombustor_GeneralMotors_AIAA}
   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 19, 2013 9:25 pm, edited 1 time in total.
Post Reply