# Is it possible to use chapterthumbs to create a specific shape?

Is there a method available to draw shapes on the paper side of a closed book using LaTeX, e.g. by manipulating chapterthumbs?

As an example of what I mean see the below figure but instead of such complicated figures it can be something like a spiral.

• Yes, this is possible, but I'd not modify chapterthumbs for it. Instead I'd use esopic or similar to place code on each page. What's difficult is to get the shape for each page such that you'll get symbols like those. Jan 14 '20 at 15:08

This does something of the sort. As @Skillmon mentions, you need only eso-pic. Further thanks go to @Skillmon for explaining the question to me. Other than that you need to slice the graphics. Here I draw a spiral, but you can use external graphics and so on.

\documentclass{article}
\usepackage{tikz}
\usepackage{tikzlings}
\usepackage{eso-pic}
\newsavebox\Spiral
\sbox\Spiral{\tikz{%
\draw[thick] plot[variable=\t,domain=0:1440,samples=145,smooth] (\t:0.2+\t/2880);}}
\pgfmathtruncatemacro{\Xmax}{\wd\Spiral*3+1}
\begin{tikzpicture}[overlay,remember picture]
\pgfmathsetmacro{\myshift}{2*int(1/2+\number\value{page}/2)/3}
\ifodd\value{page}
% \clip ([xshift=-0.33pt,yshift=-\ht\Spiral/2]current page.east)
%  rectangle ++ (0.34pt,\ht\Spiral);
\path (current page.east) node[anchor=east,xshift=\myshift*1pt,
inner sep=0pt,outer sep=0pt]{\usebox\Spiral};
\else
% \clip ([xshift=0.33pt,yshift=-\ht\Spiral/2]current page.west)
%   rectangle ++ (-0.34pt,\ht\Spiral);
\path (current page.west) node[anchor=west,xshift=-\myshift*1pt,
inner sep=0pt,outer sep=0pt]{\usebox\Spiral};
\fi
\end{tikzpicture}
}
\begin{document}
\foreach \X in {1,...,\Xmax}
{
pft
\newpage}
\end{document}


This document just has enough pages to display the spiral. Also, I commented out the clips that clip the spiral to the relevant piece. I did this to avoid getting messages saying that this code does not do anything. If you uncomment the both \clip commands you will get hardly visible tiny slices of the spiral, but the spiral will be visible from the outside. That is, you will want to uncomment the clips after you have seen how this works.

You need to be careful in several ways:

1. Sometimes printers do not print the full page. You need to play with the settings of your printer in such a way that they do.
2. This answer assumes that, if you look at page 1, the right side is the open end. If you follow the opposite conventions, you need to replace \ifodd\value{page} by \unless\ifodd\value{page}.
3. I measure the depth of some standard pages of books I have by measuring the depth of the book and dividing by the number of pages. This yielded something like 0.33pt. If you use different paper, you may need to adjust the shift in \pgfmathsetmacro{\myshift}{2*int(1/2+\number\value{page}/2)/3}.
4. Obviously I did not test this. I love trees.
• Awesome! I won't be able to test it on an actual printed book for a few months still but I'll report back how it worked.
– Niek
Jan 18 '20 at 16:03