| 1 |
%% |
| 2 |
%% This is file `thumbs-example.tex', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% thumbs.dtx (with options: `example') |
| 8 |
%% |
| 9 |
%% This is a generated file. |
| 10 |
%% |
| 11 |
%% Project: thumbs |
| 12 |
%% Version: 2026-01-18 v1.1d |
| 13 |
%% Info: Thumb marks and overview page(s) |
| 14 |
%% |
| 15 |
%% Copyright (C) 2010 - 2026 by |
| 16 |
%% H.-Martin Muench <Martin dot Muench at Uni-Bonn dot de> |
| 17 |
%% |
| 18 |
%% This work may be distributed and/or modified under the |
| 19 |
%% conditions of the LaTeX Project Public License, either |
| 20 |
%% version 1.3c of this license or (at your option) any later |
| 21 |
%% version. This version of this license is in |
| 22 |
%% https://www.latex-project.org/lppl/lppl-1-3c.txt |
| 23 |
%% and the latest version of this license is in |
| 24 |
%% https://www.latex-project.org/lppl.txt |
| 25 |
%% and version 1.3c or later is part of all distributions of |
| 26 |
%% LaTeX version 2005-12-01 or later. |
| 27 |
%% |
| 28 |
%% This work has the LPPL maintenance status "maintained". |
| 29 |
%% |
| 30 |
%% The Current Maintainer of this work is H.-Martin Muench. |
| 31 |
%% |
| 32 |
%% This work consists of the main source file thumbs.dtx, |
| 33 |
%% the README, and the derived files |
| 34 |
%% thumbs.sty, thumbs.pdf, |
| 35 |
%% thumbs.ins, thumbs.drv, |
| 36 |
%% thumbs-example.tex, thumbs-example.pdf. |
| 37 |
%% |
| 38 |
%% In memoriam |
| 39 |
%% Claudia Simone Barth + 1996-01-30 |
| 40 |
%% Tommy Muench + 2014-01-02 |
| 41 |
%% Hans-Klaus Muench + 2014-08-24 |
| 42 |
%% |
| 43 |
\documentclass[a4paper,twoside,british]{article}[2025/01/22]% v1.4n Standard LaTeX document class |
| 44 |
\usepackage{lipsum}[2021-09-20]% v2.7 150 paragraphs of Lorem Ipsum dummy text |
| 45 |
\usepackage{eurosym}[1998/08/06]% v1.1 European currency symbol ''Euro'' |
| 46 |
\usepackage[extension=pdf,% |
| 47 |
pdfpagelayout=TwoPageRight,pdfpagemode=UseThumbs,% |
| 48 |
plainpages=false,pdfpagelabels=true,% |
| 49 |
hyperindex=false,% |
| 50 |
pdflang={en},% |
| 51 |
pdftitle={thumbs package example},% |
| 52 |
pdfauthor={H.-Martin Muench},% |
| 53 |
pdfsubject={Example for the thumbs package},% |
| 54 |
pdfkeywords={LaTeX, thumbs, thumb marks},% |
| 55 |
pdfview=Fit,pdfstartview=Fit,% |
| 56 |
linktoc=all]{hyperref}[2025-07-12]% v7.01o Hypertext links for LaTeX |
| 57 |
\usepackage[a4paper]{geometry}[2020/01/02]% v5.9 Page Geometry |
| 58 |
% % For testing with package crop, |
| 59 |
% % you can use a4 paper layout and print on a3 paper; |
| 60 |
% % for real production probably "frame" would be removed from the crop options: |
| 61 |
% \usepackage[cross,cam,frame,width=297truemm,height=420truemm,center,axes]{crop}[2017/11/19]% v1.10 Crop marks (MF) |
| 62 |
\IfPackageLoadedTF{crop}{% |
| 63 |
% In contrast to the "normal" example the offsets must be regarded for use with the crop package: |
| 64 |
\PassOptionsToPackage{ignorehoffset=false,ignorevoffset=false}{thumbs}% crop |
| 65 |
}{\PassOptionsToPackage{ignorehoffset=true,ignorevoffset=true}{thumbs}% no crop |
| 66 |
} |
| 67 |
\usepackage[linefill=dots,thumblink=rule,minheight={47pt},height={auto},width={auto},% |
| 68 |
distance={2mm},topthumbmargin={auto},bottomthumbmargin={auto},% |
| 69 |
eventxtindent={5pt},oddtxtexdent={5pt},% |
| 70 |
evenmarkindent={0pt},oddmarkexdent={0pt},evenprintvoffset={0pt},% |
| 71 |
leftindexruleplus={1em},% |
| 72 |
% unused options: frame, frameinnercolor |
| 73 |
txtcentered=false,% |
| 74 |
nophantomsection=false,plainthumbsoverview=false,% |
| 75 |
verbose=true,final=true, hidethumbs=false,% |
| 76 |
% unused, obsolete options: |
| 77 |
% pagecolor: instead the pagecolor package is used. |
| 78 |
% evenindent: was replaced by eventxtindent. |
| 79 |
% oddexdent: was replaced by oddtxtexdent. |
| 80 |
]{thumbs}[2026-01-18]% v1.1d Thumb marks and overview page(s) (HMM) |
| 81 |
\nopagecolor% use \pagecolor{white} if \nopagecolor does not work |
| 82 |
\IfPackageLoadedF{hyperref}{\usepackage{url}[2013/09/16]% v3.4 Verb mode for urls etc. |
| 83 |
} |
| 84 |
|
| 85 |
\DeclareMathAlphabet{\mathup}{OT1}{\familydefault}{m}{n} |
| 86 |
\DeclareRobustCommand{\unit}[1]{\ensuremath{\mathord{\thinspace\mathup{#1}}}} |
| 87 |
|
| 88 |
\xdef\thetextchangingcolour{red} |
| 89 |
\colorlet{textchangingcolour}{\thetextchangingcolour} |
| 90 |
|
| 91 |
\xdef\themarkchangingcolour{green} |
| 92 |
\colorlet{markchangingcolour}{\themarkchangingcolour} |
| 93 |
|
| 94 |
\DeclareRobustCommand{\thethumbchangingtextE}{\Huge{\textbf{E}}} |
| 95 |
\DeclareRobustCommand{\thethumbchangingtexte}{\Huge{\textbf{e}}} |
| 96 |
\gdef\thumbchangingtext{\thethumbchangingtextE} |
| 97 |
|
| 98 |
\listfiles |
| 99 |
\begin{document} |
| 100 |
\pagenumbering{arabic} |
| 101 |
\label{FirstPage} |
| 102 |
\section*{Example for thumbs} |
| 103 |
\addcontentsline{toc}{section}{Example for thumbs} |
| 104 |
\markboth{Example for thumbs}{Example for thumbs} |
| 105 |
|
| 106 |
This example demonstrates the most common uses of package \textsf{thumbs}, v1.1d as of 2026-01-18. |
| 107 |
The used options were\newline |
| 108 |
\texttt{linefill=dots}, \texttt{thumblink=rule}, \texttt{minheight=\{47pt\}}, |
| 109 |
\texttt{height=auto}, \texttt{width={auto}}, \newline |
| 110 |
\texttt{distance=\{2mm\}}, \texttt{topthumbmargin=\{auto\}}, \texttt{bottomthumbmargin=\{auto\}}, \newline |
| 111 |
\texttt{eventxtindent=\{5pt\}}, \texttt{oddtxtexdent=\{5pt\}}, |
| 112 |
\texttt{evenmarkindent=\{0pt\}}, \texttt{oddmarkexdent=\{0pt\}}, \newline |
| 113 |
\texttt{evenprintvoffset=\{0pt\}}, |
| 114 |
\texttt{leftindexruleplus=\{1em\}}, |
| 115 |
\texttt{txtcentered=false}, \newline |
| 116 |
\texttt{nophantomsection=false}, |
| 117 |
\texttt{plainthumbsoverview=false}, |
| 118 |
\texttt{verbose=true}, \texttt{final=true}, and \newline |
| 119 |
\texttt{hidethumbs=false}. \newline |
| 120 |
|
| 121 |
These are the default options, except |
| 122 |
\texttt{leftindexruleplus=\{1em\}} (default: \texttt{0pt}) and \newline |
| 123 |
\texttt{verbose=true}.\newline |
| 124 |
|
| 125 |
If package \textsf{crop} was loaded, options |
| 126 |
\texttt{ignorehoffset=true} and \texttt{ignorevoffset=true} were passed to the \textsf{thumbs} package, |
| 127 |
otherwise \texttt{ignorehoffset=false} and \texttt{ignorevoffset=false}. \newline |
| 128 |
|
| 129 |
Options \texttt{frame} and \texttt{frameinnercolor} were not used.\newline |
| 130 |
|
| 131 |
The obsolete options \texttt{pagecolor} (instead the \texttt{pagecolor} package is used), |
| 132 |
\texttt{evenindent} (was replaced by \texttt{eventxtindent}), and |
| 133 |
\texttt{oddexdent} (was replaced by \texttt{oddtxtexdent}) were not used. \newline |
| 134 |
|
| 135 |
For more details please see the documentation!\bigskip |
| 136 |
|
| 137 |
\textbf{Hyperlinks or not:} If the \textsf{hyperref} package is loaded, |
| 138 |
the references in the overview page for the thumb marks are also hyperlinked |
| 139 |
(except when option \texttt{thumblink=none} is used).\bigskip |
| 140 |
|
| 141 |
\noindent\textbf{For testing purpose pages \pageref{greenpage}f. have been completely coloured!}\newline |
| 142 |
\textbf{Better exclude those two pages from printing\ldots}\bigskip |
| 143 |
|
| 144 |
Some thumb mark texts are too large for the thumb mark by intention |
| 145 |
(especially when the paper size and therefore also the thumb mark size |
| 146 |
is decreased). When option \texttt{width=\{autoauto\}} would be used, |
| 147 |
the thumb mark width would be automatically increased. |
| 148 |
Please see page~\pageref{HugeText} for details!\bigskip |
| 149 |
|
| 150 |
For printing this example to another format of paper (e.\,g.~A4) it is necessary to add the according |
| 151 |
option (e.\,g.~\verb|a4paper|) to the document class and recompile it! (In that case the |
| 152 |
thumb marks column change will occur at another point, of course.) |
| 153 |
With paper format equal to document format the document can be printed without adapting the size, |
| 154 |
like e.\,g.~\textquotedblleft shrink to page\textquotedblright . That would add a white border around |
| 155 |
the document and by moving the thumb marks from the edge of the paper they no longer appear |
| 156 |
at the side of the stack of paper. It is also necessary to use a printer capable of printing up to the |
| 157 |
border of the sheet of paper. Alternatively it is possible after the printing to cut the paper to the |
| 158 |
right size. While performing this manually is probably quite cumbersome, printing houses use paper, |
| 159 |
which is slightly larger than the desired format, and afterwards cut it to format. |
| 160 |
\newpage |
| 161 |
|
| 162 |
\addtitlethumb{Frontmatter}{0}{white}{gray}{FirstPage} |
| 163 |
|
| 164 |
At the first page no thumb mark was used, but we want to begin with thumb marks |
| 165 |
at the first page, therefore a |
| 166 |
\begin{verbatim} |
| 167 |
\addtitlethumb{Frontmatter}{0}{white}{gray}{FirstPage} |
| 168 |
\end{verbatim} |
| 169 |
was used at the beginning of this page. This does not place a thumb mark at that page, |
| 170 |
but the pagenumber and link{-}target in the Table of Thumbs point to the first page. |
| 171 |
The label \verb|FirstPage| needs to be placed manually on the first page, of course! |
| 172 |
If manually no label can be placed on the first page, the label \texttt{pagesLTS.0} |
| 173 |
from the \textsf{pageslts} package (needs to be loaded explicitly!) can be used. |
| 174 |
\newpage |
| 175 |
\tableofcontents |
| 176 |
\newpage |
| 177 |
|
| 178 |
To include an overview page for the thumb marks, |
| 179 |
\begin{verbatim} |
| 180 |
\addthumbsoverviewtocontents{section}{Thumb marks overview}% |
| 181 |
\thumbsoverview{Table of Thumbs}% |
| 182 |
\end{verbatim} |
| 183 |
is used, where \verb|\addthumbsoverviewtocontents| adds the thumb marks overview page to the table of contents. |
| 184 |
(\textquotedblleft Edge index\textquotedblright{} would be the correct/{}formal term, see the Introduction in the manual.) |
| 185 |
\smallskip |
| 186 |
|
| 187 |
Generally it is desirable to have a hyperlink from the thumbs overview page to lead to the thumb mark |
| 188 |
and not to some earlier place. Therefore automatically a~\verb|\phantomsection| is placed before each thumb mark. |
| 189 |
But for example when using the thumb mark after a~\verb|\chapter{...}| command, it is probably nicer to have |
| 190 |
the link point at the top of that chapter's title (instead of the line below it). The automatic placing of the |
| 191 |
\verb|\phantomsection| can be disabled either globally by using option \texttt{nophantomsection}, |
| 192 |
or locally for the next thumb mark by the command \verb|\thumbsnophantom|. (When disabled globally, |
| 193 |
still manual use of \verb|\phantomsection| is possible.) |
| 194 |
|
| 195 |
\addthumbsoverviewtocontents{section}{Thumb marks overview}% |
| 196 |
\thumbsoverview{Table of Thumbs}% |
| 197 |
|
| 198 |
\noindent Those were the overview pages for the thumb marks. |
| 199 |
\newpage |
| 200 |
|
| 201 |
\section{The first section} |
| 202 |
\addthumb{First section}{% |
| 203 |
\space\Huge{\textbf{$1\textsuperscript{st}$}}}{yellow}{green} |
| 204 |
|
| 205 |
\begin{verbatim} |
| 206 |
\addthumb{First section}{% |
| 207 |
\space\Huge{\textbf{$1\textsuperscript{st}$}}}{yellow}{green} |
| 208 |
\end{verbatim} |
| 209 |
|
| 210 |
A thumb mark is added for this section. The parameters are: title for the thumb mark, |
| 211 |
the text to be displayed in the thumb mark (choose your own format), |
| 212 |
the colour of the text in the thumb mark, |
| 213 |
and the background colour of the thumb mark (parameters in this order).\newline |
| 214 |
|
| 215 |
Now for some pages of \textquotedblleft content\textquotedblright\ldots |
| 216 |
|
| 217 |
\newpage |
| 218 |
\lipsum[1] |
| 219 |
\newpage |
| 220 |
\lipsum[1] |
| 221 |
\newpage |
| 222 |
\lipsum[1] |
| 223 |
\newpage |
| 224 |
|
| 225 |
\section{The second section} |
| 226 |
\addthumb{Second section}{\Huge{\textbf{\arabic{section}}}}{green}{yellow} |
| 227 |
|
| 228 |
For this section, the text to be displayed in the thumb mark was set to |
| 229 |
\begin{verbatim} |
| 230 |
\Huge{\textbf{\arabic{section}}} |
| 231 |
\end{verbatim} |
| 232 |
i.\,e. the number of the section will be displayed (huge \& bold).\newline |
| 233 |
|
| 234 |
Let us change the thumb mark on a page with an even number: |
| 235 |
\newpage |
| 236 |
|
| 237 |
\section{The third section} |
| 238 |
\addthumb{Third section}{\Huge{\textbf{\arabic{section}}}}{blue}{red} |
| 239 |
|
| 240 |
No problem! |
| 241 |
|
| 242 |
And you do not need to have a section to add a thumb: |
| 243 |
\newpage |
| 244 |
|
| 245 |
\addthumb{Still third section}{\Huge{\textbf{\arabic{section}b}}}{red}{blue} |
| 246 |
|
| 247 |
This is still the third section, but there is a new thumb mark. |
| 248 |
|
| 249 |
On the other hand, you can even get rid of the thumb marks for some page(s): |
| 250 |
\newpage |
| 251 |
|
| 252 |
\stopthumb |
| 253 |
|
| 254 |
\noindent The command |
| 255 |
\begin{verbatim} |
| 256 |
\stopthumb |
| 257 |
\end{verbatim} |
| 258 |
was used here. Until another \verb|\addthumb| (with parameters) or |
| 259 |
\begin{verbatim} |
| 260 |
\continuethumb |
| 261 |
\end{verbatim} |
| 262 |
is used, there will be no more thumb marks. |
| 263 |
\newpage |
| 264 |
Still no thumb marks.\newpage |
| 265 |
Still no thumb marks.\newpage |
| 266 |
Still no thumb marks.\newpage |
| 267 |
|
| 268 |
\continuethumb |
| 269 |
|
| 270 |
Thumb mark continued (unchanged).\newpage |
| 271 |
Thumb mark continued (unchanged).\newpage |
| 272 |
|
| 273 |
Time for another thumb, |
| 274 |
|
| 275 |
\addthumb{Another heading}{Small text}{white}{black} |
| 276 |
|
| 277 |
and another.\bigskip |
| 278 |
|
| 279 |
\addthumb{Huge Text paragraph}{\Huge{Huge\newline Text}}{yellow}{green} |
| 280 |
|
| 281 |
\textquotedblleft {\Huge{Huge Text}}\textquotedblright\ is too wide for the thumb mark. When option |
| 282 |
\texttt{width=\{autoauto\}} would be used, the thumb mark width would be automatically increased. |
| 283 |
Now the text is either split over two lines (try \verb|Huge\newline Text| for another format) |
| 284 |
or (in case \verb|Huge~Text| is used) is written over the border of the thumb mark. When the text is |
| 285 |
too wide for the thumb mark and cannot be split, \LaTeX{} might nevertheless place the text into the |
| 286 |
next line. By this the text is placed too low. Adding a |
| 287 |
\hbox{\verb|\protect\vspace*{-| some length \verb|}|} to the text could help, for example\newline |
| 288 |
\verb|\addthumb{Huge Text}{\protect\vspace*{-3pt}\Huge{Huge~Text}}...|.\label{HugeText}\bigskip |
| 289 |
|
| 290 |
\addthumb{Huge Text}{\Huge{Huge~Text}}{red}{blue} |
| 291 |
\addthumb{Huge Bold Text}{\Huge{\textbf{HBT}}}{black}{yellow} |
| 292 |
|
| 293 |
\noindent When there is more than one thumb mark at one page, this is also no problem.\newpage |
| 294 |
Some text\newpage |
| 295 |
Some text\newpage |
| 296 |
Some text\newpage |
| 297 |
|
| 298 |
\section{xcolor} |
| 299 |
\addthumb{xcolor}{\Huge{\textbf{xcolor}}}{magenta}{cyan} |
| 300 |
|
| 301 |
It is probably a good idea to have a look at the \textsf{xcolor} package and use other colours than used |
| 302 |
in this example.\newline |
| 303 |
(About automatically increasing the thumb mark width to the thumb mark text width please see the note |
| 304 |
at page~\pageref{HugeText}.) |
| 305 |
\newpage |
| 306 |
|
| 307 |
\addthumb{A mark}{\Huge{\textbf{A}}}{lime}{darkgray} |
| 308 |
|
| 309 |
I just need to add further thumb marks to get them reaching the bottom of the page.\newline |
| 310 |
Generally the vertical size of the thumb marks is set to the value given in the height option. |
| 311 |
If it is \texttt{auto}, the size of the thumb marks is decreased, so that they fit all on one page. |
| 312 |
But when they get smaller than \texttt{minheight}, instead of decreasing their size further, |
| 313 |
a~new thumbs column is started (which will happen here). |
| 314 |
\newpage |
| 315 |
|
| 316 |
\addthumb{B mark}{\Huge{\textbf{B}}}{brown}{pink} |
| 317 |
|
| 318 |
Another thumb mark.\newpage |
| 319 |
|
| 320 |
\addthumb{C mark}{\Huge{\textbf{C}}}{brown}{pink} |
| 321 |
|
| 322 |
There! A new thumb column was started automatically! |
| 323 |
|
| 324 |
On the one hand you can, of course, keep the colour for more than one thumb mark. |
| 325 |
On the other hand you can change the colour of an existing thumb mark, |
| 326 |
shown at page~\pageref{E mark}f.\newpage |
| 327 |
|
| 328 |
\addthumb{$1/1.\,955\,83$\, EUR}{\Huge{\textbf{D}}}{orange}{violet} |
| 329 |
|
| 330 |
\noindent I am just adding further thumb marks. |
| 331 |
|
| 332 |
\noindent If you are curious why the thumb mark between |
| 333 |
\textquotedblleft C mark\textquotedblright\ and \textquotedblleft E mark\textquotedblright\ has |
| 334 |
not been named \textquotedblleft D mark\textquotedblright\ but |
| 335 |
\textquotedblleft $1/1.\,955\,83$\, EUR\textquotedblright : |
| 336 |
|
| 337 |
$1\unit{DM}=1\unit{D\ Mark}=1\unit{Deutsche\ Mark}% |
| 338 |
=\frac{1}{1.\,955\,83}\,$\euro$\,=1/1.\,955\,83\unit{Euro}=1/1.\,955\,83\unit{EUR}$. |
| 339 |
\newpage |
| 340 |
Just a page. |
| 341 |
\newpage |
| 342 |
|
| 343 |
\xdef\thetextchangingcolour{red}% |
| 344 |
\colorlet{textchangingcolour}{\thetextchangingcolour}% |
| 345 |
|
| 346 |
\xdef\themarkchangingcolour{green}% |
| 347 |
\colorlet{markchangingcolour}{\themarkchangingcolour}% |
| 348 |
|
| 349 |
%% In the preamble: |
| 350 |
%%\DeclareRobustCommand{\thethumbchangingtextE}{\Huge{\textbf{E}}} |
| 351 |
%%\DeclareRobustCommand{\thethumbchangingtexte}{\Huge{\textbf{e}}} |
| 352 |
%%\gdef\thumbchangingtext{\thethumbchangingtextE} |
| 353 |
|
| 354 |
\gdef\thumbchangingtext{\thethumbchangingtextE}% |
| 355 |
|
| 356 |
\addthumb{E mark}{\protect\thumbchangingtext}{textchangingcolour}{markchangingcolour} |
| 357 |
\label{E mark} |
| 358 |
|
| 359 |
As announced above, it is not only possible to keep the colour for more than one thumb mark, |
| 360 |
but also to change the colour(s) and the text of an existing thumb mark. Here a thumb mark added with |
| 361 |
\begin{verbatim} |
| 362 |
\addthumb{Name}{\protect\thumbchangingtext}{textchangingcolour}{% |
| 363 |
markchangingcolour} |
| 364 |
\end{verbatim} |
| 365 |
appears as red text \textquotedblleft E\textquotedblright{} on green background, |
| 366 |
but really it is not \texttt{red} but \texttt{textchangingcolour} (which was defined as \texttt{red}) |
| 367 |
and not \texttt{green} but\newline |
| 368 |
\texttt{markchangingcolour} (which was defined as \texttt{green}). Also the text of a thumb mark |
| 369 |
can be changed. Here \verb|thumbchangingtext| was used as text, which was defined as |
| 370 |
\verb|thethumbchangingtextE|, which was predefined in the preamble: |
| 371 |
\begin{verbatim} |
| 372 |
\DeclareRobustCommand{\thethumbchangingtextE}{\Huge{\textbf{E}}} |
| 373 |
\end{verbatim} |
| 374 |
\newpage |
| 375 |
|
| 376 |
\noindent Some pages(s) later: |
| 377 |
|
| 378 |
\begin{verbatim} |
| 379 |
\xdef\thetextchangingcolour{blue}% |
| 380 |
\colorlet{textchangingcolour}{\thetextchangingcolour}% |
| 381 |
|
| 382 |
\xdef\themarkchangingcolour{yellow}% |
| 383 |
\colorlet{markchangingcolour}{\themarkchangingcolour}% |
| 384 |
|
| 385 |
\gdef\thumbchangingtext{\thethumbchangingtexte}% |
| 386 |
\end{verbatim} |
| 387 |
|
| 388 |
\xdef\thetextchangingcolour{blue}% |
| 389 |
\colorlet{textchangingcolour}{\thetextchangingcolour}% |
| 390 |
|
| 391 |
\xdef\themarkchangingcolour{yellow}% |
| 392 |
\colorlet{markchangingcolour}{\themarkchangingcolour}% |
| 393 |
|
| 394 |
\gdef\thumbchangingtext{\thethumbchangingtexte}% |
| 395 |
|
| 396 |
And here the thumb mark still uses \texttt{textchangingcolour} and\newline |
| 397 |
\texttt{markchangingcolour}, but instead of \texttt{red} and \texttt{green} |
| 398 |
those have been redefined to \texttt{blue} and \texttt{yellow}. |
| 399 |
\verb|\thumbchangingtext| was still used as text, but redefined as \verb|\thethumbchangingtexte|, |
| 400 |
which was predefined in the preamble: |
| 401 |
\begin{verbatim} |
| 402 |
\DeclareRobustCommand{\thethumbchangingtexte}{\Huge{\textbf{e}}} |
| 403 |
\end{verbatim} |
| 404 |
Instead of \verb|\thumbchangingtext| also some variable like \verb|\thepage| can be used.\newline |
| 405 |
For the thumb marks overview page(s) it must be decided which colour(s) and text |
| 406 |
to use and the according definitions have to be made before that page{/}those pages! |
| 407 |
Otherwise inconsistencies or even \textquotedblleft\texttt{undefined}\textquotedblright{-}errors |
| 408 |
would result. |
| 409 |
\newpage |
| 410 |
(This page was intentionally left blank.) |
| 411 |
\newpage |
| 412 |
|
| 413 |
To prevent inconsistencies between the different thumb mark overviews, |
| 414 |
we redefine \texttt{textchangingcolour} to \texttt{red}, |
| 415 |
\texttt{markchangingcolour} to \texttt{green}, and |
| 416 |
\verb|\thumbchangingtext| to \verb|\thethumbchangingtextE| again here. |
| 417 |
|
| 418 |
\xdef\thetextchangingcolour{red}% |
| 419 |
\colorlet{textchangingcolour}{\thetextchangingcolour}% |
| 420 |
|
| 421 |
\xdef\themarkchangingcolour{green}% |
| 422 |
\colorlet{markchangingcolour}{\themarkchangingcolour}% |
| 423 |
|
| 424 |
\gdef\thumbchangingtext{\thethumbchangingtextE}% |
| 425 |
|
| 426 |
\newpage |
| 427 |
|
| 428 |
\makeatletter% |
| 429 |
\ifx\thumbs@frame\thumbs@empty\relax% |
| 430 |
\gdef\thumbs@frame{2pt}% |
| 431 |
\gdef\th@mbs@fr@meinnercolor{\thepagecolor}% could also be another colour |
| 432 |
\gdef\thumbs@checkforexample{0}% |
| 433 |
\else% somebody changed the example to use the frame option: |
| 434 |
\gdef\thumbs@checkforexample{1}% |
| 435 |
\PackageInfo{thumbs}{The frame option is already used,\MessageBreak% |
| 436 |
not changing here anything!}% |
| 437 |
\fi% |
| 438 |
\makeatother% |
| 439 |
|
| 440 |
\textsc{Bjorn Victor} suggested to use thumb marks consisting only of frames |
| 441 |
instead of filled rectangles. Options \texttt{frame} and \texttt{frameinnercolor} were introduced |
| 442 |
to accomplish this. While these options have not been used in this example, it is possible to trick |
| 443 |
\LaTeX{} into believing that they had been used. (Do not use this for a regular document!) |
| 444 |
This is just for demonstrating how a thumb mark consisting just of a frame with |
| 445 |
$2\unit{pt}$~thick lines would look like\newpage |
| 446 |
\noindent on left and right pages.\newpage |
| 447 |
|
| 448 |
Now let us restore the filled thumb marks again |
| 449 |
|
| 450 |
\makeatletter% |
| 451 |
\ifx\thumbs@checkforexample\thumbs@zero\relax% |
| 452 |
\gdef\thumbs@frame{\empty}% |
| 453 |
\gdef\th@mbs@fr@meinnercolor{\thepagecolor}% |
| 454 |
\fi% |
| 455 |
\makeatother% |
| 456 |
|
| 457 |
and then have a look at \verb|\thumbsoverviewverso|: |
| 458 |
|
| 459 |
\addthumbsoverviewtocontents{section}{Table of Thumbs, verso mode}% |
| 460 |
\thumbsoverviewverso{Table of Thumbs, verso mode} |
| 461 |
|
| 462 |
\newpage |
| 463 |
|
| 464 |
And, of course, also at \verb|\thumbsoverviewdouble|: |
| 465 |
|
| 466 |
\addthumbsoverviewtocontents{section}{Table of Thumbs, double mode}% |
| 467 |
\thumbsoverviewdouble{Table of Thumbs, double mode} |
| 468 |
|
| 469 |
\newpage |
| 470 |
|
| 471 |
\addthumb{F mark}{\Huge{\textbf{F}}}{lightgray}{black} |
| 472 |
|
| 473 |
I am just adding further thumb marks. |
| 474 |
\newpage |
| 475 |
|
| 476 |
\addthumb{G mark}{\Huge{\textbf{G}}}{magenta}{black} |
| 477 |
|
| 478 |
Some text. |
| 479 |
|
| 480 |
\newpage |
| 481 |
\thumbnewcolumn |
| 482 |
\addthumb{New thumb marks column}{\Huge{\textit{NC}}}{magenta}{black} |
| 483 |
|
| 484 |
There! A new thumb column was started manually! |
| 485 |
|
| 486 |
\newpage |
| 487 |
Some text. |
| 488 |
\newpage |
| 489 |
|
| 490 |
\addthumb{H mark}{\Huge{\textbf{H}}}{orange}{violet} |
| 491 |
|
| 492 |
I just added another thumb mark. |
| 493 |
\newpage |
| 494 |
The following two pages are completely coloured in green. |
| 495 |
\newpage |
| 496 |
\pagecolor{green} |
| 497 |
|
| 498 |
\IfPackageLoadedT{hyperref}{\phantomsection} |
| 499 |
\label{greenpage} |
| 500 |
|
| 501 |
Some faulty, outdated version of a pdf-viewer sometimes (for the same document!) |
| 502 |
added a white line at the bottom and right side of the document when presenting it. This did |
| 503 |
not change the printed version. To test for this problem, this doublepage has been completely coloured. |
| 504 |
(Probably better exclude these two pages from printing!)\newline |
| 505 |
|
| 506 |
\textsc{Heiko Oberdiek} wrote at Tue, 26 Apr 2011 14:13:29 +0200 in the \newline |
| 507 |
comp.text.tex newsgroup (see e.\,g.\newline |
| 508 |
\url{https://groups.google.com/g/de.comp.text.tex/c/4GAcL6qlTZ8/m/NzccDqakrrMJ}):\newline |
| 509 |
\textquotedblleft Der Ursprung ist 0 0, da gibt es nicht viel zu runden; bei den anderen |
| 510 |
Seiten werden pt als bp in die PDF-Datei geschrieben, d.\,h.~der Balken ist um 72.27/72 zu |
| 511 |
gro\ss{}, das sollte auch Rundungsfehler abdecken.\textquotedblright\newline |
| 512 |
|
| 513 |
(The origin is 0 0, there is not much to be rounded; for the other sides the $\unit{pt}$ |
| 514 |
are written as $\unit{bp}$ into the pdf-file, i.\,e.~the rule is too large by $72.27/72$, |
| 515 |
which should cover also rounding errors.)\newline |
| 516 |
|
| 517 |
The thumb marks are also too wide -- on purpose! This has been done to assure, |
| 518 |
that they cover the page up to its (paper) border, therefore they are placed |
| 519 |
a little bit over the paper margin.\newline |
| 520 |
|
| 521 |
Now I red somewhere in the net (should have remembered to note the url), |
| 522 |
that white margins are presented, whenever there is some object outside of the page. |
| 523 |
Thus, it is a feature, not a bug?! |
| 524 |
What I do not understand: The same document sometimes is presented |
| 525 |
with white lines and sometimes without (same viewer, same PC).\newline |
| 526 |
But at least it does not influence the printed version. |
| 527 |
\newpage |
| 528 |
Another green page. |
| 529 |
\newpage |
| 530 |
\pagecolor{white} |
| 531 |
|
| 532 |
It is possible to use the Table of Thumbs more than once (for example at the beginning and |
| 533 |
at the end of the document) and to refer to them via e.\,g.~\verb|\pageref{TableOfThumbs1}|,\linebreak |
| 534 |
\verb|\pageref{TableOfThumbs2}|,\ldots , here: page~\pageref{TableOfThumbs1}, |
| 535 |
page~\pageref{TableOfThumbs2}, and via e.\,g.~\verb|\pageref{TableOfThumbs}| |
| 536 |
it is referred to the last used Table of Thumbs (for compatibility with older package versions). |
| 537 |
If there is only one Table of Thumbs, this one is also the last one, of course. |
| 538 |
Here it is at page~\pageref{TableOfThumbs}.\newline |
| 539 |
|
| 540 |
Now let us have a look at \verb|\thumbsoverviewback|: |
| 541 |
|
| 542 |
\addthumbsoverviewtocontents{section}{Table of Thumbs, back mode}% |
| 543 |
\thumbsoverviewback{Table of Thumbs, back mode}% |
| 544 |
\newpage |
| 545 |
|
| 546 |
Text can be placed after any of the Tables of Thumbs, of course. |
| 547 |
\end{document} |
| 548 |
\endinput |
| 549 |
%% |
| 550 |
%% End of file `thumbs-example.tex'. |