BibTeX, biblatex and biberBibliography Database in other Directory than Source

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
Norman314
Posts: 6
Joined: Fri Jun 01, 2012 10:18 pm

Bibliography Database in other Directory than Source

Post by Norman314 »

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?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
nphaibk
Posts: 23
Joined: Fri Sep 19, 2008 4:34 pm

Bibliography Database in other Directory than Source

Post by nphaibk »

just enter the full path for the bib file

Code: Select all

\bibliography{C:/literature/ref.bib}
or relative path (assume you have:

Code: Select all

C:/MyDocument/PhD/Literature/ref.bib
C:/MyDocument/PhD/Thesis/thesis.tex
then you can write:

Code: Select all

\bibliography{../literature/ref.bib}
in your thesis.tex, it will understand
Last edited by cgnieder on Sat Dec 15, 2012 2:49 pm, edited 1 time in total.
Norman314
Posts: 6
Joined: Fri Jun 01, 2012 10:18 pm

Re: Bibliography Database in other Directory than Source

Post by Norman314 »

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.
Post Reply