0

Every chapters and sections of my document within the TOC are pointing to the right places, except the bibliography.

How to fix that?

MWE:

\documentclass[a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage[british,UKenglish,USenglish,american]{babel}
\usepackage[T1]{fontenc}

% Biblatex references:
\usepackage[
backend=bibtex,
style=authoryear
]
{biblatex}
\DeclareNameAlias{sortname}{last-first}
\renewbibmacro{in:}{}
\setlength\bibitemsep{0.8\baselineskip}
\addbibresource{bib.bib}


\usepackage[
 unicode=true,
 bookmarks=true,
 bookmarksnumbered=true,
 bookmarksopen=true,
 bookmarksopenlevel=1,
 breaklinks=false,
 pdfborder={0 0 1},
 backref=false,
 colorlinks=false
 ]
 {hyperref}

\hypersetup{
 colorlinks=false,
 linkbordercolor={0 0.8 0.2},
 linktoc=section
 }


\usepackage{minitoc}
\mtcsettitle{minitoc}{Contents of chapter\,:}
\mtcsetrules{*}{off}
\mtcsetoffset{minitoc}{-2.0em}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\thispagestyle{empty}
\pagenumbering{gobble} 
\renewcommand{\tablename}{Table}

\title{Title}

\author{\normalsize{\textsc{Name} First Name}}
\date{\small{\today}}


\maketitle

\vspace*{-12mm}

\dominitoc

\tableofcontents  

\newpage{}
\renewcommand{\listfigurename}{Figures list}
\listoffigures \addcontentsline{toc}{chapter}{Figures list} \mtcaddchapter   

\newpage{}
\renewcommand{\listtablename}{Tables list}
\listoftables \addcontentsline{toc}{chapter}{Tables list} \mtcaddchapter 


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage{}
\chapter*{Sumary}
\markboth{Sumary}{Sumary}
\addstarredchapter{Sumary}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\minitoc
stuff

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage{}
\chapter*{Introduction}
\markboth{Introduction}{Introduction}
\addstarredchapter{Introduction}
\minitoc
other stuff

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage{}
%\chapter*{Bibliography} % Test: if I un-comment this line, I got two "References" chapters then.
\markboth{References}{References}
\addstarredchapter{References}
\printbibliography%[]
\nocite{*}
%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
1

Just use it like this:

\printbibliography%[]
\markboth{References}{References}
\addstarredchapter{References}
| improve this answer | |
  • So simple? I can't believe it... Thanks. – s.k Jul 9 '17 at 13:24
  • The \addstarredchapter -command needs to be set after \printbibliography otherwise hyperref will think it still belongs to your Introduction. Same behaviour as for labels. You're welcome! – rolly Jul 9 '17 at 13:27
  • I just see now that the page for the bibliography in the TOC is the last page of the bibliography, not the first one with this method. How to fix that? – s.k Jul 21 '17 at 14:40
2

This won't work correctly as it print the last page for the bibliography in the TOC.

Instead, you have better to simply insert your bibliography like (it works with biblatex):

\printbibliography[title={References},heading=bibintoc]
\markboth{References}{References}

As explained here: Bibliography not in ToC when using biblatex/biber
or here: Wrong page number of References in toc (scrreprt)
for example.

| improve this answer | |

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.