%% %% This is file `thumbs.sty', %% generated with the docstrip utility. %% %% The original source files were: %% %% thumbs.dtx (with options: `package') %% %% This is a generated file. %% %% Project: thumbs %% Version: 2012/02/23 v1.0m %% %% Copyright (C) 2010 - 2012 by %% H.-Martin M"unch %% %% The usual disclaimer applies: %% 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, %% the README, and the derived files %% thumbs.sty, thumbs.pdf, thumbs.ins, thumbs.drv, %% thumbs-example.tex, thumbs-example.pdf. %% \NeedsTeXFormat{LaTeX2e}[2011/06/27] \ProvidesPackage{thumbs}[2012/02/23 v1.0m Thumb marks and overview page(s) (HMM)] %% This package allows to create a customizable thumb index, %% providing a quick and easy reference method for large documents, %% as well as an overview page. \IfFileExists{tcilatex.tex}{% % Quite probably SWP/SW/SN \PackageWarningNoLine{thumbs}{% When compiling with SWP 5.50 Build 2960\MessageBreak% (copyright 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\providecommand{\string\QTO}[2]{\string##2}\MessageBreak% especially before hyperref and thumbs,\MessageBreak% but best right after the \string\documentclass!% }% }{% Probably not SWP/SW/SN \message{^^J *** Compiling with SW(P)? ^^J% When compiling with SWP 5.50 Build 2960^^J% (copyright MacKichan Software, Inc.),^^J% these additional packages are needed:^^J% \string\usepackage[T1]{fontenc}^^J% \string\usepackage{amsfonts}^^J% \string\usepackage[math]{cellspace}^^J% \string\usepackage{xcolor}^^J% \string\pagecolor{white}^^J% \string\providecommand{\string\QTO}[2]{\string##2}^^J% especially before hyperref and thumbs,^^J% but best right after the \string\documentclass!^^J% ^^J% }% } \RequirePackage{kvoptions}[2010/12/23]% v3.10 \RequirePackage{atbegshi}[2011/01/30]% v1.15 \RequirePackage{xcolor}[2007/01/21]% v2.11 \RequirePackage{picture}[2009/10/11]% v1.3 \RequirePackage{alphalph}[2010/04/18]% v2.3 \RequirePackage{pageslts}[2011/08/08]% v1.2a \RequirePackage{pagecolor}[2012/02/23]% v1.0e \RequirePackage{rerunfilecheck}[2011/04/15]% v1.7 \RequirePackage{infwarerr}[2010/04/08]% v1.3 \RequirePackage{ltxcmds}[2011/04/18]% v1.20 \RequirePackage{atveryend}[2011/04/23]% v1.7 %% \RequirePackage{atveryend}[2011/06/30]% v1.8 %% would be needed but is currently (2012/02/23) not available at CTAN yet %% thumbs may work with earlier versions of LaTeX2e and those packages, %% but this was not tested. Please consider updating your LaTeX contribution %% and packages to the most recent version (if they are not already the most %% recent version). \@ifl@t@r\fmtversion{2011/06/27}% or possibly even newer {\@ifpackagelater{atveryend}{2011/06/29}% {% 2011/06/30, v1.8, or even more recent: OK }{% else: older package version, no \AtVeryVeryEnd \PackageWarningNoLine{thumbs}{% LaTeX 2011/06/27 has changed \string\enddocument\space and thus broken the\MessageBreak% \string\AtVeryVeryEnd\space command/hooking of atveryend package as of\MessageBreak% 2011/04/23, v1.7. New package version 2011/06/30, v1.8, works with\MessageBreak% the new LaTeX format, but some older package version was loaded.\MessageBreak% (As of 2012/02/23, the new version is NOT available at CTAN yet.)\MessageBreak% For fixing this problem until the update is available,\MessageBreak% \string\let\string\AtVeryVeryEnd\string\AtEndAfterFileList\MessageBreak% is used now, fingers crossed.% }% \let\AtVeryVeryEnd\AtEndAfterFileList% \AtEndAfterFileList{% if there is \AtVeryVeryEnd inside \AtEndAfterFileList \let\AtEndAfterFileList\ltx@firstofone% } } }{% else: older fmtversion: OK } \SetupKeyvalOptions{family=thumbs,prefix=thumbs@} \DeclareStringOption{linefill}[dots]% \thumbs@linefill \DeclareStringOption[rule]{thumblink}[rule] \DeclareStringOption[47pt]{minheight}[47pt] \DeclareStringOption{height}[auto] \DeclareStringOption{width}[auto] \DeclareStringOption{distance}[2mm] \DeclareStringOption{topthumbmargin}[auto] \DeclareStringOption{bottomthumbmargin}[auto] \DeclareBoolOption[true]{ignorehoffset} \DeclareBoolOption[true]{ignorevoffset} \DeclareBoolOption{nophantomsection}% false by default, but true if used \DeclareBoolOption[true]{verbose} \DeclareComplementaryOption{silent}{verbose} \DeclareBoolOption{draft} \DeclareComplementaryOption{final}{draft} \DeclareBoolOption[false]{hidethumbs} \DeclareStringOption{pagecolor} \ProcessKeyvalOptions* \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 \ifthumbs@ignorehoffset \PackageInfo{thumbs}{% Option ignorehoffset NOT =false:\MessageBreak% hoffset will be ignored.\MessageBreak% To make thumbs regard hoffset use option\MessageBreak% ignorehoffset=false} \gdef\th@bmshoffset{0pt} \else \PackageInfo{thumbs}{% Option ignorehoffset=false:\MessageBreak% hoffset will be regarded.\MessageBreak% This might move the thumb marks away from the paper edge} \gdef\th@bmshoffset{\hoffset} \fi \ifthumbs@ignorevoffset \PackageInfo{thumbs}{% Option ignorevoffset NOT =false:\MessageBreak% voffset will be ignored.\MessageBreak% To make thumbs regard voffset use option\MessageBreak% ignorevoffset=false} \gdef\th@bmsvoffset{-\voffset} \else \PackageInfo{thumbs}{% Option ignorevoffset=false:\MessageBreak% voffset will be regarded.\MessageBreak% This might move the thumb mark outside of the printable area} \gdef\th@bmsvoffset{\voffset} \fi \ifx\thumbs@linefill\empty% \gdef\th@mbs@linefill{\hspace*{\fill}} \else \def\th@mbstest{line}% \ifx\thumbs@linefill\th@mbstest% \gdef\th@mbs@linefill{\hrulefill} \else \def\th@mbstest{dots}% \ifx\thumbs@linefill\th@mbstest% \gdef\th@mbs@linefill{\dotfill} \else \PackageError{thumbs}{Option linefill with invalid value}{% Option linefill has value '\thumbs@linefill'.\MessageBreak% Valid values are '' (empty), 'line', or 'dots'.\MessageBreak% '' (empty) will be used now.\MessageBreak% } \gdef\th@mbs@linefill{\hspace*{\fill}} \fi \fi \fi \newdimen\th@mbwidthx \newdimen\th@mbheighty% Thumb height y \setlength{\th@mbheighty}{\z@} \newdimen\th@mbposx \newdimen\th@mbposy \newdimen\th@mbposyA \newdimen\th@mbposytop \newdimen\th@mbposybottom \newdimen\th@mbwidthxtoc \newdimen\th@mbsposytocy \newdimen\th@mbsposytocyy \newdimen\th@mbsdistance% vertical distance between thumb marks \ifx\thumbs@distance\empty% \setlength{\th@mbsdistance}{1mm} \else \setlength{\th@mbsdistance}{\thumbs@distance} \fi \ifthumbs@verbose% \relax \else \PackageInfo{thumbs}{% Option verbose=false (or silent=true) found:\MessageBreak% You will lose some information} \fi \newbox\ThumbsBox \gdef\th@mbs{0} \gdef\th@mbsmax{0} \gdef\th@umbsperpage{0}% will be set via .aux file \gdef\th@umbsperpagecount{0} \gdef\th@mbtitle{} \gdef\th@mbtext{} \gdef\th@mbtextcolour{\thepagecolor} \gdef\th@mbbackgroundcolour{\thepagecolor} \gdef\th@mbcolumn{0} \gdef\th@mbtextA{} \gdef\th@mbtextcolourA{\thepagecolor} \gdef\th@mbbackgroundcolourA{\thepagecolor} \gdef\th@mbprinting{1} \gdef\th@mbtoprint{0} \gdef\th@mbonpage{0} \gdef\th@mbonpagemax{0} \gdef\th@mbcolumnnew{0} \gdef\th@mbs@toc@level{} \gdef\th@mbs@toc@text{} \gdef\th@mbmaxwidth{0pt} \gdef\th@mb@titlelabel{} \gdef\th@mbstable{0}% number of thumb marks overview tables \if@filesw% \relax \else \PackageWarningNoLine{thumbs}{No auxiliary files allowed!\MessageBreak% It was not allowed to write to files.\MessageBreak% A lot of packages do not work without access to files\MessageBreak% like the .aux one. The thumbs package needs to write\MessageBreak% to the \jobname.tmb file. To exit press\MessageBreak% Ctrl+Z\MessageBreak% .\MessageBreak% } \fi \newcommand{\setth@mbheight}{% \setlength{\th@mbheighty}{\z@} \advance\th@mbheighty+\headheight \advance\th@mbheighty+\headsep \advance\th@mbheighty+\textheight \advance\th@mbheighty+\footskip \@tempcnta=\th@mbsmax\relax \ifnum\@tempcnta>1 \divide\th@mbheighty\th@mbsmax \fi \advance\th@mbheighty-\th@mbsdistance \advance\th@mbheighty-\th@mbsdistance } \AtBeginDocument{% \ifthumbs@ignorehoffset \gdef\th@bmshoffset{0pt} \else \gdef\th@bmshoffset{\hoffset} \fi \ifthumbs@ignorevoffset \gdef\th@bmsvoffset{-\voffset} \else \gdef\th@bmsvoffset{\voffset} \fi \xdef\th@mbpaperwidth{\the\paperwidth} \setlength{\@tempdima}{1pt} \ifdim \thumbs@minheight < \@tempdima% too small \setlength{\thumbs@minheight}{1pt} \else \ifdim \thumbs@minheight = \@tempdima% small, but ok \else \ifdim \thumbs@minheight > \@tempdima% ok \else \PackageError{thumbs}{Option minheight has invalid value}{% Please use a number and a length unit (e.g. mm, cm, pt)\MessageBreak% and no space between as value for option minheight\MessageBreak% and include this value+unit combination in curly brackets\MessageBreak% (please see the thumbs-example.tex file).\MessageBreak% When pressing return, minheight will now be set to 47pt.\MessageBreak% } \setlength{\thumbs@minheight}{47pt} \fi \fi \fi \setlength{\@tempdima}{\thumbs@minheight} \ifx\thumbs@height\empty% \setlength{\th@mbheighty}{\@tempdima} \else \def\th@mbstest{auto} \ifx\thumbs@height\th@mbstest% \setth@mbheight \ifdim \th@mbheighty < \thumbs@minheight \PackageWarningNoLine{thumbs}{Thumbs not high enough:\MessageBreak% Option height has value 'auto'. For \th@mbsmax\space thumbs per page\MessageBreak% this results in a thumb height of \the\th@mbheighty.\MessageBreak% This is lower than the minimal thumb height, \thumbs@minheight,\MessageBreak% therefore another thumbs column will be opened.\MessageBreak% If you do not want this, choose a smaller value\MessageBreak% for option 'minheight'% } \setlength{\th@mbheighty}{\z@} \advance\th@mbheighty by \@tempdima% = \thumbs@minheight \fi \else \ifthumbs@verbose \edef\thumbsinfo{\the\th@mbheighty} \PackageInfo{thumbs}{Now setting thumbs' height to \thumbsinfo .} \fi \setlength{\th@mbheighty}{\thumbs@height} \fi \fi \newread\@instreamthumb% \ifthumbs@verbose \message{^^J} \@PackageInfoNoLine{thumbs}{************** THUMB dimensions **************} \edef\thumbsinfo{\the\th@mbheighty} \@PackageInfoNoLine{thumbs}{The height of the thumb marks is \thumbsinfo} \fi \ifthumbs@draft \setlength{\th@mbwidthx}{2pt} \else \setlength{\th@mbwidthx}{\paperwidth} \advance\th@mbwidthx-\textwidth \divide\th@mbwidthx4 \setlength{\@tempdima}{0sp} \ifx\thumbs@width\empty% \else \def\th@mbstest{auto} \ifx\thumbs@width\th@mbstest% \else \def\th@mbstest{autoauto} \ifx\thumbs@width\th@mbstest% \@ifundefined{th@mbmaxwidtha}{% \if@filesw% \gdef\th@mbmaxwidtha{0pt} \setlength{\th@mbwidthx}{\th@mbmaxwidtha} \AtEndAfterFileList{ \PackageWarningNoLine{thumbs}{% \string\th@mbmaxwidtha\space undefined.\MessageBreak% Rerun to get the thumb marks width right% } } \else \PackageError{thumbs}{% You cannot use option autoauto without \jobname.aux file.% } \fi }{%\else \setlength{\th@mbwidthx}{\th@mbmaxwidtha} }%\fi \else \ifdim \thumbs@width > \@tempdima% OK \setlength{\th@mbwidthx}{\thumbs@width} \else \PackageError{thumbs}{Thumbs not wide enough}{% Option width has value '\thumbs@width'.\MessageBreak% This is not a valid dimension larger than zero.\MessageBreak% Width will be set automatically.\MessageBreak% } \fi \fi \fi \fi \fi \ifthumbs@verbose \edef\thumbsinfo{\the\th@mbwidthx} \@PackageInfoNoLine{thumbs}{The width of the thumb marks is \thumbsinfo} \ifthumbs@draft \@PackageInfoNoLine{thumbs}{because thumbs package is in draft mode} \fi \fi % Thumb position x \th@mbposx \setlength{\th@mbposx}{\paperwidth} \advance\th@mbposx-\th@mbwidthx \ifthumbs@ignorehoffset \advance\th@mbposx-\hoffset \fi \advance\th@mbposx+1pt % Thumb position y \th@mbposy \ifx\thumbs@topthumbmargin\empty% \def\thumbs@topthumbmargin{auto} \fi \def\th@mbstest{auto} \ifx\thumbs@topthumbmargin\th@mbstest% \setlength{\th@mbposy}{1in} \advance\th@mbposy+\th@bmsvoffset \advance\th@mbposy+\topmargin \advance\th@mbposy-\th@mbsdistance \advance\th@mbposy+\th@mbheighty \else \setlength{\@tempdima}{-1pt} \ifdim \thumbs@topthumbmargin > \@tempdima% OK \else \PackageWarning{thumbs}{Thumbs column starting too high.\MessageBreak% Option topthumbmargin has value '\thumbs@topthumbmargin'.\MessageBreak% topthumbmargin will be set to -1pt.\MessageBreak% } \gdef\thumbs@topthumbmargin{-1pt} \fi \setlength{\th@mbposy}{\thumbs@topthumbmargin} \advance\th@mbposy-\th@mbsdistance \advance\th@mbposy+\th@mbheighty \fi \setlength{\th@mbposytop}{\th@mbposy} \ifthumbs@verbose% \setlength{\@tempdimc}{\th@mbposytop} \advance\@tempdimc-\th@mbheighty \advance\@tempdimc+\th@mbsdistance \edef\thumbsinfo{\the\@tempdimc} \@PackageInfoNoLine{thumbs}{The top thumb margin is \thumbsinfo} \fi % Max. thumb position y \th@mbposybottom \ifx\thumbs@bottomthumbmargin\empty% \gdef\thumbs@bottomthumbmargin{auto} \fi \def\th@mbstest{auto} \ifx\thumbs@bottomthumbmargin\th@mbstest% \setlength{\th@mbposybottom}{1in} \ifthumbs@ignorevoffset% \relax \else \advance\th@mbposybottom+\th@bmsvoffset \fi \advance\th@mbposybottom+\topmargin \advance\th@mbposybottom-\th@mbsdistance \advance\th@mbposybottom+\th@mbheighty \advance\th@mbposybottom+\headheight \advance\th@mbposybottom+\headsep \advance\th@mbposybottom+\textheight \advance\th@mbposybottom+\footskip \advance\th@mbposybottom-\th@mbsdistance \advance\th@mbposybottom-\th@mbheighty \else \setlength{\@tempdima}{\paperheight} \advance\@tempdima by -\thumbs@bottomthumbmargin \advance\@tempdima by -\th@mbposytop \advance\@tempdima by -\th@mbsdistance \advance\@tempdima by -\th@mbheighty \advance\@tempdima by -\th@mbsdistance \ifdim \@tempdima > 0sp \relax \else \setlength{\@tempdima}{\paperheight} \advance\@tempdima by -\th@mbposytop \advance\@tempdima by -\th@mbsdistance \advance\@tempdima by -\th@mbheighty \advance\@tempdima by -\th@mbsdistance \advance\@tempdima by -1pt \PackageWarning{thumbs}{Thumbs column ending too high.\MessageBreak% Option bottomthumbmargin has value '\thumbs@bottomthumbmargin'.\MessageBreak% bottomthumbmargin will be set to '\the\@tempdima'.\MessageBreak% } \xdef\thumbs@bottomthumbmargin{\the\@tempdima} \fi \setlength{\@tempdima}{\thumbs@bottomthumbmargin} \setlength{\@tempdimc}{-1pt} \ifdim \@tempdima < \@tempdimc% \PackageWarning{thumbs}{Thumbs column ending too low.\MessageBreak% Option bottomthumbmargin has value '\thumbs@bottomthumbmargin'.\MessageBreak% bottomthumbmargin will be set to -1pt.\MessageBreak% } \gdef\thumbs@bottomthumbmargin{-1pt} \fi \setlength{\th@mbposybottom}{\paperheight} \advance\th@mbposybottom-\thumbs@bottomthumbmargin \fi \ifthumbs@verbose% \setlength{\@tempdimc}{\paperheight} \advance\@tempdimc by -\th@mbposybottom \edef\thumbsinfo{\the\@tempdimc} \@PackageInfoNoLine{thumbs}{The bottom thumb margin is \thumbsinfo} \@PackageInfoNoLine{thumbs}{**********************************************} \message{^^J} \fi \advance\th@mbposy-\th@mbheighty% because it will be advanced also for the first thumb \setlength{\th@mbposyA}{\th@mbposy}% \th@mbposyA will change. \setlength{\th@mbsposytocyy}{\th@mbposy}% \th@mbsposytocyy shall not be changed. } \newcommand{\th@mb@dvance}{% \advance\th@mbposy+\th@mbheighty% \advance\th@mbposy+\th@mbsdistance% \ifdim\th@mbposy>\th@mbposybottom% \advance\th@mbposy-\th@mbheighty% \advance\th@mbposy-\th@mbsdistance% \else% \advance\th@mbposy-\th@mbheighty% \advance\th@mbposy-\th@mbsdistance% \thumborigaddthumb{}{}{\string\thepagecolor}{\string\thepagecolor}% \th@mb@dvance% \fi% } \newcommand{\thumbnewcolumn}{% \ifx\th@mbtoprint\pagesLTS@one% \PackageError{thumbs}{\string\thumbnewcolumn\space after \string\addthumb }{% On page \thepage\space (approx.) \string\addthumb\space was used and *afterwards* % \string\thumbnewcolumn .\MessageBreak% When you want to use \string\thumbnewcolumn , do not use an \string\addthumb\space % on the same\MessageBreak% page before \string\thumbnewcolumn . Thus, either remove the \string\addthumb , % or use a\MessageBreak% \string\pagebreak , \string\newpage\space etc. before \string\thumbnewcolumn .\MessageBreak% (And remember to use an \string\addthumb\space*after* \string\thumbnewcolumn .)\MessageBreak% Your command \string\thumbnewcolumn\space will be ignored now.% }% \else% \PackageWarning{thumbs}{% Starting of another column requested by command\MessageBreak% \string\thumbnewcolumn.\space Only use this command directly\MessageBreak% before an \string\addthumb\space - did you?!\MessageBreak% }% \gdef\th@mbcolumnnew{1}% \th@mb@dvance% \gdef\th@mbprinting{0}% \gdef\th@mbcolumnnew{2}% \fi% } \newcommand{\addtitlethumb}[5]{% \xdef\th@mb@titlelabel{#5}% \addthumb{#1}{#2}{#3}{#4}% \xdef\th@mb@titlelabel{}% } \gdef\th@mbsphantom{1} \newcommand{\thumbsnophantom}{% \gdef\th@mbsphantom{0}% } \newcommand{\addthumb}[4]{% \gdef\th@mbprinting{1}% \advance\th@mbposy\th@mbheighty% \advance\th@mbposy\th@mbsdistance% \ifdim\th@mbposy>\th@mbposybottom% \PackageInfo{thumbs}{% Thumbs column full, starting another column.\MessageBreak% }% \setlength{\th@mbposy}{\th@mbposytop}% \advance\th@mbposy\th@mbsdistance% \ifx\th@mbcolumn\pagesLTS@zero% \xdef\th@umbsperpagecount{\th@mbs}% \gdef\th@mbcolumn{1}% \fi% \fi% \@tempcnta=\th@mbs\relax% \advance\@tempcnta by 1% \xdef\th@mbs{\the\@tempcnta}% \gdef\th@mbtitle{#1}% \gdef\th@mbtext{#2}% \gdef\th@mbtextcolour{#3}% \gdef\th@mbbackgroundcolour{#4}% \settowidth{\@tempdima}{\th@mbtext\space}% \ifdim\@tempdima>\th@mbmaxwidth% \xdef\th@mbmaxwidth{\the\@tempdima}% \fi% \ifdim\@tempdima>\th@mbwidthx% \ifthumbs@draft% \relax \else% \edef\thumbsinfoa{\the\th@mbwidthx} \edef\thumbsinfob{\the\@tempdima} \PackageWarning{thumbs}{% Thumb mark too small (width: \thumbsinfoa )\MessageBreak% or its text too wide (width: \thumbsinfob )\MessageBreak% }% \fi% \fi% \ltx@ifpackageloaded{hyperref}{% hyperref loaded \ifthumbs@nophantomsection% \relax \else% \ifx\th@mbsphantom\pagesLTS@one% \phantomsection% \else% \gdef\th@mbsphantom{1}% \fi% \fi% }{% hyperref not loaded }% \label{thumbs.\th@mbs}% \if@filesw% \ifx\th@mb@titlelabel\empty% \addtocontents{tmb}{\string\thumbcontents{#1}{#2}{#3}{#4}{\thepage}{thumbs.\th@mbs}{\th@mbcolumnnew}}% \else% \addtocounter{page}{-1}% \edef\th@mb@page{\thepage}% \addtocontents{tmb}{\string\thumbcontents{#1}{#2}{#3}{#4}{\th@mb@page}{\th@mb@titlelabel}{\th@mbcolumnnew}}% \addtocounter{page}{+1}% \fi% %\else there is a problem, but the according warning message was already given earlier. \fi% \ifx\th@mbcolumnnew\pagesLTS@one% \else% \@tempcnta=\th@mbonpage\relax% \advance\@tempcnta by 1% \xdef\th@mbonpage{\the\@tempcnta}% \fi% \ifx\th@mbtoprint\pagesLTS@zero% \else% \ifx\th@mbcolumnnew\pagesLTS@zero% \PackageWarning{thumbs}{More than one thumb at one page:\MessageBreak% You placed more than one thumb mark (at least \th@mbonpage)\MessageBreak% on page \thepage \space (page is approximately).\MessageBreak% Maybe insert a page break?\MessageBreak% }% \fi% \fi% \ifnum\th@mbonpage=1% \ifnum\th@mbonpagemax>0% \relax \else \gdef\th@mbonpagemax{1}% \fi% \gdef\th@mbtextA{#2}% \gdef\th@mbtextcolourA{#3}% \gdef\th@mbbackgroundcolourA{#4}% \setlength{\th@mbposyA}{\th@mbposy}% \else% \ifx\th@mbcolumnnew\pagesLTS@zero% \@tempcnta=1\relax% \edef\th@mbonpagetest{\the\@tempcnta}% \@whilenum\th@mbonpagetest<\th@mbonpage\do{% \advance\@tempcnta by 1% \xdef\th@mbonpagetest{\the\@tempcnta}% \ifnum\th@mbonpage=\th@mbonpagetest% \ifnum\th@mbonpagemax<\th@mbonpage% \xdef\th@mbonpagemax{\th@mbonpage}% \fi% \edef\th@mbtmpdef{\csname th@mbtext\AlphAlph{\the\@tempcnta}\endcsname}% \expandafter\gdef\th@mbtmpdef{#2}% \edef\th@mbtmpdef{\csname th@mbtextcolour\AlphAlph{\the\@tempcnta}\endcsname}% \expandafter\gdef\th@mbtmpdef{#3}% \edef\th@mbtmpdef{\csname th@mbbackgroundcolour\AlphAlph{\the\@tempcnta}\endcsname}% \expandafter\gdef\th@mbtmpdef{#4}% \fi% }% \else% \ifnum\th@mbonpagemax<\th@mbonpage% \xdef\th@mbonpagemax{\th@mbonpage}% \fi% \fi% \fi% \ifx\th@mbcolumnnew\pagesLTS@two% \gdef\th@mbcolumnnew{0}% \fi% \gdef\th@mbtoprint{1}% } \newcommand{\stopthumb}{\gdef\th@mbprinting{0}} \newcommand{\continuethumb}{\gdef\th@mbprinting{1}} \newcommand{\thumbcontents}[7]{% \advance\th@mbposy\th@mbheighty% \advance\th@mbposy\th@mbsdistance% \ifdim\th@mbposy>\th@mbposybottom% \setlength{\th@mbposy}{\th@mbposytop}% \advance\th@mbposy\th@mbsdistance% \fi% \def\th@mb@tmp@title{#1}% \def\th@mb@tmp@text{#2}% \def\th@mb@tmp@textcolour{#3}% \def\th@mb@tmp@backgroundcolour{#4}% \def\th@mb@tmp@page{#5}% \def\th@mb@tmp@label{#6}% \def\th@mb@tmp@column{#7}% \ifx\th@mb@tmp@column\pagesLTS@two% \def\th@mb@tmp@column{0}% \fi% \setlength{\th@mbwidthxtoc}{\paperwidth}% \advance\th@mbwidthxtoc-1in% \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% \begin{picture}(0,0)% \def\th@mbstest{rule}% \ifx\thumbs@thumblink\th@mbstest% \ifx\th@mb@tmp@column\pagesLTS@zero% {\color{\th@mb@tmp@backgroundcolour}\hyperref[\th@mb@tmp@label]{\rule{\th@mbwidthxtoc}{\th@mbheighty}}}% \else% {\color{\th@mb@tmp@backgroundcolour}\rule{\th@mbwidthxtoc}{\th@mbheighty}}% \fi% \else% {\color{\th@mb@tmp@backgroundcolour}\rule{\th@mbwidthxtoc}{\th@mbheighty}}% \fi% \end{picture}% \ifx\th@mbstest\th@mbsprintpage% l \advance\th@mbwidthxtoc-\evensidemargin% \fi% \ifx\th@mb@tmp@column\pagesLTS@zero% \setlength{\th@mbwidthxtoc}{\paperwidth}% \advance\th@mbwidthxtoc-1in% \advance\th@mbwidthxtoc-\hoffset% \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% \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% {\hsize=\th@mbwidthxtoc {% \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}% }% \else% \def\th@mbstest{title}% \ifx\thumbs@thumblink\th@mbstest% {\color{\th@mb@tmp@textcolour}\noindent% \hyperref[\th@mb@tmp@label]{\th@mb@tmp@title}% \leaders\box \ThumbsBox {\th@mbs@linefill \th@mb@tmp@page}% }% \else% \def\th@mbstest{page}% \ifx\thumbs@thumblink\th@mbstest% {\color{\th@mb@tmp@textcolour}\noindent% \th@mb@tmp@title% \leaders\box \ThumbsBox {\th@mbs@linefill \pageref{\th@mb@tmp@label}}% }% \else% \def\th@mbstest{titleandpage}% \ifx\thumbs@thumblink\th@mbstest% {\color{\th@mb@tmp@textcolour}\noindent% \hyperref[\th@mb@tmp@label]{\th@mb@tmp@title}% \leaders\box \ThumbsBox {\th@mbs@linefill \pageref{\th@mb@tmp@label}}% }% \else% \def\th@mbstest{line}% \ifx\thumbs@thumblink\th@mbstest% {\color{\th@mb@tmp@textcolour}\noindent% \hyperref[\th@mb@tmp@label]{\th@mb@tmp@title% \leaders\box \ThumbsBox {\th@mbs@linefill \th@mb@tmp@page}}% }% \else% \def\th@mbstest{rule}% \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}% }% \else% \PackageError{thumbs}{\string\thumbs@thumblink\space invalid}{% \string\thumbs@thumblink\space has an invalid value,\MessageBreak% although it did not have an invalid value before,\MessageBreak% and the thumbs package did not change it.\MessageBreak% Therefore some other package (or the user)\MessageBreak% manipulated it.\MessageBreak% Now setting it to 'none' as last resort.\MessageBreak% }% \gdef\thumbs@thumblink{none}% {\color{\th@mb@tmp@textcolour}\noindent% \th@mb@tmp@title% \leaders\box \ThumbsBox {\th@mbs@linefill \th@mb@tmp@page}% }% \fi% \fi% \fi% \fi% \fi% \fi% }% }% \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% }% } \newcommand{\th@mb@yA}{% \advance\th@mbposyA\th@mbheighty% \advance\th@mbposyA\th@mbsdistance% \ifdim\th@mbposyA>\th@mbposybottom% \PackageWarning{thumbs}{You are not only using more than one thumb mark at one\MessageBreak% single page, but also thumb marks from different thumb\MessageBreak% columns. May I suggest the use of a \string\pagebreak\space or\MessageBreak% \string\newpage ?% }% \setlength{\th@mbposyA}{\th@mbposytop}% \fi% } \ltx@ifpackageloaded{tikz}{% tikz loaded before thumbs \ltx@ifpackageloaded{hyperref}{% hyperref loaded before thumbs %% but tikz and hyperref in which order? To be determined now: %% Code similar to the one from Joseph Wright: %% http://tex.stackexchange.com/questions/45533/how-to-determine-which-register-a-count-uses/ \def\th@mbhalt{\th@mbhalt} \def\registernumber#1{% \expandafter\registernumberauxi\meaning#1\th@mbhalt\stop% } \def\registernumberauxi#1#2\stop{% \ifx\th@mbhalt#1% \expandafter\ltx@gobbletwo% \else% \expandafter\registernumberauxii% \fi% {#1}{#2}% } \def\registernumberauxii#1#2{% \ifnum`#1<48% \else% \ifnum`#1>57% \else% #1% \fi% \fi% \registernumberauxi#2\stop% } %% End of code similar to the one from Joseph Wright \def\thumbs@gobblesix#1#2#3#4#5#6#7{#7} \edef\wrighta{\registernumber\Hy@linkcounter} \edef\wrightb{\expandafter\thumbs@gobblesix\wrighta} \@tempcnta=\wrightb\relax% \edef\wrighta{\registernumber\tikztreelevel} \edef\wrightb{\expandafter\thumbs@gobblesix\wrighta} \@tempcntb=\wrightb\relax% \ifnum\@tempcntb>\@tempcnta% tikz, hyperref \xdef\th@mbtikz{-1}% tikz loaded after hyperref \else \xdef\th@mbtikz{0}% tikz loaded before hyperref \fi% }{% tikz loaded before thumbs and hyperref loaded afterwards or not at all \xdef\th@mbtikz{0}% } }{% tikz not loaded before thumbs \xdef\th@mbtikz{-1} } \newcommand{\th@mbprint}[3]{% \put(\th@mbxpos,-\th@mbposyA){% \begin{picture}(0,0)% {\color{#3}\rule{\th@mbwidthx}{\th@mbheighty}}% \end{picture}% \begin{picture}(0,0)(0,-0.5\th@mbheighty+384930sp)% \bgroup% \setlength{\parindent}{0pt}% \ifodd\c@CurrentPage% \if@twoside% \ifx\th@mbtikz\pagesLTS@zero% %\makebox[\th@mbwidthx][r]{{\color{#2}#1\space}}% \parbox{\th@mbwidthx}{{\raggedleft{\hfill \color{#2}#1\space}}}% \else% %\makebox[\th@mbwidthx][l]{{\color{#2}\hspace*{1pt}\space #1}}% \parbox{\th@mbwidthx}{{\raggedright{\color{#2}\hspace*{1pt}\space #1}}}% \fi% \else% %\makebox[\th@mbwidthx][r]{{\color{#2}#1\space}}% \parbox{\th@mbwidthx}{{\raggedleft{\hfill \color{#2}#1\space}}}% \fi% \else% \if@twoside% \ifx\th@mbtikz\pagesLTS@zero% %\makebox[\th@mbwidthx][l]{{\color{#2}\hspace*{1pt}\space #1}}% \parbox{\th@mbwidthx}{{\raggedright{\color{#2}\hspace*{1pt}\space #1}}}% \else% %\makebox[\th@mbwidthx][r]{{\color{#2}#1\space}}% \parbox{\th@mbwidthx}{{\raggedleft{\hfill \color{#2}#1\space}}}% \fi% \else% %\makebox[\th@mbwidthx][r]{{\color{#2}#1\space}}% \parbox{\th@mbwidthx}{{\raggedleft{\hfill \color{#2}#1\space}}}% \fi% \fi% \egroup% \end{picture}% }% } \AtBeginShipout{% \ifx\th@mbcolumnnew\pagesLTS@zero% ok \else% \PackageError{thumbs}{Missing \string\addthumb\space after \string\thumbnewcolumn }{% Command \string\thumbnewcolumn\space was used, but no new thumb placed with \string\addthumb\MessageBreak% (at least not at the same page). After \string\thumbnewcolumn\space please always use an\MessageBreak% \string\addthumb . Until the next \string\addthumb , there will be no thumb marks on the\MessageBreak% pages. Starting a new column of thumb marks and not putting a thumb mark into\MessageBreak% that column does not make sense. If you just want to get rid of column marks,\MessageBreak% do not abuse \string\thumbnewcolumn\space but use \string\stopthumb .\MessageBreak% (This error message will be repeated at all following pages,\MessageBreak% \space until \string\addthumb\space is used.)\MessageBreak% }% \fi% \@tempcnta=\value{CurrentPage}\relax% \advance\@tempcnta by \th@mbtikz% \edef\th@mbstmpwidth{\the\paperwidth}% \ifdim\th@mbpaperwidth=\th@mbstmpwidth% OK \else% \PackageWarningNoLine{thumbs}{% Paperwidth has changed. Thumb mark positions become now adapted% }% \setlength{\th@mbposx}{\paperwidth}% \advance\th@mbposx-\th@mbwidthx% \ifthumbs@ignorehoffset% \advance\th@mbposx-\hoffset% \fi% \advance\th@mbposx+1pt% \xdef\th@mbpaperwidth{\the\paperwidth}% \fi% \def\th@mbxpos{\th@mbposx}% \ifodd\@tempcnta% \relax \else% \if@twoside% \ifthumbs@ignorehoffset% \def\th@mbxpos{-1pt-\hoffset}% \else% \def\th@mbxpos{-1pt}% \fi% \fi% \fi% \AtBeginShipoutUpperLeft{% \ifx\th@mbprinting\pagesLTS@one% \th@mbprint{\th@mbtextA}{\th@mbtextcolourA}{\th@mbbackgroundcolourA}% \@tempcnta=1\relax% \edef\th@mbonpagetest{\the\@tempcnta}% \@whilenum\th@mbonpagetest<\th@mbonpage\do{% \advance\@tempcnta by 1% \edef\th@mbonpagetest{\the\@tempcnta}% \th@mb@yA% \def\th@mbtmpdeftext{\csname th@mbtext\AlphAlph{\the\@tempcnta}\endcsname}% \def\th@mbtmpdefcolour{\csname th@mbtextcolour\AlphAlph{\the\@tempcnta}\endcsname}% \def\th@mbtmpdefbackgroundcolour{\csname th@mbbackgroundcolour\AlphAlph{\the\@tempcnta}\endcsname}% \th@mbprint{\th@mbtmpdeftext}{\th@mbtmpdefcolour}{\th@mbtmpdefbackgroundcolour}% }% \fi% \@tempcnta=\th@mbonpage\relax% \ifnum\@tempcnta<2% \relax \else% \gdef\th@mbtextA{\th@mbtext}% \gdef\th@mbtextcolourA{\th@mbtextcolour}% \gdef\th@mbbackgroundcolourA{\th@mbbackgroundcolour}% \gdef\th@mbposyA{\th@mbposy}% \fi% \gdef\th@mbonpage{0}% \gdef\th@mbtoprint{0}% }% } \AfterLastShipout{% \ifx\th@mbcolumnnew\pagesLTS@zero% ok \else \PackageWarningNoLine{thumbs}{% Still missing \string\addthumb\space after \string\thumbnewcolumn\space after\MessageBreak% last ship-out: Command \string\thumbnewcolumn\space was used,\MessageBreak% but no new thumb placed with \string\addthumb\space anywhere in the\MessageBreak% rest of the document. Starting a new column of thumb\MessageBreak% marks and not putting a thumb mark into that column\MessageBreak% does not make sense. If you just want to get rid of\MessageBreak% thumb marks, do not abuse \string\thumbnewcolumn\space but use\MessageBreak% \string\stopthumb % } \fi \ifx\th@mbcolumn\pagesLTS@zero% if there is only one column of thumbs \xdef\th@umbsperpagecount{\th@mbs} \gdef\th@mbcolumn{1} \fi \ifx\th@umbsperpagecount\pagesLTS@zero \gdef\th@umbsperpagecount{\th@mbs}% \th@mbs was increased with each \addthumb \fi \ifdim\th@mbmaxwidth>\th@mbwidthx \ifthumbs@draft% \relax \else \def\th@mbstest{autoauto} \ifx\thumbs@width\th@mbstest% \AtEndAfterFileList{% \PackageWarningNoLine{thumbs}{% Rerun to get the thumb marks width right% } } \else \AtEndAfterFileList{% \edef\thumbsinfoa{\th@mbmaxwidth} \edef\thumbsinfob{\the\th@mbwidthx} \PackageWarningNoLine{thumbs}{% Thumb mark too small or its text too wide:\MessageBreak% The widest thumb mark text is \thumbsinfoa\space wide,\MessageBreak% but the thumb marks are only \space\thumbsinfob\space wide.\MessageBreak% Either shorten or scale down the text,\MessageBreak% or increase the thumb mark width,\MessageBreak% or use option width=autoauto% } } \fi \fi \fi \if@filesw \immediate\write\@auxout{\string\gdef\string\th@mbmaxwidtha{\th@mbmaxwidth}} \immediate\write\@auxout{\string\gdef\string\th@umbsperpage{\th@umbsperpagecount}} \immediate\write\@auxout{\string\gdef\string\th@mbsmax{\th@mbs}} \expandafter\newwrite\csname tf@tmb\endcsname \RerunFileCheck{\jobname.tmb}{% \immediate\closeout \csname tf@tmb\endcsname }{Warning: Rerun to get list of thumbs right!% } \immediate\openout \csname tf@tmb\endcsname = \jobname.tmb\relax %\else there is a problem, but the according warning message was already given earlier. \fi } \newcommand{\addthumbsoverviewtocontents}[2]{% \gdef\th@mbs@toc@level{#1} \gdef\th@mbs@toc@text{#2} } \newcommand{\clearotherdoublepage}{% \clearpage\if@twoside \ifodd\c@page% removed "\else" from \cleardoublepage \hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi\fi\fi% } \newcommand{\th@mbstablabeling}{% \ltx@ifpackageloaded{hyperref}{\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% } \newcommand{\thumbsoverview}[1]{\thumbsoverviewprint{#1}{r}} \newcommand{\thumbsoverviewback}[1]{\thumbsoverviewprint{#1}{l}} \newcommand{\thumbsoverviewverso}[1]{\thumbsoverviewprint{#1}{v}} \newcommand{\thumbsoverviewdouble}[1]{\thumbsoverviewprint{#1}{d}} \newcommand{\thumbsoverviewprint}[2]{% \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% \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% \def\th@mbstest{none}% \ifx\thumbs@thumblink\th@mbstest% OK \else% \ltx@ifpackageloaded{hyperref}{% hyperref loaded \def\th@mbstest{title}% \ifx\thumbs@thumblink\th@mbstest% OK \else% \def\th@mbstest{page}% \ifx\thumbs@thumblink\th@mbstest% OK \else% \def\th@mbstest{titleandpage}% \ifx\thumbs@thumblink\th@mbstest% OK \else% \def\th@mbstest{line}% \ifx\thumbs@thumblink\th@mbstest% OK \else% \def\th@mbstest{rule}% \ifx\thumbs@thumblink\th@mbstest% OK \else% \PackageError{thumbs}{Option thumblink with invalid value}{% Option thumblink has value '\thumbs@thumblink'.\MessageBreak% Valid values are 'none', 'title', 'page',\MessageBreak% 'titleandpage', 'line', or 'rule'.\MessageBreak% 'rule' will be used now.\MessageBreak% }% \gdef\thumbs@thumblink{rule}% \fi% \fi% \fi% \fi% \fi% }{% hyperref not loaded \PackageError{thumbs}{Option thumblink != none, but hyperref not loaded}{% The option thumblink of the thumbs package was not set to 'none',\MessageBreak% but to some kind of hyperlinks, without using package hyperref.\MessageBreak% Either choose option 'thumblink=none', or load package hyperref.\MessageBreak% When pressing return, 'thumblink=none' will be set now.\MessageBreak% }% \gdef\thumbs@thumblink{none}% }% \fi% \edef\th@mbprintingovertoc{\th@mbprinting}% \ifnum \th@mbsmax > \pagesLTS@zero% \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% \markboth{\MakeUppercase #1 }{\MakeUppercase #1 }% \fi% \setlength{\th@mbsposytocy}{\th@mbposy}% \setlength{\th@mbposy}{\th@mbsposytocyy}% \ifx\th@mbstable\pagesLTS@zero% \newcounter{th@mblinea}% \newcounter{th@mblineb}% \newcounter{FileLine}% \newcounter{thumbsstop}% \fi% \setcounter{th@mblinea}{\th@mbstable}% \addtocounter{th@mblinea}{+1}% \xdef\th@mbstable{\arabic{th@mblinea}}% \setcounter{th@mblinea}{1}% \setcounter{th@mblineb}{\th@umbsperpage}% \setcounter{FileLine}{1}% \setcounter{thumbsstop}{1}% \addtocounter{thumbsstop}{\th@mbsmax}% \let\thumbsoriglabel\label% \let\thumbsorigindex\index% \let\thumbsorigglossary\glossary% \let\label\@gobble% \let\index\@gobble% \let\glossary\@gobble% \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% {\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% \edef\theth@mblinea{\arabic{th@mblinea}}% \edef\theth@mblineb{\arabic{th@mblineb}}% \def\th@mb@resetdoublepage{1}% \fi% \else% \if@twoside% \def\th@mbstest{r}% \ifx\th@mbstest\th@mbsprintpage% \cleardoublepage% \else% l \clearotherdoublepage% \fi% \else \clearpage% \fi% \fi% \ifnum\value{FileLine}=1% \ifx\th@mbdoublepage\pagesLTS@one% \ifx\th@mb@resetdoublepage\pagesLTS@one% \th@mbstablabeling% \fi% \else \th@mbstablabeling% \fi% \fi% \null% \th@mbs@verview% \pagebreak% \ifthumbs@verbose% \message{THUMBS: Fileline: \arabic{FileLine}, a: \arabic{th@mblinea}, % b: \arabic{th@mblineb}, per page: \th@umbsperpage, max: \th@mbsmax.^^J}% \fi% \ifx\th@mb@resetdoublepage\pagesLTS@one% \setcounter{FileLine}{\theth@mblinea}% \fi% }% \setlength{\th@mbposy}{\th@mbsposytocy}% \ifx\th@mbprintingovertoc\pagesLTS@one% \continuethumb% \fi% \let\label\thumbsoriglabel% \let\index\thumbsorigindex% \let\glossary\thumbsorigglossary% \addthumbsoverviewtocontents{}{}% } \newcommand{\th@mbs@verview}{% \ifthumbs@verbose% \message{^^JPackage thumbs Info: Processing line \arabic{th@mblinea} to \arabic{th@mblineb} of \jobname.tmb.}% \fi% \setcounter{FileLine}{1}% \AtBeginShipoutNext{% \AtBeginShipoutUpperLeftForeground{% \IfFileExists{\jobname.tmb}{% then \openin\@instreamthumb=\jobname.tmb % \@whilenum\value{FileLine}<\value{th@mblineb}\do% {\ifthumbs@verbose% \message{THUMBS: Processing \jobname.tmb line \arabic{FileLine}.}% \fi% \ifnum \value{FileLine}<\value{th@mblinea}% \read\@instreamthumb to \@unused% \ifthumbs@verbose% \message{Can be skipped.^^J}% \fi% % NIRVANA: ignore the line by not executing it, % i.e. not executing \@unused. % % \@unused \else% \ifnum \value{FileLine}=\value{th@mblinea}% \read\@instreamthumb to \@thumbsout% execute the code of this line \ifthumbs@verbose% \message{Executing \jobname.tmb line \arabic{FileLine}.^^J}% \fi% \@thumbsout% \else% \ifnum \value{FileLine}>\value{th@mblinea}% \read\@instreamthumb to \@thumbsout% execute the code of this line \ifthumbs@verbose% \message{Executing \jobname.tmb line \arabic{FileLine}.^^J}% \fi% \@thumbsout% \else% THIS SHOULD NEVER HAPPEN! \PackageError{thumbs}{Unexpected error! (Really!)}{% ! You are in trouble here.\MessageBreak% ! Type\space \space X \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\space \space \string\space to proceed.\MessageBreak% ! If that does not work,\MessageBreak% ! you might contact the maintainer of the thumbs package.\MessageBreak% }% \fi% \fi% \fi% \stepcounter{FileLine}% }% \ifnum \value{FileLine}=\value{th@mblineb} \ifthumbs@verbose% \message{THUMBS: Processing \jobname.tmb line \arabic{FileLine}.}% \fi% \read\@instreamthumb to \@thumbsout% Execute the code of that line. \ifthumbs@verbose% \message{Executing \jobname.tmb line \arabic{FileLine}.^^J}% \fi% \@thumbsout% Well, really execute it here. \stepcounter{FileLine}% \fi% \closein\@instreamthumb% \addtocounter{th@mblinea}{\th@umbsperpage}% \addtocounter{th@mblineb}{\th@umbsperpage}% \@tempcnta=\th@mbsmax\relax% \ifnum \value{th@mblineb}>\@tempcnta\relax% \setcounter{th@mblineb}{\@tempcnta}% \fi% }{% else \setcounter{FileLine}{\arabic{thumbsstop}}% \AtEndAfterFileList{% \PackageWarningNoLine{thumbs}{% File \jobname.tmb not found.\MessageBreak% Rerun to get thumbs overview page(s) right.\MessageBreak% }% }% }% }% }% } \let\thumborigaddthumb\addthumb% \ifthumbs@draft \setlength{\th@mbwidthx}{2pt} \renewcommand{\addthumb}[4]{\thumborigaddthumb{#1}{#2}{black}{gray}} \PackageWarningNoLine{thumbs}{thumbs package in draft mode:\MessageBreak% Thumb mark width is set to 2pt,\MessageBreak% thumb mark text colour to black, and\MessageBreak% thumb mark background colour to gray.\MessageBreak% Use package option final to get the original values.\MessageBreak% } \fi \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 \endinput %% %% End of file `thumbs.sty'.