diff options
author | Karl Berry <karl@freefriends.org> | 2011-05-21 22:10:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-05-21 22:10:17 +0000 |
commit | 6dd89615a820f1819c4a0e856cc7e07312b0350c (patch) | |
tree | 6739c462d51ff47ce1e91ca97c6ab905bfd66883 /Master/texmf-dist/tex/latex/thumbs | |
parent | 2fd2732f82155fde3b8bb6da9820108d07461224 (diff) |
thumbs (21may11)
git-svn-id: svn://tug.org/texlive/trunk@22558 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/thumbs')
-rw-r--r-- | Master/texmf-dist/tex/latex/thumbs/thumbs.sty | 110 |
1 files changed, 71 insertions, 39 deletions
diff --git a/Master/texmf-dist/tex/latex/thumbs/thumbs.sty b/Master/texmf-dist/tex/latex/thumbs/thumbs.sty index 246156c9c56..52f8825b70d 100644 --- a/Master/texmf-dist/tex/latex/thumbs/thumbs.sty +++ b/Master/texmf-dist/tex/latex/thumbs/thumbs.sty @@ -9,7 +9,7 @@ %% This is a generated file. %% %% Project: thumbs -%% Version: 2011/05/18 v1.0b +%% Version: 2011/05/20 v1.0c %% %% Copyright (C) 2010, 2011 by %% H.-Martin M"unch <Martin dot Muench at Uni-Bonn dot de> @@ -39,7 +39,7 @@ %% thumbs-example.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/06/01]% or later -\ProvidesPackage{thumbs}[2011/05/18 v1.0b +\ProvidesPackage{thumbs}[2011/05/20 v1.0c Thumb marks and overwiew page(s) (HMM)] %% This package allows to create a customizable thumb index, @@ -68,8 +68,8 @@ \RequirePackage{alphalph}[2010/04/18]% v2.3 \RequirePackage{pagesLTS}[2011/03/17]% v1.1o \RequirePackage{rerunfilecheck}[2011/04/15]% v1.7 -\RequirePackage{ifthen}[2001/05/26]% v1.1c; for \whiledo -\RequirePackage{warning}[2001/08/17]% v0.01 +\RequirePackage{infwarerr}[2010/04/08]% v1.3 +\RequirePackage{atveryend}[2011/04/23]% v1.7 %% thumbs may work with earlier versions of those packages, %% but this was not tested. Please consider updating your packages %% to the most recent version (if they are not already the most @@ -89,12 +89,6 @@ \ProcessKeyvalOptions* -\ifthumbs@verbose -\else - \PackageWarningNoLine{thumbs}{Option verbose=false found:\MessageBreak% - You will lose some information.} -\fi - \pagecolor{\thumbs@pagecolor} \ifx\thumbs@linefill\empty% @@ -139,6 +133,16 @@ \setlength{\th@mbsdistance}{\thumbs@distance} \fi +\ifthumbs@verbose + \newdimen\thumbsinfodimen + \newcommand{\thumbs@info}[1]{% + \setlength{\thumbsinfodimen}{#1}% + }% +\else + \PackageWarningNoLine{thumbs}{Option verbose=false found:\MessageBreak% + You will lose some information.} +\fi + \newbox\ThumbsBox \newcounter{th@mbs@tmpA} @@ -146,7 +150,8 @@ \gdef\th@mbs{0} \gdef\th@mbsmax{0} -\gdef\th@umbsperpage{0} +\gdef\th@umbsperpage{0}% will be set via aux file +\gdef\th@umbsperpagecount{0} \gdef\th@mbtitle{} \gdef\th@mbtext{} @@ -193,8 +198,7 @@ \divide\th@mbheighty\th@mbsmax \fi \advance\th@mbheighty-\th@mbsdistance - % Remove numbers behind the decimal seperator, e.g. 13.67777 pt -> 13 pt: - \@settopoint\th@mbheighty% + \advance\th@mbheighty-\th@mbsdistance } \AtBeginDocument{% @@ -237,11 +241,20 @@ \advance\th@mbheighty+\th@mbposyA% = \thumbs@minheight \fi \else - \PackageInfo{thumbs}{Now setting thumbs' height to \thumbs@height.\MessageBreak} + \ifthumbs@verbose + \thumbs@info{\th@mbheighty} + \PackageInfo{thumbs}{Now setting thumbs' height to \the\thumbsinfodimen .} + \fi \setlength{\th@mbheighty}{\thumbs@height} \fi \fi \newread\@instreamthumb% + \ifthumbs@verbose + \message{^^J} + \@PackageInfoNoLine{thumbs}{************** THUMB dimensions **************} + \thumbs@info{\th@mbheighty} + \@PackageInfoNoLine{thumbs}{The height of the thumb marks is \the\thumbsinfodimen} + \fi \setlength{\th@mbwidthx}{\paperwidth} \advance\th@mbwidthx-\textwidth \divide\th@mbwidthx4 @@ -262,6 +275,10 @@ \fi \fi \fi + \ifthumbs@verbose + \thumbs@info{\th@mbwidthx} + \@PackageInfoNoLine{thumbs}{The width of the thumb marks is \the\thumbsinfodimen} + \fi % Thumb position x \th@mbposx \setlength{\th@mbposx}{\paperwidth} \advance\th@mbposx-\th@mbwidthx @@ -292,6 +309,13 @@ \advance\th@mbposy+\th@mbheighty \fi \setlength{\th@mbposytop}{\th@mbposy} + \ifthumbs@verbose% + \setlength{\@tempdimc}{\th@mbposytop} + \advance\@tempdimc-\th@mbheighty + \advance\@tempdimc+\thumbs@distance + \thumbs@info{\@tempdimc} + \@PackageInfoNoLine{thumbs}{The top thumb margin is \the\thumbsinfodimen} + \fi % Max. thumb position y \th@mbposybottom \ifx\thumbs@bottomthumbmargin\empty% \gdef\thumbs@bottomthumbmargin{auto} @@ -342,6 +366,14 @@ \setlength{\th@mbposybottom}{\paperheight} \advance\th@mbposybottom-\thumbs@bottomthumbmargin \fi + \ifthumbs@verbose% + \setlength{\@tempdimc}{\paperheight} + \advance\@tempdimc-\th@mbposybottom + \thumbs@info{\@tempdimc} + \@PackageInfoNoLine{thumbs}{The bottom thumb margin is \the\thumbsinfodimen} + \@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. @@ -401,7 +433,7 @@ \setlength{\th@mbposy}{\th@mbposytop}% \advance\th@mbposy\thumbs@distance% \ifx\th@mbcolumn\pagesLTS@zero% - \global\edef\th@umbsperpage{\th@mbs}% + \global\edef\th@umbsperpagecount{\th@mbs}% \gdef\th@mbcolumn{1}% \fi% \fi% @@ -705,15 +737,15 @@ } \fi \ifx\th@mbcolumn\pagesLTS@zero% if there is only one column of thumbs - \global\edef\th@umbsperpage{\th@mbs} + \global\edef\th@umbsperpagecount{\th@mbs} \gdef\th@mbcolumn{1} \fi - \ifx\th@umbsperpage\pagesLTS@zero - \gdef\th@umbsperpage{\th@mbs}% \th@mbs was increased with each \addthumb + \ifx\th@umbsperpagecount\pagesLTS@zero + \gdef\th@umbsperpagecount{\th@mbs}% \th@mbs was increased with each \addthumb \fi \if@filesw \immediate\write\@auxout{\string - \gdef\string\th@umbsperpage{\th@umbsperpage}} + \gdef\string\th@umbsperpage{\th@umbsperpagecount}} \immediate\write\@auxout{\string \gdef\string\th@mbsmax{\th@mbs}} \expandafter\newwrite\csname tf@tmb\endcsname @@ -787,24 +819,24 @@ \newcounter{thumbsstop} \setcounter{thumbsstop}{1} \addtocounter{thumbsstop}{\th@mbsmax} - \whiledo{\value{FileLine}<\value{thumbsstop}} - {\if@twoside \cleardoublepage% - \else \clearpage% - \fi% - \ifnum\value{FileLine}=1% - \@ifundefined{Hy@Warning}{}{\phantomsection \label{TableOfThumbs}}% - \ifx\th@mbs@toc@level\empty% - \else \addcontentsline{toc}{\th@mbs@toc@level}{\th@mbs@toc@text}% - \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% - }% + \@whilenum\value{FileLine}<\value{thumbsstop}\do% + {\if@twoside \cleardoublepage% + \else \clearpage% + \fi% + \ifnum\value{FileLine}=1% + \@ifundefined{Hy@Warning}{}{\phantomsection \label{TableOfThumbs}}% + \ifx\th@mbs@toc@level\empty% + \else \addcontentsline{toc}{\th@mbs@toc@level}{\th@mbs@toc@text}% + \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% + }% \setlength{\th@mbposy}{\th@mbsposytocy}% \ifx\th@mbprintingovertoc\pagesLTS@one% \continuethumb% @@ -820,7 +852,7 @@ \AtBeginShipoutUpperLeftForeground{% \IfFileExists{\jobname.tmb}{% then \openin\@instreamthumb=\jobname.tmb % - \whiledo{\value{FileLine}<\value{th@mblineb}} + \@whilenum\value{FileLine}<\value{th@mblineb}\do% {\ifthumbs@verbose% \message{THUMBS: Processing \jobname.tmb line \arabic{FileLine}.}% \fi% @@ -883,7 +915,7 @@ \fi% }{% else \setcounter{FileLine}{\arabic{thumbsstop}}% - \addglobalwarning{% + \AtVeryVeryEnd{% \PackageWarningNoLine{thumbs}{% File \jobname.tmb not found.\MessageBreak% Rerun to get thumbs overview page(s) right.\MessageBreak% |