I've been using example 3.11.4
of the biblatex
documentation to generate a per-chapter bibliography at the end of my thesis. It works great, until I try to make my introduction into an unnumbered chapter. Then, the introduction does not appear in the bibliography. Here's a MWE:
\documentclass{book}
\usepackage[sorting = none, style = numeric, refsegment = chapter, cite reset = chapter]{bib latex}
\usepackage{nameref}
\defbibheading{bibintoc}{%
\addcontentsline{toc}{chapter}{\bibname}%
\section*{References for Chapter \ref{refsegment:\therefsection\therefsegment} - \nameref{refsegment:\therefsection\therefsegment}}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.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}
\addbibresource{\jobname.bib}
\begin{document}
\chapter*{Introduction}
\cite{A01}
\chapter{Chapter 1}
\cite{A01,B02}
\backmatter
\printbibheading
\bibbysegment[heading = bibintoc]
\end{document}
I found a work-around, using a refsection for the unnumbered Introduction. Here's a MWE of the workaround:
\documentclass{book}
\usepackage[sorting = none, style = numeric, refsegment = chapter, cite reset = chapter]{bib latex}
\usepackage{nameref}
\defbibheading{bibintoc}{%
\addcontentsline{toc}{chapter}{\bibname}%
\section*{References for Chapter \ref{refsegment:\therefsection\therefsegment} - \nameref{refsegment:\therefsection\therefsegment}}}
\defbibheading{bibintoc2}{%
\addcontentsline{toc}{chapter}{\bibname}%
\section*{References for the \nameref{refsection:\therefsection}}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.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}
\addbibresource{\jobname.bib}
\begin{document}
\chapter*{Introduction}
\begin{refsection}
\cite{A01}
\end{refsection}
\chapter{Chapter 1}
\cite{A01,B02}
\backmatter
\printbibheading
\printbibliography[section=1,heading=bibintoc2]
\bibbysegment[heading = bibintoc]
\end{document}
I was content with this until I added an unnumbered Conclusion with citations. Then the code breaks down and biblatex
returns a nested refsections
error. Here's the MWE for that:
\documentclass{book}
\usepackage[sorting = none, style = numeric, refsegment = chapter, cite reset = chapter]{bib latex}
\usepackage{nameref}
\defbibheading{bibintoc}{%
\addcontentsline{toc}{chapter}{\bibname}%
\section*{References for Chapter \ref{refsegment:\therefsection\therefsegment} - \nameref{refsegment:\therefsection\therefsegment}}}
\defbibheading{bibintoc2}{%
\addcontentsline{toc}{chapter}{\bibname}%
\section*{References for the \nameref{refsection:\therefsection}}}
\usepackage{filecontents}
\begin{filecontents}{\jobname.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}
\addbibresource{\jobname.bib}
\begin{document}
\chapter*{Introduction}
\begin{refsection}
\cite{A01}
\end{refsection}
\chapter{Chapter 1}
\cite{A01,B02}
\chapter*{Conclusion}
\begin{refsection}
\cite{C03}
\end{refsection}
\backmatter
\printbibheading
\printbibliography[section=1,heading=bibintoc2]
\bibbysegment[heading = bibintoc]
\end{document}
Any ideas how to solve this? Or, even better, how to properly implement \chapter*
with example 3.11.4
of the biblatex
doc?
Thanks in advance for the help!