4

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?

Lorenzo
  • 41

1 Answers1

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
  • @Lorenzo No, I don't get errors. – Guido Dec 16 '12 at 21:40
  • 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
  • babel and hyperref work for me (they might be problems with hyperref if 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 bu1 and bibtex bu2? Alternatively you can try with biblatex. – 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