As Jon has pointed out in his comment.
The correct sequence is: latex file.tex
, bibtex file.aux
, latex file.tex
, latex file.tex
. (Note that the extensions .tex
and .aux
are not strictly necessary, but are implied and thereby used even when you omit them. And of course, you can use any of the following commands in place of latex: latex (produces .dvi
by default), pdflatex
(produces .pdf
by default), lualatex
, or xelatex
-- these last two require the use of a slightly different preamble from 'regular' LaTeX.)
To test a bibtex
run use example files at http://andy-roberts.net/writing/latex/bibliographies
Download bib.tex and sample.bib to a folder. Run pdflatex bib
-> bibtex
-> pdflatex bib
-> pdflatex bib
from that folder with proper sequence to get bib.pdf
Alternatively one can automate the compiling using latexmk
and arara
latex file.tex
,bibtex file.aux
,latex file.tex
,latex file.tex
. (Note that the extensions.tex
and.aux
are not strictly necessary, but are implied and thereby used even when you omit them. And of course, you can use any of the following commands in place oflatex
:latex
(produces.dvi
by default),pdflatex
(produces.pdf
by default),lualatex
, orxelatex
-- these last two require the use of a slightly different preamble from 'regular' LaTeX.)pdflatex bib
->bibtex
->pdflatex bib
->pdflatex bib
from that folder with proper sequence to getbib.pdf