I have created a courses.bib database file for all my course litterature, which I have placed along with a package of mine named tlnames.sty that defines some related macros. The folder in which both files reside is ~/documents/texlive/texmf/tex/latex/tlnames.

I'm compiling this from inside TeXWorks using a modified version of the LaTeXmk script, which works fine except for the bibliography - it can't find courses.bib. Finding tlnames.sty works OK - I can import the package and use macros from it.

I have, since I placed courses.bib there, run texhash ~/documents/texlive/texmf and recievd the following output

$ texhash texmf
texhash: Updating /home/tomas/documents/texlive/texmf/ls-R... 
texhash: Done.

Why is this not working? What do I need to do to help BiBTeX find my database?

For completeness of the question: I'm running Ubuntu 12.04, with TeX Live 2011 and TeXWorks version 0.5 r.952.


2 Answers 2


(Still running 11.10, but....)

I wouldn't put my .bib file there. If you want a system-wide solution, try running this command from the terminal:

kpsewhich -var-value BIBINPUTS

For me, that gives me a bunch of choices, including


So if I add a file like test.bib to:


BibTeX and/or Biber can find this file even without using texhash. (This works from within emacs and from a terminal; I don't have TeXWorks.)


Files stored inside the texmf tree have to be in the 'correct' locations for TeX to find them. In the case of .bib files, they need to be inside texmf/bibtex/bib. From your description, ~/documents/texlive/texmf is a local tree on your system, so you need the .bib file inside


You can further sub-divide things if you wish, so perhaps


would be a location you could use.

Recent TeX Live releases, including TL2011, do not need you to texhash a local tree unless it's stored on a remote disk. So for most people simply adding files in the correct place inside texmf will be enough.

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.