3

I want my bibliography to appear as a chapter with a page number on its page as well as in the TOC. I tried including \usepackage[numbib]{tocbibind} but that doesn't work for me. Here is a simple example:

\documentclass[]{scrartcl} \usepackage[ngerman]{babel} \usepackage[nottoc, numbib]{tocbibind} \usepackage{biblatex} \usepackage{lipsum} \bibliography{sources.bib} \title{Testdokument} \begin{document} \maketitle \tableofcontents \section{Erstes Kapitel} \lipsum \cite{Bib1} \clearpage \printbibliography \addcontentsline{toc}{section}{\bibname} \end{document} 

Source.bib just contains 1 entry for testing:

@online {Bib1, url = {https://www.123.com}, title = {Website title}, urldate = {2018-06-06} } 

enter image description here

enter image description here

1 Answer 1

4

Don't use tocbibind with KOMA classes like scrartcl. From the .log file:

Class scrartcl Warning: Usage of package `tocbibind' together (scrartcl) with a KOMA-Script class is not recommended. (scrartcl) I'd suggest to use options like `listof=totoc' (scrartcl) or `bibliography=totoc', or commands like (scrartcl) `\setuptoc{toc}{totoc}' instead of this package, (scrartcl) because it breaks several KOMA-Script features of (scrartcl) the list of figures, list of tables, bibliography, (scrartcl) index and the running head. 

Use a class option instead. In this case bibliography=numbered.

\documentclass[bibliography=numbered]{scrartcl} \usepackage[ngerman]{babel} \usepackage{csquotes} \usepackage{biblatex} \usepackage{lipsum} \bibliography{biblatex-examples.bib} \title{Testdokument} \begin{document} \maketitle \tableofcontents \section{Erstes Kapitel} \lipsum \cite{sigfridsson} \clearpage \printbibliography \end{document} 

TOC of the MWE 1 "Erstes Kapitel", 2 "Literatur"

Last page of the MWE: The bibliography with heading: "2 Literatur"

The compatibility between KOMA script options and biblatex's headings was improved recently. Earlier versions of biblatex could only deal with KOMA options if they were given as global class options (because biblatex intercepted the options), newer versions hand control over the bibliography heading over to KOMA script. You can read more about that in Add bibliography to toc with KOMA-Script.

Note that \addcontentsline{toc}{section}{\bibname} would have been wrong anyway since it writes the last page of the bibliography to the table of contents.


If you don't use a KOMA class tocbibind still does not do the right thing (it does not produce a warning, though). tocbibind does not work together with biblatex at all, in that case you should use the optional argument heading=bibnumbered to \printbibliography

\documentclass{article} \usepackage[ngerman]{babel} \usepackage{csquotes} \usepackage{biblatex} \usepackage{lipsum} \bibliography{biblatex-examples.bib} \title{Testdokument} \begin{document} \maketitle \tableofcontents \section{Erstes Kapitel} \lipsum \cite{sigfridsson} \clearpage \printbibliography[heading=bibnumbered] \end{document} 

The optional argument \printbibliography[heading=bibnumbered] also works for KOMA classes, but I prefer the class argument in that case (if you decide to switch back from biblatex to BibTeX bibliographies, for example).

2
  • But that still doesn't solve the problem with the number. Commented Sep 20, 2018 at 11:00
  • @11011100 Please check the edit, I wrote bibliography=totoc at first when it should have been bibliography=numbered. Commented Sep 20, 2018 at 11:03

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.