summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/latex-tipps-und-tricks/thumb.sty
blob: 7d11b522efa2f803816b17b5bbe29858f4bd47f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
% 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}
}