texlive[41549] Master/texmf-dist: fancytabs (27jun16)

commits+karl at tug.org commits+karl at tug.org
Mon Jun 27 22:38:01 CEST 2016


Revision: 41549
          http://tug.org/svn/texlive?view=revision&revision=41549
Author:   karl
Date:     2016-06-27 22:38:01 +0200 (Mon, 27 Jun 2016)
Log Message:
-----------
fancytabs (27jun16)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/fancytabs/fancytabs.pdf
    trunk/Master/texmf-dist/source/latex/fancytabs/fancytabs.dtx
    trunk/Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty

Modified: trunk/Master/texmf-dist/doc/latex/fancytabs/fancytabs.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/fancytabs/fancytabs.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/fancytabs/fancytabs.dtx	2016-06-27 20:37:50 UTC (rev 41548)
+++ trunk/Master/texmf-dist/source/latex/fancytabs/fancytabs.dtx	2016-06-27 20:38:01 UTC (rev 41549)
@@ -26,7 +26,7 @@
 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<package>\ProvidesPackage{fancytabs}
 %<*package>
-   [2012/09/17 1.8 Fancy page border tabs with Tikz]
+   [2016/03/29 1.9 Fancy page border tabs with Tikz]
 %</package>
 %
 %<*driver>
@@ -33,6 +33,9 @@
 \documentclass{ltxdoc}
 \usepackage{fancytabs}
 \usepackage{scrpage2}
+\makeatletter
+\global\let\tikz at ensure@dollar at catcode=\relax
+\makeatother
 \EnableCrossrefs
 \CodelineIndex
 \RecordChanges
@@ -44,7 +47,7 @@
 %</driver>
 % \fi
 %
-% \CheckSum{123}
+% \CheckSum{142}
 %
 % \CharacterTable
 %  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -63,6 +66,7 @@
 %   Right brace   \}     Tilde         \~}
 %
 %
+% \changes{v1.9}{2016/03/29}{Add RTL support (thanks to Zvika Haramaty)}
 % \changes{v1.8}{2012/09/17}{Use lengths were fit}
 % \changes{v1.7}{2011/09/04}{Add Makefile}
 % \changes{v1.6}{2011/09/03}{Bugfix: Fix babel for non-frenchb users (thanks to Marco Daniel)}
@@ -102,9 +106,10 @@
 %
 % \DescribeMacro{\fancytab}
 % The |\fancytab| macro adds a new tab.
-% It takes two arguments:
-% |\fancytab{<text>}{<position>}|
-% and displays the text in the tab, on given vertical position.
+% It takes two mandatory arguments, and one optional:
+% |\fancytab[<LEFT,RIGHT>]{<text>}{<position>}|
+% and displays the text in the tab, on given vertical position,
+% at LEFT or RIGHT horizontal position. Default is RIGHT.
 %
 % \subsection{Adding a tab to all odd pages with scrpage2}
 %
@@ -195,6 +200,10 @@
 % for previous chapters.
 % Default is |0|.
 %
+% \DescribeMacro{\fancytabsRotate}
+% Define the text rotation.
+% Default is |90|.
+%
 % \StopEventually{}
 %
 % \section{Implementation}
@@ -206,6 +215,7 @@
 %    \begin{macrocode}
 \ProvidesPackage{fancytabs}
 \RequirePackage{tikz}
+\RequirePackage{etoolbox}
 %    \end{macrocode}
 % 
 % \begin{macro}{Variables}
@@ -225,6 +235,7 @@
 \newlength{\tab at gap}
 \setlength{\tab at gap}{0in}
 \newcommand{\tab at floor}{0}
+\newcommand{\tab at rotate}{90}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -242,6 +253,7 @@
 \newcommand{\fancytabsTextHPos}[1]{\renewcommand{\tab at texthpos}{#1}}
 \newcommand{\fancytabsGap}[1]{\setlength{\tab at gap}{#1}}
 \newcommand{\fancytabsFloor}[1]{\renewcommand{\tab at floor}{#1}}
+\newcommand{\fancytabsRotate}[1]{\renewcommand{\tab at rotate}{#1}}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -268,19 +280,28 @@
 % \begin{macro}{\fancytab}
 % We define the |\fancytab| macro to generate a new tab.
 %    \begin{macrocode}
-\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 at top+\the\tab at height/2+
-                 mod(#2-1-\tab at floor,\tab at count)*
+                 mod(#3-1-\tab at floor,\tab at count)*
                  (\the\tab at height+\the\tab at gap))},
-                  xshift=-0.5*\the\tab at width]
-      at (current page.north east) {
+                  xshift=\multiplier*\the\tab at width]
+      at (current page.north \eastwest) {
       \tikz\shade[shading=axis,bottom color=\tab at leftcolor,
                   top color=\tab at rightcolor,shading angle=-90]
         (0,0) rectangle (\the\tab at width,\the\tab at height)
            node[rotate=0]
                   at (\tab at texthpos*\the\tab at width,\tab at textvpos*\the\tab at height)
-                      {\rotatebox{90}{\tab at style#1}};%
+                      {\rotatebox{\tab at rotate}{\tab at style#2}};%
     };%
   \end{tikzpicture}%
 }

Modified: trunk/Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty	2016-06-27 20:37:50 UTC (rev 41548)
+++ trunk/Master/texmf-dist/tex/latex/fancytabs/fancytabs.sty	2016-06-27 20:38:01 UTC (rev 41549)
@@ -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 at style}{\Large\scshape}
 \newlength{\tab at height}
 \setlength{\tab at height}{4cm}
@@ -41,6 +42,7 @@
 \newlength{\tab at gap}
 \setlength{\tab at gap}{0in}
 \newcommand{\tab at floor}{0}
+\newcommand{\tab at rotate}{90}
 \newcommand{\fancytabsStyle}[1]{\renewcommand{\tab at style}{#1}}
 \newcommand{\fancytabsHeight}[1]{\setlength{\tab at height}{#1}}
 \newcommand{\fancytabsWidth}[1]{\setlength{\tab at width}{#1}}
@@ -52,6 +54,7 @@
 \newcommand{\fancytabsTextHPos}[1]{\renewcommand{\tab at texthpos}{#1}}
 \newcommand{\fancytabsGap}[1]{\setlength{\tab at gap}{#1}}
 \newcommand{\fancytabsFloor}[1]{\renewcommand{\tab at floor}{#1}}
+\newcommand{\fancytabsRotate}[1]{\renewcommand{\tab at rotate}{#1}}
 \AtBeginDocument{\@ifpackageloaded{babel}
   {\@ifundefined{active at char;}{}{%
     \g at addto@macro\tikz at 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 at top+\the\tab at height/2+
-                 mod(#2-1-\tab at floor,\tab at count)*
+                 mod(#3-1-\tab at floor,\tab at count)*
                  (\the\tab at height+\the\tab at gap))},
-                  xshift=-0.5*\the\tab at width]
-      at (current page.north east) {
+                  xshift=\multiplier*\the\tab at width]
+      at (current page.north \eastwest) {
       \tikz\shade[shading=axis,bottom color=\tab at leftcolor,
                   top color=\tab at rightcolor,shading angle=-90]
         (0,0) rectangle (\the\tab at width,\the\tab at height)
            node[rotate=0]
                   at (\tab at texthpos*\the\tab at width,\tab at textvpos*\the\tab at height)
-                      {\rotatebox{90}{\tab at style#1}};%
+                      {\rotatebox{\tab at rotate}{\tab at style#2}};%
     };%
   \end{tikzpicture}%
 }



More information about the tex-live-commits mailing list