General ⇒ Multiple Latex documents, single bibliography ... ?
-
MitsosOSougias
- Posts: 10
- Joined: Mon Jan 07, 2008 4:11 pm
Multiple Latex documents, single bibliography ... ?
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
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Re: Multiple Latex documents, single 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 ... ?
Hope this can help Mitsos too
Multiple Latex documents, single bibliography ... ?
Code: Select all
\bibliography{/the/path/to/the/bib/file}Re: Multiple Latex documents, single bibliography ... ?
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.
Multiple Latex documents, single bibliography ... ?
Cheers,
Tomek
-
MitsosOSougias
- Posts: 10
- Joined: Mon Jan 07, 2008 4:11 pm
Re: Multiple Latex documents, single bibliography ... ?
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).