# How do I use my .bib file with TexShop

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.

-
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 '12 at 3:32

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.

-
You should usually run `latex` twice after running `bibtex`. See Undefined citation warnings. –  Alan Munn Apr 11 '12 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 '12 at 14:10