Cannot generate bibliography using TeXworks from MiKTeX
Too long for a comment: Let's try us another way. Can you please compile the following MWE on your system? It works for me with pdflatex
-- bibtex
-- pdflatex
-- pdflatex
.
%File mb-bibtex.tex, then \jobname = mb-bibtex
\RequirePackage{filecontents} % loading package filecontents
% writing file \jobname.bib, for example mb-bibtex.bib.
\begin{filecontents*}{\jobname.bib}
@Book{companion,
author = {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander},
title = {The LaTeX Companion},
edition = {1},
publisher = {Addison-Wesley},
location = {Reading, Mass.},
year = {1994}
}
@Book{adams,
title = {The Restaurant at the End of the Universe},
author = {Douglas Adams},
series = {The Hitchhiker's Guide to the Galaxy},
publisher = {Pan Macmillan},
year = {1980}
}
\end{filecontents*}
\documentclass{article}
\usepackage[numbers]{natbib} % bibliography style
\usepackage[colorlinks]{hyperref} % better urls in bibliography
\begin{document}
Test of bibliography:
The \LaTeX{} companion~\cite{companion}, the funny book of Adams~\cite{adams}.
\bibliographystyle{plainnat} % needs package natbib
\bibliography{\jobname} % uses \jobname.bib, according to \jobname.tex
\end{document}
To be sure (that there is no error in your config of your editor) please use the terminal/console.
I had the exact same problem, and I was finally able to diagnose and solve my problem. I am posting so others may find this potential problem as I have not seen this as a solution to this problem.
I am working on a Windows 7 machine (ugh--it's my office's requirement). After an hour+ of trouble shooting, I found my problem was the file type of my .bib
file. I had exported from Endnote to bibtex (or so I thought). Endnote made a .txt
file. I manually changed this to a .bib
file.
However, the file was actually just retitled myLib.bib.txt
. Yuck.
When I opened my myLib.bib.txt
in JabRef and did a "SaveAs" choosing .BIB fileType, everything finally worked. I did the normal:
pdfLatex myFile.tex
bibtex myFile.aux
pdfLatex myFile.tex
pdfLatex myFile.tex
Again, now everything worked. It was a filetype error that was leading to an empty .bbl
file. When I say empty, previously my .bbl
file had only the \begin
and \end
lines, with no actual content.