I am completely new to using LaTex (I just started a week ago), and I'm using the templates posted on this website. I downloaded all the files, including the .bib file and the .cls file and they are all in the same directory. I am able to compile and display the .tex file, but when it appears, all citations have a [?] in them.

I'm not sure what I'm supposed to do. I'm sure there's a step I'm missing... perhaps there is a special way to use TexShop to make it work? Or am I supposed to use another program? Any help would be greatly appreciated.

  • 1
    Note that for .bib files, you need to compile using the sequence: latex file, bibtex file, latex file (and possibly another latex file). latex can also be substituted with pdflatex or xelatex (depending on your compiler).
    – Werner
    Apr 11, 2012 at 3:32
  • This works fine for me tex.stackexchange.com/a/515807/200866 Nov 10, 2019 at 12:07

5 Answers 5


To get proper citations using TeXShop you need to (at least):

  1. Run LaTeX
  2. Run BibTeX
  3. Run LaTeX
  4. Run LaTeX

LaTeX and BibTeX are selected in the drop-down box next to the "Typeset" button.

Assuming that everything else is correct (packages, .bib file, citation commands), this should give proper citations.

edit: Added an extra LaTeX run after running BibTeX as noted in the comments.

  • 1
    You should usually run latex twice after running bibtex. See Undefined citation warnings.
    – Alan Munn
    Apr 11, 2012 at 11:07
  • Wow! Thank you so much!!! I didn't realize that I had to compile both the .tex and .bib files. After a few tries, it seems like I need four steps: Latex File, Bibtex file, Latex File, Latex File (again).
    – Paul
    Apr 11, 2012 at 14:10
  • SORCERY! This works. =) Dec 14, 2019 at 19:50

I am also new to Latex and was having this problem while using TexShop on Mac OS X. I second what's been said above: you need to run Latex, then Bibtex, then Latex twice. Also: you need to ensure that the file name of the .bib file is the same as the .tex file, and in the same directory. You do not need to specify the whole file directory path in the \bibliography{} command, just the file name e.g. \bibliography{my bib.bib} if it is in the same directory as the .tex file. After a lot of tinkering, I've got it to work!

  • 3
    I don't think the .bib file must have the same name as the .tex file, putting the correct name in \bibliography{...} is enough.
    – CarLaTeX
    Feb 23, 2017 at 9:53
  • Also, it's not necessary to include the extension .bib in the argument of \bibliography.
    – Mico
    Feb 23, 2017 at 10:25

I found a better alternative to running the script four times:

if you add the following comment as a very first line in your .tex file:

% !TEX TS-program = pdflatexmk

⌘+T will make it work on the first try.

  • 1
    Thank you, it works! Where does it come from?
    – Rico
    Oct 27, 2021 at 15:02

I'm using BibTex, Version 0.99d. In this version, it seems that the name of the .bib file must be the same with the latex file. So if you can't get the BibTex work, try to unify the name.


I use biber, i.e. \usepackage[backend=biber]{biblatex} and I also needed to change the BibTex Engine, which can be done in the TeXShop preferences:

TeXShop -> Preferences... -> Engine

Under BibTex Engine, type "Biber" and then ok.

Then proceed as JohnReed described: With Cmd + T to typeset and Cmd + shift + B to run biber.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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