1

I asked a similar question yesterday in which asked how to remove thumbs from parts and bibliography. @Pieter van Oostrum commented with the solution which is to put \clearpage \stopthumb before \part and \printbibliography. However, I also mentioned that the thumbs did not shift down properly, which I found out later is caused by refsection in some of the chapter (I am writing a collection of manuscripts so I need individual bibliographies in addition to the main bibliography at the end). The MWE's main.tex is:

\documentclass[pdftex,10pt,b5paper,twoside]{book}

\usepackage[lmargin=25mm,rmargin=25mm,tmargin=27mm,bmargin=30mm]{geometry}

\usepackage[Glenn]{fncychap}
    \ChNameVar{\Large\fontfamily{cmbright}\selectfont\color{black}}
    \ChNumVar{\Huge\fontfamily{cmbright}\selectfont\color{black}}
    \ChTitleVar{\Large\fontfamily{cmbright}\selectfont\scshape\color{black}}

\usepackage[height={2cm},distance={5mm},topthumbmargin={auto},bottomthumbmargin={auto}]{thumbs}

\usepackage{fancyhdr}

\usepackage{lipsum}

\usepackage[backend=biber, natbib=true, style=authoryear, sorting=nyt, maxbibnames=99, maxcitenames=2, uniquename=false, uniquelist=false]{biblatex}
\addbibresource{bibliography.bib}

\newcommand{\thumbforchapter}{\addthumb{Chapter \thechapter}{\Large{\thechapter}}{white}{gray}}

\begin{document}

\pagenumbering{arabic}

\part{Introduction}

\chapter{Intro} \label{chap:1}\thumbforchapter
\lipsum[1-5] \cite{lipsum}
\clearpage \stopthumb

\part{Manuscripts}

\begin{refsection}

\chapter{Manuscript $1$} \label{chap:2}\thumbforchapter
\lipsum[6-10] \cite{lipsum}

\printbibliography[title={BIBLIOGRAPHY},heading=subbibliography]

\end{refsection}

\begin{refsection}

\chapter{Manuscript 2} \label{chap:3}\thumbforchapter
\lipsum[11-15] \cite{lipsum}

\end{refsection}

\begin{refsection}

\chapter{Manuscript 3} \label{chap:4}\thumbforchapter
\lipsum[16-20] \cite{lipsum}
\clearpage \stopthumb

\end{refsection}

\part{Conclusion}

\chapter{Conclusion} \label{chap:5}\thumbforchapter
\lipsum[21]

\clearpage \stopthumb

\printbibliography

\end{document}

The MWE's bibliography.bib is:

@Manual{lipsum,
    title = {lipsum -- Easy access to the Lorem Ipsum dummy text},
    author = {Patrick Happel},
    year = {2014},
    note = {\LaTeX~package version 1.3},
    url = {https://www.ctan.org/pkg/lipsum},
}

How do I prevent refsection from interrupting with the thumbs?

Also, is it possible to remove thumbs from the chapter page?

1 Answer 1

1

An environment like \begin{refsection}...\end{refsection} implies a group, which means that everything that happens inside that group is local to the group unless it is specifically declared global.

In particular the position calculations of \addthumb are done via local assignments, so the position does not take the \thumbforchapter inside refsections into account.

One way to resolve this would be to make thumb use global counter operations everywhere (almost all of its other operations are already global). (That said, it is generally quite unusual to have grouping across large parts of the document, so I can imagine that the thumb package author did not want to account for that.)

Unfortunately, the required code changes would be fairly far-reaching (an earlier version of the answer contained a fix that only worked for in some situations, a real solution would have to be much more comprehensive).

Another solution that works in the MWE (because there are no citations in the chapter headings) is to move the \thumbforchapter outside the refsection.

\documentclass[10pt,b5paper,twoside]{book}
\usepackage[lmargin=25mm,rmargin=25mm,tmargin=27mm,bmargin=30mm]{geometry}
\usepackage[Glenn]{fncychap}
    \ChNameVar{\Large\fontfamily{cmbright}\selectfont\color{black}}
    \ChNumVar{\Huge\fontfamily{cmbright}\selectfont\color{black}}
    \ChTitleVar{\Large\fontfamily{cmbright}\selectfont\scshape\color{black}}
\usepackage[height={2cm},distance={5mm},topthumbmargin={auto},bottomthumbmargin={auto}]{thumbs}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage[backend=biber, style=authoryear,]{biblatex}
\addbibresource{biblatex-examples.bib}

\newcommand{\thumbforchapter}{\addthumb{Chapter \thechapter}{\Large{\thechapter}}{white}{gray}}

\begin{document}
\pagenumbering{arabic}
\part{Introduction}

\chapter{Intro} \label{chap:1}\thumbforchapter
\lipsum[1-5] \cite{sigfridsson}
\clearpage \stopthumb

\part{Manuscripts}

\chapter{Manuscript $1$} \label{chap:2}\thumbforchapter
\begin{refsection}
\lipsum[6-10] \cite{sigfridsson}

\printbibliography[title={BIBLIOGRAPHY},heading=subbibliography]
\end{refsection}

\chapter{Manuscript 2} \label{chap:3}\thumbforchapter
\begin{refsection}
\lipsum[11-15] \cite{sigfridsson}
\end{refsection}

\chapter{Manuscript 3} \label{chap:4}\thumbforchapter
\begin{refsection}
\lipsum[16-20] \cite{sigfridsson}
\clearpage \stopthumb
\end{refsection}

\part{Conclusion}

\chapter{Conclusion} \label{chap:5}\thumbforchapter
\lipsum[21]

\clearpage \stopthumb

\printbibliography

\end{document}
3
  • Wow -- thank you, @moewe. I am really impressed by our answer. There are however a few flaws with the first alternative: thumbs on pages 4, 8, and 10 are out of position. The second alternative works as charm though. :) Commented Mar 24, 2021 at 12:15
  • @naughty_waves Oh yeah. Sorry, I didn't notice that. I had another look at thumb and found quite a number of other local assignments that have to be made global. I removed the half-working fix.
    – moewe
    Commented Mar 24, 2021 at 15:29
  • Thank you again, @moewe. I am grateful for your help. :) Commented Mar 26, 2021 at 10:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .