diff options
author | Karl Berry <karl@freefriends.org> | 2012-09-28 22:45:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-09-28 22:45:35 +0000 |
commit | 07888e042f25fd4196570073ba3d4d86194adb0a (patch) | |
tree | cc21686dc45b7dc0a54a72ceb48839ee75037754 /Master/texmf-dist/tex/latex/dynblocks | |
parent | e607bebc2513cccf4c6a8f2d26c06d60933682de (diff) |
dynblocks (28sep12)
git-svn-id: svn://tug.org/texlive/trunk@27838 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/dynblocks')
-rw-r--r-- | Master/texmf-dist/tex/latex/dynblocks/dynblocks.sty | 48 |
1 files changed, 17 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/latex/dynblocks/dynblocks.sty b/Master/texmf-dist/tex/latex/dynblocks/dynblocks.sty index 8c52e8bed98..361f1eee573 100644 --- a/Master/texmf-dist/tex/latex/dynblocks/dynblocks.sty +++ b/Master/texmf-dist/tex/latex/dynblocks/dynblocks.sty @@ -14,7 +14,7 @@ % The Current Maintainer of this work is Claudio Fiandrino. \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{dynblocks}[2012/13/05 v0.1 A simple way to create dynamic blocks.] +\ProvidesPackage{dynblocks}[2012/27/09 v0.2a A simple way to create dynamic blocks.] \RequirePackage{tikz} \RequirePackage{etoolbox} \RequirePackage{xparse} @@ -103,6 +103,7 @@ \def\@alignment{justify} %% Word alert color + \def\setwordscolor#1{\def\@setwordscolor{#1}} \def\@setwordscolor{blue} @@ -127,30 +128,15 @@ \tikzset{invisib/.style={rectangle,color=gray,fill=gray!10,text=black,draw,text opacity=\@invopacity, text width=#1,align=\@alignment}} %% Overlays + \tikzset{ - invisible/.style={opacity=0,text opacity=0}, - visible on/.style={alt=#1{}{invisible}}, - alt/.code args={<#1>#2#3}{% + dyninvisible/.style={opacity=0,text opacity=0}, + dynvisible on/.style={dynalt=#1{}{dyninvisible}}, + dynalt/.code args={<#1>#2#3}{% \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} }, } - -%% Shadow layer -\pgfdeclarelayer{shadowback} -\pgfsetlayers{shadowback,main} - -\pgfkeys{% - /tikz/on layer/.code={ - \pgfonlayer{#1}\begingroup - \aftergroup\endpgfonlayer - \aftergroup\endgroup - }, - /tikz/node on layer/.code={ - \pgfonlayer{#1}\begingroup - \expandafter\def\expandafter\tikz@node@finish\expandafter{\expandafter\endgroup\expandafter\endpgfonlayer\tikz@node@finish}% - }, -} - + %% Rounded corners \ifbool{rndcorners}{%true \tikzset{visib/.append style={rounded corners}} @@ -171,9 +157,9 @@ \setlength{\intdimension}{\z@} \addtolength{\intdimension}{#2} \ifbool{shadowed}{% true -\node[visib=#2,visible on=<#1>,drop shadow={opacity=\@shadowopacity,on layer=shadowback,visible on=<#1->}] (X) {\begingroup #3 \endgroup}; +\node[visib=#2,dynvisible on=<#1>,drop shadow={opacity=\@shadowopacity,dynvisible on=<#1>}] (X) {\begingroup #3 \endgroup}; }{% false -\node[visib=#2,visible on=<#1>] (X) {\begingroup #3 \endgroup}; +\node[visib=#2,dynvisible on=<#1>] (X) {\begingroup #3 \endgroup}; } \savetext{mytext}{#3} } @@ -182,9 +168,9 @@ \setlength{\intdimension}{\z@} \addtolength{\intdimension}{#2} \ifbool{shadowed}{% true -\node[fancyvisib=#2,visible on=<#1>,drop shadow={opacity=\@shadowopacity,on layer=shadowback,visible on=<#1->}] (X) {\begingroup #3 \endgroup}; +\node[fancyvisib=#2,dynvisible on=<#1>,drop shadow={opacity=\@shadowopacity,dynvisible on=<#1>}] (X) {\begingroup #3 \endgroup}; }{% false -\node[fancyvisib=#2,visible on=<#1>] (X) {\begingroup #3 \endgroup}; +\node[fancyvisib=#2,dynvisible on=<#1>] (X) {\begingroup #3 \endgroup}; } \savetext{mytext}{#3} } @@ -193,9 +179,9 @@ \setlength{\intdimension}{\z@} \addtolength{\intdimension}{#2} \ifbool{shadowed}{% true -\node[vshadevisib=#2,visible on=<#1>,drop shadow={opacity=\@shadowopacity,on layer=shadowback,visible on=<#1->}] (X) {\begingroup #3 \endgroup}; +\node[vshadevisib=#2,dynvisible on=<#1>,drop shadow={opacity=\@shadowopacity,dynvisible on=<#1>}] (X) {\begingroup #3 \endgroup}; }{% false -\node[vshadevisib=#2,visible on=<#1>] (X) {\begingroup #3 \endgroup}; +\node[vshadevisib=#2,dynvisible on=<#1>] (X) {\begingroup #3 \endgroup}; } \savetext{mytext}{#3} } @@ -204,18 +190,18 @@ \setlength{\intdimension}{\z@} \addtolength{\intdimension}{#2} \ifbool{shadowed}{% true -\node[oshadevisib=#2,visible on=<#1>,drop shadow={opacity=\@shadowopacity,on layer=shadowback,visible on=<#1->}] (X) {\begingroup #3 \endgroup}; +\node[oshadevisib=#2,dynvisible on=<#1>,drop shadow={opacity=\@shadowopacity,dynvisible on=<#1>}] (X) {\begingroup #3 \endgroup}; }{% false -\node[oshadevisib=#2,visible on=<#1>] (X) {\begingroup #3 \endgroup}; +\node[oshadevisib=#2,dynvisible on=<#1>] (X) {\begingroup #3 \endgroup}; } \savetext{mytext}{#3} } \NewDocumentCommand{\invblock}{r<>}{% \ifbool{shadowed}{% true -\node[invisib=\intdimension,visible on=<#1>,drop shadow={opacity=\@shadowopacity,on layer=shadowback,visible on=<#1>}] (X) {\printthistext{\thethistext}}; +\node[invisib=\intdimension,dynvisible on=<#1>,drop shadow={opacity=\@shadowopacity,dynvisible on=<#1>}] (X) {\printthistext{\thethistext}}; }{% false -\node[invisib=\intdimension,visible on=<#1>] (X) {\printthistext{\thethistext}}; +\node[invisib=\intdimension,dynvisible on=<#1>] (X) {\printthistext{\thethistext}}; } } |