I have the following:
\documentclass{report}
\begin{document}
\include{chapter1}
\include{chapter2}
\end{document}
I also have a reference.bib file, with entries book1, book2 and book3.
chapter1.tex:
\chapter{Foo}
Some text and a reference to \cite{book1}. But also have a look in \cite{book2}...
\bibliographystyle{plain}
\bibliography{references}
and chapter2.tex being exactly the same except change book2 to book3. Thus book1 is cited in both, but book2 is only cited in chapter1 and book3 only in chapter2.
This produces "multiply-defined" warnings so I am looking for an easy way to do this properly. Any suggestions greatly appreciated.
EDIT: Bibtex produces this:
This is BibTeX, Version 0.99c (TeX Live 2009/Debian)
The top-level auxiliary file: main.aux
A level-1 auxiliary file: chapter1.aux
The style file: plain.bst
A level-1 auxiliary file: chapter2.aux
Illegal, another \bibdata command---line 4 of file chapter2.aux
: \bibdata
: {references}
I'm skipping whatever remains of this command
Database file #1: references.bib
Warning--empty publisher in book1
(There was 1 error message)
And the output from pdflatex is:
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)
entering extended mode
(./main.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, ngerman, german, german-x-2009-06-19, ngerman-x-2009-06-19, loaded.
(/usr/share/texmf-texlive/tex/latex/base/report.cls
Document Class: report 2007/10/19 v1.4h Standard LaTeX document class
(/usr/share/texmf-texlive/tex/latex/base/size10.clo)) (./main.aux
(./chapter1.aux) (./chapter2.aux
LaTeX Warning: Label `book2' multiply defined.
LaTeX Warning: Label `book1' multiply defined.
LaTeX Warning: Label `book3' multiply defined.
)) (./chapter1.tex
Chapter 1.
(./main.bbl [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}])) [2]
(./chapter2.tex
Chapter 2.
(./main.bbl [3])) [4] (./main.aux (./chapter1.aux) (./chapter2.aux))
LaTeX Warning: There were multiply-defined labels.
)</usr/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmbx12.pfb> </usr/sha
re/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr10.pfb></usr/share /texmf-tex
live/fonts/type1/public/amsfonts/cm/cmti10.pfb>
Output written on main.pdf (4 pages, 38197 bytes).
Transcript written on main.log.
\cite
commands. Can you please add the exact warning message that you are getting?chapterbib
package.chapterbib
package.