BibTeX, biblatex and bibernatbib - multiple bibliographies

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
legallytired
Posts: 2
Joined: Fri Jul 31, 2015 4:09 am

natbib - multiple bibliographies

Post by legallytired »

Hello,

I'm working on a document that requires a few independent bibliographies. Some of the entries can be found in more than one bibliography. I'm using a documentclass based on memoir and using the natbib package and I'm compiling with xelatex (xelatex-bibtex-xelatex-xelatex).

I work in different documents that I \include and all seemed to work perfectly when I compiled each document on it's own using the main file and commenting out the other parts. It doesn't really work when I \include them all however. All the files are in the same folder including the bib files.

The first bibliography works fine but I can't get the second and subsequent ones to work properly. References aren't being recognized and only the items found in the first bibliography are recognized (the first bibliography also gets printed a second time instead of printing a second empty one).
I guess only the first bib file is considered when I compile? Should I call different bib files another way? I'm a bit lost.

Here is a minimal example!

Code: Select all

%This is the main file
\documentclass{memoir}
\usepackage{natbib}
\bibliographystyle{plainnat}
\begin{document}
\include{TEST1}
\include{TEST2}
\end{document}

Code: Select all

%TEST1.tex
\chapter{First chapter}
daijdwoadwa dawodwaoijdawoi. \citep{Knu86}
\bibliography{bibtest1}

Code: Select all

%TEST2.tex
\chapter{2 chapter}
daijdwoadwa dawodwaoijdawoi. \citep{MDDELCC2012}
\bibliography{bibtest2}

Code: Select all

%bibtest1.bib
@book{Knu86,
author = {Knuth, Donald E.},
year = {1986},
title = {The \TeX book},
}

Code: Select all

%bibtest2.bib
@MANUAL{MDDELCC2012,
title = {fafwafwafwafwa},
year = 2012,
author={fafafwfafwa},
organization = {afsafafwafwa},
}
All my files are pretty much done using natbib notation (\citep{}) and the bib files also done so hopefully it's only a dumb error on my part!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

legallytired
Posts: 2
Joined: Fri Jul 31, 2015 4:09 am

Re: natbib - multiple bibliographies

Post by legallytired »

Of course I run in a solution right after I post this.
Adding \usepackage{chapterbib} and running bibtex on each included .aux files seems to do the trick but it is a bit cumbersome.
This seems to work on my MWE but not on my actual file.
Some errors in the bib file might be the culprit I suppose.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

natbib - multiple bibliographies

Post by Johannes_B »

There are also packages like multibib or multibibliography or the very new nmbib.

I would do the job with a package that replaces all all of the former packages to deal with bibliographies and citing. It is called biblatex and very very powerful.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply