summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/thumbs
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-08-12 22:55:56 +0000
committerKarl Berry <karl@freefriends.org>2011-08-12 22:55:56 +0000
commita07c67c54f352666c40d9af55958e6da1a1b659b (patch)
treef6e716b818daed42bfb8a689cd21dca3301c3709 /Master/texmf-dist/source/latex/thumbs
parent7eac940f377be3fe2a1acc78987b724dab6b0b22 (diff)
thumbs (12aug11)
git-svn-id: svn://tug.org/texlive/trunk@23516 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/thumbs')
-rw-r--r--Master/texmf-dist/source/latex/thumbs/thumbs.drv4
-rw-r--r--Master/texmf-dist/source/latex/thumbs/thumbs.dtx744
-rw-r--r--Master/texmf-dist/source/latex/thumbs/thumbs.ins6
3 files changed, 571 insertions, 183 deletions
diff --git a/Master/texmf-dist/source/latex/thumbs/thumbs.drv b/Master/texmf-dist/source/latex/thumbs/thumbs.drv
index f351a9dc120..5eb7c3355b8 100644
--- a/Master/texmf-dist/source/latex/thumbs/thumbs.drv
+++ b/Master/texmf-dist/source/latex/thumbs/thumbs.drv
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: thumbs
-%% Version: 2011/06/24 v1.0g
+%% Version: 2011/08/08 v1.0h
%%
%% Copyright (C) 2010, 2011 by
%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
@@ -40,7 +40,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2009/09/24]
\ProvidesFile{thumbs.drv}%
- [2011/06/24 v1.0g Thumb marks and overwiew page(s) (HMM)]%
+ [2011/08/08 v1.0h Thumb marks and overwiew page(s) (HMM)]%
\documentclass[landscape]{ltxdoc}[2007/11/11]% v2.0u
\usepackage{geometry}[2010/09/12]% v5.6
\usepackage{holtxdoc}[2011/02/04]% v0.21
diff --git a/Master/texmf-dist/source/latex/thumbs/thumbs.dtx b/Master/texmf-dist/source/latex/thumbs/thumbs.dtx
index 8d319613ed9..33ddabc8d33 100644
--- a/Master/texmf-dist/source/latex/thumbs/thumbs.dtx
+++ b/Master/texmf-dist/source/latex/thumbs/thumbs.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% File: thumbs.dtx
-% Version: 2011/06/24 v1.0g
+% Version: 2011/08/08 v1.0h
%
% Copyright (C) 2010, 2011 by
% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
@@ -79,7 +79,7 @@
\input docstrip.tex
\Msg{*************************************************************************}
\Msg{* Installation}
-\Msg{* Package: thumbs 2011/06/24 v1.0g Thumb marks and overwiew page(s) (HMM)}
+\Msg{* Package: thumbs 2011/08/08 v1.0h Thumb marks and overwiew page(s) (HMM)}
\Msg{*************************************************************************}
\keepsilent
@@ -91,7 +91,7 @@
This is a generated file.
Project: thumbs
-Version: 2011/06/24 v1.0g
+Version: 2011/08/08 v1.0h
Copyright (C) 2010, 2011 by
H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
@@ -175,7 +175,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}[2009/09/24]
\ProvidesFile{thumbs.drv}%
- [2011/06/24 v1.0g Thumb marks and overwiew page(s) (HMM)]%
+ [2011/08/08 v1.0h Thumb marks and overwiew page(s) (HMM)]%
\documentclass[landscape]{ltxdoc}[2007/11/11]% v2.0u
\usepackage{geometry}[2010/09/12]% v5.6
\usepackage{holtxdoc}[2011/02/04]% v0.21
@@ -212,7 +212,7 @@ and the derived files
%
% \fi
%
-% \CheckSum{1995}
+% \CheckSum{2281}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -265,7 +265,7 @@ and the derived files
% \DoNotIndex{\hspace,\thepage}
%
% \title{The \xpackage{thumbs} package}
-% \date{2011/06/24 v1.0g}
+% \date{2011/08/08 v1.0h}
% \author{H.-Martin M\"{u}nch\\\xemail{Martin.Muench at Uni-Bonn.de}}
%
% \maketitle
@@ -298,7 +298,7 @@ and the derived files
%
% \tableofcontents
%
-% \bigskip
+% \newpage
%
% \section{Introduction}
% \indent This package puts running, customizable thumb marks in the outer
@@ -364,11 +364,6 @@ and the derived files
% \DescribeMacro{options}
% \indent The \xpackage{thumbs} package takes the following options:
%
-% \subsubsection{pagecolor\label{sss:pagecolor}}
-% \DescribeMacro{pagecolor}
-% \indent Option |pagecolor| wants to know the background colour of the pages
-% for use with the \texttt{xcolor} package. The default value is |white|.
-%
% \subsubsection{linefill\label{sss:linefill}}
% \DescribeMacro{linefill}
% \indent Option |linefill| wants to know how the line between object
@@ -395,8 +390,6 @@ and the derived files
% marks. If smaller thumb marks are really wanted, choose a smaller |minheight|
% (e.\,g.~$0\unit{pt}$).
%
-% \pagebreak
-%
% \subsubsection{width\label{sss:width}}
% \DescribeMacro{width}
% \indent Option |width| wants to know the horizontal extension of each thumb mark.
@@ -419,6 +412,8 @@ and the derived files
% is 1 inch plus |\th@bmsvoffset| plus |\topmargin|. Dimensions (e.\,g. $1\unit{cm}$)
% are also accepted.
%
+% \pagebreak
+%
% \subsubsection{bottomthumbmargin\label{sss:bottomthumbmargin}}
% \DescribeMacro{bottomthumbmargin}
% \indent Option |bottomthumbmargin| wants to know the vertical spacing between
@@ -443,8 +438,8 @@ and the derived files
%
% \item[- |titleandpage|] hyperlinks the \emph{title and page} numbers of the thumb marks
%
-% \item[- |line|] hyperlinks the whole \emph{line}, i.\,e. title, dots (or line or whatsoever)%
-% and page numbers of the thumb marks
+% \item[- |line|] hyperlinks the whole \emph{line}, i.\,e. title, dots%
+% (or line or whatsoever) and page numbers of the thumb marks
%
% \item[- |rule|] hyperlinks the whole \emph{rule}.
% \end{description}
@@ -481,6 +476,26 @@ and the derived files
% or use |draft=false|, or |final|, or |final=true| to get the original appearance
% of the thumb marks.\\
%
+% \subsubsection{hidethumbs\label{sss:hidethumbs}}
+% \DescribeMacro{hidethumbs}
+% \indent Option |hidethumbs| (\emph{not} the default) prevents \xpackage{thumbs}
+% to create thumb marks (or thumb marks overview pages). This could be useful
+% when thumb marks were placed, but for some reason no thumb marks (and overview pages)
+% shall be placed. Removing |\usepackage[...]{thumbs}| would not work but
+% create errors for unknown commands (e.\,g. |\addthumb|, |\addtitlethumb|,
+% |\thumbnewcolumn|, |\stopthumb|, |\continuethumb|, |\addthumbsoverviewtocontents|,
+% |\thumbsoverview|, |\thumbsoverviewback|, |\thumbsoverviewverso|, and
+% |\thumbsoverviewdouble|). (A~|\jobname.tmb| file is created nevertheless.)~--
+% Either do not use this option with the \xpackage{thumbs}
+% package at all, or use |hidethumbs=false| to get the original appearance
+% of the thumb marks.\\
+%
+% \subsubsection{pagecolor (obsolete)\label{sss:pagecolor}}
+% \DescribeMacro{pagecolor}
+% \indent Option |pagecolor| is obsolete. Instead the \xpackage{pagecolor}
+% package is used. Use |\pagecolor{...}| \emph{after} |\usepackage[...]{thumbs}|
+% and \emph{before} |\begin{document}| to define a background colour of the pages.\\
+%
% \bigskip
%
% \subsection{Commands to be used in the document}
@@ -512,7 +527,7 @@ and the derived files
% at the thumb marks overview page shall link to. The \xpackage{thumbs} package does
% \emph{not} create that label! But for the first page the label
% \texttt{pagesLTS.0} can be use, which is already placed there by the used
-% \xpackage{pagesLTS} package.\\
+% \xpackage{pageslts} package.\\
%
% \subsubsection{\textbackslash stopthumb and \textbackslash continuethumb}
% \DescribeMacro{\stopthumb}
@@ -521,16 +536,41 @@ and the derived files
% (without parameters). Placing another thumb mark with |\addthumb| or |\addtitlethumb|
% or using the command |\continuethumb| continues the thumb marks.\\
%
-% \subsubsection{\textbackslash thumbsoverview}
+% \subsubsection{\textbackslash thumbsoverview/back/verso/double}
% \DescribeMacro{\thumbsoverview}
-% The command |\thumbsoverview| is used to place the overview page(s) for the thumb marks.
-% Its single parameter is used to mark this page/these pages (e.\,g. in the page header).
-% If these marks are not whished, |\thumbsoverview{}| will generate empty marks in the
+% \DescribeMacro{\thumbsoverviewback}
+% \DescribeMacro{\thumbsoverviewverso}
+% \DescribeMacro{\thumbsoverviewdouble}
+% The commands |\thumbsoverview|, |\thumbsoverviewback|, |\thumbsoverviewverso|, and/or
+% |\thumbsoverviewdouble| is/are used to place the overview page(s) for the thumb marks.
+% Their single parameter is used to mark this page/these pages (e.\,g. in the page header).
+% If these marks are not whished, |\thumbsoverview...{}| will generate empty marks in the
% page header(s). |\thumbsoverview| can be used more than once (for example at the
-% beginning and at the end of the document). The overviews have labels |TableOfThumbs1|,
+% beginning and at the end of the document, or |\thumbsoverview| at the beginning and
+% |\thumbsoverviewback| at the end). The overviews have labels |TableOfThumbs1|,
% |TableOfThumbs2|, and so on, which can be referred to with e.\,g. |\pageref{TableOfThumbs1}|.
% The reference |TableOfThumbs| (without number) aims at the last used Table of Thumbs
-% (for compatibility with older versions of this package).\\
+% (for compatibility with older versions of this package).
+% \begin{description}
+% \item[-] |\thumbsoverview| prints the thumb marks at the right side
+% and (in |twoside| mode) skips left sides (useful e.\,g. at the beginning
+% of a document)
+%
+% \item[-] |\thumbsoverviewback| prints the thumb marks at the left side
+% and (in |twoside| mode) skips right sides (useful e.\,g. at the end
+% of a document)
+%
+% \item[-] |\thumbsoverviewverso| prints the thumb marks at the right side
+% and (in |twoside| mode) repeats them at the next left side and so on
+% (useful anywhere in the document and when one wants to prevent empty
+% pages)
+%
+% \item[-] |\thumbsoverviewdouble| prints the thumb marks at the left side
+% and (in |twoside| mode) repeats them at the next right side and so on
+% (useful anywhere in the document and when one wants to prevent empty
+% pages)
+% \end{description}
+% \smallskip
%
% \subsubsection{\textbackslash thumbnewcolumn}
% \DescribeMacro{\thumbnewcolumn}
@@ -624,19 +664,19 @@ and the derived files
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% When compiling with SWP 5.50. Build 2960 %
%% (copyright MacKichan Software, Inc.), %
-%% these additional packages are needed: %
+%% this is additionally needed: %
%% \usepackage[T1]{fontenc} %
%% \usepackage{amsfonts} %
%% \usepackage[math]{cellspace} %
%% \usepackage{xcolor} %
%% \pagecolor{white} %
+%% \newcommand{\QTO}[2]{#2} %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\usepackage{lipsum}[2011/04/14]% v1.2
+\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,%
+ pdfpagelayout=TwoPageRight,pdfpagemode=UseThumbs,%
+ plainpages=false,pdfpagelabels=true,%
hyperindex=false,%
pdflang={en},%
pdftitle={thumbs package example},%
@@ -645,10 +685,18 @@ and the derived files
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},%
+\usepackage[thumblink=rule,linefill=dots,height={auto},minheight={47pt},%
width={auto},distance={2mm},topthumbmargin={auto},bottomthumbmargin={auto},%
- ignorehoffset=true,ignorevoffset=true,verbose=true]{thumbs}[2011/06/24]% v1.0g
+ ignorehoffset=true,ignorevoffset=true,final=true,hidethumbs=false,%
+ verbose=true]{thumbs}[2011/08/08]% v1.0h
+\nopagecolor% use \pagecolor{white} if \nopagecolor does not work
\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}%
+\makeatletter
+ \@ifundefined{Hy@Warning}{% hyperref not loaded
+ \@ifundefined{\url}{\let\url\verb}% neither url
+ }{% hyperref loaded
+ }%
+\makeatother
\listfiles
\begin{document}
\pagenumbering{arabic}
@@ -657,13 +705,13 @@ and the derived files
\markboth{Example for thumbs}{Example for thumbs}
This example demonstrates the most common uses of package
-\textsf{thumbs}, v1.0g as of 2011/06/24 (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\}}, \texttt{ignorehoffset=true},
-\texttt{ignorevoffset=true},and \texttt{verbose=true}.
+\textsf{thumbs}, v1.0h as of 2011/08/08 (HMM).
+The used options were \texttt{thumblink=rule}, \texttt{linefill=dots},
+\texttt{height=auto}, \texttt{minheight=\{47pt\}}, \texttt{width={auto}},
+\texttt{distance=\{2mm\}}, \newline
+\texttt{topthumbmargin=\{auto\}}, \texttt{bottomthumbmargin=\{auto\}},
+\texttt{ignorehoffset=true}, \texttt{ignorevoffset=true},
+\texttt{final=true},\texttt{hidethumbs=false}, and \texttt{verbose=true}.
\noindent These are the default options, except \texttt{verbose=true}.
For more details please see the documentation!\newline
@@ -674,7 +722,7 @@ the references in the overview page for the thumb marks are also hyperlinked
\bigskip
-{\color{green} Save per page about $200\unit{ml}$ water, $2\unit{g}$ CO$_{2}$
+{\color{teal} 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.}\newline
@@ -916,6 +964,20 @@ $=\frac{1}{1.\,955\,83}\,$\euro $\,=1/1.\,955\,83\unit{Euro}=1/1.\,955\,83\unit{
\newpage
+Let us have a look at \verb|\thumbsoverviewverso|:
+
+\addthumbsoverviewtocontents{section}{Table of Thumbs, verso mode}%
+\thumbsoverviewverso{Table of Thumbs, verso mode}
+
+\newpage
+
+And, of course, also at \verb|\thumbsoverviewdouble|:
+
+\addthumbsoverviewtocontents{section}{Table of Thumbs, double mode}%
+\thumbsoverviewdouble{Table of Thumbs, double mode}
+
+\newpage
+
\addthumb{E mark}{\Huge{\textbf{E}}}{lightgray}{black}
I am just adding further thumb marks.
@@ -942,21 +1004,14 @@ Some text.
I just added another thumb mark.
-% \end{macrocode}
-%
-% \pagebreak
-%
-% \begin{macrocode}
\newpage
\pagecolor{green}
\makeatletter
\@ifundefined{Hy@Warning}{% hyperref not loaded
- \let\url\verb%
- }{% hyperref loaded
- \phantomsection%
- }%
+ }{\phantomsection% hyperref loaded
+ }%
\makeatother
\label{greenpage}
@@ -965,7 +1020,7 @@ Some faulty pdf-viewer sometimes (for the same document!)
adds a white line at the bottom and right side of the document
when presenting it. This does not change the printed version.
To test for this problem, this page has been completely coloured.
-(Probably better exclude this page from printing\ldots{})
+(Probably better exclude this page from printing!)
\textsc{Heiko Oberdiek} wrote at Tue, 26 Apr 2011 14:13:29 +0200
in the \newline
@@ -982,6 +1037,11 @@ for the other sides the $\unit{pt}$ are written as $\unit{bp}$ into
the pdf-file, i.\,e. the rule is too large by $72.27/72$, which
should cover also rounding errors.)
+% \end{macrocode}
+%
+% \pagebreak
+%
+% \begin{macrocode}
The thumb marks are also too large - on purpose! This has been done
to assure, that they cover the page up to its (paper) border,
therefore they are placed a little bit over the paper margin.
@@ -989,16 +1049,9 @@ therefore they are placed a little bit over the paper margin.
Now I red somwhere in the net (should have remembered to note the url),
that white margins are presented, whenever there is some object outside
of the page. Thus, it is a feature, not a bug?!
-What I do not understand: The same version of the viewer (at same operating
-system) at one PC shows white margins, and at another one does not. Strange.
-Even stranger: The same document sometimes is presented with white lines
-and sometimes without.\newline
+What I do not understand: The same document sometimes is presented
+with white lines and sometimes without (same viewer, same PC).\newline
But at least it does not influence the printed version.
-% \end{macrocode}
-%
-% \pagebreak
-%
-% \begin{macrocode}
\newpage
@@ -1011,9 +1064,16 @@ here: page \pageref{TableOfThumbs1}, page \pageref{TableOfThumbs2},
and via e.\,g. \verb|\pageref{TableOfThumbs}| it is referred to the last used
Table of Thumbs (for compatibility with older package versions).
If there is only one Table of Thumbs, this one is also the last one, of course.
-Here it is at page \pageref{TableOfThumbs}.
+Here it is at page \pageref{TableOfThumbs}.\newline
+
+Now let us have a look at \verb|\thumbsoverviewback|:
+
+\addthumbsoverviewtocontents{section}{Table of Thumbs, back mode}%
+\thumbsoverviewback{Table of Thumbs, back mode}
-\thumbsoverview{Table of Thumbs again}
+\newpage
+
+Text can be placed after any of the Tables of Thumbs, of course.
\end{document}
%</example>
@@ -1034,7 +1094,7 @@ Here it is at page \pageref{TableOfThumbs}.
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[2009/09/24]
-\ProvidesPackage{thumbs}[2011/06/24 v1.0g
+\ProvidesPackage{thumbs}[2011/08/08 v1.0h
Thumb marks and overwiew page(s) (HMM)]
% \end{macrocode}
@@ -1052,7 +1112,7 @@ Here it is at page \pageref{TableOfThumbs}.
% software (can we?), and there will be a stack overflow when using \xpackage{hyperref}
% even before the \xpackage{thumbs} package is loaded, thus the warning might not
% even reach the users. (Thus: Read the manual of the \xpackage{thumbs} package!)
-% The options for those packages might be changed by the user -- I did not
+% The options for those packages might be changed by the user~-- I~did not
% test all available options, thus first test, whether the document can be compiled
% with these options, and then try to change them according to your whishes.
%
@@ -1061,13 +1121,14 @@ Here it is at page \pageref{TableOfThumbs}.
Please see the sw(p)*.log or \jobname.log-file! *** ^^J}
\PackageWarningNoLine{thumbs}{%
When compiling with SWP 5.50 Build 2960\MessageBreak%
- (\copyright\ MacKichan Software, Inc.),\MessageBreak%
+ (\copyright\space MacKichan Software, Inc.),\MessageBreak%
these additional packages are needed:\MessageBreak%
\string\usepackage[T1]{fontenc}\MessageBreak%
\string\usepackage{amsfonts}\MessageBreak%
\string\usepackage[math]{cellspace}\MessageBreak%
\string\usepackage{xcolor}\MessageBreak%
\string\pagecolor{white}\MessageBreak%
+ \string\newcommand{\string\QTO}[2]{\string#2}\MessageBreak%
especially before hyperref and thumbs,\MessageBreak%
but best right after the \string\documentclass!\MessageBreak%
}
@@ -1092,12 +1153,13 @@ Here it is at page \pageref{TableOfThumbs}.
%
% \pagebreak
%
-% For the total number of the current page we need the \xpackage{pagesLTS}
+% For the total number of the current page we need the \xpackage{pageslts}
% package of myself (see subsection~\ref{ss:Downloads}). It also loads
% the \xpackage{undolabl} package, which is needed for |\overridelabel|:
%
% \begin{macrocode}
-\RequirePackage{pagesLTS}[2011/03/17]% v1.1o
+\RequirePackage{pageslts}[2011/08/08]% v1.2a
+\RequirePackage{pagecolor}[2011/08/08]% v1.0c
\RequirePackage{rerunfilecheck}[2011/04/15]% v1.7
\RequirePackage{infwarerr}[2010/04/08]% v1.3
\RequirePackage{atveryend}[2011/04/23]% v1.7
@@ -1118,8 +1180,7 @@ Here it is at page \pageref{TableOfThumbs}.
%
% \begin{macrocode}
\SetupKeyvalOptions{family=thumbs,prefix=thumbs@}
-\DeclareStringOption[white]{pagecolor}[white]% \thumbs@pagecolor
-\DeclareStringOption{linefill}[dots]
+\DeclareStringOption{linefill}[dots]% \thumbs@linefill
\DeclareStringOption[rule]{thumblink}[rule]
\DeclareStringOption[47pt]{minheight}[47pt]
\DeclareStringOption{height}[auto]
@@ -1133,11 +1194,39 @@ Here it is at page \pageref{TableOfThumbs}.
\DeclareComplementaryOption{silent}{verbose}
\DeclareBoolOption{draft}
\DeclareComplementaryOption{final}{draft}
+\DeclareBoolOption[false]{hidethumbs}
+% \end{macrocode}
+%
+% \DescribeMacro{pagecolor}
+% The |pagecolor| option is obsolete now, but for compatibility with older
+% documents we still provide it at the time beeing (might be removed
+% in future versions).
+%
+% \begin{macrocode}
+\DeclareStringOption{pagecolor}
\ProcessKeyvalOptions*
% \end{macrocode}
%
+% We set the (background) page colour to |\thepagecolor| (from the
+% \xpackage{pagecolor} package), because the \xpackage{xcolour} package needs
+% a defined colour here (it~can be changed later).
+%
+% \begin{macrocode}
+\ifx\thumbs@pagecolor\empty%
+ \pagecolor{\thepagecolor}
+\else
+ \PackageWarningNoLine{thumbs}{Option pagecolor is obsolete.\MessageBreak%
+ Instead the pagecolor package is used.\MessageBreak%
+ Use \string\pagecolor{...}\space after \string\usepackage[...]{thumbs}\space and\MessageBreak%
+ before \string\begin{document}\space to define a background colour\MessageBreak%
+ of the pages}
+ \pagecolor{\thumbs@pagecolor}
+\fi
+
+% \end{macrocode}
+%
% \DescribeMacro{ignorehoffset}
% \DescribeMacro{ignorevoffset}
% Usually |\hoffset| and |\voffset| should be regarded, but moving the
@@ -1185,14 +1274,7 @@ Here it is at page \pageref{TableOfThumbs}.
% \end{macrocode}
%
-% \DescribeMacro{pagecolor}
-% We set the (background) page colour to |\thumbs@pagecolor|, because the
-% \texttt{xcolour} package needs a defined colour here (it~can be changed later).
-%
-% \begin{macrocode}
-\pagecolor{\thumbs@pagecolor}
-
-% \end{macrocode}
+% \pagebreak
%
% \DescribeMacro{linefill}
% We process the |linefill| option value:
@@ -1246,6 +1328,11 @@ Here it is at page \pageref{TableOfThumbs}.
\setlength{\th@mbsdistance}{\thumbs@distance}
\fi
+% \end{macrocode}
+%
+% \pagebreak
+%
+% \begin{macrocode}
\ifthumbs@verbose% \relax
\else
\PackageWarningNoLine{thumbs}{%
@@ -1281,13 +1368,13 @@ Here it is at page \pageref{TableOfThumbs}.
\gdef\th@mbtitle{}
\gdef\th@mbtext{}
-\gdef\th@mbtextcolour{\thumbs@pagecolor}
-\gdef\th@mbbackgroundcolour{\thumbs@pagecolor}
+\gdef\th@mbtextcolour{\thepagecolor}
+\gdef\th@mbbackgroundcolour{\thepagecolor}
\gdef\th@mbcolumn{0}
\gdef\th@mbtextA{}
-\gdef\th@mbtextcolourA{\thumbs@pagecolor}
-\gdef\th@mbbackgroundcolourA{\thumbs@pagecolor}
+\gdef\th@mbtextcolourA{\thepagecolor}
+\gdef\th@mbbackgroundcolourA{\thepagecolor}
\gdef\th@mbprinting{1}
\gdef\th@mbtoprint{0}
@@ -1296,8 +1383,6 @@ Here it is at page \pageref{TableOfThumbs}.
\gdef\th@mbcolumnnew{0}
-\gdef\thumb@two{2}% There is no \pagesLTS@two (yet).
-
\gdef\th@mbs@toc@level{}
\gdef\th@mbs@toc@text{}
@@ -1364,7 +1449,7 @@ Here it is at page \pageref{TableOfThumbs}.
\else
\gdef\th@bmsvoffset{\voffset}
\fi
- \global\edef\th@mbpaperwidth{\the\paperwidth}
+ \xdef\th@mbpaperwidth{\the\paperwidth}
\setlength{\th@mbposyA}{1pt}
\ifdim \thumbs@minheight < \th@mbposyA% too small
\setlength{\thumbs@minheight}{1pt}
@@ -1448,8 +1533,6 @@ Here it is at page \pageref{TableOfThumbs}.
\newread\@instreamthumb%
% \end{macrocode}
%
-% \pagebreak
-%
% Inform the users about the dimensions of the thumb marks (look in the \xfile{log} file):
%
% \begin{macrocode}
@@ -1500,11 +1583,6 @@ Here it is at page \pageref{TableOfThumbs}.
\ifdim \thumbs@width > \th@mbposyA% OK
\setlength{\th@mbwidthx}{\thumbs@width}
\else
-% \end{macrocode}
-%
-% \pagebreak
-%
-% \begin{macrocode}
\PackageError{thumbs}{Thumbs not wide enought}{%
Option width has value '\thumbs@width'.\MessageBreak%
This is not a valid dimension larger than zero.\MessageBreak%
@@ -1539,6 +1617,11 @@ Here it is at page \pageref{TableOfThumbs}.
\ifx\thumbs@topthumbmargin\empty%
\def\thumbs@topthumbmargin{auto}
\fi
+% \end{macrocode}
+%
+% \pagebreak
+%
+% \begin{macrocode}
\def\th@mbstest{auto}
\ifx\thumbs@topthumbmargin\th@mbstest%
\setlength{\th@mbposy}{1in}
@@ -1611,7 +1694,7 @@ Here it is at page \pageref{TableOfThumbs}.
Option bottomthumbmargin has value '\thumbs@bottomthumbmargin'.\MessageBreak%
bottomthumbmargin will be set to '\the\th@mbposyA'.\MessageBreak%
}
- \global\edef\thumbs@bottomthumbmargin{\the\th@mbposyA}
+ \xdef\thumbs@bottomthumbmargin{\the\th@mbposyA}
\fi
\setlength{\th@mbposyA}{\thumbs@bottomthumbmargin}
\setlength{\@tempdimc}{-1pt}
@@ -1635,6 +1718,8 @@ Here it is at page \pageref{TableOfThumbs}.
\fi
% \end{macrocode}
%
+% \pagebreak
+%
% |\th@mbposyA| is no longer used as temporary dimension here, but set to the top-most
% vertical thumb position~(y). Because it will be increased (i.\,e.~the thumb positions
% will move downwards on the page), |\th@mbsposytocyy| is used to remember this position
@@ -1666,7 +1751,7 @@ Here it is at page \pageref{TableOfThumbs}.
\else%
\advance\th@mbposy-\th@mbheighty%
\advance\th@mbposy-\th@mbsdistance%
- \thumborigaddthumb{}{}{\thumbs@pagecolor}{\thumbs@pagecolor}%
+ \thumborigaddthumb{}{}{\string\thepagecolor}{\string\thepagecolor}%
\th@mb@dvance%
\fi%
}
@@ -1676,8 +1761,8 @@ Here it is at page \pageref{TableOfThumbs}.
% \DescribeMacro{\thumbnewcolumn}
% With the command |\thumbnewcolumn| a new column can be started, even if the current one
% was not filled. This could be useful e.\,g. for a dictionary, which uses one column for
-% translations from language A to language B, and the second column for translations
-% from language B to language A. But in that case one probably should increase the
+% translations from language~A to language~B, and the second column for translations
+% from language~B to language~A. But in that case one probably should increase the
% size of the thumb marks, so that $26$~thumb marks (in~case of the latin alphabet)
% fill one thumb column. Do not use |\thumbnewcolumn| on a page where |\addthumb| was
% already used, but use |\addthumb| immediately after |\thumbnewcolumn|.
@@ -1694,6 +1779,11 @@ Here it is at page \pageref{TableOfThumbs}.
Your command \string\thumbnewcolumn\space will be ignored now.%
}%
\else%
+% \end{macrocode}
+%
+% \pagebreak
+%
+% \begin{macrocode}
\PackageWarning{thumbs}{%
Starting of another column requested by command\MessageBreak%
\string\thumbnewcolumn.\space Only use this command directly\MessageBreak%
@@ -1717,13 +1807,13 @@ Here it is at page \pageref{TableOfThumbs}.
% and the fifth argument consists of the label of the page, where the hyperlink
% at the thumb marks overview page shall link to. For the first page the label
% \texttt{pagesLTS.0} can be use, which is already placed there by the used
-% \xpackage{pagesLTS} package.
+% \xpackage{pageslts} package.
%
% \begin{macrocode}
\newcommand{\addtitlethumb}[5]{%
- \global\edef\th@mb@titlelabel{#5}%
+ \xdef\th@mb@titlelabel{#5}%
\addthumb{#1}{#2}{#3}{#4}%
- \global\edef\th@mb@titlelabel{}%
+ \xdef\th@mb@titlelabel{}%
}
% \end{macrocode}
@@ -1744,15 +1834,17 @@ Here it is at page \pageref{TableOfThumbs}.
\setlength{\th@mbposy}{\th@mbposytop}%
\advance\th@mbposy\th@mbsdistance%
\ifx\th@mbcolumn\pagesLTS@zero%
- \global\edef\th@umbsperpagecount{\th@mbs}%
+ \xdef\th@umbsperpagecount{\th@mbs}%
\gdef\th@mbcolumn{1}%
\fi%
\fi%
\setcounter{th@mbs@tmpA}{\th@mbs}%
\addtocounter{th@mbs@tmpA}{+1}%
- \global\edef\th@mbs{\arabic{th@mbs@tmpA}}%
+ \xdef\th@mbs{\arabic{th@mbs@tmpA}}%
% \end{macrocode}
%
+% \pagebreak
+%
% The |\addthumb| command has four parameters:
% \begin{enumerate}
% \item a title for the thumb mark (for the thumb marks overview page,
@@ -1782,7 +1874,7 @@ Here it is at page \pageref{TableOfThumbs}.
\edef\th@mbstmpwidth{\the\th@mbposyA}%
\settowidth{\th@mbposyA}{\th@mbtext\space}%
\ifdim\th@mbposyA>\th@mbmaxwidth%
- \global\edef\th@mbmaxwidth{\the\th@mbposyA}%
+ \xdef\th@mbmaxwidth{\the\th@mbposyA}%
\fi%
\ifdim\th@mbposyA>\th@mbwidthx%
\ifthumbs@draft% \relax
@@ -1790,8 +1882,8 @@ Here it is at page \pageref{TableOfThumbs}.
\edef\thumbsinfoa{\the\th@mbwidthx}
\edef\thumbsinfob{\the\th@mbposyA}
\PackageWarning{thumbs}{%
- Thumb mark too small (width: \thumbsinfoa)\MessageBreak%
- or its text too wide (width: \thumbsinfob)\MessageBreak%
+ Thumb mark too small (width: \thumbsinfoa )\MessageBreak%
+ or its text too wide (width: \thumbsinfob )\MessageBreak%
}%
\fi%
\fi%
@@ -1840,13 +1932,8 @@ Here it is at page \pageref{TableOfThumbs}.
\else%
\setcounter{th@mbs@tmpA}{\th@mbonpage}%
\addtocounter{th@mbs@tmpA}{+1}%
- \global\edef\th@mbonpage{\arabic{th@mbs@tmpA}}%
+ \xdef\th@mbonpage{\arabic{th@mbs@tmpA}}%
\fi%
-% \end{macrocode}
-%
-% \pagebreak
-%
-% \begin{macrocode}
\ifx\th@mbtoprint\pagesLTS@zero%
\else%
\ifx\th@mbcolumnnew\pagesLTS@zero%
@@ -1869,12 +1956,17 @@ Here it is at page \pageref{TableOfThumbs}.
\ifx\th@mbcolumnnew\pagesLTS@zero%
\setcounter{th@mbs@tmpA}{1}%
\edef\th@mbonpagetest{\arabic{th@mbs@tmpA}}%
+% \end{macrocode}
+%
+% \pagebreak
+%
+% \begin{macrocode}
\@whilenum\th@mbonpagetest<\th@mbonpage\do{%
\addtocounter{th@mbs@tmpA}{1}%
- \global\edef\th@mbonpagetest{\arabic{th@mbs@tmpA}}%
+ \xdef\th@mbonpagetest{\arabic{th@mbs@tmpA}}%
\ifnum\th@mbonpage=\th@mbonpagetest%
\ifnum\th@mbonpagemax<\th@mbonpage%
- \global\edef\th@mbonpagemax{\th@mbonpage}%
+ \xdef\th@mbonpagemax{\th@mbonpage}%
\fi%
\edef\th@mbtmpdef{\csname th@mbtext\AlphAlph{\arabic{th@mbs@tmpA}}\endcsname}%
\expandafter\gdef\th@mbtmpdef{#2}%
@@ -1886,11 +1978,11 @@ Here it is at page \pageref{TableOfThumbs}.
}%
\else%
\ifnum\th@mbonpagemax<\th@mbonpage%
- \global\edef\th@mbonpagemax{\th@mbonpage}%
+ \xdef\th@mbonpagemax{\th@mbonpage}%
\fi%
\fi%
\fi%
- \ifx\th@mbcolumnnew\thumb@two% There is no \pagesLTS@two (yet).
+ \ifx\th@mbcolumnnew\pagesLTS@two%
\gdef\th@mbcolumnnew{0}%
\fi%
\gdef\th@mbtoprint{1}%
@@ -1955,19 +2047,37 @@ Here it is at page \pageref{TableOfThumbs}.
\def\th@mb@tmp@page{#5}%
\def\th@mb@tmp@label{#6}%
\def\th@mb@tmp@column{#7}%
- \ifx\th@mb@tmp@column\thumb@two%
+ \ifx\th@mb@tmp@column\pagesLTS@two%
\def\th@mb@tmp@column{0}%
\fi%
\setlength{\th@mbwidthxtoc}{\paperwidth}%
\advance\th@mbwidthxtoc-1in%
- \advance\th@mbwidthxtoc-\hoffset%
- \advance\th@mbwidthxtoc-\oddsidemargin%
+% \end{macrocode}
+%
+% Depending on which side the thumb marks should be placed the
+% according dimensions have to be adapted.
+%
+% \begin{macrocode}
+ \def\th@mbstest{r}%
+ \ifx\th@mbstest\th@mbsprintpage% r
+ \advance\th@mbwidthxtoc-\oddsidemargin%
+ \setlength{\@tempdimc}{1in}%
+ \advance\@tempdimc+\oddsidemargin%
+ \else% l
+ \advance\th@mbwidthxtoc-\evensidemargin%
+ \setlength{\@tempdimc}{\th@bmshoffset}%
+ \advance\@tempdimc-\hoffset
+ \fi%
+ \put(\@tempdimc,-\th@mbposy){%
+ \def\th@mbstest{l}%
+ \ifx\th@mbstest\th@mbsprintpage% l
+ \advance\th@mbwidthxtoc+\evensidemargin%
+ \fi%
% \end{macrocode}
%
% \pagebreak
%
% \begin{macrocode}
- \put(1in+\oddsidemargin,-\th@mbposy){%
\begin{picture}(0,0)%
% \end{macrocode}
%
@@ -1993,6 +2103,15 @@ Here it is at page \pageref{TableOfThumbs}.
\end{picture}%
% \end{macrocode}
%
+% When |\th@mbsprintpage| is |l|, before the picture |\th@mbwidthxtoc| was changed,
+% which must be reverted now.
+%
+% \begin{macrocode}
+ \ifx\th@mbstest\th@mbsprintpage% l
+ \advance\th@mbwidthxtoc-\evensidemargin%
+ \fi%
+% \end{macrocode}
+%
% When |\th@mb@tmp@column| is zero, then this is \textbf{not} a blank thumb mark from |thumbnewcolumn|,
% and we need to fill it with some content. If it is not zero, it is a blank thumb mark,
% and nothing needs to be done here.
@@ -2002,13 +2121,35 @@ Here it is at page \pageref{TableOfThumbs}.
\setlength{\th@mbwidthxtoc}{\paperwidth}%
\advance\th@mbwidthxtoc-1in%
\advance\th@mbwidthxtoc-\hoffset%
- \advance\th@mbwidthxtoc-\oddsidemargin%
+ \ifx\th@mbstest\th@mbsprintpage% l
+ \advance\th@mbwidthxtoc-\evensidemargin%
+ \else%
+ \advance\th@mbwidthxtoc-\oddsidemargin%
+ \fi%
\advance\th@mbwidthxtoc-\th@mbwidthx%
\advance\th@mbwidthxtoc-20pt%
\ifdim\th@mbwidthxtoc>\textwidth%
- \setlength{\th@mbwidthxtoc}{\textwidth}
- \fi
- \begin{picture}(0,0)(0,-0.5\th@mbheighty+384930sp)%
+ \setlength{\th@mbwidthxtoc}{\textwidth}%
+ \fi%
+% \end{macrocode}
+%
+% Depending on which side the thumb marks should be placed the
+% according dimensions have to be adapted here, too.
+%
+% \begin{macrocode}
+ \ifx\th@mbstest\th@mbsprintpage% l
+ \begin{picture}(0,0)(-6pt,-0.5\th@mbheighty+384930sp)%
+ \bgroup%
+ \setlength{\parindent}{0pt}%
+ \makebox[\th@mbwidthx][l]{{\color{\th@mb@tmp@textcolour}\th@mb@tmp@text}}%
+ \egroup%
+ \end{picture}%
+ \setlength{\@tempdimc}{-1in}%
+ \advance\@tempdimc-\evensidemargin%
+ \else% r
+ \setlength{\@tempdimc}{0pt}%
+ \fi%
+ \begin{picture}(0,0)(\@tempdimc,-0.5\th@mbheighty+384930sp)%
\bgroup%
\setlength{\parindent}{0pt}%
\vbox%
@@ -2020,7 +2161,7 @@ Here it is at page \pageref{TableOfThumbs}.
% \item[- |none|] creates \emph{none} hyperlink
%
% \begin{macrocode}
- \def\th@mbstest{none}
+ \def\th@mbstest{none}%
\ifx\thumbs@thumblink\th@mbstest%
{\color{\th@mb@tmp@textcolour}\noindent \th@mb@tmp@title%
\leaders\box \ThumbsBox {\th@mbs@linefill \th@mb@tmp@page}%
@@ -2052,6 +2193,8 @@ Here it is at page \pageref{TableOfThumbs}.
\else%
% \end{macrocode}
%
+% \pagebreak
+%
% \item[- |titleandpage|] hyperlinks the \emph{title and page} numbers of the thumb marks
%
% \begin{macrocode}
@@ -2120,15 +2263,18 @@ Here it is at page \pageref{TableOfThumbs}.
% \end{macrocode}
%
% The thumb mark (with text) as set in the document outside of the thumb marks overview page(s)
-% is also presented here.
+% is also presented here, except when we are printing at the left side.
%
% \begin{macrocode}
- \begin{picture}(0,0)(1in+\th@bmshoffset+\oddsidemargin-\th@mbxpos+20pt,-0.5\th@mbheighty+384930sp)%
- \bgroup%
- \setlength{\parindent}{0pt}%
- \makebox[\th@mbwidthx][r]{{\color{\th@mb@tmp@textcolour}\th@mb@tmp@text}}%
- \egroup%
- \end{picture}%
+ \ifx\th@mbstest\th@mbsprintpage% l; relax
+ \else%
+ \begin{picture}(0,0)(1in+\oddsidemargin-\th@mbxpos+20pt,-0.5\th@mbheighty+384930sp)%
+ \bgroup%
+ \setlength{\parindent}{0pt}%
+ \makebox[\th@mbwidthx][r]{{\color{\th@mb@tmp@textcolour}\th@mb@tmp@text}}%
+ \egroup%
+ \end{picture}%
+ \fi%
\fi%
}%
}
@@ -2154,6 +2300,8 @@ Here it is at page \pageref{TableOfThumbs}.
% \end{macrocode}
%
+% \pagebreak
+%
% \DescribeMacro{\th@mbprint}
% |\th@mbprint| places a |picture| containing the thumb mark on the page.
%
@@ -2206,6 +2354,8 @@ Here it is at page \pageref{TableOfThumbs}.
\addtocounter{th@mbs@tmpA}{-1}% because CurrentPage is already the one of the next page
% \end{macrocode}
%
+% \pagebreak
+%
% Changing the paper size mid-document will probably cause some problems.
% But if it works, we try to cope with it. (When the change is performed
% without changing |\paperwidth|, we cannot detect it. Sorry.)
@@ -2223,7 +2373,7 @@ Here it is at page \pageref{TableOfThumbs}.
\advance\th@mbposx-\hoffset%
\fi%
\advance\th@mbposx+1pt%
- \global\edef\th@mbpaperwidth{\the\paperwidth}%
+ \xdef\th@mbpaperwidth{\the\paperwidth}%
\fi%
% \end{macrocode}
%
@@ -2265,14 +2415,11 @@ Here it is at page \pageref{TableOfThumbs}.
%
% \pagebreak
%
-% \begin{macrocode}
- \setcounter{th@mbs@tmpA}{\th@mbonpage}%
-% \end{macrocode}
-%
% When more than one thumb mark was placed at that page, on the following pages
% only the last issued thumb mark shall appear.
%
% \begin{macrocode}
+ \setcounter{th@mbs@tmpA}{\th@mbonpage}%
\ifnum\value{th@mbs@tmpA}<2% \relax
\else%
\gdef\th@mbtextA{\th@mbtext}%
@@ -2314,7 +2461,7 @@ Here it is at page \pageref{TableOfThumbs}.
%
% \begin{macrocode}
\ifx\th@mbcolumn\pagesLTS@zero% if there is only one column of thumbs
- \global\edef\th@umbsperpagecount{\th@mbs}
+ \xdef\th@umbsperpagecount{\th@mbs}
\gdef\th@mbcolumn{1}
\fi
\ifx\th@umbsperpagecount\pagesLTS@zero
@@ -2388,20 +2535,149 @@ Here it is at page \pageref{TableOfThumbs}.
% \end{macrocode}
%
+% \DescribeMacro{\clearotherdoublepage}
+% We need a command to clear a double page, thus that the following text
+% is \emph{left} instead of \emph{right} as accomplished with the usual
+% |\cleardoublepage|. For this we take the original |\cleardoublepage| code
+% and revert the |\ifodd\c@page\else| (i.\,e. if even |\c@page|) condition.
+%
+% \begin{macrocode}
+\newcommand{\clearotherdoublepage}{%
+\clearpage\if@twoside \ifodd\c@page% removed "\else" from \cleardoublepage
+\hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi%
+}
+
+% \end{macrocode}
+%
+% When the \xpackage{hyperref} package is used, one might like to refer to the
+% thumb overview page(s), therefore |\th@mbstablabeling| command is defined
+% (and used later). First a~|\phantomsection| is added.
+% With or without \xpackage{hyperref} a label |TableOfThumbs1| (or |TableOfThumbs2|
+% or\ldots) is placed here. For compatibility with older versions of this
+% package also the label |TableOfThumbs| is created. Equal to older versions
+% it aims at the last used Table of Thumbs, but since version~1.0g \textbf{without}\\
+% |Error: Label TableOfThumbs multiply defined| - thanks to |\overridelabel| from
+% the \xpackage{undolabl} package (which is automatically loaded by the
+% \xpackage{pageslts} package).\\
+% When |\addthumbsoverviewtocontents| was used, the entry is placed into the
+% table of contents.
+%
+% \begin{macrocode}
+\newcommand{\th@mbstablabeling}{%
+ \@ifundefined{Hy@Warning}{}{\phantomsection}%
+ \let\label\thumbsoriglabel%
+ \ifx\th@mbstable\pagesLTS@one%
+ \label{TableOfThumbs}%
+ \label{TableOfThumbs1}%
+ \else%
+ \overridelabel{TableOfThumbs}%
+ \label{TableOfThumbs\th@mbstable}%
+ \fi%
+ \let\label\@gobble%
+ \ifx\th@mbs@toc@level\empty%\relax
+ \else \addcontentsline{toc}{\th@mbs@toc@level}{\th@mbs@toc@text}%
+ \fi%
+ }
+
+% \end{macrocode}
+%
% \DescribeMacro{\thumbsoverview}
-% |\thumbsoverview| is used to place the overview page(s) for the thumb marks.
-% Its parameter is used to mark this page/these pages (e.\,g. in the page header).
-% If these marks are not whished, |\thumbsoverview{}| will generate empty marks in the
-% page header(s). |\thumbsoverview| can be used more than once (for example at the
-% beginning and at the end of the document). The overviews have labels |TableOfThumbs1|,
-% |TableOfThumbs2| and so on, which can be referred to with e.\,g. |\pageref{TableOfThumbs1}|.
+% \DescribeMacro{\thumbsoverviewback}
+% \DescribeMacro{\thumbsoverviewverso}
+% \DescribeMacro{\thumbsoverviewdouble}
+% For compatibility with documents created using older versions of this package
+% |\thumbsoverview| did not get a second argument, but it is renamed to
+% |\thumbsoverviewprint| and additional to |\thumbsoverview| new commands are
+% introduced. It is of course also possible to use |\thumbsoverviewprint| with
+% its two arguments directly, therefore its name does not include any |@|
+% (saving the users the use of |\makeatother| and |\makeatletter|).\\
+% \begin{description}
+% \item[-] |\thumbsoverview| prints the thumb marks at the right side
+% and (in |twoside| mode) skips left sides (useful e.\,g. at the beginning
+% of a document)
+%
+% \item[-] |\thumbsoverviewback| prints the thumb marks at the left side
+% and (in |twoside| mode) skips right sides (useful e.\,g. at the end
+% of a document)
+%
+% \item[-] |\thumbsoverviewverso| prints the thumb marks at the right side
+% and (in |twoside| mode) repeats them at the next left side and so on
+% (useful anywhere in the document and when one wants to prevent empty
+% pages)
+%
+% \item[-] |\thumbsoverviewdouble| prints the thumb marks at the left side
+% and (in |twoside| mode) repeats them at the next right side and so on
+% (useful anywhere in the document and when one wants to prevent empty
+% pages)
+% \end{description}
+%
+% The |\thumbsoverview...| commands are used to place the overview page(s)
+% for the thumb marks. Their parameter is used to mark this page/these pages
+% (e.\,g. in the page header). If these marks are not whished,
+% |\thumbsoverview...{}| will generate empty marks in the page header(s).
+% |\thumbsoverview...| can be used more than once (for example at the
+% beginning and at the end of the document). The overviews have labels
+% |TableOfThumbs1|, |TableOfThumbs2| and so on, which can be referred to with
+% e.\,g. |\pageref{TableOfThumbs1}|.
% The reference |TableOfThumbs| (without number) aims at the last used Table of Thumbs
-% (for compatibility with older versions of this package).\\
-% |\thumbsoverview| works by calling the internal command |\th@mbs@verview| (see below),
-% repeating this until all thumb marks have been processed.
+% (for compatibility with older versions of this package).
+%
+% \begin{macrocode}
+\newcommand{\thumbsoverview}[1]{\thumbsoverviewprint{#1}{r}}
+
+\newcommand{\thumbsoverviewback}[1]{\thumbsoverviewprint{#1}{l}}
+
+\newcommand{\thumbsoverviewverso}[1]{\thumbsoverviewprint{#1}{v}}
+
+\newcommand{\thumbsoverviewdouble}[1]{\thumbsoverviewprint{#1}{d}}
+
+% \end{macrocode}
+%
+% \DescribeMacro{\thumbsoverviewprint}
+% |\thumbsoverviewprint| works by calling the internal command |\th@mbs@verview|
+% (see below), repeating this until all thumb marks have been processed.
+%
+% \begin{macrocode}
+\newcommand{\thumbsoverviewprint}[2]{%
+% \end{macrocode}
+%
+% It would be possible to just |\edef\th@mbsprintpage{#2}|, but
+% |\thumbsoverviewprint| might be called manually and without valid second argument.
+%
+% \begin{macrocode}
+ \edef\th@mbstest{#2}%
+ \def\th@mbstestb{r}%
+ \ifx\th@mbstest\th@mbstestb% r
+ \gdef\th@mbsprintpage{r}%
+ \else%
+ \def\th@mbstestb{l}%
+ \ifx\th@mbstest\th@mbstestb% l
+ \gdef\th@mbsprintpage{l}%
+ \else%
+ \def\th@mbstestb{v}%
+ \ifx\th@mbstest\th@mbstestb% v
+ \gdef\th@mbsprintpage{v}%
+ \else%
+ \def\th@mbstestb{d}%
+ \ifx\th@mbstest\th@mbstestb% d
+ \gdef\th@mbsprintpage{d}%
+ \else%
+% \end{macrocode}
+%
+% \pagebreak
%
% \begin{macrocode}
-\newcommand{\thumbsoverview}[1]{%
+ \PackageError{thumbs}{%
+ Invalid second parameter of \string\thumbsoverviewprint %
+ }{The second argument of command \string\thumbsoverviewprint\space must be\MessageBreak%
+ either 'r' or 'l' or 'v' or 'd', but is 'X2'.\MessageBreak%
+ Now 'r' is chosen instead.\MessageBreak%
+ }%
+ \gdef\th@mbsprintpage{r}%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
% \end{macrocode}
%
% Option |\thumbs@thumblink| is checked for a valid and resonable value here.
@@ -2461,7 +2737,18 @@ Here it is at page \pageref{TableOfThumbs}.
% \begin{macrocode}
\edef\th@mbprintingovertoc{\th@mbprinting}%
\ifnum \th@mbsmax > \pagesLTS@zero%
- \if@twoside \cleardoublepage%
+ \if@twoside%
+ \def\th@mbstest{r}%
+ \ifx\th@mbstest\th@mbsprintpage%
+ \cleardoublepage%
+ \else%
+ \def\th@mbstest{v}%
+ \ifx\th@mbstest\th@mbsprintpage%
+ \cleardoublepage%
+ \else% l or d
+ \clearotherdoublepage%
+ \fi%
+ \fi%
\else \clearpage%
\fi%
\stopthumb%
@@ -2477,7 +2764,7 @@ Here it is at page \pageref{TableOfThumbs}.
\fi%
\setcounter{th@mblinea}{\th@mbstable}%
\addtocounter{th@mblinea}{+1}%
- \global\edef\th@mbstable{\arabic{th@mblinea}}%
+ \xdef\th@mbstable{\arabic{th@mblinea}}%
\setcounter{th@mblinea}{1}%
\setcounter{th@mblineb}{\th@umbsperpage}%
\setcounter{FileLine}{1}%
@@ -2495,38 +2782,79 @@ Here it is at page \pageref{TableOfThumbs}.
\let\label\@gobble%
\let\index\@gobble%
\let\glossary\@gobble%
- \@whilenum\value{FileLine}<\value{thumbsstop}\do%
- {\if@twoside \cleardoublepage%
- \else \clearpage%
+% \end{macrocode}
+%
+% Some preparation in case of double printing the overview page(s):
+%
+% \begin{macrocode}
+ \def\th@mbstest{v}% r l r ...
+ \ifx\th@mbstest\th@mbsprintpage%
+ \def\th@mbsprintpage{l}% because it will be changed to r
+ \def\th@mbdoublepage{1}%
+ \else%
+ \def\th@mbstest{d}% l r l ...
+ \ifx\th@mbstest\th@mbsprintpage%
+ \def\th@mbsprintpage{r}% because it will be changed to l
+ \def\th@mbdoublepage{1}%
+ \else%
+ \def\th@mbdoublepage{0}%
\fi%
+ \fi%
+ \def\th@mb@resetdoublepage{0}%
+ \@whilenum\value{FileLine}<\value{thumbsstop}\do%
% \end{macrocode}
%
-% When the \xpackage{hyperref} package is used, one might like to refer to the
-% thumb overview page(s), therefore a phantomsection is added.
-% With or without \xpackage{hyperref} a label |TableOfThumbs1| (or |TableOfThumbs2|
-% or \ldots) is placed here. For compatibility with older versions of this
-% package also the label |TableOfThumbs| is created. Equal to older versions
-% it aims at the last used Table of Thumbs, but since version~1.0g \textbf{without}
-% \ |Error: Label TableOfThumbs multiply defined| - thanks to |\overridelabel| from
-% the \xpackage{undolabl} package (which is automatically loaded by the
-% \xpackage{pagesLTS} package).\\
-% When |\addthumbsoverviewtocontents| was used, the entry is placed into the
-% table of contents.
+% For double printing the overview page(s) we just change between printing
+% left and right, and we need to reset the line number of the |\jobname.tmb| file
+% which is read, because we need to read things twice.
%
% \begin{macrocode}
- \ifnum\value{FileLine}=1%
- \@ifundefined{Hy@Warning}{}{\phantomsection}%
- \let\label\thumbsoriglabel%
- \ifx\th@mbstable\pagesLTS@one%
- \label{TableOfThumbs}%
- \label{TableOfThumbs1}%
+ {\ifx\th@mbdoublepage\pagesLTS@one%
+ \def\th@mbstest{r}%
+ \ifx\th@mbsprintpage\th@mbstest%
+ \def\th@mbsprintpage{l}%
+ \else% \th@mbsprintpage is l
+ \def\th@mbsprintpage{r}%
+ \fi%
+ \clearpage%
+ \ifx\th@mb@resetdoublepage\pagesLTS@one%
+ \setcounter{th@mblinea}{\theth@mblinea}%
+ \setcounter{th@mblineb}{\theth@mblineb}%
+ \def\th@mb@resetdoublepage{0}%
\else%
- \overridelabel{TableOfThumbs}%
- \label{TableOfThumbs\th@mbstable}%
+ \edef\theth@mblinea{\arabic{th@mblinea}}%
+ \edef\theth@mblineb{\arabic{th@mblineb}}%
+ \def\th@mb@resetdoublepage{1}%
+ \fi%
+ \else%
+% \end{macrocode}
+%
+% \pagebreak
+%
+% \begin{macrocode}
+ \if@twoside%
+ \def\th@mbstest{r}%
+ \ifx\th@mbstest\th@mbsprintpage%
+ \cleardoublepage%
+ \else% l
+ \clearotherdoublepage%
+ \fi%
+ \else \clearpage%
\fi%
- \let\label\@gobble%
- \ifx\th@mbs@toc@level\empty%\relax
- \else \addcontentsline{toc}{\th@mbs@toc@level}{\th@mbs@toc@text}%
+ \fi%
+% \end{macrocode}
+%
+% When the very first page of a thumb marks overview is generated,
+% the label is set (with the |\th@mbstablabeling| command).
+%
+% \begin{macrocode}
+ \ifnum\value{FileLine}=1%
+ \ifx\th@mbdoublepage\pagesLTS@one%
+ \ifx\th@mb@resetdoublepage\pagesLTS@one%
+ \th@mbstablabeling%
+ \fi%
+ \else
+ \th@mbstablabeling%
\fi%
\fi%
\null%
@@ -2536,6 +2864,19 @@ Here it is at page \pageref{TableOfThumbs}.
\message{THUMBS: Fileline: \arabic{FileLine}, a: \arabic{th@mblinea}, %
b: \arabic{th@mblineb}, per page: \th@umbsperpage, max: \th@mbsmax.^^J}%
\fi%
+% \end{macrocode}
+%
+% When double page mode is active and |\th@mb@resetdoublepage| is one,
+% the last page of the thumbs mark overview must be repeated, but\\
+% | \@whilenum\value{FileLine}<\value{thumbsstop}\do|\\
+% would prevent this, because |FileLine| is already too large
+% and would only be reset \emph{inside} the loop, but the loop would
+% not be executed again.
+%
+% \begin{macrocode}
+ \ifx\th@mb@resetdoublepage\pagesLTS@one%
+ \setcounter{FileLine}{\theth@mblinea}%
+ \fi%
}%
% \end{macrocode}
%
@@ -2548,12 +2889,25 @@ Here it is at page \pageref{TableOfThumbs}.
\fi%
% \end{macrocode}
%
+% \pagebreak
+%
% as well as the |\label|, |\index|, and |\glossary| commands:
%
% \begin{macrocode}
\let\label\thumbsoriglabel%
\let\index\thumbsorigindex%
\let\glossary\thumbsorigglossary%
+% \end{macrocode}
+%
+% and |\th@mbs@toc@level| and |\th@mbs@toc@text| need to be emptied,
+% otherwise for each following Table of Thumb Marks the same entry
+% in the table of contents would be added, if no new
+% |\addthumbsoverviewtocontents| would be given.
+% ( But when no |\addthumbsoverviewtocontents| is given, it can be assumed
+% that no thumbsoverview-entry shall be added to contents.)
+%
+% \begin{macrocode}
+ \addthumbsoverviewtocontents{}{}%
}
% \end{macrocode}
@@ -2602,12 +2956,12 @@ Here it is at page \pageref{TableOfThumbs}.
\else% THIS SHOULD NEVER HAPPEN!
\PackageError{thumbs}{Unexpected error! (Really!)}{%
! You are in trouble here.\MessageBreak%
- ! Type X \string<return\string> to quit.\MessageBreak%
+ ! Type\space \space X \string<return\string>\space to quit.\MessageBreak%
! Delete temporary auxiliary files\MessageBreak%
! (like \jobname.aux, \jobname.tmb, \jobname.out)\MessageBreak%
! and retry the compilation.\MessageBreak%
! If the error persists, cross your fingers\MessageBreak%
- ! and try typing \string<return\string> to proceed.\MessageBreak%
+ ! and try typing\space \space \string<return\string>\space to proceed.\MessageBreak%
! If that does not work,\MessageBreak%
! you might contact the maintainer of the thumbs package.\MessageBreak%
}%
@@ -2661,8 +3015,6 @@ Here it is at page \pageref{TableOfThumbs}.
% \end{macrocode}
%
-% \pagebreak
-%
% When we are in |draft| mode, the thumb marks are
% \textquotedblleft de-coloured\textquotedblright{},
% their width is reduced, and a warning is given.
@@ -2683,6 +3035,21 @@ Here it is at page \pageref{TableOfThumbs}.
% \end{macrocode}
%
+% When we are in |hidethumbs| mode, there are no thumb marks
+% and therefore neither any thumb mark overview page. A warning is given.
+%
+% \begin{macrocode}
+\ifthumbs@hidethumbs
+ \renewcommand{\addthumb}[4]{\relax}
+ \PackageWarningNoLine{thumbs}{thumbs package in hide mode:\MessageBreak%
+ Thumb marks are hidden.\MessageBreak%
+ Remove package option hide to get thumb marks.\MessageBreak%
+ }
+ \renewcommand{\thumbnewcolumn}{\relax}
+\fi
+
+% \end{macrocode}
+%
% \begin{macrocode}
%</package>
% \end{macrocode}
@@ -2718,7 +3085,9 @@ Here it is at page \pageref{TableOfThumbs}.
%
% \item[-] package \xpackage{xcolor}, 2007/01/21, v2.11, \CTAN{macros/latex/contrib/xcolor/xcolor.dtx}
%
-% \item[-] package \xpackage{pagesLTS}, 2011/03/17, v1.1o, \CTAN{macros/latex/contrib/pageslts/pagesLTS.dtx}
+% \item[-] package \xpackage{pageslts}, 2011/08/08, v1.2a, \CTAN{macros/latex/contrib/pageslts/pagesLTS.dtx}
+%
+% \item[-] package \xpackage{pagecolor}, 2011/08/08, v1.0c, \CTAN{macros/latex/contrib/pagecolor/pagecolor.dtx}
%
% \item[-] package \xpackage{alphalph}, 2010/04/18, v2.3, \CTAN{macros/latex/contrib/oberdiek/alphalph.dtx}
%
@@ -2737,7 +3106,7 @@ Here it is at page \pageref{TableOfThumbs}.
%
% \DescribeMacro{SW/SWP}
% When compiling with SWP 5.50 Build 2960 (\copyright~MacKichan Software, Inc.),
-% these additional packages are needed:
+% this is additionally needed:
%
% \begin{quote}
%\begin{verbatim}
@@ -2746,11 +3115,12 @@ Here it is at page \pageref{TableOfThumbs}.
%\usepackage[math]{cellspace}
%\usepackage{xcolor}
%\pagecolor{white}
+%\newcommand{\QTO}[2]{#2}
%\end{verbatim}
% \end{quote}
%
% \noindent especially before \xpackage{hyperref} and \xpackage{thumbs}, but best right after the |\documentclass|!
-% (The options for those packages might be changed by the user -- I did not test all available options,
+% (The options for those packages might be changed by the user~-- I~did not test all available options,
% thus first test, whether the document can be compiled with these options, and then try to change them
% according to your whishes.)\\
%
@@ -2766,7 +3136,7 @@ Here it is at page \pageref{TableOfThumbs}.
%
% \item[-] package \xpackage{hyperref}, 2011/04/17, v6.82g, \CTAN{macros/latex/contrib/hyperref/hyperref.dtx}
%
-% \item[-] package \xpackage{thumbs}, 2011/06/24, v1.0g, \CTAN{macros/latex/contrib/thumbs/thumbs.dtx}\\
+% \item[-] package \xpackage{thumbs}, 2011/08/08, v1.0h, \CTAN{macros/latex/contrib/thumbs/thumbs.dtx}\\
% (Well, it is the example file for this package, and because you are reading the
% documentation for the \xpackage{thumbs} package, it can be assumed that you already
% have some version of it -- is it the current one?)
@@ -3107,6 +3477,22 @@ Here it is at page \pageref{TableOfThumbs}.
% before the Table of Thumbs~- fixed.
% \item Some details changed.
% \end{Version}
+% \begin{Version}{2011/08/08 v1.0h}
+% \item Replaced |\global\edef| by |\xdef|.
+% \item Now using the \xpackage{pagecolor} package. Empty thumb marks now
+% inherit their colour from the pages's background. Option |pagecolor|
+% is therefore obsolete.
+% \item The \xpackage{pagesLTS} package has been replaced by the
+% \xpackage{pageslts} package.
+% \item New kinds of thumb mark overview pages introduced additionally to
+% |\thumbsoverview|: |\thumbsoverviewback|, |\thumbsoverviewverso|,
+% and |\thumbsoverviewdouble|.
+% \item New option |hidethumbs=true| to hide thumb marks (and their
+% overview page(s)).
+% \item Option |ignorehoffset| did not work for the thumb marks overview page(s)~-
+% neither |true| nor |false|; fixed.
+% \item Changed a huge number of details.
+% \end{Version}
% \end{History}
%
% \bigskip
@@ -3114,11 +3500,13 @@ Here it is at page \pageref{TableOfThumbs}.
% When you find a mistake or have a suggestion for an improvement of this package,
% please send an e-mail to the maintainer, thanks! (Please see BUG REPORTS in the README.)\\
%
+% \bigskip
+%
% Note: \textsf{Q}, \textsf{X}, and \textsf{Y} are not missing in the following index,
% but no command \emph{beginning} with any of these letters has been used in this
% \xpackage{thumbs} package.
%
-% \bigskip
+% \pagebreak
%
% \PrintIndex
%
diff --git a/Master/texmf-dist/source/latex/thumbs/thumbs.ins b/Master/texmf-dist/source/latex/thumbs/thumbs.ins
index fbf27cf91c3..b6e8f838a4c 100644
--- a/Master/texmf-dist/source/latex/thumbs/thumbs.ins
+++ b/Master/texmf-dist/source/latex/thumbs/thumbs.ins
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Project: thumbs
-%% Version: 2011/06/24 v1.0g
+%% Version: 2011/08/08 v1.0h
%%
%% Copyright (C) 2010, 2011 by
%% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>
@@ -41,7 +41,7 @@
\input docstrip.tex
\Msg{*************************************************************************}
\Msg{* Installation}
-\Msg{* Package: thumbs 2011/06/24 v1.0g Thumb marks and overwiew page(s) (HMM)}
+\Msg{* Package: thumbs 2011/08/08 v1.0h Thumb marks and overwiew page(s) (HMM)}
\Msg{*************************************************************************}
\keepsilent
@@ -53,7 +53,7 @@
This is a generated file.
Project: thumbs
-Version: 2011/06/24 v1.0g
+Version: 2011/08/08 v1.0h
Copyright (C) 2010, 2011 by
H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de>