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 would like to use one .bib file for everything and not have to keep a copy in each project's folder. By reading around I see that if I were calling bibtex manually, then I could add the string --include-directory with the path to the .bib file (I plan on keeping the .bib file with my other latex style files).

In my _vimrc file I do set some g: variables for latex (like to set latex, pdf viewer, etc), but I can't find anything in the documentation about a g: variable for the bibtex call. Is this possible? Or do I have to specify the full path in my \bibliography{} call?

Thanks!

share|improve this question
    
On Linux and TeXLive, I know for a fact that specifying the relative path in \bibliography{} works for keeping a bib file in a different directory. You may also want to look at this question. –  Willie Wong Dec 17 '10 at 15:29
    
Thanks, Willie! How did I miss that one? I guess I was too focused on the --include-directory string. I switched to windows and it's a pain to fool around with the read only folders, so I have a user folder for my .sty files. Setting the path in \bibliogrpahy{} does work, but I like to work lazier (although I spend more time looking for the answer than I save). I'll vote to close if no one offers an --include-directory solution. –  Richard Herron Dec 17 '10 at 15:37

1 Answer 1

up vote 1 down vote accepted

Create the file $VIM/vimfiles/ftplugin/tex.vim if you don't have it yet, and in it add the line

let g:Tex_CompileRule_bib = g:Tex_BibtexFlavor . ' --include-directory /your/dir/here $*'
share|improve this answer
    
I also recently found that I can add to a directory to path for MikTex (I should have know there was a different angle than the vimrc file). docs.miktex.org/manual/localadditions.html –  Richard Herron Jan 25 '11 at 20:55

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.