2

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!

  • 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
2

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 $*'

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.