From 6b4264f45f77531796d8d090f09358be4dff8854 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 25 Feb 2012 23:47:39 +0000 Subject: thumbs (25feb12) git-svn-id: svn://tug.org/texlive/trunk@25506 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/thumbs/README | 2 +- .../texmf-dist/doc/latex/thumbs/thumbs-example.pdf | Bin 182746 -> 182911 bytes .../texmf-dist/doc/latex/thumbs/thumbs-example.tex | 21 +- Master/texmf-dist/doc/latex/thumbs/thumbs.pdf | Bin 507314 -> 506898 bytes Master/texmf-dist/source/latex/thumbs/thumbs.drv | 4 +- Master/texmf-dist/source/latex/thumbs/thumbs.dtx | 262 ++++++++++++--------- Master/texmf-dist/source/latex/thumbs/thumbs.ins | 6 +- Master/texmf-dist/tex/latex/thumbs/thumbs.sty | 84 +++---- 8 files changed, 201 insertions(+), 178 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/thumbs/README b/Master/texmf-dist/doc/latex/thumbs/README index 7dc00962b60..63a87415a43 100644 --- a/Master/texmf-dist/doc/latex/thumbs/README +++ b/Master/texmf-dist/doc/latex/thumbs/README @@ -1,4 +1,4 @@ -README for thumbs package, 2012/02/23, v1.0m +README for thumbs package, 2012/02/25, v1.0n TABLE OF CONTENTS diff --git a/Master/texmf-dist/doc/latex/thumbs/thumbs-example.pdf b/Master/texmf-dist/doc/latex/thumbs/thumbs-example.pdf index e8240c8175c..5e23c97a14a 100644 Binary files a/Master/texmf-dist/doc/latex/thumbs/thumbs-example.pdf and b/Master/texmf-dist/doc/latex/thumbs/thumbs-example.pdf differ diff --git a/Master/texmf-dist/doc/latex/thumbs/thumbs-example.tex b/Master/texmf-dist/doc/latex/thumbs/thumbs-example.tex index ab71ab82a10..919219edc23 100644 --- a/Master/texmf-dist/doc/latex/thumbs/thumbs-example.tex +++ b/Master/texmf-dist/doc/latex/thumbs/thumbs-example.tex @@ -9,7 +9,7 @@ %% This is a generated file. %% %% Project: thumbs -%% Version: 2012/02/23 v1.0m +%% Version: 2012/02/25 v1.0n %% %% Copyright (C) 2010 - 2012 by %% H.-Martin M"unch @@ -67,14 +67,14 @@ \usepackage[thumblink=rule,linefill=dots,height={auto},minheight={47pt},% width={auto},distance={2mm},topthumbmargin={auto},bottomthumbmargin={auto},% nophantomsection=false,ignorehoffset=true,ignorevoffset=true,final=true,% - hidethumbs=false,verbose=true]{thumbs}[2012/02/23]% v1.0m + hidethumbs=false,verbose=true]{thumbs}[2012/02/25]% v1.0n \nopagecolor% use \pagecolor{white} if \nopagecolor does not work -\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}% +\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}} \makeatletter \ltx@ifpackageloaded{hyperref}{% hyperref loaded }{% hyperref not loaded -\@ifundefined{\url}{\let\url\verb}% neither url -}% + \usepackage{url}% otherwise the "\url"s in this example must be removed manually +} \makeatother \listfiles \begin{document} @@ -84,7 +84,7 @@ \markboth{Example for thumbs}{Example for thumbs} This example demonstrates the most common uses of package -\textsf{thumbs}, v1.0m as of 2012/02/23 (HMM). +\textsf{thumbs}, v1.0n as of 2012/02/25 (HMM). The used options were \texttt{thumblink=rule}, \texttt{linefill=dots}, \texttt{height=auto}, \texttt{minheight=\{47pt\}}, \texttt{width={auto}}, \texttt{distance=\{2mm\}}, \newline @@ -277,15 +277,18 @@ Time for another thumb, and another. -\addthumb{Huge Text}{\Huge{Huge Text}}{yellow}{green} +\addthumb{Huge Text paragraph}{\Huge{Huge\\ \ Text}}{yellow}{green} \bigskip \textquotedblleft {\Huge{Huge Text}}\textquotedblright\ is too large for the thumb mark. When option \texttt{width=\{autoauto\}} would be used, -the thumb mark width would be automatically increased.\label{HugeText} +the thumb mark width would be automatically increased. Now the text is +either split over two lines (use \verb|Huge\\ \ Text| for better format) +or (in case \verb|Huge~Text| is used) is written over the border of the +thumb mark.\label{HugeText} -\addthumb{bold text }{\textbf{Bf Text}}{pink}{blue} +\addthumb{Huge Text}{\Huge{Huge~Text}}{red}{blue} \addthumb{Huge Bold Text}{\Huge{\textbf{HBT}}}{black}{yellow} diff --git a/Master/texmf-dist/doc/latex/thumbs/thumbs.pdf b/Master/texmf-dist/doc/latex/thumbs/thumbs.pdf index b6a5844f08b..80d06ef08a8 100644 Binary files a/Master/texmf-dist/doc/latex/thumbs/thumbs.pdf and b/Master/texmf-dist/doc/latex/thumbs/thumbs.pdf differ diff --git a/Master/texmf-dist/source/latex/thumbs/thumbs.drv b/Master/texmf-dist/source/latex/thumbs/thumbs.drv index c91309b693f..9f57ea4edf6 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: 2012/02/23 v1.0m +%% Version: 2012/02/25 v1.0n %% %% Copyright (C) 2010 - 2012 by %% H.-Martin M"unch @@ -40,7 +40,7 @@ %% \NeedsTeXFormat{LaTeX2e}[2011/06/27] \ProvidesFile{thumbs.drv}% - [2012/02/23 v1.0m Thumb marks and overview page(s) (HMM)] + [2012/02/25 v1.0n Thumb marks and overview page(s) (HMM)] \documentclass[landscape]{ltxdoc}[2007/11/11]% v2.0u \usepackage[maxfloats=20]{morefloats}[2012/01/28]% v1.0f \usepackage{geometry}[2010/09/12]% v5.6 diff --git a/Master/texmf-dist/source/latex/thumbs/thumbs.dtx b/Master/texmf-dist/source/latex/thumbs/thumbs.dtx index b88d1f269ee..a8c43c28c3e 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: 2012/02/23 v1.0m +% Version: 2012/02/25 v1.0n % % Copyright (C) 2010 - 2012 by % H.-Martin M"unch @@ -83,7 +83,7 @@ \input docstrip.tex \Msg{**************************************************************************} \Msg{* Installation *} -\Msg{* Package: thumbs 2012/02/23 v1.0m Thumb marks and overview page(s) (HMM)*} +\Msg{* Package: thumbs 2012/02/25 v1.0n Thumb marks and overview page(s) (HMM)*} \Msg{**************************************************************************} \keepsilent @@ -95,7 +95,7 @@ This is a generated file. Project: thumbs -Version: 2012/02/23 v1.0m +Version: 2012/02/25 v1.0n Copyright (C) 2010 - 2012 by H.-Martin M"unch @@ -179,7 +179,7 @@ the README, and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e}[2011/06/27] \ProvidesFile{thumbs.drv}% - [2012/02/23 v1.0m Thumb marks and overview page(s) (HMM)] + [2012/02/25 v1.0n Thumb marks and overview page(s) (HMM)] \documentclass[landscape]{ltxdoc}[2007/11/11]% v2.0u \usepackage[maxfloats=20]{morefloats}[2012/01/28]% v1.0f \usepackage{geometry}[2010/09/12]% v5.6 @@ -217,7 +217,7 @@ the README, and the derived files % % \fi % -% \CheckSum{2501} +% \CheckSum{2458} % % \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 @@ -256,12 +256,13 @@ the README, and the derived files % \DoNotIndex{\documentclass,\usepackage,\ProvidesPackage,\begin,\end} % \DoNotIndex{\MessageBreak} % \DoNotIndex{\NeedsTeXFormat,\DoNotIndex,\verb} -% \DoNotIndex{\def,\edef,\gdef,\global} +% \DoNotIndex{\def,\edef,\gdef,\xdef,\global} % \DoNotIndex{\ifx,\listfiles,\mathord,\mathrm} % \DoNotIndex{\kvoptions,\SetupKeyvalOptions,\ProcessKeyvalOptions} -% \DoNotIndex{\bigskip,\space,\thinspace,\ldots} +% \DoNotIndex{\smallskip,\bigskip,\space,\thinspace,\ldots} % \DoNotIndex{\indent,\noindent,\newline,\linebreak,\pagebreak,\newpage} -% \DoNotIndex{\textbf,\textit,\textsf,\texttt,\textsc,\textquotedblleft,\textquotedblright} +% \DoNotIndex{\textbf,\textit,\textsf,\texttt,\textsc,\textrm} +% \DoNotIndex{\textquotedblleft,\textquotedblright} % \DoNotIndex{\plainTeX,\TeX,\LaTeX,\pdfLaTeX} % \DoNotIndex{\chapter,\section} % \DoNotIndex{\Huge,\Large,\large} @@ -269,10 +270,10 @@ the README, and the derived files % \DoNotIndex{\setlength,\textbackslash,\,} % \DoNotIndex{\csname,\endcsname,\color,\copyright,\frac,\null} % \DoNotIndex{\@PackageInfoNoLine,\thumbsinfo,\thumbsinfoa,\thumbsinfob} -% \DoNotIndex{\hspace,\thepage,\do,\empty} +% \DoNotIndex{\hspace,\thepage,\do,\empty,\ss} % % \title{The \xpackage{thumbs} package} -% \date{2012/02/23 v1.0m} +% \date{2012/02/25 v1.0n} % \author{H.-Martin M\"{u}nch\\\xemail{Martin.Muench at Uni-Bonn.de}} % % \maketitle @@ -716,14 +717,14 @@ the README, and the derived files \usepackage[thumblink=rule,linefill=dots,height={auto},minheight={47pt},% width={auto},distance={2mm},topthumbmargin={auto},bottomthumbmargin={auto},% nophantomsection=false,ignorehoffset=true,ignorevoffset=true,final=true,% - hidethumbs=false,verbose=true]{thumbs}[2012/02/23]% v1.0m + hidethumbs=false,verbose=true]{thumbs}[2012/02/25]% v1.0n \nopagecolor% use \pagecolor{white} if \nopagecolor does not work -\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}}% +\gdef\unit#1{\mathord{\thinspace\mathrm{#1}}} \makeatletter \ltx@ifpackageloaded{hyperref}{% hyperref loaded }{% hyperref not loaded -\@ifundefined{\url}{\let\url\verb}% neither url -}% + \usepackage{url}% otherwise the "\url"s in this example must be removed manually +} \makeatother \listfiles \begin{document} @@ -733,7 +734,7 @@ the README, and the derived files \markboth{Example for thumbs}{Example for thumbs} This example demonstrates the most common uses of package -\textsf{thumbs}, v1.0m as of 2012/02/23 (HMM). +\textsf{thumbs}, v1.0n as of 2012/02/25 (HMM). The used options were \texttt{thumblink=rule}, \texttt{linefill=dots}, \texttt{height=auto}, \texttt{minheight=\{47pt\}}, \texttt{width={auto}}, \texttt{distance=\{2mm\}}, \newline @@ -929,15 +930,18 @@ Time for another thumb, and another. -\addthumb{Huge Text}{\Huge{Huge Text}}{yellow}{green} +\addthumb{Huge Text paragraph}{\Huge{Huge\\ \ Text}}{yellow}{green} \bigskip \textquotedblleft {\Huge{Huge Text}}\textquotedblright\ is too large for the thumb mark. When option \texttt{width=\{autoauto\}} would be used, -the thumb mark width would be automatically increased.\label{HugeText} +the thumb mark width would be automatically increased. Now the text is +either split over two lines (use \verb|Huge\\ \ Text| for better format) +or (in case \verb|Huge~Text| is used) is written over the border of the +thumb mark.\label{HugeText} -\addthumb{bold text }{\textbf{Bf Text}}{pink}{blue} +\addthumb{Huge Text}{\Huge{Huge~Text}}{red}{blue} \addthumb{Huge Bold Text}{\Huge{\textbf{HBT}}}{black}{yellow} @@ -1137,7 +1141,7 @@ Text can be placed after any of the Tables of Thumbs, of course. % % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[2011/06/27] -\ProvidesPackage{thumbs}[2012/02/23 v1.0m +\ProvidesPackage{thumbs}[2012/02/25 v1.0n Thumb marks and overview page(s) (HMM)] % \end{macrocode} @@ -1224,7 +1228,7 @@ Text can be placed after any of the Tables of Thumbs, of course. \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 +%% would be needed but is currently (2012/02/25) not available at CTAN yet. % \end{macrocode} % % A last information for the user: @@ -1261,7 +1265,7 @@ Text can be placed after any of the Tables of Thumbs, of course. \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% + (As of 2012/02/25, 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.% @@ -1278,7 +1282,7 @@ Text can be placed after any of the Tables of Thumbs, of course. % |\NeedsTeXFormat{LaTeX2e}[2011/06/27]|\\ % is executed at the beginning of \xpackage{regstats} package, % the appropriate warning message is issued automatically. -% (And \xpackage{regstats} should also work with older versions, +% (And \xpackage{thumbs} should also work with older versions, % I~used it with a 2003/12/01 version myself.) % % \begin{macrocode} @@ -1506,8 +1510,9 @@ Text can be placed after any of the Tables of Thumbs, of course. % \end{macrocode} % -% In |\setth@mbheight| the height of a thumb mark (for automatically thumb heights) -% is computed as\\ +% \begin{macro}{\setth@mbheight} +% In |\setth@mbheight| the height of a thumb mark +% (for automatical thumb heights) is computed as\\ % \textquotedblleft |((Thumbs extension) / (Number of Thumbs)) - (2| % $\times $\ |distance between Thumbs)|\textquotedblright. % @@ -1527,6 +1532,7 @@ Text can be placed after any of the Tables of Thumbs, of course. } % \end{macrocode} +% \end{macro} % % At the beginning of the document |\AtBeginDocument| is executed. % |\th@bmshoffset| and |\th@bmsvoffset| are set again, because @@ -1821,7 +1827,7 @@ Text can be placed after any of the Tables of Thumbs, of course. % \end{macrocode} % -% \DescribeMacro{\th@mb@dvance} +% \begin{macro}{\th@mb@dvance} % The internal command |\th@mb@dvance| is used to advance the position of the current % thumb by |\th@mbheighty| and |\th@mbsdistance|. If the resulting position % of the thumb is lower than the |\th@mbposybottom| position (i.\,e.~|\th@mbposy| @@ -1845,8 +1851,9 @@ Text can be placed after any of the Tables of Thumbs, of course. } % \end{macrocode} +% \end{macro} % -% \DescribeMacro{\thumbnewcolumn} +% \begin{macro}{\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 @@ -1883,8 +1890,9 @@ Text can be placed after any of the Tables of Thumbs, of course. } % \end{macrocode} +% \end{macro} % -% \DescribeMacro{\addtitlethumb} +% \begin{macro}{\addtitlethumb} % When a thumb mark shall not or cannot be placed on a page, e.\,g.~at the title page or % when using |\includepdf| from \xpackage{pdfpages} package, but the reference in the thumb % marks overview nevertheless shall name that page number and hyperlink to that page, @@ -1903,8 +1911,9 @@ Text can be placed after any of the Tables of Thumbs, of course. } % \end{macrocode} +% \end{macro} % -% \DescribeMacro{\thumbsnophantom} +% \begin{macro}{\thumbsnophantom} % To locally disable the setting of a |\phantomsection| before a thumb mark, % the command |\thumbsnophantom| is provided. (But at first it is not disabled.) % @@ -1916,8 +1925,9 @@ Text can be placed after any of the Tables of Thumbs, of course. } % \end{macrocode} +% \end{macro} % -% \DescribeMacro{\addthumb} +% \begin{macro}{\addthumb} % Now the |\addthumb| command is defined, which is used to add a new % thumb mark to the document. % @@ -1937,13 +1947,14 @@ Text can be placed after any of the Tables of Thumbs, of course. \gdef\th@mbcolumn{1}% \fi% \fi% +% \end{macrocode} +% \pagebreak +% \begin{macrocode} \@tempcnta=\th@mbs\relax% \advance\@tempcnta by 1% \xdef\th@mbs{\the\@tempcnta}% % \end{macrocode} % -% \pagebreak -% % The |\addthumb| command has four parameters: % \begin{enumerate} % \item a title for the thumb mark (for the thumb marks overview page, @@ -2083,8 +2094,9 @@ Text can be placed after any of the Tables of Thumbs, of course. } % \end{macrocode} +% \end{macro} % -% \DescribeMacro{\stopthumb} +% \begin{macro}{\stopthumb} % When a page (or pages) shall have no thumb marks, |\stopthumb| stops % the issuing of thumb marks (until another thumb mark is placed or % |\continuethumb| is used). @@ -2093,8 +2105,9 @@ Text can be placed after any of the Tables of Thumbs, of course. \newcommand{\stopthumb}{\gdef\th@mbprinting{0}} % \end{macrocode} +% \end{macro} % -% \DescribeMacro{\continuethumb} +% \begin{macro}{\continuethumb} % |\continuethumb| continues the issuing of thumb marks (equal to the one % before this was stopped by |\stopthumb|). % @@ -2102,10 +2115,11 @@ Text can be placed after any of the Tables of Thumbs, of course. \newcommand{\continuethumb}{\gdef\th@mbprinting{1}} % \end{macrocode} +% \end{macro} % % \pagebreak % -% \DescribeMacro{\thumbcontents} +% \begin{macro}{\thumbcontents} % The \textbf{internal} command |\thumbcontents| (which will be read in from the % |\jobname.tmb| file) creates a thumb mark entry on the overview page(s). % Its seven parameters are @@ -2371,8 +2385,9 @@ Text can be placed after any of the Tables of Thumbs, of course. } % \end{macrocode} +% \end{macro} % -% \DescribeMacro{\th@mb@yA} +% \begin{macro}{\th@mb@yA} % |\th@mb@yA| sets the y-position to be used in |\th@mbprint|. % % \begin{macrocode} @@ -2391,6 +2406,9 @@ Text can be placed after any of the Tables of Thumbs, of course. % \end{macrocode} +% \end{macro} +% +% \pagebreak % % \DescribeMacro{tikz, hyperref} % To determine whether to place the thumb marks at the left or right side of a @@ -2406,66 +2424,40 @@ Text can be placed after any of the Tables of Thumbs, of course. % the real page, not the next one.) Thus it must be checked which package was % loaded and in what order. % -% \pagebreak -% % \begin{macrocode} \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% + \ltx@ifpackageloaded{hyperref}{% hyperref loaded before thumbs, + %% but tikz and hyperref in which order? To be determined now: + %% Code similar to the one from David Carlisle: + %% http://tex.stackexchange.com/a/45654/6865 +% \end{macrocode} +% \url{http://tex.stackexchange.com/a/45654/6865} +% \begin{macrocode} + \xdef\th@mbtikz{-1}% assume tikz loaded after hyperref, + %% check for opposite case: + \def\th@mbstest{tikz.sty} + \let\th@mbstestb\@empty + \@for\@th@mbsfl:=\@filelist\do{% + \ifx\@th@mbsfl\th@mbstest + \def\th@mbstestb{hyperref.sty} + \fi + \ifx\@th@mbsfl\th@mbstestb + \xdef\th@mbtikz{0}% tikz loaded before hyperref + \fi + } + %% End of code similar to the one from David Carlisle + }{% 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} } -%% 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} - } - % \end{macrocode} % -% \DescribeMacro{\th@mbprint} +% \newpage +% +% \begin{macro}{\th@mbprint} % |\th@mbprint| places a |picture| containing the thumb mark on the page. % % \begin{macrocode} @@ -2510,6 +2502,9 @@ Text can be placed after any of the Tables of Thumbs, of course. } % \end{macrocode} +% \end{macro} +% +% \newpage % % \DescribeMacro{\AtBeginShipout} % |\AtBeginShipoutUpperLeft| calls the |\th@mbprint| macro for each thumb mark @@ -2614,6 +2609,8 @@ Text can be placed after any of the Tables of Thumbs, of course. % \end{macrocode} % +% \newpage +% % \DescribeMacro{\AfterLastShipout} % |\AfterLastShipout| is executed after the last page has been shipped out. % It is still possible to e.\,g. write to the \xfile{aux} file at this time. @@ -2694,7 +2691,7 @@ Text can be placed after any of the Tables of Thumbs, of course. % \end{macrocode} % -% \DescribeMacro{\addthumbsoverviewtocontents} +% \begin{macro}{\addthumbsoverviewtocontents} % |\addthumbsoverviewtocontents| with two arguments is a replacement for % |\addcontentsline{toc}{}{}|, where the first argument of % |\addthumbsoverviewtocontents| is for || and the second for ||. @@ -2709,8 +2706,9 @@ Text can be placed after any of the Tables of Thumbs, of course. } % \end{macrocode} +% \end{macro} % -% \DescribeMacro{\clearotherdoublepage} +% \begin{macro}{\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 @@ -2723,7 +2721,11 @@ Text can be placed after any of the Tables of Thumbs, of course. } % \end{macrocode} +% \end{macro} +% +% \pagebreak % +% \begin{macro}{\th@mbstablabeling} % 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. @@ -2755,6 +2757,7 @@ Text can be placed after any of the Tables of Thumbs, of course. } % \end{macrocode} +% \end{macro} % % \DescribeMacro{\thumbsoverview} % \DescribeMacro{\thumbsoverviewback} @@ -2797,20 +2800,32 @@ Text can be placed after any of the Tables of Thumbs, of course. % The reference |TableOfThumbs| (without number) aims at the last used Table of Thumbs % (for compatibility with older versions of this package). % +% \begin{macro}{\thumbsoverview} % \begin{macrocode} \newcommand{\thumbsoverview}[1]{\thumbsoverviewprint{#1}{r}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\thumbsoverviewback} +% \begin{macrocode} \newcommand{\thumbsoverviewback}[1]{\thumbsoverviewprint{#1}{l}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\thumbsoverviewverso} +% \begin{macrocode} \newcommand{\thumbsoverviewverso}[1]{\thumbsoverviewprint{#1}{v}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\thumbsoverviewdouble} +% \begin{macrocode} \newcommand{\thumbsoverviewdouble}[1]{\thumbsoverviewprint{#1}{d}} % \end{macrocode} +% \end{macro} % -% \pagebreak -% -% \DescribeMacro{\thumbsoverviewprint} +% \begin{macro}{\thumbsoverviewprint} % |\thumbsoverviewprint| works by calling the internal command |\th@mbs@verview| % (see below), repeating this until all thumb marks have been processed. % @@ -2852,8 +2867,6 @@ Text can be placed after any of the Tables of Thumbs, of course. \fi% % \end{macrocode} % -% \pagebreak -% % Option |\thumbs@thumblink| is checked for a valid and reasonable value here. % % \begin{macrocode} @@ -2946,20 +2959,32 @@ Text can be placed after any of the Tables of Thumbs, of course. \addtocounter{thumbsstop}{\th@mbsmax}% % \end{macrocode} % +% \pagebreak +% % We do not want any labels or index or glossary entries confusing the % table of thumb marks entries, but the commands must work outside of it: % +% \begin{macro}{\thumbsoriglabel} % \begin{macrocode} \let\thumbsoriglabel\label% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\thumbsorigindex} +% \begin{macrocode} \let\thumbsorigindex\index% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\thumbsorigglossary} +% \begin{macrocode} \let\thumbsorigglossary\glossary% +% \end{macrocode} +% \end{macro} +% \begin{macrocode} \let\label\@gobble% \let\index\@gobble% \let\glossary\@gobble% % \end{macrocode} % -% \pagebreak -% % Some preparation in case of double printing the overview page(s): % % \begin{macrocode} @@ -3010,7 +3035,8 @@ Text can be placed after any of the Tables of Thumbs, of course. \else% l \clearotherdoublepage% \fi% - \else \clearpage% + \else% + \clearpage% \fi% \fi% % \end{macrocode} @@ -3051,6 +3077,8 @@ Text can be placed after any of the Tables of Thumbs, of course. }% % \end{macrocode} % +% \pagebreak +% % After the overview, the current thumb mark (if there is any) is restored, % % \begin{macrocode} @@ -3080,8 +3108,9 @@ Text can be placed after any of the Tables of Thumbs, of course. } % \end{macrocode} +% \end{macro} % -% \DescribeMacro{\th@mbs@verview} +% \begin{macro}{\th@mbs@verview} % The internal command |\th@mbs@verview| reads a line from file |\jobname.tmb| and % executes the content of that line~-- if that line has not been processed yet, % in which case it is just ignored (see |\@unused|). @@ -3165,9 +3194,11 @@ Text can be placed after any of the Tables of Thumbs, of course. }{% else % \end{macrocode} % +% \pagebreak +% % When |\jobname.tmb| was not found, we cannot read from that file, therefore % the |FileLine| is set to |thumbsstop|, stopping the calling of |\th@mbs@verview| -% in |\thumbsoverview|. (And we issue a warning, of course). +% in |\thumbsoverview|. (And we issue a warning, of course.) % % \begin{macrocode} \setcounter{FileLine}{\arabic{thumbsstop}}% @@ -3183,9 +3214,9 @@ Text can be placed after any of the Tables of Thumbs, of course. } % \end{macrocode} +% \end{macro} % -% \pagebreak -% +% \begin{macro}{\thumborigaddthumb} % When we are in |draft| mode, the thumb marks are % \textquotedblleft de-coloured\textquotedblright{}, % their width is reduced, and a warning is given. @@ -3193,6 +3224,10 @@ Text can be placed after any of the Tables of Thumbs, of course. % \begin{macrocode} \let\thumborigaddthumb\addthumb% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} \ifthumbs@draft \setlength{\th@mbwidthx}{2pt} \renewcommand{\addthumb}[4]{\thumborigaddthumb{#1}{#2}{black}{gray}} @@ -3329,7 +3364,7 @@ Text can be placed after any of the Tables of Thumbs, of course. % \item[-] package \xpackage{hyperref}, 2012/02/06, v6.82o, % \url{http://ctan.org/pkg/hyperref} % -% \item[-] package \xpackage{thumbs}, 2012/02/23, v1.0m, +% \item[-] package \xpackage{thumbs}, 2012/02/25, v1.0n, % \url{http://ctan.org/pkg/thumbs}\\ % (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 @@ -3572,9 +3607,11 @@ Text can be placed after any of the Tables of Thumbs, of course. % (from which I also got everything I know about creating a file in % \xext{dtx} format, ok, say it: copying), % and the \Newsgroup{comp.text.tex} and \Newsgroup{de.comp.text.tex} -% newsgroups for their help in all things \TeX{}. -% Thanks for bug reports go to \textsc{Veronica Brandt} and \textsc{Martin Baute} -% (even two bug reports). +% newsgroups and everybody at \url{http://tex.stackexchange.com/} +% for their help in all things \TeX{} (especially \textsc{David Carlisle} +% for \url{http://tex.stackexchange.com/a/45654/6865}). +% Thanks for bug reports go to \textsc{Veronica Brandt} and +% \textsc{Martin Baute} (even two bug reports). % % \bigskip % @@ -3745,6 +3782,17 @@ Text can be placed after any of the Tables of Thumbs, of course. % in a phone book, where the other |S|es are placed in another chapter). % \item Minor details changed. % \end{Version} +% \begin{Version}{2012/02/25 v1.0n} +% \item Check for loading order of \xpackage{tikz} and \xpackage{hyperref} replaced +% by robust method. (Thanks to \textsc{David Carlisle}, +% \url{http://tex.stackexchange.com/a/45654/6865}!) +% \item Fixed \texttt{url}-handling in the example in case the \xpackage{hyperref} +% package was not loaded. +% \item In the index the line-numbers of definitions were not underlined; fixed. +% \item In the \xfile{thumbs-example} there are now a few words about +% \textquotedblleft paragraph-thumbs\textquotedblright{} +% (i.\,e.~text which is too long for the width of a thumb mark). +% \end{Version} % \end{History} % % \bigskip diff --git a/Master/texmf-dist/source/latex/thumbs/thumbs.ins b/Master/texmf-dist/source/latex/thumbs/thumbs.ins index b6a3544fe39..a54ff9de4fb 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: 2012/02/23 v1.0m +%% Version: 2012/02/25 v1.0n %% %% Copyright (C) 2010 - 2012 by %% H.-Martin M"unch @@ -41,7 +41,7 @@ \input docstrip.tex \Msg{**************************************************************************} \Msg{* Installation *} -\Msg{* Package: thumbs 2012/02/23 v1.0m Thumb marks and overview page(s) (HMM)*} +\Msg{* Package: thumbs 2012/02/25 v1.0n Thumb marks and overview page(s) (HMM)*} \Msg{**************************************************************************} \keepsilent @@ -53,7 +53,7 @@ This is a generated file. Project: thumbs -Version: 2012/02/23 v1.0m +Version: 2012/02/25 v1.0n Copyright (C) 2010 - 2012 by H.-Martin M"unch diff --git a/Master/texmf-dist/tex/latex/thumbs/thumbs.sty b/Master/texmf-dist/tex/latex/thumbs/thumbs.sty index 658ff8bbb9e..7b7f5678145 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: 2012/02/23 v1.0m +%% Version: 2012/02/25 v1.0n %% %% Copyright (C) 2010 - 2012 by %% H.-Martin M"unch @@ -39,7 +39,7 @@ %% thumbs-example.tex, thumbs-example.pdf. %% \NeedsTeXFormat{LaTeX2e}[2011/06/27] -\ProvidesPackage{thumbs}[2012/02/23 v1.0m +\ProvidesPackage{thumbs}[2012/02/25 v1.0n Thumb marks and overview page(s) (HMM)] %% This package allows to create a customizable thumb index, @@ -90,7 +90,7 @@ \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 +%% would be needed but is currently (2012/02/25) 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 @@ -105,7 +105,7 @@ \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% + (As of 2012/02/25, 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.% @@ -853,59 +853,30 @@ } \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% + \ltx@ifpackageloaded{hyperref}{% hyperref loaded before thumbs, + %% but tikz and hyperref in which order? To be determined now: + %% Code similar to the one from David Carlisle: + %% http://tex.stackexchange.com/a/45654/6865 + \xdef\th@mbtikz{-1}% assume tikz loaded after hyperref, + %% check for opposite case: + \def\th@mbstest{tikz.sty} + \let\th@mbstestb\@empty + \@for\@th@mbsfl:=\@filelist\do{% + \ifx\@th@mbsfl\th@mbstest + \def\th@mbstestb{hyperref.sty} + \fi + \ifx\@th@mbsfl\th@mbstestb + \xdef\th@mbtikz{0}% tikz loaded before hyperref + \fi + } + %% End of code similar to the one from David Carlisle + }{% 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} } -%% 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)% @@ -1261,7 +1232,8 @@ \else% l \clearotherdoublepage% \fi% - \else \clearpage% + \else% + \clearpage% \fi% \fi% \ifnum\value{FileLine}=1% -- cgit v1.2.3