%%
%% This is file `fancytabs.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% fancytabs.dtx  (with options: `package')
%% 
%% This is a generated file.
%% 
%% Copyright (C) 2011 by Raphaël Pinson
%% 
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
%% version 1.2 of this license or (at your option) any later
%% version. The latest version of this license is in:
%% 
%%    http://www.latex-project.org/lppl.txt
%% 
%% and version 1.2 or later is part of all distributions of
%% LaTeX version 1999/12/01 or later.
%% 
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{fancytabs}
   [2011/04/17 1.2 Fancy page border tabs]
\RequirePackage{tikz}
\newcommand{\tabstyle}{\Large\scshape}
\newcommand{\tabheight}{4cm}
\newcommand{\tabwidth}{1cm}
\newcommand{\tabcount}{6}
\newcommand{\tableftcolor}{white}
\newcommand{\tabrightcolor}{gray!50}
\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={-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,
                  top color=\tabrightcolor,shading angle=-90]
        (0,0) rectangle (\tabwidth,\tabheight)
           node[rotate=90]
                  at (\tabtexthpos*\tabwidth,\tabtextvpos*\tabheight)
                      {\tabstyle#1};
    };
  \end{tikzpicture}%
}
\endinput
%%
%% End of file `fancytabs.sty'.
