General ⇒ Multiple Latex documents, single bibliography ... ?
-
- Posts: 10
- Joined: Mon Jan 07, 2008 4:11 pm
Multiple Latex documents, single bibliography ... ?
Another newbie question from me ...
I have seperated the chapters of my thesis in different folders under a main folder called "THESIS".
I want to have one bibtex file under the general folder THESIS that all other chpaters (in different folders) will draw from.
What I currently do is use:
\bibliographystyle{unsrt}
\bibliography{REFERENCES}
And have the REFERENCES.bib on each folder which I manually update. But you can realise that this is a bit cumbersome ...
Thanx
I have seperated the chapters of my thesis in different folders under a main folder called "THESIS".
I want to have one bibtex file under the general folder THESIS that all other chpaters (in different folders) will draw from.
What I currently do is use:
\bibliographystyle{unsrt}
\bibliography{REFERENCES}
And have the REFERENCES.bib on each folder which I manually update. But you can realise that this is a bit cumbersome ...
Thanx
NEW: TikZ book now 40% off at Amazon.com for a short time.
Re: Multiple Latex documents, single bibliography ... ?
What I'm doing in my thesis is having the following dir structure:
thesis/
chap1/
chap2/
chapn/
I have thesis/paper.tex, which uses \include to make the chapters, e.g., inside paper.tex I have
\include{chap1/intro}
and so on. The only thing to watch out for is all path URL's are relative to thesis, not where the files sit, so if I have a file chap1/foo.tex and it wants to include chap1/bar.tex, I have to write \include{chap1/bar.tex} where I note the directory wrt the top-most directory.
Then, inside paper.tex, you have a single bibliography, like the two lines you have above and they all draw from the same bibliography.
thesis/
chap1/
chap2/
chapn/
I have thesis/paper.tex, which uses \include to make the chapters, e.g., inside paper.tex I have
\include{chap1/intro}
and so on. The only thing to watch out for is all path URL's are relative to thesis, not where the files sit, so if I have a file chap1/foo.tex and it wants to include chap1/bar.tex, I have to write \include{chap1/bar.tex} where I note the directory wrt the top-most directory.
Then, inside paper.tex, you have a single bibliography, like the two lines you have above and they all draw from the same bibliography.
Re: Multiple Latex documents, single bibliography ... ?
I too have a similar question. Say I wanted to link to a .bib file not in the active directory. What would the argument, path, in \bibliography{bibfile} look like?
Hope this can help Mitsos too
Hope this can help Mitsos too

Multiple Latex documents, single bibliography ... ?
Well, I do not know about Windows, but with my OS/Installation (Debian Lenny/TeX-Live 2007) I simply use the usual way to indicate paths:
Code: Select all
\bibliography{/the/path/to/the/bib/file}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Re: Multiple Latex documents, single bibliography ... ?
Thanks to you
I missed the first slash... 


Multiple Latex documents, single bibliography ... ?
Look at the import package:dbrumley wrote:I have thesis/paper.tex, which uses \include to make the chapters, e.g., inside paper.tex I have
\include{chap1/intro}
and so on. The only thing to watch out for is all path URL's are relative to thesis, not where the files sit, so if I have a file chap1/foo.tex and it wants to include chap1/bar.tex, I have to write \include{chap1/bar.tex} where I note the directory wrt the top-most directory.
http://www.ctan.org/tex-archive/help/Ca ... mport.html
With it, path URLs will be relative to the current directory and not the main directory. That makes it much nicer to organize your files in multiple directories.
In your main file, instead of using \input{directory/file} use \import{directory}{file}. Then inside the file, use the standard LaTeX commands, but use relative paths.
Likewise, \includefrom is to \include as is \import is to \input.
Multiple Latex documents, single bibliography ... ?
Instead, why don't you try...MitsosOSougias wrote:\bibliographystyle{unsrt}
\bibliography{REFERENCES}
Code: Select all
\bibliographystyle{unsrt}
\bibliography{../REFERENCES}
Alternatively, if your file system supports it (Windows' file system, NTFS, does not), you can use symbolic links to put a BIB in each directory that is always in sync with the main BIB. However, it's probably better just use \bibliography with the "../" prefix.
Check out the other message I posted about the import package. It makes working with subdirectories easier when you start including files from each sub file.
Last edited by Ted on Sat Jul 26, 2008 2:54 pm, edited 1 time in total.
Multiple Latex documents, single bibliography ... ?
There was recently a discussion on this forum about managing mutli-file projects. Basically, there are two methods: (1) give file names with full/relative paths in your source or (2) specify the directories to search in TEXINPUTS environmental variable (or on the first line of the main file) and use bare file names in your source.
Cheers,
Tomek
Cheers,
Tomek
-
- Posts: 10
- Joined: Mon Jan 07, 2008 4:11 pm
Re: Multiple Latex documents, single bibliography ... ?
I used the gmedina's advice with excellent results!
Thank you!
Thank you!
Multiple Latex documents, single bibliography ... ?
Remember that you don't need to give an ABSOLUTE path. Using a relative path with the "parent" directory .. will work just as well:MitsosOSougias wrote:I used the gmedina's advice with excellent results!
Thank you!
Code: Select all
\bibliography{../yourbib}
Using absolute paths can be nice when you have a centralized bibliography database that never moves.
Using relative paths (i.e., with ..) can be nice if you ever plan on moving your main folder somewhere else (e.g., on another machine that you work on or when someone else opens it). Of course, your bibliography database would have to live somewhere within that main folder (in ONE place, not many).