summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-06-27 20:38:01 +0000
committerKarl Berry <karl@freefriends.org>2016-06-27 20:38:01 +0000
commitb87a85274cfe6465d3a6c6dce560c8134f63b57c (patch)
tree69581f92e8811cd37c344a6bc6a28dbdb7dae1b5 /Master/texmf-dist/tex
parent3dfeceb17846d1431ce48f9774ecef028533293e (diff)
fancytabs (27jun16)
git-svn-id: svn://tug.org/texlive/trunk@41549 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty24
1 files changed, 18 insertions, 6 deletions
diff --git a/Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty b/Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty
index 18c6439a2a5..24b712b9080 100644
--- a/Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty
+++ b/Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty
@@ -22,10 +22,11 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{fancytabs}
- [2012/09/17 1.8 Fancy page border tabs with Tikz]
+ [2016/03/29 1.9 Fancy page border tabs with Tikz]
\ProvidesPackage{fancytabs}
\RequirePackage{tikz}
+\RequirePackage{etoolbox}
\newcommand{\tab@style}{\Large\scshape}
\newlength{\tab@height}
\setlength{\tab@height}{4cm}
@@ -41,6 +42,7 @@
\newlength{\tab@gap}
\setlength{\tab@gap}{0in}
\newcommand{\tab@floor}{0}
+\newcommand{\tab@rotate}{90}
\newcommand{\fancytabsStyle}[1]{\renewcommand{\tab@style}{#1}}
\newcommand{\fancytabsHeight}[1]{\setlength{\tab@height}{#1}}
\newcommand{\fancytabsWidth}[1]{\setlength{\tab@width}{#1}}
@@ -52,6 +54,7 @@
\newcommand{\fancytabsTextHPos}[1]{\renewcommand{\tab@texthpos}{#1}}
\newcommand{\fancytabsGap}[1]{\setlength{\tab@gap}{#1}}
\newcommand{\fancytabsFloor}[1]{\renewcommand{\tab@floor}{#1}}
+\newcommand{\fancytabsRotate}[1]{\renewcommand{\tab@rotate}{#1}}
\AtBeginDocument{\@ifpackageloaded{babel}
{\@ifundefined{active@char;}{}{%
\g@addto@macro\tikz@installcommands{%
@@ -61,19 +64,28 @@
}%
}{}%
}
-\newcommand{\fancytab}[2]{%
+\newcommand{\fancytab}[3][RIGHT]{%
+ \ifstrequal{#1}{LEFT}
+ {
+ \newcommand{\eastwest}{west}
+ \newcommand{\multiplier}{0.5}
+ }
+ { %else
+ \newcommand{\eastwest}{east}
+ \newcommand{\multiplier}{-0.5}
+ }
\begin{tikzpicture}[remember picture,overlay]%
\node[yshift={-1*(\the\tab@top+\the\tab@height/2+
- mod(#2-1-\tab@floor,\tab@count)*
+ mod(#3-1-\tab@floor,\tab@count)*
(\the\tab@height+\the\tab@gap))},
- xshift=-0.5*\the\tab@width]
- at (current page.north east) {
+ xshift=\multiplier*\the\tab@width]
+ at (current page.north \eastwest) {
\tikz\shade[shading=axis,bottom color=\tab@leftcolor,
top color=\tab@rightcolor,shading angle=-90]
(0,0) rectangle (\the\tab@width,\the\tab@height)
node[rotate=0]
at (\tab@texthpos*\the\tab@width,\tab@textvpos*\the\tab@height)
- {\rotatebox{90}{\tab@style#1}};%
+ {\rotatebox{\tab@rotate}{\tab@style#2}};%
};%
\end{tikzpicture}%
}