Using .bib and .bst files without having to save them in the working directory

Anirudh Yadav 2019-12-23 1 minute read

As stated in the TeXShop documentation, bibtex will locate any .bib file in ~/Library/texmf/bibtex/bib or in a subfolder of this folder, and any .bst file in ~/Library/texmf/bibtex/bst or in a subfolder of this folder. Accordingly, you can save .bib and .bst files in these folders and access them in TeX using the usual code without specifying file paths:

bibliography{mybib}
bibliographystyle{econ-econometrica}

This approach works well for .bst files, and I’ve implemented it for the econ-econometrica.bst file. I’m less convinced that it’s very useful for centralised .bib storage. While it would be easy to make Mendeley save all .bib files in ~/Library/texmf/bibtex/bib, the problem is that Mendeley’s .bib files often contain a lot of trash, so you’d have to edit them anyway using bibertool or whatever. Maybe it makes sense to use this centralised folder as a starting point, but when a project becomes serious you should probably just save the .bib in the working directory…