TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My article paper.tex compiles fine, but myBib.bib doesn't.

$ pdflatex paper.tex
$ bibtex myBib
I couldn't open file name `myBib.aux'

I happen to be using TeXShop, but the command line is unambiguous.

Thanks in advance.

share|improve this question
bibtex paper rather than bibtex myBib. – Ian Thompson Jul 25 '12 at 20:58
Wow, that works. – Nick Vence Jul 25 '12 at 21:07
@NickVence myBib.bib is only a database, which may contain many entries that you don't cite in your paper. It's in paper.tex that you tell the system what bibliographic database to use (with \bibliography{myBib}). So it's paper which you must run BibTeX on (precisely paper.aux, but the extension can be omitted). – egreg Jul 25 '12 at 23:04
A solution can be found here if you use a build subfolder for compiling. – Alexandre Willame Sep 7 '14 at 19:15
up vote 11 down vote accepted

In addition to Ian Thompson's comment, if you are using TeXShop then you don't even have to bother with the command line, as TeXShop provides you with a graphical interface. Just switch to BibTeX in the pop-up menu after a first LaTeX compilation, then press typeset (this is equivalent to calling bibtex paperin the command line) exactly as for a LaTeX compilation, then switch back to LaTeX and press Typeset (equivalent to command line pdflatex paper.tex; two compilations are needed).

share|improve this answer

That will resolve the problem ;) :

pdflatex paper.tex
bibtex paper.aux
pdflatex paper.tex
evince paper.pdf
share|improve this answer

In my case, my latx file contains of many files. So when I tried to compile the bibliography.bib file directly without switching to the main document file (thesis.tex) I got the error. The solution is to compile the document from the main file (thesis.tex). enter image description here

share|improve this answer
That's why they added the function "Options"->"Set current document as 'Master Document'". If you're clicking this while the main .tex file is open, you can compile everywhere – Christian Dreher Mar 7 at 9:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.