# Add bib to toc with custom chapter style

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@}
\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.
\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}.

\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"
}


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}

\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}.

• 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