Compiling LaTex bib source

Klaus picture Klaus · Mar 17, 2010 · Viewed 103.1k times · Source

I am writing my thesis in Latex, and I have the references in an own thesis.bib file which look as follows

@Article{xxx,
  author =       "D.A. Reinhard",
  title =        "Case Study",
  year =         "1985",
}

and I reference them in my main document as ~\cite{xxx}

When I compile then the main document with: pdflatex main.tex than it shows me question marks instead of the proper references to the bibliography. Do I also need to compile the bib source on its own? If yes, can somebody please tell me the command for Linux

Many thanks!

Answer

Tadeusz A. Kadłubowski picture Tadeusz A. Kadłubowski · Mar 17, 2010

You need to compile the bibtex file.

Suppose you have article.tex and article.bib. You need to run:

  • latex article.tex (this will generate a document with question marks in place of unknown references)
  • bibtex article (this will parse all the .bib files that were included in the article and generate metainformation regarding references)
  • latex article.tex (this will generate document with all the references in the correct places)
  • latex article.tex (just in case if adding references broke page numbering somewhere)