3

In the following example, I use "biblatex" and "thumbs" packages. I need an overview page of thumbs - see page 5 of the document. I have 13 chapter in my book, but only 6 chapter in the overview (see picture).

If I remove "biblatex" and "csquote" package from preamble, then I have, as forecasted my 13 chapter in my overview page.

\documentclass[twoside]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[frenchb]{babel}
\usepackage[hyperindex=false, linktoc=all]{hyperref} 
\hypersetup{colorlinks=true,linkcolor=blue, citecolor=blue}
\usepackage[thumblink=none,linefill=dots,height={auto},minheight={33pt},%
            width={40pt},distance={2mm},topthumbmargin={40pt},bottomthumbmargin={40pt},%
            nophantomsection=false,ignorehoffset=true,ignorevoffset=true,final=true,%
            hidethumbs=false,verbose=true]{thumbs}           
\usepackage{lipsum}
\usepackage[backend=bibtex, style=authoryear, backref, useprefix=true]{biblatex}
\usepackage{csquotes}

\begin{document}
\pagenumbering{arabic}
\section*{Example for thumbs}
\tableofcontents
\addthumbsoverviewtocontents{chapter}{Thumb marks overview}
\thumbsoverview{Table of Thumbs}

\chapter{Chaptitre 1}
\addthumb{First Chap}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 2}
\addthumb{Chaptitre 2}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 3}
\addthumb{Chaptitre 3}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 4}
\addthumb{Chaptitre 4}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 5}
\addthumb{Chaptitre 5}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 6}
\addthumb{2Chaptitre 6}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 7}
\addthumb{Chaptitre 7}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 8}
\addthumb{Chaptitre 8}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 9}
\addthumb{Chaptitre 9}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 10}
\addthumb{Chaptitre 10}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 11}
\addthumb{Chaptitre 11}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 12}
\addthumb{Chaptitre 12}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 13}
\addthumb{Chaptitre 13}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]
\end{document}

enter image description here

Compile 3 times. Linux Debian Mint Edition, TeXLive, TeXmaker 4.5

  • Welcome to TeX.SX! Nice problem! – egreg Jun 1 '16 at 13:31
  • I can reproduce the problem, it indeed disappears if biblatex is uncommented. – moewe Jun 1 '16 at 15:18
  • biblatex inserts lines in the .tmb-file (as it patches \addtocontents) and as thumbs inserts "line 1 to 13" of file tmb the count goes out of sync. – Ulrike Fischer Jun 1 '16 at 15:55
3

As mentioned in the comments biblatex patches \addtocontents to insert code in the various toc-files and so confuse the thumbs counter. You can patch thumbs like this:

\documentclass[twoside]{book}

%save the old definition:
\let\oldaddtocontents\addtocontents

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[frenchb]{babel}

\usepackage[backend=bibtex, style=authoryear, backref, useprefix=true]{biblatex}
\usepackage{csquotes}

\usepackage[hyperindex=false, linktoc=all]{hyperref}
\hypersetup{colorlinks=true,linkcolor=blue, citecolor=blue}

\usepackage[thumblink=none,linefill=dots,height={auto},minheight={33pt},%
            width={40pt},distance={2mm},topthumbmargin={40pt},bottomthumbmargin={40pt},%
            nophantomsection=false,ignorehoffset=true,ignorevoffset=true,final=true,%
            hidethumbs=false,verbose=true]{thumbs}

\usepackage{xpatch}
%restore (twice!) the definition in \addthumb:
\xpatchcmd{\addthumb}{\addtocontents}{\oldaddtocontents}{}{}            
\xpatchcmd{\addthumb}{\addtocontents}{\oldaddtocontents}{}{}

\usepackage{lipsum}


\begin{document}
\pagenumbering{arabic}
\section*{Example for thumbs}
\tableofcontents

\addthumbsoverviewtocontents{chapter}{Thumb marks overview}
\thumbsoverview{Table of Thumbs}

\chapter{Chaptitre 1}
\addthumb{First Chap}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 2}
\addthumb{Chaptitre 2}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 3}
\addthumb{Chaptitre 3}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 4}
\addthumb{Chaptitre 4}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 5}
\addthumb{Chaptitre 5}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 6}
\addthumb{2Chaptitre 6}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 7}
\addthumb{Chaptitre 7}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 8}
\addthumb{Chaptitre 8}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 9}
\addthumb{Chaptitre 9}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 10}
\addthumb{Chaptitre 10}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 11}
\addthumb{Chaptitre 11}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 12}
\addthumb{Chaptitre 12}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]

\chapter{Chaptitre 13}
\addthumb{Chaptitre 13}{\Huge{\textbf{\arabic{chapter}}}}{white}{gray}
\newpage
\lipsum[1]
\end{document}

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.