diff options
author | Karl Berry <karl@freefriends.org> | 2011-04-20 01:02:32 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-04-20 01:02:32 +0000 |
commit | 695bdab05077ae6db369ce39763e4c69bc49d737 (patch) | |
tree | 95f50f57fac478eeb32a93b8d14d1eb62d934b4b | |
parent | 0ea4797d5f27cf7d8aba1d8af5c9a928cbe6a66d (diff) |
fancytabs (19apr11)
git-svn-id: svn://tug.org/texlive/trunk@22130 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/fancytabs/fancytabs.pdf | bin | 160299 -> 160927 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/fancytabs/fancytabs.dtx | 81 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty | 19 |
3 files changed, 67 insertions, 33 deletions
diff --git a/Master/texmf-dist/doc/latex/fancytabs/fancytabs.pdf b/Master/texmf-dist/doc/latex/fancytabs/fancytabs.pdf Binary files differindex 7b1cc98d3cb..a610c8319b2 100644 --- a/Master/texmf-dist/doc/latex/fancytabs/fancytabs.pdf +++ b/Master/texmf-dist/doc/latex/fancytabs/fancytabs.pdf diff --git a/Master/texmf-dist/source/latex/fancytabs/fancytabs.dtx b/Master/texmf-dist/source/latex/fancytabs/fancytabs.dtx index 71148945157..25539c7b088 100644 --- a/Master/texmf-dist/source/latex/fancytabs/fancytabs.dtx +++ b/Master/texmf-dist/source/latex/fancytabs/fancytabs.dtx @@ -17,7 +17,7 @@ % \iffalse %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{fancytabs} -%<package> [2011/04/16 1.1 Fancy page border tabs] +%<package> [2011/04/17 1.2 Fancy page border tabs] % %<*driver> \documentclass{ltxdoc} @@ -33,6 +33,8 @@ % % \CheckSum{0} % +% \changes{v1.3}{2011/04/18}{Add tabfloor and accessors} +% \changes{v1.2}{2011/04/17}{Add tabgap. Fix tabtop by adding tabheight/2} % \changes{v1.1}{2011/04/16}{Add tabtextvpos and tabtexthpos macros} % \changes{v1.0}{2011/04/14}{Initial version} % @@ -62,7 +64,8 @@ % % \subsection{Adding a tab to all odd pages with scrpage2} % -% The following code adds a tab with the chapter name, positioned by chapter order, on each odd page. +% The following code adds a tab with the chapter name, +% positioned by chapter order, on each odd page. % % \begin{verbatim} % \documentclass{scrbook} @@ -97,67 +100,63 @@ % % \subsection{Parameters} % -% \DescribeMacro{\tabstyle} +% \DescribeMacro{\fancytabsStyle} % The style of for the text in the tab. % Default is |\Large\scshape|. -% You can set this value with: -% |\renewcommand{\tabstyle}{<value>}|. % -% \DescribeMacro{\tabheight} +% \DescribeMacro{\fancytabsHeight} % Define the height of the tab. % Default is |4cm|. -% You can set this value with -% |\renewcommand{\tabheight}{<value>}|. % -% \DescribeMacro{\tabwidth} +% \DescribeMacro{\fancytabsWidth} % Define the height of the tab. % Default is |1cm|. -% You can set this value with -% |\renewcommand{\tabwidth}{<value>}|. % -% \DescribeMacro{\tabcount} +% \DescribeMacro{\fancytabsCount} % Define the maximum amount of tabs on a page. -% After |\tabcount| tabs are displayed, the next tab is displayed on top of the page again. +% After |\tabcount| tabs are displayed, +% the next tab is displayed on top of the page again. % Default is |6|. -% You can set this value with -% |\renewcommand{\tabcount}{<value>}|. % -% \DescribeMacro{\tableftcolor} +% \DescribeMacro{\fancytabsLeftColor} % Define the left color for the tab gradient. % Default is |white|. -% You can set this value with -% |\renewcommand{\tableftcolor}{<value>}|. % -% \DescribeMacro{\tabrightcolor} +% \DescribeMacro{\fancytabsRightColor} % Define the right color for the tab gradient. % Default is |gray!50|. -% You can set this value with -% |\renewcommand{\tabrightcolor}{<value>}|. % -% \DescribeMacro{\tabtop} +% \DescribeMacro{\fancytabsTop} % Define margin on top of the top tab. % Default is |\tabheight|. -% You can set this value with -% |\renewcommand{\tabtop}{<value>}|. % -% \DescribeMacro{\tabtextvpos} +% \DescribeMacro{\fancytabsTextVPos} % Define the relative vertical position % of the text in the tab. % Default is |0.5|. -% You can set this value with -% |\renewcommand{\tabtextvpos}{<value>}|. % -% \DescribeMacro{\tabtexthpos} +% \DescribeMacro{\fancytabsTextHPos} % Define the relative horizontal position % of the text in the tab. % Default is |\tabtextvpos|. -% You can set this value with -% |\renewcommand{\tabtexthpos}{<value>}|. +% +% \DescribeMacro{\fancytabsGap} +% Define the gap between two tabs. +% Default is |0in|. +% +% \DescribeMacro{\fancytabsFloor} +% Define the starting number for incrementation. +% This is useful if you want to pass for example +% |\arabic{chapter}| as counter but not put tabs +% for previous chapters. +% Default is |0|. % % \StopEventually{\PrintIndex} % % \section{Implementation} % +% \subsection{Variables} +% % \begin{macrocode} \RequirePackage{tikz} \newcommand{\tabstyle}{\Large\scshape} @@ -169,6 +168,24 @@ \newcommand{\tabtop}{\tabheight} \newcommand{\tabtextvpos}{0.5} \newcommand{\tabtexthpos}{\tabtextvpos} +\newcommand{\tabgap}{0in} +\newcommand{\tabfloor}{0} +% \end{macrocode} +% +% \subsection{Accessors} +% +% \begin{macrocode} +\newcommand{\fancytabsStyle}[1]{\renewcommand{\tabstyle}{#1}} +\newcommand{\fancytabsHeight}[1]{\renewcommand{\tabheight}{#1}} +\newcommand{\fancytabsWidth}[1]{\renewcommand{\tabwidth}{#1}} +\newcommand{\fancytabsCount}[1]{\renewcommand{\tabcount}{#1}} +\newcommand{\fancytabsLeftColor}[1]{\renewcommand{\tableftcolor}{#1}} +\newcommand{\fancytabsRightColor}[1]{\renewcommand{\tabrightcolor}{#1}} +\newcommand{\fancytabsTop}[1]{\renewcommand{\tabtop}{#1}} +\newcommand{\fancytabsTextVPos}[1]{\renewcommand{\tabtextvpos}{#1}} +\newcommand{\fancytabsTextHPos}[1]{\renewcommand{\tabtexthpos}{#1}} +\newcommand{\fancytabsGap}[1]{\renewcommand{\tabgap}{#1}} +\newcommand{\fancytabsFloor}[1]{\renewcommand{\tabfloor}{#1}} % \end{macrocode} % % \begin{macro}{\fancytab} @@ -176,7 +193,9 @@ % \begin{macrocode} \newcommand{\fancytab}[2]{% \begin{tikzpicture}[remember picture,overlay] - \node[yshift={-\tabtop-1*mod(#2-1,\tabcount)*\tabheight}, + \node[yshift={-1*(\tabtop+\tabheight/2+ + mod(#2-1-\tabfloor,\tabcount)* + (\tabheight+\tabgap))}, xshift=-0.5*\tabwidth] at (current page.north east) { \tikz\shade[shading=axis,bottom color=\tableftcolor, diff --git a/Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty b/Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty index a904711d510..36b66225b57 100644 --- a/Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty +++ b/Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty @@ -22,7 +22,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{fancytabs} - [2011/04/16 1.1 Fancy page border tabs] + [2011/04/17 1.2 Fancy page border tabs] \RequirePackage{tikz} \newcommand{\tabstyle}{\Large\scshape} \newcommand{\tabheight}{4cm} @@ -33,9 +33,24 @@ \newcommand{\tabtop}{\tabheight} \newcommand{\tabtextvpos}{0.5} \newcommand{\tabtexthpos}{\tabtextvpos} +\newcommand{\tabgap}{0in} +\newcommand{\tabfloor}{0} +\newcommand{\fancytabsStyle}[1]{\renewcommand{\tabstyle}{#1}} +\newcommand{\fancytabsHeight}[1]{\renewcommand{\tabheight}{#1}} +\newcommand{\fancytabsWidth}[1]{\renewcommand{\tabwidth}{#1}} +\newcommand{\fancytabsCount}[1]{\renewcommand{\tabcount}{#1}} +\newcommand{\fancytabsLeftColor}[1]{\renewcommand{\tableftcolor}{#1}} +\newcommand{\fancytabsRightColor}[1]{\renewcommand{\tabrightcolor}{#1}} +\newcommand{\fancytabsTop}[1]{\renewcommand{\tabtop}{#1}} +\newcommand{\fancytabsTextVPos}[1]{\renewcommand{\tabtextvpos}{#1}} +\newcommand{\fancytabsTextHPos}[1]{\renewcommand{\tabtexthpos}{#1}} +\newcommand{\fancytabsGap}[1]{\renewcommand{\tabgap}{#1}} +\newcommand{\fancytabsFloor}[1]{\renewcommand{\tabfloor}{#1}} \newcommand{\fancytab}[2]{% \begin{tikzpicture}[remember picture,overlay] - \node[yshift={-\tabtop-1*mod(#2-1,\tabcount)*\tabheight}, + \node[yshift={-1*(\tabtop+\tabheight/2+ + mod(#2-1-\tabfloor,\tabcount)* + (\tabheight+\tabgap))}, xshift=-0.5*\tabwidth] at (current page.north east) { \tikz\shade[shading=axis,bottom color=\tableftcolor, |