9

I want to send a dissertation document with chapterthumbs to the printing house. The document is written in KOMA-Script and a good solution for bleed correction is found here. Since chapterthumbs are sitting at the edge of the pages in black I want to make sure that there is a bleed correction for that too before sending out the document. Otherwise, due to imprecise cutting process (which is expected), unwanted white margins could appear at the edge of the pages where chapterthumbs are sitting.

Question
How to provide a bleed correction for the chapterthumbs themselves, i.e. extend their black color to the bleed correction area as in the image below?

Output

enter image description here

Consider the MWE below, where chapterthumbs are provided and bleed correction using crop package. What is missing is bleed correction for the chapterthumbs themselves.

MWE Code

\documentclass[paper=a4, twoside=semi]{scrbook} % A4 is 210mm x 297mm
\usepackage[cross,center,width=216mm,height=303mm]{crop} % bleed is 6mm
\usepackage{blindtext}
\usepackage{calc}%
\usepackage{chapterthumb}% package should be installed in the same active folder
\usepackage{etoolbox}%
\usepackage{nameref}%
\usepackage{totcount}
\regtotcounter{chapter}%
%=====================Bibliography=============================
\usepackage{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}
%=========================Chapter thumbs========================
\AtBeginDocument{%
\ifnumequal{\number\totvalue{chapter}}{0}{%
\renewcommand{\chapterthumbwidth}{\paperheight}%
\renewcommand{\chapterthumbskip}{\paperheight}%
}{%
\typeout{There are \number\totvalue{chapter} chapter in this document}%
\renewcommand{\chapterthumbskip}{\paperheight/\number\totvalue{chapter}}%
\renewcommand{\chapterthumbwidth}{\paperheight/\number\totvalue{chapter}}%
}%
}%

\lohead[\putchapterthumb]{\putchapterthumb}
\addtokomafont{chapterthumb}{\bfseries}

\newrobustcmd{\SetChapterThumbHeader}{%
\lohead[\putchapterthumb]{\putchapterthumb}%
}%

\newrobustcmd{\ClearChapterThumbHeader}{%
\lohead[]{}%
}%

