BibTeX, biblatex and biber ⇒ Bibliography Database in other Directory than Source
Bibliography Database in other Directory than Source
I am using TeXStudio. I want to keep my .bib files in a different directory from my .tex files so that I can share my .bib files among all my projects. I have figured out how to include the .bib files in my compilation, by using the --include-directory switch with the bibtex command. However, when I type \cite in my .tex file, TeXStudio is not able to find the .bib files unless they are in the same directory as the .tex file, so I have to manually enter the bibliography keys rather than selecting them from a list. How can I solve this problem? Is there a way to tell TeXStudio which directory to look in for the .bib file?
Bibliography Database in other Directory than Source
just enter the full path for the bib file
or relative path (assume you have:
then you can write:
in your
Code: Select all
\bibliography{C:/literature/ref.bib}
Code: Select all
C:/MyDocument/PhD/Literature/ref.bib
C:/MyDocument/PhD/Thesis/thesis.tex
Code: Select all
\bibliography{../literature/ref.bib}
thesis.tex
, it will understand
Last edited by cgnieder on Sat Dec 15, 2012 2:49 pm, edited 1 time in total.
Re: Bibliography Database in other Directory than Source
Thanks, that mostly worked. I actually had to put the full path name without the .bib extension omitted.
Another issue that came up is that I'm using hard wrap mode, and I had two bib files, and so I wasn't able to fit them both on the same line, and the hard wrap in the middle of the second made it not be recognized. I fixed this by combining the two into one. But I wonder whether there's a way to keep a particular line from wrapping in hard wrap mode.
Another issue that came up is that I'm using hard wrap mode, and I had two bib files, and so I wasn't able to fit them both on the same line, and the hard wrap in the middle of the second made it not be recognized. I fixed this by combining the two into one. But I wonder whether there's a way to keep a particular line from wrapping in hard wrap mode.