%%
%% This is file `thumbs-example.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% thumbs.dtx  (with options: `example')
%% 
%% This is a generated file.
%% 
%% Project: thumbs
%% Version: 2011/05/20 v1.0c
%% 
%% Copyright (C) 2010, 2011 by
%%     H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
%% 
%% The usual disclaimer applys:
%% If it doesn't work right that's your problem.
%% (Nevertheless, send an e-mail to the maintainer
%%  when you find an error in this package.)
%% 
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.3c of this license or (at your option) any later
%% version. This version of this license is in
%%    http://www.latex-project.org/lppl/lppl-1-3c.txt
%% and the latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of
%% LaTeX version 2005/12/01 or later.
%% 
%% This work has the LPPL maintenance status "maintained".
%% 
%% The Current Maintainer of this work is H.-Martin Muench.
%% 
%% This work consists of the main source file thumbs.dtx
%% and the derived files
%%    thumbs.sty, thumbs.pdf, thumbs.ins, thumbs.drv,
%%    thumbs-example.tex.
%% 
\documentclass[twoside,british]{article}[2007/10/19]% v1.4h
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% When compiling with SWP 5.50. Build 2960 %
%% (copyright MacKichan Software, Inc.),    %
%% these additional packages are needed:    %
%% \usepackage[T1]{fontenc}                 %
%% \usepackage{amsfonts}                    %
%% \usepackage[math]{cellspace}             %
%% \usepackage{xcolor}                      %
%% \pagecolor{white}                        %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{lipsum}[2011/04/14]% v1.2
\usepackage{eurosym}[1998/08/06]% v1.1
\usepackage[extension=pdf,%
 pdfpagelayout=TwoPageRight,pdfpagemode={UseNone},%
 plainpages=false,%
 pdfpagelabels=true,%
 hyperindex=false,%
 pdflang={en},%
 pdftitle={thumbs package example},%
 pdfauthor={Hans-Martin Muench},%
 pdfsubject={Example for the thumbs package},%
 pdfkeywords={LaTeX, thumbs, thumb marks, Hans-Martin Muench},%
 pdfview=Fit,pdfstartview=Fit,%
 linktoc=all]{hyperref}[2011/04/17]% v6.82g
\usepackage[pagecolor=white,thumblink=rule,linefill=dots,height={auto},minheight={47pt},%
            width={auto},distance={2mm},topthumbmargin={auto},bottomthumbmargin={auto},%
            verbose=true]{thumbs}[2011/05/20]% v1.0c
\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}%
\listfiles
\begin{document}
\pagenumbering{arabic}
\section*{Example for thumbs}
\addcontentsline{toc}{section}{Example for thumbs}
\markboth{Example for thumbs}{Example for thumbs}

This example demonstrates the most common uses of package
\textsf{thumbs}, v1.0c as of 2011/05/20 (HMM).
The used options were \texttt{pagecolor=white},
\texttt{thumblink=rule}, \texttt{linefill=dots},
\texttt{height=auto}, \texttt{minheight=\{47pt\}},
width={auto}, \texttt{distance=\{2mm\}}, \texttt{topthumbmargin=\{auto\}},
\texttt{bottomthumbmargin=\{auto\}}, and \texttt{verbose=true}.
These are the default options, except \texttt{verbose=true}.
For more details please see the documentation!\newline

\textbf{Hyperlinks or not:} If the \textsf{hyperref} package is loaded,
the references in the overview page for the thumb marks are also hyperlinked
(except when option \texttt{thumblink=none} is used).\newline

\bigskip

{\color{green} Save per page about $200\unit{ml}$ water, $2\unit{g}$ CO$_{2}$
and $2\unit{g}$ wood:\newline
Therefore please print only if this is really necessary.}

\newpage

\addtitlethumb{Frontmatter}{0}{white}{gray}{pagesLTS.0}

At the first page no thumb mark was used, but we want to begin with thumb marks
at the first page, therefore a
\begin{verbatim}
\addtitlethumb{Frontmatter}{0}{white}{gray}{pagesLTS.0}
\end{verbatim}
was used at the beginning of this page.

\newpage

\tableofcontents

\newpage

To include an overview page for the thumb marks,
\begin{verbatim}
\addthumbsoverviewtocontents{section}{Thumb marks overview}%
\thumbsoverview{Table of Thumbs}
\end{verbatim}
is used, where \textbackslash addthumbsoverviewtocontents adds the thumb
marks overview page to the table of contents.

\addthumbsoverviewtocontents{section}{Thumb marks overview}%
\thumbsoverview{Table of Thumbs}

That were the overview pages for the thumb marks.

\newpage

\section{The first section}
\addthumb{First section}{\space\Huge{\textbf{$1^ \textrm{st}$}}}{yellow}{green}

\begin{verbatim}
\addthumb{First section}{\space\Huge{\textbf{$1^ \textrm{st}$}}}{yellow}{green}
\end{verbatim}

A thumb mark is added for this section. The parameters are: title for the thumb mark,
the text to be displayed in the thumb mark (choose your own format),
the colour of the text in the thumb mark,
and the background colour of the thumb mark (parameters in this order).\newline

Now for some pages of \textquotedblleft content\textquotedblright\ldots

\newpage
\lipsum[1]
\newpage
\lipsum[1]
\newpage
\lipsum[1]
\newpage

\section{The second section}
\addthumb{Second section}{\Huge{\textbf{\arabic{section}}}}{green}{yellow}

For this section, the text to be displayed in the thumb mark was set to
\begin{verbatim}
\Huge{\textbf{\arabic{section}}}
\end{verbatim}
i.\,e. the number of the section will be displayed (huge \& bold).\newline

Let us change the thumb mark on a page with an even number:

\newpage

\section{The third section}
\addthumb{Third section}{\Huge{\textbf{\arabic{section}}}}{blue}{red}

No problem!

And you do not need to have a section to add a thumb:

\newpage

\addthumb{Still third section}{\Huge{\textbf{\arabic{section}b}}}{red}{blue}

This is still the third section, but there is a new thumb mark.

On the other hand, you can even get rid of the the thumb marks
for some page(s):

\newpage

\stopthumb

The command
\begin{verbatim}
\stopthumb
\end{verbatim}
was used here. Until another addthumb (with parameters) or
\begin{verbatim}
\continuethumb
\end{verbatim}
is used, there will be no more thumb marks.

\newpage

Still no thumb marks.

\newpage

Still no thumb marks.

\newpage

Still no thumb marks.

\newpage

\continuethumb

Thumb mark continued (unchanged).

\newpage

Thumb mark continued (unchanged).

\newpage

Time for another thumb,

\addthumb{Another heading}{Small text}{white}{black}

and another.

\addthumb{Huge Text}{\Huge{Huge Text}}{yellow}{green}

\addthumb{bold text }{\textbf{Bf Text}}{pink}{blue}

\addthumb{Huge Bold Text}{\Huge{\textbf{HBT}}}{black}{yellow}

When there is more than one thumb mark at one page, this is no problem.
When more than six (6) thumb marks are at one (1) page,
only the first six will be shown,
while all will appear in the thumbs overview page.
On the following pages the correct, last thumb mark will appear.
More than one thumb mark at one page probably does not make much sense.
This package was not created to create decorations at the page margin,
but if you really need more than six thumb marks at one page,
feel free to send an e-mail to the maintainer.
If you have got an idea how to dynamically create thumb
\textquotedblleft registers\textquotedblright\ (thereby overcomming
this limitation), please send an e-mail to the maintainer, too.

\newpage

Some text

\newpage

Some text

\newpage

Some text

\newpage

\section{xcolor}
\addthumb{xcolor}{\Huge{\textbf{xcolor}}}{magenta}{cyan}

It is probably a good idea to have a look at the \textsf{xcolor} package
and use other colours than used in this example.

\newpage

\addthumb{A mark}{\Huge{\textbf{A}}}{lime}{darkgray}

I just need to add further thumb marks to get them reaching the bottom of the page.

Generally the vertical size of the thumb marks is set to the value given in the
height option. If it is \texttt{auto}, the size of the thumb marks is decreased,
so that they fit all on one page. But when they get smaller than \texttt{minheight},
instead of decreasing their size further, a~new thumbs colum is started
(which will happen here).

\newpage

\addthumb{B mark}{\Huge{\textbf{B}}}{brown}{pink}

There! A new thumb colum was started automatically!

\newpage

\addthumb{C mark}{\Huge{\textbf{C}}}{brown}{pink}

You can, of course, keep the colour for more than one thumb mark.

\newpage

\addthumb{$1/1.\,955\,83$\, EUR}{\Huge{\textbf{D}}}{orange}{violet}

I am just adding further thumb marks.

If you are curiouse why the thumb mark between
\textquotedblleft C mark\textquotedblright\ and \textquotedblleft E mark\textquotedblright\ has
not been named \textquotedblleft D mark\textquotedblright\ but
\textquotedblleft $1/1.\,955\,83$\, EUR\textquotedblright :

$1\unit{DM}=1\unit{D\ Mark}=1\unit{Deutsche\ Mark}$\newline
$=\frac{1}{1.\,955\,83}\,$\euro $\,=1/1.\,955\,83\unit{Euro}=1/1.\,955\,83\unit{EUR}$.

\newpage

\addthumb{E mark}{\Huge{\textbf{E}}}{lightgray}{black}

I am just adding further thumb marks.

\newpage

\addthumb{F mark}{\Huge{\textbf{F}}}{magenta}{black}

Some text.

\newpage
\thumbnewcolumn
\addthumb{New thumb marks column}{\Huge{\textit{NC}}}{magenta}{black}

There! A new thumb colum was started manually!

\newpage

Some text.

\newpage

\addthumb{G mark}{\Huge{\textbf{G}}}{orange}{violet}

I just added another thumb mark.

\newpage

Well, I think that are enough thumb marks.

Good bye!

\end{document}

\endinput
%%
%% End of file `thumbs-example.tex'.
