Tuesday, October 23, 2012

LaTeX BibTeX undefined citations

As a LaTeX beginner, a problem I ran into while trying to set up my first bibliography was that of undefined citations. I was using TeXnicCenter and opening a .tex file, which uses a .bib file to store the bibliography. I was getting question marks wherever I used \cite, and the build log reported the following:


LaTeX Warning: Citation `testcitation' on page 1 undefined on input line 1
3.

No file test.bbl.
[1

This problem is answered on this page, which explains that BibTeX is actually not used if you just open a .tex file directly in TeXnicCenter. Instead, you need to set up a project and tick the "Use BibTeX" checkbox. If you already have a standalone .tex file, a very quick and easy way to do this in TeXnicCenter is to go in the Project menu and click "Create with active file as main file". You can then check "Use BibTex", choose your language settings, click OK, and live happily ever after.

No comments:

Post a Comment