I'm trying to write a book divided into two parts. I'd like to insert a bibliography at the end of each part (several chapters each) but, since it will be one volume, I want the page number to keep growing. Is there a way to do it? I'm currently arguing with chapterbib, but I had no luck up to now. Any suggestion?
Asked
Active
Viewed 1,262 times
4
Claudio Fiandrino
- 63,575
Lorenzo
- 41
1 Answers
2
bibunits (use texdoc bibunits for the manual) provides an alternative to chapterbib.
Here is a possible template for your use
\documentclass{book}
\usepackage{bibunits}
\begin{document}
\defaultbibliographystyle{plain}
\begin{bibunit}
\include{chapter1}
...
\include{chapterN}
\putbib[bibliography1]
\end{bibunit}
\begin{bibunit}
\include{chapterN}
...
\include{chapterN+M}
\putbib[bibliography2]
\end{bibunit}
\end{document}
Then run
latex file
bibtex bu1
bibtex bu2
latex file
latex file
where file is the name of your master .tex file
Guido
- 30,740
-
I was trying exactly your solution but as soon as I latex the file the second time (I tried with just 1 bu) I get the error: "Can only be used in the preamble" making reference to \bibcite{citation}{1}. Any idea? – Lorenzo Dec 16 '12 at 21:25
-
-
The example works fine to me but in my file i get the error. I'm using both babel and hyperref do you know any issue? – Lorenzo Dec 16 '12 at 21:54
-
babelandhyperrefwork for me (they might be problems withhyperrefif a citation appears in both bibliography. Otherwise, no problems. Have you removed existing auxiliary files? – Guido Dec 16 '12 at 22:04 -
Ok, I tried to load bibunits as the last package and now it give me no errors BUT where there should be the bibliography there are just [1] ... [6] (I have 18 references). I'm getting out for the blue... – Lorenzo Dec 16 '12 at 23:01
-
Have you again removed all auxiliary files and run again
bibtex bu1andbibtex bu2? Alternatively you can try withbiblatex. – Guido Dec 16 '12 at 23:24 -
Ok now it works, I found an error in my .bib file! =) One last thing do you know if there is any incompatibility with \boldmath and bibubits? I get the error (which I can skip, is not a big problem...) "Math version 'BOLD' is not defined. – Lorenzo Dec 17 '12 at 07:57
-
@Lorenzo Id doubt there are incompatibility between bibunits and \boldmath. – Guido Dec 17 '12 at 08:25
biblatexto create your bibliographies? – Gonzalo Medina Dec 16 '12 at 20:02\includes (e.g., one for each chapter) but not the same number of bibliographies. – Guido Dec 16 '12 at 20:47