% thumb.sty
\RequirePackage{ifthen,calc}

\newcounter{y}
\newcommand{\thumb}
{\unitlength1cm
 \begin{picture}(0,0)
 \ifthenelse{\value{chapter}>0}
  {% 3 = 1cm Hoehe + 2 cm Abstand
   \setcounter{y}{-3*\value{chapter}-2}
   \put(2,\value{y}){\makebox(0,0){\rule{2cm}{1cm}}}
  }
  {}
 \end{picture}
}
% Minimaler Seitenstil
\newcommand{\ps@thumb}
{\renewcommand{\@oddhead}{\hfil\thepage\thumb}
 \renewcommand{\@evenhead}{\thepage\hfil}
}
