From c1d60321ff8dce536932b6ae6a195ffdc082beab Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 18 Sep 2012 00:03:43 +0000 Subject: fancytabs (17sep12) git-svn-id: svn://tug.org/texlive/trunk@27684 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/latex/fancytabs/fancytabs.pdf | Bin 179412 -> 179526 bytes .../source/latex/fancytabs/fancytabs.dtx | 37 ++++++++++++--------- .../texmf-dist/tex/latex/fancytabs/fancytabs.sty | 32 ++++++++++-------- 3 files changed, 39 insertions(+), 30 deletions(-) (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/fancytabs/fancytabs.pdf b/Master/texmf-dist/doc/latex/fancytabs/fancytabs.pdf index e909d7543ec..a7f8d8df394 100644 Binary files a/Master/texmf-dist/doc/latex/fancytabs/fancytabs.pdf and b/Master/texmf-dist/doc/latex/fancytabs/fancytabs.pdf differ diff --git a/Master/texmf-dist/source/latex/fancytabs/fancytabs.dtx b/Master/texmf-dist/source/latex/fancytabs/fancytabs.dtx index 039d2aa4031..bbb311b6968 100644 --- a/Master/texmf-dist/source/latex/fancytabs/fancytabs.dtx +++ b/Master/texmf-dist/source/latex/fancytabs/fancytabs.dtx @@ -26,7 +26,7 @@ %\NeedsTeXFormat{LaTeX2e}[1999/12/01] %\ProvidesPackage{fancytabs} %<*package> - [2011/09/04 1.7 Fancy page border tabs with Tikz] + [2012/09/17 1.8 Fancy page border tabs with Tikz] % % %<*driver> @@ -44,7 +44,7 @@ % % \fi % -% \CheckSum{105} +% \CheckSum{123} % % \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 @@ -63,6 +63,7 @@ % Right brace \} Tilde \~} % % +% \changes{v1.8}{2012/09/17}{Use lengths were fit} % \changes{v1.7}{2011/09/04}{Add Makefile} % \changes{v1.6}{2011/09/03}{Bugfix: Fix babel for non-frenchb users (thanks to Marco Daniel)} % \changes{v1.5}{2011/09/01}{Bugfix: Put rotate box around text only (thanks to Wolfgang Ulmer)} @@ -210,15 +211,19 @@ % \begin{macro}{Variables} % \begin{macrocode} \newcommand{\tab@style}{\Large\scshape} -\newcommand{\tab@height}{4cm} -\newcommand{\tab@width}{1cm} +\newlength{\tab@height} +\setlength{\tab@height}{4cm} +\newlength{\tab@width} +\setlength{\tab@width}{1cm} \newcommand{\tab@count}{6} \newcommand{\tab@leftcolor}{white} \newcommand{\tab@rightcolor}{gray!50} -\newcommand{\tab@top}{\tab@height} +\newlength{\tab@top} +\setlength{\tab@top}{\the\tab@height} \newcommand{\tab@textvpos}{0.5} \newcommand{\tab@texthpos}{\tab@textvpos} -\newcommand{\tab@gap}{0in} +\newlength{\tab@gap} +\setlength{\tab@gap}{0in} \newcommand{\tab@floor}{0} % \end{macrocode} % \end{macro} @@ -227,15 +232,15 @@ % \begin{macro}{Accessors} % \begin{macrocode} \newcommand{\fancytabsStyle}[1]{\renewcommand{\tab@style}{#1}} -\newcommand{\fancytabsHeight}[1]{\renewcommand{\tab@height}{#1}} -\newcommand{\fancytabsWidth}[1]{\renewcommand{\tab@width}{#1}} +\newcommand{\fancytabsHeight}[1]{\setlength{\tab@height}{#1}} +\newcommand{\fancytabsWidth}[1]{\setlength{\tab@width}{#1}} \newcommand{\fancytabsCount}[1]{\renewcommand{\tab@count}{#1}} \newcommand{\fancytabsLeftColor}[1]{\renewcommand{\tab@leftcolor}{#1}} \newcommand{\fancytabsRightColor}[1]{\renewcommand{\tab@rightcolor}{#1}} -\newcommand{\fancytabsTop}[1]{\renewcommand{\tab@top}{#1}} +\newcommand{\fancytabsTop}[1]{\setlength{\tab@top}{#1}} \newcommand{\fancytabsTextVPos}[1]{\renewcommand{\tab@textvpos}{#1}} \newcommand{\fancytabsTextHPos}[1]{\renewcommand{\tab@texthpos}{#1}} -\newcommand{\fancytabsGap}[1]{\renewcommand{\tab@gap}{#1}} +\newcommand{\fancytabsGap}[1]{\setlength{\tab@gap}{#1}} \newcommand{\fancytabsFloor}[1]{\renewcommand{\tab@floor}{#1}} % \end{macrocode} % \end{macro} @@ -265,16 +270,16 @@ % \begin{macrocode} \newcommand{\fancytab}[2]{% \begin{tikzpicture}[remember picture,overlay]% - \node[yshift={-1*(\tab@top+\tab@height/2+ + \node[yshift={-1*(\the\tab@top+\the\tab@height/2+ mod(#2-1-\tab@floor,\tab@count)* - (\tab@height+\tab@gap))}, - xshift=-0.5*\tab@width] + (\the\tab@height+\the\tab@gap))}, + xshift=-0.5*\the\tab@width] at (current page.north east) { \tikz\shade[shading=axis,bottom color=\tab@leftcolor, - top color=\tab@rightcolor,shading angle=-90] - (0,0) rectangle (\tab@width,\tab@height) + top color=\tab@rightcolor,shading angle=-90] + (0,0) rectangle (\the\tab@width,\the\tab@height) node[rotate=0] - at (\tab@texthpos*\tab@width,\tab@textvpos*\tab@height) + at (\tab@texthpos*\the\tab@width,\tab@textvpos*\the\tab@height) {\rotatebox{90}{\tab@style#1}};% };% \end{tikzpicture}% diff --git a/Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty b/Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty index 4e86fa18bf8..18c6439a2a5 100644 --- a/Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty +++ b/Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty @@ -22,31 +22,35 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{fancytabs} - [2011/09/04 1.7 Fancy page border tabs with Tikz] + [2012/09/17 1.8 Fancy page border tabs with Tikz] \ProvidesPackage{fancytabs} \RequirePackage{tikz} \newcommand{\tab@style}{\Large\scshape} -\newcommand{\tab@height}{4cm} -\newcommand{\tab@width}{1cm} +\newlength{\tab@height} +\setlength{\tab@height}{4cm} +\newlength{\tab@width} +\setlength{\tab@width}{1cm} \newcommand{\tab@count}{6} \newcommand{\tab@leftcolor}{white} \newcommand{\tab@rightcolor}{gray!50} -\newcommand{\tab@top}{\tab@height} +\newlength{\tab@top} +\setlength{\tab@top}{\the\tab@height} \newcommand{\tab@textvpos}{0.5} \newcommand{\tab@texthpos}{\tab@textvpos} -\newcommand{\tab@gap}{0in} +\newlength{\tab@gap} +\setlength{\tab@gap}{0in} \newcommand{\tab@floor}{0} \newcommand{\fancytabsStyle}[1]{\renewcommand{\tab@style}{#1}} -\newcommand{\fancytabsHeight}[1]{\renewcommand{\tab@height}{#1}} -\newcommand{\fancytabsWidth}[1]{\renewcommand{\tab@width}{#1}} +\newcommand{\fancytabsHeight}[1]{\setlength{\tab@height}{#1}} +\newcommand{\fancytabsWidth}[1]{\setlength{\tab@width}{#1}} \newcommand{\fancytabsCount}[1]{\renewcommand{\tab@count}{#1}} \newcommand{\fancytabsLeftColor}[1]{\renewcommand{\tab@leftcolor}{#1}} \newcommand{\fancytabsRightColor}[1]{\renewcommand{\tab@rightcolor}{#1}} -\newcommand{\fancytabsTop}[1]{\renewcommand{\tab@top}{#1}} +\newcommand{\fancytabsTop}[1]{\setlength{\tab@top}{#1}} \newcommand{\fancytabsTextVPos}[1]{\renewcommand{\tab@textvpos}{#1}} \newcommand{\fancytabsTextHPos}[1]{\renewcommand{\tab@texthpos}{#1}} -\newcommand{\fancytabsGap}[1]{\renewcommand{\tab@gap}{#1}} +\newcommand{\fancytabsGap}[1]{\setlength{\tab@gap}{#1}} \newcommand{\fancytabsFloor}[1]{\renewcommand{\tab@floor}{#1}} \AtBeginDocument{\@ifpackageloaded{babel} {\@ifundefined{active@char;}{}{% @@ -59,16 +63,16 @@ } \newcommand{\fancytab}[2]{% \begin{tikzpicture}[remember picture,overlay]% - \node[yshift={-1*(\tab@top+\tab@height/2+ + \node[yshift={-1*(\the\tab@top+\the\tab@height/2+ mod(#2-1-\tab@floor,\tab@count)* - (\tab@height+\tab@gap))}, - xshift=-0.5*\tab@width] + (\the\tab@height+\the\tab@gap))}, + xshift=-0.5*\the\tab@width] at (current page.north east) { \tikz\shade[shading=axis,bottom color=\tab@leftcolor, top color=\tab@rightcolor,shading angle=-90] - (0,0) rectangle (\tab@width,\tab@height) + (0,0) rectangle (\the\tab@width,\the\tab@height) node[rotate=0] - at (\tab@texthpos*\tab@width,\tab@textvpos*\tab@height) + at (\tab@texthpos*\the\tab@width,\tab@textvpos*\the\tab@height) {\rotatebox{90}{\tab@style#1}};% };% \end{tikzpicture}% -- cgit v1.2.3