# Repeat margin note for every page within section

Basically, I want to add chapter/section thumbs to my document but I do not like the thumbs from the thumbs package. What I have been trying to do is make my own thumbs using tikz and marginnote. For the start of every section, I add a chapter thumb by simply adding a marginnote just after section. For the next section, I do the same, but I shift the note slightly lower so that the thumbs are separate. I would like to know if it is possible to repeat these marginnotes if the sections are longer than one page, and if so, how. I have an example of how far I got with marginnote, but if anyone knows a different package that is easier to use that is also fine.

\documentclass{article}
\usepackage{lipsum}
\usepackage{float}
\usepackage{marginnote}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\usepackage[a4paper,top=1in,bottom=1in,inner=1.2in,outer=0.8in]{geometry}

\begin{document}
\section{Section 1}
\marginnote{
\begin{figure}[H]
\hspace{0.5cm}
\begin{tikzpicture}[every node/.style={fill=black,text=white, rounded rectangle, minimum width=1.5cm, minimum height=1cm}]
\node [rounded rectangle east arc=none]{\large\textbf{\thesection}};
\end{tikzpicture}
\end{figure}}[\thesection cm]
\lipsum[1-10]
\newpage
\section{Section 2}
\marginnote{
\begin{figure}[H]
\hspace{0.5cm}
\begin{tikzpicture}[every node/.style={fill=black,text=white, rounded rectangle, minimum width=1.5cm, minimum height=1cm}]
\node [rounded rectangle east arc=none]{\large\textbf{\thesection}};
\end{tikzpicture}
\end{figure}}[\thesection cm]
\lipsum[11-20]
\end{document}

• marginnote is the wrong command. The thumbnails should be part of the page style, so they should be stored e.g. in the header. Try e.g. eso-pic or the background package. Btw: You don't need the figure environment. – Ulrike Fischer Jan 27 '16 at 8:52
• Thanks, I figured it was going to be difficult the way I was trying to implement it. I actually found a solution myself using fancyhdr package and some suggestions on this website to other problems. – joep Jan 27 '16 at 9:53

So I found a solution that seems to be working. It does not require the marginnote package but uses the fancyhdr package and adds the thumbs by shifting a picture added to the header downwards. I tried it for two-sided article since that was the ultimate goal. The nice thing is that you can change the appearance and the location of the thumbs.

\documentclass[twoside]{article}
\usepackage{graphicx}
\usepackage{float}
\usepackage[a4paper,top=1in,bottom=1in,inner=1.2in,outer=0.8in]{geometry}
\usepackage{tikz}
\usepackage{picture}
\usetikzlibrary{shapes,arrows}
\newcommand\rblob{\thepage
\begin{picture}(0,0)
\put(0.8cm,-\value{section}cm - 1cm){
\begin{tikzpicture}[every node/.style={fill=black,text=white, rounded rectangle, minimum width=1.5cm, minimum height=1cm}]
\node [rounded rectangle east arc=none]{\large\textbf{\thesection}};
\end{tikzpicture}}
\end{picture}}
\newcommand\lblob{%
\begin{picture}(0,0)
\put(-61,-\value{section}cm - 1cm){
\begin{tikzpicture}[every node/.style={fill=black,text=white, rounded rectangle, minimum width=1.5cm, minimum height=1cm}]
\node [rounded rectangle west arc=none]{\large\textbf{\thesection}};
\end{tikzpicture}}
\end{picture}%
\thepage}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{lipsum}

\begin{document}