From b87a85274cfe6465d3a6c6dce560c8134f63b57c Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Mon, 27 Jun 2016 20:38:01 +0000
Subject: fancytabs (27jun16)

git-svn-id: svn://tug.org/texlive/trunk@41549 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/tex/latex/fancytabs/fancytabs.sty   | 24 ++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty')

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}%
 }
-- 
cgit v1.2.3

