summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty
blob: a904711d510e3421ff465e3c42051d1bd1b41156 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
%%
%% 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/16 1.1 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{\fancytab}[2]{%
  \begin{tikzpicture}[remember picture,overlay]
    \node[yshift={-\tabtop-1*mod(#2-1,\tabcount)*\tabheight},
                  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'.