0

This question is similar to previous ones considering chapterthumbs -- answering this question will render them obsolete.

Why this post then? The reason is that the new version of chapterthumb is based on another package called scrlayer-scrpage of the KOMA-script instead of the old one scrpage2. For more info see this reference (in German): http://www.komascript.de/chapterthumbs-example

What is needed:
The MWE will present the current problem of compilation of my dissertation as well as fulfill the criteria of the printing house where suitable bleed correction must be provided. So the objectives are:

  1. Change the text of the chapterthumbs from Chapter 1 to Introduction, Chapter 2 to Materials & Methods, and so forth.
  2. The chapterthumbs should be spread over the whole right edge -- introduction thumb begins at the top right and bibliography thumb ends at the bottom right. Of course the crop area should not be calculated. One can do this without crop package and without its related code and when chapterthumbs distributed correctly one can reload the crop code later one.
  3. Chapterthumbs should only appear in intro - M&M - Discussion - Results and Bibliography. So it needs to show up in the Bibliography as well.

MWE

\documentclass[paper=a4, twoside=semi]{scrbook} % A4 is 210mm x 297mm
\usepackage{blindtext}
\usepackage{fontspec} 
%=====================Bibliography=============================
\usepackage[backend=biber]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{jobname.bib}
@article{rand_objective_1971,
    title = {Objective criteria for the evaluation of clustering methods},
    volume = {66},
    pages = {846},
    number = {336},
    journaltitle = {Journal of the American Statistical Association},
    author = {Rand, William M.},
    date = {1971}
}
\end{filecontents}
\addbibresource{jobname.bib}
%===================Chapterthumb ===============================
\usepackage{chapterthumb}% install + add in active .tex folder
\usepackage{scrlayer-scrpage}
\pagestyle{scrheadings}
\AddLayersToPageStyle{@everystyle@}{chapterthumb}
\addtokomafont{chapterthumb}{\bfseries}
%====================Crop and Bleed correction==================
\usepackage[mirror,cross,center,width=216mm,height=303mm]{crop} % bleed is 6mm
    \makeatletter
    \newsavebox\WholePageBigBox
    \renewcommand*\CROP@genreflect[1]{
        \leavevmode
        \savebox\WholePageBigBox{\hb@xt@\paperwidth{\vbox to\paperheight{#1\vss}\hss}}%
        \usebox\WholePageBigBox\dimen0\CROP@horigin\kern2\dimen0\reflectbox{\usebox\WholePageBigBox}}
    \makeatother
%===============================================================
\title{Title of the Dissertation}
\author{Author Name} 
\publishers{Faculty Name}

\begin{document}
\maketitle
\pagenumbering{roman}
\tableofcontents
\listoffigures
\listoftables

\chapter*{Acknowledgments}
\addcontentsline{toc}{chapter}{Acknowledgments}

\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract}

\mainmatter
\chapter{Introduction}
\begin{figure}
\caption{dummy figure}
\end{figure}

\chapter{Materials \& Methods} 

\chapter{Results} 
\begin{table}
\caption{dummy table}
\end{table}

\chapter{Discussion}
In his reference \parencite{rand_objective_1971}, the author did a nice job.
\backmatter
\printbibliography[heading=bibintoc]
\chapter*{Curriculum Vitae} %there should be no chapterthumbs here
\end{document}

Output
enter image description here

Notes

  • Pls make sure you have the updated version of LaTeX distribution whether MikTeX or TexLive. To use the chapterthumb in the MWE one should install KOMA examples from the latex distribution package manager. the chapterthumb.sty resides in the Angang B. Additionally, one should copy the chapterthumb.sty and paste it in the active .tex folder.
  • Windows 7 32bit but the same problem was encountered on Ubuntu 14.04 LTS OS.
  • TexLive 2014 distribution XeTeX, Version 3.14159265-2.6-0.99991 (TeX Live 2014/W32TeX)
  • compilation with XeLaTeX

Update1
This code would solve the chapternames instead of their numbers and was extracted from previous posts using nameref and etoolbox packages. This can be added between the section of chapterthumb and crop bleed correction in the MWE.

%==================== to show chapter names instead of their numbers ========
\usepackage{etoolbox}
\usepackage{nameref}    
\let\LaTeXStandardChapter\chapter%
    \renewcommand*{\chapterthumbformat}{\refcommand{chapter::title::\number\value{chapter}}}%
    \makeatletter
    \newcounter{totalchaptercounter}%
    \newrobustcmd{\WriteChapterTitleToAux}[1]{%
    \refstepcounter{totalchaptercounter}%
    \immediate\write\@auxout{%
    \string\newlabel{chapter::title::\number\value{totalchaptercounter}}{{\thesection}{\thepage}{\unexpanded{#1}}{}}
    }% End of writing to AUX file
    }%
    \newrobustcmd{\refcommand}[1]{%
    \nameref*{#1}%
    }%
    \newcommand{\chapter@noopt}[1]{%
    \WriteChapterTitleToAux{#1}%
    \LaTeXStandardChapter{#1}%
    }%
    \newcommand{\chapter@opt}[2][]{%
    \WriteChapterTitleToAux{#2}%
    \LaTeXStandardChapter[#1]{#2}%
    }%
    \newcommand{\unstarredchapter}{%
    \@ifnextchar[{\chapter@opt}{\chapter@noopt}%
    }%
    \newcommand{\starredchapter}[1]{%
    \LaTeXStandardChapter*{#1}
    }%
    \renewcommand{\chapter}{%
    \@ifstar{\starredchapter}{\unstarredchapter}%
    }%

Output
enter image description here

Andrew Dunning
  • 1,714
  • 13
  • 21
doctorate
  • 4,173
  • 1
    Is your font libertine and Inconsolata neccessary to show the error? If not, it is better to build a MWE with LaTeX standard font lmodern (because not everyone has libertine installed, but Latin Modern ...) – Mensch Sep 04 '14 at 08:28
  • I had a bad interaction in the older TexLive distribution with the font packages in the bleed correction post. Anyway to make life easier of course I can remove it by now, chances are this problem should've been solved by the updated TexLive. – doctorate Sep 04 '14 at 08:32
  • Is this really a question (and if so: What is the question)? IMHO this is more a kind of statement or the answer to a question (either one or more of the linked question or a not yet asked question). – Schweinebacke Jan 25 '19 at 10:22
  • Please, if I'm right, and this is a mixture of a question and your own answer, can you split the answer from the question and post it as an answer? If I'm wrong, can you clarify the question and explain what should be different than reached by your own example? – Schweinebacke Apr 15 '19 at 13:21

0 Answers0