1

Using biblatex I have a simple problem with the bibliography appearing in the table of contents. I want an entry without a chapter number. This works fine using the option heading=bibintoc for the default layout. However, if I change the defintion of the chapter heading (see the example), the entry in the toc is correct, but the chapter itself starts with the number of the previous chapter.

Furthermore, the same happens with toc=bibliography as a koma option, but toc=listof works fine. And I think it worked for the bibliography in the past, too.

Btw, the packages are up-to date (biblatex 2015/04/19 v3.0, scrbook 2015/07/02 v3.18).

Here is the tex-file:

\documentclass[oneside]{scrbook}

\usepackage[backend=bibtex]{biblatex}
\bibliography{MWE}

% For normal chapter
\makeatletter
\def\thickhrulefill{\leavevmode \leaders \hrule height 1ex \hfill \kern \z@}
\def\@makechapterhead#1{%
  \vspace*{20\p@}
  {\parindent \z@
    {\centering \reset@font
      \scshape  \large \@chapapp{} \thechapter\par\nobreak}
    \par\nobreak
    \vspace*{18\p@}
    \interlinepenalty\@M
    {\centering \Huge \bfseries #1\par\nobreak}
    \par\nobreak
    \vskip 35\p@
  }}

 % For list of contents etc.
\def\@makeschapterhead#1{%
  \vspace*{20\p@}%
  {\parindent \z@
    {\centering \reset@font
      \scshape \vphantom{\@chapapp{} \thechapter}\par\nobreak}%
    \par\nobreak
    \vspace*{18\p@}
    \interlinepenalty\@M
    {\centering \Huge \bfseries #1\par\nobreak}%
    \par\nobreak
    \vskip 33\p@
  }}
\makeatother

\begin{document}

\tableofcontents

\chapter{First Chapter}
Test text \cite{einstein}.

%\printbibliography[heading=bibliography]
\printbibliography[heading=bibintoc]
\end{document}

And here an example bib-file:

@article{einstein,
    author =       "Albert Einstein",
    title =        "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
        [{On} the electrodynamics of moving bodies]",
    journal =      "Annalen der Physik",
    volume =       "322",
    number =       "10",
    pages =        "891--921",
    year =         "1905",
    DOI =          "http://dx.doi.org/10.1002/andp.19053221004"
}
2

Do not redefine the internal commands \@makechapterhead and \@makeschapterhead. You can use \RedeclareSectionCommand and redefine \raggedchapter instead. If there should be no \autodot only for chapters you must also redefine \chapterformat.

\begin{filecontents*}{MWE.bib}
@article{einstein,
    author =       "Albert Einstein",
    title =        "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
        [{On} the electrodynamics of moving bodies]",
    journal =      "Annalen der Physik",
    volume =       "322",
    number =       "10",
    pages =        "891--921",
    year =         "1905",
    DOI =          "http://dx.doi.org/10.1002/andp.19053221004"
}
\end{filecontents*}
\documentclass[oneside
  ,chapterprefix
]{scrbook}

\usepackage[backend=bibtex]{biblatex}
\addbibresource{MWE.bib}

\RedeclareSectionCommand[
  beforeskip=34pt,
  innerskip=18pt,
  afterskip=35pt,
  font=\Huge\rmfamily,
  prefixfont=\normalfont\large\scshape
]{chapter}
\renewcommand*\raggedchapter{\centering}
\renewcommand*\raggedchapter{\centering}
\renewcommand*{\chapterformat}{% only if \autodot should be removed for chapters
  \mbox{\chapappifchapterprefix{\nobreakspace}\thechapter\IfUsePrefixLine{}{\enskip}}%
}

\begin{document}
\tableofcontents
\chapter{First Chapter}
Test text \cite{einstein}.
\printbibliography[heading=bibintoc]
\end{document}

enter image description here

  • Worked fine. Is there a good page with example layouts consistent with the koma-script? I think my code was adopted from zoonek.free.fr/LaTeX/LaTeX_samples_chapter/0.html which always uses \@makechapterhead – Jan Sep 30 '15 at 10:26
  • @Jan The page you linked provides samples for changing the standard classes. KOMA-Script is much more advanced and the documentation should be the place to look for information. – Johannes_B Oct 3 '15 at 7:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.