Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I would like to use multiple .bib files for my article, such as file1.bib, file2.bib.

However, I would like my references not to be separated (such as "Primary sources", "Secondary sources", etc.) These bibliographies just need to be merged into one.

One way to do this is to just copy-paste these .bib files into one .bib file, and this would solve the problem. However, I would like to keep it split into several .bib files, by topic (file1.bib contains articles on topic1, file2.bib contains on topic2, and so on).

I tried to do

\bibliographystyle{alpha}

\bibliography{file1}
\bibliography{file2}

but this just gives me the same bibliography twice!

share|improve this question
12  
use \bibliograhy{file1,file2} –  Guido Nov 24 '12 at 20:45
    
@Guido is on the ball. That's the way to do it. –  Nicholas Hamilton Dec 15 '12 at 16:37
    
Please select "answer your own question", so your question does not show up as unanswered anymore. –  mafp Dec 21 '12 at 23:18

1 Answer 1

The correct way to load multiple bib files is to use

\bibliography{file1,file2}

Note the lack of space between the comma and the files!

share|improve this answer
5  
What if there is a conflict in bibtexkeys of the two files? –  Orion Jun 26 '13 at 18:52
8  
Only one of them will be include (the first one) and bibtex will report a Repeated Entry message and will skip the second one. –  Guido Jun 26 '13 at 20:59
1  
@Guido, may I ask why the space between the comma and the second filename is important? –  Leo Fang May 6 at 4:15
2  
@LeoFang otherwise bibtex will report a white space in arguments and will ignore the bibtex files after the space. –  Guido May 6 at 11:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.