GeneralSharing bibtex file between TeXnicCenter projects

General information and discussion about TeXnicCenter
Post Reply
kbajer
Posts: 1
Joined: Sun Feb 04, 2007 1:03 pm

Sharing bibtex file between TeXnicCenter projects

Post by kbajer »

I have a large bibliography file that I use in several different TxC projects. I cannot see a way to make TxC see and use the .bib file unless I actually move it to the folder of the current project. Even if I put a link in the current project folder, it does not work.

Do I really have to keep moving the .bib file around all the time? Or, perhaps, there is some entirely different approach to this problem.
I guess this must have been asked many times before, but I still cannot find an answer.

Konrad

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
craigim
Posts: 28
Joined: Sun Jan 14, 2007 6:19 pm

Re: Sharing bibtex file between TeXnicCenter projects

Post by craigim »

You should be able to provide a path in the \bibliography{} command. I keep all of my projects in a directory tree with a root of C:\...\My Documents\LaTeX\ , and each project with its own subdirectory. When I want to reference the .bib file, I use the command \bibliography {../ThesisBibComplete} and it has no problem running one level up the directory tree to parse my main bib file.

When a project is finished and I'm not going to be making any other changes to it, JabRef will build a sub-database based on the aux file of a project that contains only the entries used in a particular project (that way I don't have to send my boss a bib file with 749 entries, only one with 9).
Cillian
Posts: 2
Joined: Thu Feb 01, 2007 5:43 pm

Re: Sharing bibtex file between TeXnicCenter projects

Post by Cillian »

It is possible to let bibtex know where you store all your .bib files by setting the environment variable 'BIBINPUTS' (assuming you are using MikTeX, afaik other installations have a similar capability). However, it seems that TeXnicCenter does not use this environment variable. So you will be able to make your docs fine but won't be able to access your .bib files directly from within TeXnicCenter.

To set the environment variable go: Control Panel -> System -> Advanced Tab
Click on the 'Environment Variables' button and click new (either as a local variable for you only, or a system wide variable, doesn't really matter which).
The variable name is BIBINPUTS, and the value is a semi colon separated list of _directories_ where you keep your bib files (not a list of bib files themselves). In my case I have something like this:

D:\My Documents\Work\Papers\CDMA\Bib;D:\My Documents\Work\Papers\GPS\Bib;Documents\Work\Papers\General\Bib;
Post Reply