Bibliographies – Multiple Bibliographies with Hyperref and Subdividing

bibliographieshyperrefsubdividing

I am writing a book document in which I have to put a bibliography, containing all the references cited throughout the text, and a list of publications, that should appear after the bibliography, as an appendix.

The list of publications might contain entries already appearing in the bibliography.

The following MWE describes what I've come up with so far:

\documentclass{book}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{lipsum}


\begin{document}
\tableofcontents
\cleardoublepage

\chapter{x}
\lipsum[1-4]
\section{a}
\lipsum[1-4]
\section{b}
\lipsum[1-4]
\cite{goossens}
\section{c}
\lipsum[1-4]

\chapter{y}
\lipsum[1-4]
\section{a}
\lipsum[1-4]
\section{b}
\lipsum[1-4]
\section{c}
\lipsum[1-4]


% references
\makeatletter
\phantomsection
\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{plain}
\bibliography{bibliotest}

\cleardoublepage

% appendices
\appendix
\addcontentsline{toc}{chapter}{List of Publications}
\renewcommand{\bibname}{List of Publications}
\begin{thebibliography}{1}

\bibitem{goossensdifferent}
Michel Goossens, Frank Mittlebach, and Alexander Samarin.
\newblock {\em The Latex Companion A}.
\newblock Addison-Wesley, Reading, Massachusetts, 1993.

\end{thebibliography}


\cleardoublepage

\chapter{another app}


\end{document}

File bibliotest.bib contains the following:

@book{goossens,
  author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
  title = "The Latex Companion A",
  year = "1993",
  publisher = "Addison-Wesley",
  address = "Reading, Massachusetts"
}

The problems are two:

  1. All links point to the correct destinations, except for the two links in the TOC pointing at both the bibliography and the list of publications.
  2. Though the correct title appears in the TOC (List of Publications), the chapter is unnumbered.

Issues using the multibib package

If I load multibib, I solve point number 1 (all links are correct), but:

  1. the chapter is still unnumbered.
  2. reference numbering continues after the last reference of the first bibliography.

The code of the MWE looks like this now:

\usepackage{multibib}
\newcites{pub}{List of Publications}
...
\appendix
\phantomsection
\addcontentsline{toc}{chapter}{List of Publications}
\renewcommand{\refname}{List of Publications}
\bibliographystylepub{plain}
\bibliographypub{bibliotest}
\nocitepub{*}

Best Answer

Here's a solution using multibib. I've use the tocbibind package to deal with the numbering of the chapters. It's not clear from your question whether both the regular bibliography and the list of references were supposed to be numbered chapters, or just the list of publications. I've assumed the latter, so that the Bibliography is an unnumbered chapter, and the List of Publications is a regularly numbered Appendix. To do this I created a user command \numbib that toggles the tocbibind bib numbering boolean. This command is used before the List of References to number its chapter.

If you want both the Bibliography and the List of Publications to be regular numbered chapters, you don't need to use this command, but instead can just pass the option [numbib] to the tocbibind package.

\documentclass{book}
\usepackage[english]{babel}
\usepackage{lipsum}
\usepackage[utf8]{inputenc}
\usepackage[resetlabels]{multibib} % option to reset the bib item numbering
\usepackage{tocbibind} % to have bibliographies with numbered or unnumbered chaps
\makeatletter
\newcommand*{\numbib}{\@donumbibtrue} % command to number the bib
\makeatother
\begin{filecontents}{bibtest.bib}
@misc{A01,
  author = {Author, A.},
  year = {2001},
  title = {Alpha},
}
@misc{B02,
  author = {Buthor, B.},
  year = {2002},
  title = {Bravo},
}
@misc{C03,
  author = {Cuthor, C.},
  year = {2003},
  title = {Charlie},
}
\end{filecontents}

\newcites{pub}{List of Publications}
\usepackage{hyperref}


\begin{document}
\tableofcontents
\cleardoublepage

\chapter{x}
\lipsum[1-4]
\section{a}
\lipsum[1-4]
\section{b}
\lipsum[1-4]
\cite{A01,B02}
\section{c}
\lipsum[1-4]

\chapter{y}
\lipsum[1-4]
\section{a}
\lipsum[1-4]
\section{b}
\lipsum[1-4]
\section{c}
\lipsum[1-4]

% references

\phantomsection
\bibliographystyle{plain}
\bibliography{bibtest}

\cleardoublepage
% appendices
\appendix
\numbib
\renewcommand{\refname}{List of Publications}
\numbib
\bibliographystylepub{plain}
\bibliographypub{bibtest}
\nocitepub{*}

\cleardoublepage

\chapter{another app}

\end{document}