\newrobustcmd{\refcommand}[1]{%
\nameref*{#1}%
}%

\newtoggle{UseChapterThumb}%
\toggletrue{UseChapterThumb}%

\renewcommand*{\chapterthumbformat}{\refcommand{chapter::title::\number\value{chapter}}}%

\makeatletter

\newcounter{totalchaptercounter}%

\newrobustcmd{\CreateUniqueChapterLabel}[1]{% 
\refstepcounter{totalchaptercounter}%
\label{chapter::title::\number\value{totalchaptercounter}}%
}%


\let\LaTeXStandardChapter\chapter%

\newcommand{\chapter@noopt}[1]{%
\iftoggle{UseChapterThumb}{\SetChapterThumbHeader}{\ClearChapterThumbHeader}
\LaTeXStandardChapter{#1}%
\CreateUniqueChapterLabel{#1}%
}%

\newcommand{\chapter@opt}[2][]{%
\iftoggle{UseChapterThumb}{\SetChapterThumbHeader}{\ClearChapterThumbHeader}
\LaTeXStandardChapter[#1]{#2}%
\CreateUniqueChapterLabel{#2}% Must appear after chapter title is done
}%


\newcommand{\unstarredchapter}{%
\@ifnextchar[{\chapter@opt}{\chapter@noopt}%
}%

\newcommand{\starredchapter}[1]{%
\ClearChapterThumbHeader% Clear the headers -> no chapterthumb here 
\LaTeXStandardChapter*{#1}%   
}%

\renewcommand{\chapter}{%
\@ifstar{\starredchapter}{\unstarredchapter}%
}%


\let\LaTeXStandardTOC\tableofcontents%
\renewcommand{\tableofcontents}{%
\begingroup%
\renewcommand{\chapter}{\LaTeXStandardChapter}%
\LaTeXStandardTOC%
\endgroup%
}%


\let\LaTeXStandardLOF\listoffigures%
\renewcommand{\listoffigures}{%
\begingroup%
\renewcommand{\chapter}{\LaTeXStandardChapter}
\LaTeXStandardLOF%
\endgroup
}%

\let\LaTeXStandardLOT\listoftables%
\renewcommand{\listoftables}{%
\begingroup%
\renewcommand{\chapter}{\LaTeXStandardChapter}
\LaTeXStandardLOT%
\endgroup
}%


\let\LaTeXStandardPrintBibliography\printbibliography%


\newrobustcmd{\commonprintbibliographysetup}[1][]{%
\iftoggle{UseChapterThumb}{\SetChapterThumbHeader\refstepcounter{chapter}}{\ClearChapterThumbHeader}
\LaTeXStandardPrintBibliography[#1]
\iftoggle{UseChapterThumb}{%
\immediate\write\@auxout{%
\string\newlabel{chapter::title::\number\value{chapter}}{{\thepage}{\thepage}{Bibliography}{}}%
}%
}{}%
}%



\newrobustcmd{\printbibliography@@noopt}{%
\commonprintbibliographysetup[]%
}%

\newrobustcmd{\printbibliography@@opt}[1][]{%
\commonprintbibliographysetup[#1]%
}

\renewcommand{\printbibliography}{%
\@ifnextchar[{\printbibliography@@opt}{\printbibliography@@noopt}%
}%

\makeatother
%==================================================
\title{Title of the Dissertation}
\author{Author Name} 
\publishers{Faculty Name}

\begin{document}
\maketitle
\pagestyle{plain}
\pagenumbering{roman}
\tableofcontents
\listoffigures
\listoftables
\cleardoublepage

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

\chapter*{Abstract}
\addcontentsline{toc}{chapter}{Abstract}
\cleardoublepage
\lohead[\putchapterthumb]{\putchapterthumb}
\mainmatter
\pagestyle{scrheadings}

\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
\cleardoublepage
\printbibliography[heading=bibintoc]
\end{document}

Update1: MWE based on Symbol's solution
I wonder what might cause this inequality in the crosses.

enter image description here

doctorate
  • 4,173
  • Is the total bleed 6mm or on each side? –  Aug 28 '14 at 09:14
  • Hi, total 6mm, i.e. 3mm on each side. – doctorate Aug 28 '14 at 09:16
  • I removed my comment, it was an error by me –  Aug 28 '14 at 09:32
  • I don't believe, that is an issue at all. The crop marks are cut away, just leaving the content inside the rectangle defined by the crosses. You will see, if you add the frame option, i.e. \usepackage[...,frame]{crop} –  Aug 28 '14 at 09:36
  • theoretically this is true if the cutting process would be 100% correct, but in reality it is not. That's why bleed correction is necessary to be sure that there would always be black color at the edge to compensate for any imprecise cutting action. The answer here explains it well: http://tex.stackexchange.com/questions/65170/what-is-bleed-and-how-do-i-achieve-it – doctorate Aug 28 '14 at 09:56
  • There is nothing I can say about that... How about a test? –  Aug 28 '14 at 15:10
  • A test print by the company? Just for one page? –  Aug 28 '14 at 17:02
  • @ChristianHupfer -- nice idea, but just one page won't prove anything. the trimmer doesn't get used until the thing is bound, at which point not all pages are necessarily aligned perfectly evenly, so what is true for one page is not necessarily true for another in the same volume. the inked area for a bleed really does have to extend outside the crop area. – barbara beeton Aug 28 '14 at 17:11
  • where can one find the chapterthumbs package? ctan search doesn't find it. – barbara beeton Aug 28 '14 at 17:15
  • @barbarabeeton: It's inside the KOMA examples...http://www.ctan.org/tex-archive/info/examples/KOMA-Script-5/Anhang-B/source –  Aug 28 '14 at 17:16
  • @ChristianHupfer, as a PDF file the chapterthumbs are wonderfully placed at the edge. But I believe the idea of chapterthumb shines the most when you hold the book and thumb it through giving the reader a sense of navigation. Besides, when you look at the white stack of papers you should see clearcut black patches of the chapterthumbs, but that cannot be guaranteed at all unless a bleed correction is beforehand provided. – doctorate Aug 28 '14 at 17:55

1 Answers1

5

Replacing

\usepackage[cross,center,width=216mm,height=303mm]{crop} % bleed is 6mm

by

\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

results and .

Idea

In the following MWE we could see that every page is duplicated and reflected. Hence every thumb index will not stop at the logical edge but seems exceeding it. This trick works no matter how you generate thumb indexes or any other typographic thing requiring bleed correction.

Be careful that since the black box below is not a single box but consists of two, the logical edge may still be uninked. This can be easily fixed by replacing \kern2\dimen0 by \kern2\dimen0\kern-1pt.

\documentclass[oneside]{book}
\usepackage[mirror,cam,a2,center]{crop}
\usepackage{thumb,blindtext}
\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{MyTitle}
\begin{document}
    \blinddocument
\end{document}

Antisymmetry

For antisymmetry, please add % at appropriate position so that the newline will not produce any space in horizontal mode.

\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}}

TOC items duplicated issue

This happens simply because every toc-command is executed twice. So you may either

  • Delete duplicated items in .toc file by hand; or
  • Turn on and off \contentsline on the fly, as follows.

    \makeatletter
    \newsavebox\WholePageBigBox
    \renewcommand*\CROP@genreflect[1]{%
        \leavevmode
        \savebox\WholePageBigBox{\hb@xt@\paperwidth{\vbox to\paperheight{#1\vss}\hss}}%
            \write\@auxout{\noexpand\TurnOn@writefile}%
            \usebox\WholePageBigBox%
            \write\@auxout{\noexpand\TurnOff@writefile}%
            \dimen0\CROP@horigin\kern2\dimen0\reflectbox{\usebox\WholePageBigBox}}
    \let\old@writefile=\@writefile
    \newcommand*\lazy@writefile[2]{}
    \newcommand*\TurnOn@writefile{\renewcommand\@writefile\old@writefile}
    \newcommand*\TurnOff@writefile{\renewcommand\@writefile\lazy@writefile}
    \makeatother
    
Symbol 1
  • 36,855
  • In the first solution which was great, there is one more issue as you may notice the cross marks on the right vs. left are not equal in thickness. Do you know by chance why? – doctorate Sep 01 '14 at 07:27
  • pls have a look at the update. – doctorate Sep 01 '14 at 07:42
  • I noticed the antisymmetry when I posed the answer. But so far I have no idea why. It seems like \WholePageBigBox has weird margin and is not symmetric. – Symbol 1 Sep 01 '14 at 08:07
  • not passing cross option should get rid of this bug. But I wanted to be on guards whether something else was going wrong. – doctorate Sep 01 '14 at 08:20
  • when I applied this code to my dissertation, this inequality gets more obvious and the chapterthumbs were not inked see update2 for an image of the output. – doctorate Sep 01 '14 at 08:23
  • @doctorate I edited my answer and I think everything is fine now. – Symbol 1 Sep 01 '14 at 08:38
  • your update has fixed the MWE, but unfortunately I couldn't get it right with the dissertation, it remained the same as in update2 image. I am now trying to put the code differently in the preamble because of may be some interaction with other packages, I don't know how to figure this out. – doctorate Sep 01 '14 at 09:42
  • no matter where I put the code in the preamble, I still have the same problem. Perplexed! – doctorate Sep 01 '14 at 09:43
  • can you pls have a look at the interaction problem presented in update3? your help would be very much appreciated. – doctorate Sep 01 '14 at 11:03
  • @doctorate Since you \usepackage{fontspec}, would you like to compile your document by XeLaTeX? On my computer both your and my MWE pass. (Meanwhile, yes, pdflatex reports fatal fontspec error...) – Symbol 1 Sep 01 '14 at 14:15
  • I always compile with XeLaTeX. Problem appears only when I pass the mirror option in crop package along with the above font packages. So my conclusion is that mirror option has something to do with the fonts packages. – doctorate Sep 01 '14 at 14:23
  • can you pls check whether you have double entry of chapters in the table of contents in your answer. I did get the same result but that double entry is now the only problem. Your help is much appreciated. – doctorate Sep 05 '14 at 09:53
  • @doctorate sorry I did not found this bug before. (I will not call it bug since it happens naturally.) Anyway... I updated my answer. – Symbol 1 Sep 05 '14 at 13:28
  • Thanks, but can we continue on chat? – doctorate Sep 05 '14 at 14:23
  • @doctorate I updated TOC-issue again. check it out – Symbol 1 Sep 05 '14 at 16:32
  • Worked great. thanks a lot. that fixed the the dissertation also. One minor issue. There are duplicates of bookmarks made their way into the PDF file. I think this is related to the hyperref package and duplicate headers maybe. Of course one can delete the duplicated bookmarks manually. But you may spot that for completeness of your code. Thanks a gain for your efforts. – doctorate Sep 05 '14 at 19:13
  • @doctorate hyperref is a monster... Before I work it out, you could have your e-version compiled without mirror. Since bleed correction and PDF-bookmark need not exist simultaneously, I guess. – Symbol 1 Sep 06 '14 at 13:55