From ff287f29c33f3f1d440be0d25e7d480316c1af57 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 18 May 2011 22:24:23 +0000 Subject: thumbs (18may11) git-svn-id: svn://tug.org/texlive/trunk@22525 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/thumbs/thumbs.sty | 110 ++++++++------------------ 1 file changed, 31 insertions(+), 79 deletions(-) (limited to 'Master/texmf-dist/tex/latex/thumbs') diff --git a/Master/texmf-dist/tex/latex/thumbs/thumbs.sty b/Master/texmf-dist/tex/latex/thumbs/thumbs.sty index 67b1fecfeb2..246156c9c56 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/14 v1.0a +%% Version: 2011/05/18 v1.0b %% %% Copyright (C) 2010, 2011 by %% H.-Martin M"unch @@ -39,7 +39,7 @@ %% thumbs-example.tex. %% \NeedsTeXFormat{LaTeX2e}[1994/06/01]% or later -\ProvidesPackage{thumbs}[2011/05/14 v1.0a +\ProvidesPackage{thumbs}[2011/05/18 v1.0b Thumb marks and overwiew page(s) (HMM)] %% This package allows to create a customizable thumb index, @@ -49,7 +49,8 @@ \message{^^J *** Compiling with SW(P)? ^^J% Please see the sw(p)*.log or \jobname.log-file! *** ^^J} \PackageWarningNoLine{thumbs}{% - When compiling with SWP 5.50 Build 2960,\MessageBreak% + 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% @@ -457,59 +458,23 @@ \setlength{\th@mbposyA}{\th@mbposy}% \else% \ifx\th@mbcolumnnew\pagesLTS@zero% - \ifnum\th@mbonpage=2% - \ifnum\th@mbonpagemax>1% - \else \gdef\th@mbonpagemax{2}% - \fi% - \gdef\th@mbtextB{#2}% - \gdef\th@mbtextcolourB{#3}% - \gdef\th@mbbackgroundcolourB{#4}% - \else% - \ifnum\th@mbonpage=3% - \ifnum\th@mbonpagemax>2% - \else \gdef\th@mbonpagemax{3}% - \fi% - \gdef\th@mbtextC{#2}% - \gdef\th@mbtextcolourC{#3}% - \gdef\th@mbbackgroundcolourC{#4}% - \else% - \ifnum\th@mbonpage=4% - \ifnum\th@mbonpagemax>3% - \else \gdef\th@mbonpagemax{4}% - \fi% - \gdef\th@mbtextD{#2}% - \gdef\th@mbtextcolourD{#3}% - \gdef\th@mbbackgroundcolourD{#4}% - \else% - \ifnum\th@mbonpage=5% - \ifnum\th@mbonpagemax>4% - \else \gdef\th@mbonpagemax{5}% - \fi% - \gdef\th@mbtextE{#2}% - \gdef\th@mbtextcolourE{#3}% - \gdef\th@mbbackgroundcolourE{#4}% - \else% - \ifnum\th@mbonpage=6% - \ifnum\th@mbonpagemax>5% - \else \gdef\th@mbonpagemax{6}% - \fi% - \gdef\th@mbtextF{#2}% - \gdef\th@mbtextcolourF{#3}% - \gdef\th@mbbackgroundcolourF{#4}% - \else% - \PackageError{thumbs}{Too many thumbs on one page!}{% - You tried to placed more than six (!) thumb marks on a single page,\MessageBreak% - (approximate page number: \thepage ).\MessageBreak% - Maybe insert a \string\pagebreak or \string\newpage?\MessageBreak% - No following thumb marks will show on this page, sorry.\MessageBreak% - If you absolutly need more marks on one page,\MessageBreak% - please write an e-mail to the package maintainer.\MessageBreak% - }% - \fi% - \fi% - \fi% + \setcounter{th@mbs@tmpA}{1}% + \edef\th@mbonpagetest{\arabic{th@mbs@tmpA}}% + \@whilenum\th@mbonpagetest<\th@mbonpage\do{% + \addtocounter{th@mbs@tmpA}{1}% + \global\edef\th@mbonpagetest{\arabic{th@mbs@tmpA}}% + \ifnum\th@mbonpage=\th@mbonpagetest% + \ifnum\th@mbonpagemax<\th@mbonpage% + \global\edef\th@mbonpagemax{\th@mbonpage}% \fi% + \edef\th@mbtmpdef{\csname th@mbtext\AlphAlph{\arabic{th@mbs@tmpA}}\endcsname}% + \expandafter\gdef\th@mbtmpdef{#2}% + \edef\th@mbtmpdef{\csname th@mbtextcolour\AlphAlph{\arabic{th@mbs@tmpA}}\endcsname}% + \expandafter\gdef\th@mbtmpdef{#3}% + \edef\th@mbtmpdef{\csname th@mbbackgroundcolour\AlphAlph{\arabic{th@mbs@tmpA}}\endcsname}% + \expandafter\gdef\th@mbtmpdef{#4}% \fi% + }% \else% \ifnum\th@mbonpagemax<\th@mbonpage% \global\edef\th@mbonpagemax{\th@mbonpage}% @@ -698,35 +663,21 @@ \fi% \fi% \AtBeginShipoutUpperLeft{% - \setcounter{th@mbs@tmpA}{\th@mbonpage}% \ifx\th@mbprinting\pagesLTS@one% \th@mbprint{\th@mbtextA}{\th@mbtextcolourA}{\th@mbbackgroundcolourA}% - \ifnum\value{th@mbs@tmpA}>1% + \setcounter{th@mbs@tmpA}{1}% + \edef\th@mbonpagetest{\arabic{th@mbs@tmpA}}% + \@whilenum\th@mbonpagetest<\th@mbonpage\do{% + \addtocounter{th@mbs@tmpA}{1}% + \edef\th@mbonpagetest{\arabic{th@mbs@tmpA}}% \th@mb@yA% - \th@mbprint{\th@mbtextB}{\th@mbtextcolourB}{\th@mbbackgroundcolourB}% - \ifnum\value{th@mbs@tmpA}>2% - \th@mb@yA% - \th@mbprint{\th@mbtextC}{\th@mbtextcolourC}{\th@mbbackgroundcolourC}% - \ifnum\value{th@mbs@tmpA}>3% - \th@mb@yA% - \th@mbprint{\th@mbtextD}{\th@mbtextcolourD}{\th@mbbackgroundcolourD}% - \ifnum\value{th@mbs@tmpA}>4% - \th@mb@yA% - \th@mbprint{\th@mbtextE}{\th@mbtextcolourE}{\th@mbbackgroundcolourE}% - \ifnum\value{th@mbs@tmpA}>5% - \th@mb@yA% - \th@mbprint{\th@mbtextF}{\th@mbtextcolourF}{\th@mbbackgroundcolourF}% - \ifnum\value{th@mbs@tmpA}>6% - \PackageWarning{thumbs}{Too many thumbs on one page,\MessageBreak% - please see error message already given above.\MessageBreak% - }% - \fi% - \fi% - \fi% - \fi% - \fi% - \fi% + \def\th@mbtmpdeftext{\csname th@mbtext\AlphAlph{\arabic{th@mbs@tmpA}}\endcsname}% + \def\th@mbtmpdefcolour{\csname th@mbtextcolour\AlphAlph{\arabic{th@mbs@tmpA}}\endcsname}% + \def\th@mbtmpdefbackgroundcolour{\csname th@mbbackgroundcolour\AlphAlph{\arabic{th@mbs@tmpA}}\endcsname}% + \th@mbprint{\th@mbtmpdeftext}{\th@mbtmpdefcolour}{\th@mbtmpdefbackgroundcolour}% + }% \fi% + \setcounter{th@mbs@tmpA}{\th@mbonpage}% \ifnum\value{th@mbs@tmpA}<2% \relax \else% \gdef\th@mbtextA{\th@mbtext}% @@ -931,6 +882,7 @@ \setcounter{th@mblineb}{\value{th@mbs@tmpA}}% \fi% }{% else + \setcounter{FileLine}{\arabic{thumbsstop}}% \addglobalwarning{% \PackageWarningNoLine{thumbs}{% File \jobname.tmb not found.\MessageBreak% -- cgit v1.2.3