Does someone know how to use a .bib file which resides in another directory. For example, my LaTeX file is in C:/latexfile and the .bib file is in C:/bibfile. Suppose the name of the .bib file is refer
I tried
(1) \bibliography{C:/bibfile/refer}
(2) \bibliography{C:/bibfile/refer.bib}
(3) \bibliography{"C:/bibfile/refer.bib"}
None of the above work. The bibliography is not compiled. However, if I put the refer.bib file in C:/latexfile then everything works fine.
I would ideally like to have a single .bib file in one place and use it for my manuscripts which are spread out in different directories.
Thanks in advance for your help.
General ⇒ Using a BIB file in a different directory
-
- Posts: 105
- Joined: Fri Nov 30, 2007 11:32 pm
Using a BIB file in a different directory
Last edited by curiouslearn on Tue Jan 08, 2008 8:58 pm, edited 1 time in total.
Re: Using a BIB file in a different directory
I see two possibilities: 1) launch bibtex with a switch: --enable-directory=... 2) there is an environment variable used by bibtex: BIBINPUTS qui contains extra paths fo fonding bib files.Specify your path in either way. All this corresponds to the MiKTeX distribution, but there must be the ananlogue for other distributions as well.
Regards,
B.A
Regards,
B.A
Re: Using a BIB file in a different directory
I haven't now at hand a Windows PC to try, but I wonder if the problem is simply a bad typing of the path. If the directory of the bib file is supposed to be C:/bibfile, the path to refer.bib should be C:/bibfile/refer.bib. Logically, none of the options (1), (2) and (3) can work. Maybe \bibliography{C:/bibfile/refer} does the trick.
-
- Posts: 105
- Joined: Fri Nov 30, 2007 11:32 pm
Re: Using a BIB file in a different directory
Thanks to both of you for replying. balfonsi, I am not sure how to implement either of your steps, but I will try to lookup on the web. In case it is not too much of a problem, can you please elaborate on the first method that you suggest.
Juanjo, I had made a mistake in typing out the example here. The path was complete when I tried those options. I have edited the example that I posted here.
Juanjo, I had made a mistake in typing out the example here. The path was complete when I tried those options. I have edited the example that I posted here.
Re: Using a BIB file in a different directory
I know how to implement (I think) under MiKTeX. Do you use this distribution? You also may add C:\bibfile to the path. Which editor do you use? It might be more or less simple for me, according to the one you use.
BIBINPUTS can be specified in System Properties->'Advanced' tab -> 'Environment variables' button (I'm not sure of the exact names, as I'm translating from french).
Regards,
B.A.
BIBINPUTS can be specified in System Properties->'Advanced' tab -> 'Environment variables' button (I'm not sure of the exact names, as I'm translating from french).
Regards,
B.A.
-
- Posts: 105
- Joined: Fri Nov 30, 2007 11:32 pm
Re: Using a BIB file in a different directory
Balfonsi,
Yes I am using MiKTeX. I am using Winedt for the editor. The operating system is Win XP. When you say that I can add C:/bibfile to the path, do you mean adding it to the PATH in My Computer -> Properties -> Advanced ->Enivronment Variables ->System Variables ->Path.
Thanks for your help.
Yes I am using MiKTeX. I am using Winedt for the editor. The operating system is Win XP. When you say that I can add C:/bibfile to the path, do you mean adding it to the PATH in My Computer -> Properties -> Advanced ->Enivronment Variables ->System Variables ->Path.
Thanks for your help.