Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

(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

~/home/<username>/texmf

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

~/home/<username>/texmf/bibtex/bib/

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.)

share|improve this answer
add comment

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

~/documents/texlive/texmf/bibtex/bib

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

~/documents/texlive/texmf/bibtex/bib/tlnames

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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