[Tex/LaTex] Moving from PC to Mac: BibTeX problem

bibtextextmate

I recently bought a Mac and have been struggling with running my .tex files. I'm using Textmate and TeXShop. The problem I have is the following: using the exact same .tex and .bib files and running them on my Mac, some of the references do not appear.

For example, at some point a type: Eg. \citet{heckman81} and \citet{heckman81a}, and after running both pdflatex and bibtex (several times, as suggested elsewhere) I get the following warning:

Warning--I didn't find a database entry for "heckman81a"

Importantly, when I use to run it on my PC everything worked fine.

Anyone has suggestions, or has experienced something similar in the past?

Best Answer

You should place your bibliography files in ~/Library/texmf/bibtex/bib/. The TeXShop documentation says

Personal files should be stored in ~/Library/texmf. (Recall that ~/Library is the library folder in your home directory, while /Library is a system folder analogous to /Applications.) You will have to create the subfolder "texmf." When TeX needs to open a file, it searches ~/Library/texmf first, so if you modify a standard TeX file and place it there, the modified file will be used.

The folder structure inside ~/Library/texmf should mimic that of the texmf trees in your TeX distribution. This is easier than it appears. TeX will locate any file in ~/Library/texmf/tex or in a subfolder of this folder; LaTeX will locate any file in ~/Library/texmf/tex/latex or a subfolder of this folder. Bibtex will locate any file in ~/Library/texmf/bibtex/bib or in a subfolder of this folder. Etc.

TeXShop doesn't always run in the same environment as the shell where you type kpsewhich. It is best to stick to the standard locations recommended by TeXShop.