From d21e43ac989ba93e0f327fc32fd99f3b1c3f0c6e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 25 Sep 2012 21:17:07 +0000 Subject: dynblocks.sty in runtime (25 Sep 2012 21:19:30) git-svn-id: svn://tug.org/texlive/trunk@27804 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/latex/dynblocks/doc/dynblocks.pdf | Bin 277870 -> 0 bytes .../doc/latex/dynblocks/doc/dynblocks.tex | 637 --------------------- .../doc/latex/dynblocks/doc/images/alert_1.pdf | Bin 24585 -> 0 bytes .../doc/latex/dynblocks/doc/images/alert_2.pdf | Bin 24791 -> 0 bytes .../doc/latex/dynblocks/doc/images/align.pdf | Bin 24576 -> 0 bytes .../doc/latex/dynblocks/doc/images/basic_1.pdf | Bin 24423 -> 0 bytes .../doc/latex/dynblocks/doc/images/basic_2.pdf | Bin 24530 -> 0 bytes .../doc/latex/dynblocks/doc/images/cmbx_1.pdf | Bin 34676 -> 0 bytes .../doc/latex/dynblocks/doc/images/cmbx_2.pdf | Bin 34936 -> 0 bytes .../doc/latex/dynblocks/doc/images/cmby_1.pdf | Bin 34651 -> 0 bytes .../doc/latex/dynblocks/doc/images/cmby_2.pdf | Bin 34912 -> 0 bytes .../doc/latex/dynblocks/doc/images/custcol_1.pdf | Bin 33877 -> 0 bytes .../doc/latex/dynblocks/doc/images/custcol_2.pdf | Bin 32512 -> 0 bytes .../doc/latex/dynblocks/doc/images/custcol_3.pdf | Bin 32445 -> 0 bytes .../doc/latex/dynblocks/doc/images/custcol_4.pdf | Bin 34185 -> 0 bytes .../doc/latex/dynblocks/doc/images/estl.pdf | Bin 30522 -> 0 bytes .../doc/latex/dynblocks/doc/images/shdrndc_1.pdf | Bin 24993 -> 0 bytes .../doc/latex/dynblocks/doc/images/shdrndc_2.pdf | Bin 25250 -> 0 bytes .../doc/latex/dynblocks/doc/images/szeg_1.pdf | Bin 31769 -> 0 bytes .../doc/latex/dynblocks/doc/images/szeg_2.pdf | Bin 31966 -> 0 bytes .../texmf-dist/doc/latex/dynblocks/dynblocks.pdf | Bin 0 -> 277870 bytes .../texmf-dist/doc/latex/dynblocks/dynblocks.tex | 637 +++++++++++++++++++++ .../doc/latex/dynblocks/images/alert_1.pdf | Bin 0 -> 24585 bytes .../doc/latex/dynblocks/images/alert_2.pdf | Bin 0 -> 24791 bytes .../doc/latex/dynblocks/images/align.pdf | Bin 0 -> 24576 bytes .../doc/latex/dynblocks/images/basic_1.pdf | Bin 0 -> 24423 bytes .../doc/latex/dynblocks/images/basic_2.pdf | Bin 0 -> 24530 bytes .../doc/latex/dynblocks/images/cmbx_1.pdf | Bin 0 -> 34676 bytes .../doc/latex/dynblocks/images/cmbx_2.pdf | Bin 0 -> 34936 bytes .../doc/latex/dynblocks/images/cmby_1.pdf | Bin 0 -> 34651 bytes .../doc/latex/dynblocks/images/cmby_2.pdf | Bin 0 -> 34912 bytes .../doc/latex/dynblocks/images/custcol_1.pdf | Bin 0 -> 33877 bytes .../doc/latex/dynblocks/images/custcol_2.pdf | Bin 0 -> 32512 bytes .../doc/latex/dynblocks/images/custcol_3.pdf | Bin 0 -> 32445 bytes .../doc/latex/dynblocks/images/custcol_4.pdf | Bin 0 -> 34185 bytes .../texmf-dist/doc/latex/dynblocks/images/estl.pdf | Bin 0 -> 30522 bytes .../doc/latex/dynblocks/images/shdrndc_1.pdf | Bin 0 -> 24993 bytes .../doc/latex/dynblocks/images/shdrndc_2.pdf | Bin 0 -> 25250 bytes .../doc/latex/dynblocks/images/szeg_1.pdf | Bin 0 -> 31769 bytes .../doc/latex/dynblocks/images/szeg_2.pdf | Bin 0 -> 31966 bytes .../doc/latex/dynblocks/latex/dynblocks.sty | 224 -------- 41 files changed, 637 insertions(+), 861 deletions(-) delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/dynblocks.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/dynblocks.tex delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/images/alert_1.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/images/alert_2.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/images/align.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/images/basic_1.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/images/basic_2.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/images/cmbx_1.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/images/cmbx_2.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/images/cmby_1.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/images/cmby_2.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/images/custcol_1.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/images/custcol_2.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/images/custcol_3.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/images/custcol_4.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/images/estl.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/images/shdrndc_1.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/images/shdrndc_2.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/images/szeg_1.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/doc/images/szeg_2.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/dynblocks.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/dynblocks.tex create mode 100644 Master/texmf-dist/doc/latex/dynblocks/images/alert_1.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/images/alert_2.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/images/align.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/images/basic_1.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/images/basic_2.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/images/cmbx_1.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/images/cmbx_2.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/images/cmby_1.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/images/cmby_2.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/images/custcol_1.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/images/custcol_2.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/images/custcol_3.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/images/custcol_4.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/images/estl.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/images/shdrndc_1.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/images/shdrndc_2.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/images/szeg_1.pdf create mode 100644 Master/texmf-dist/doc/latex/dynblocks/images/szeg_2.pdf delete mode 100644 Master/texmf-dist/doc/latex/dynblocks/latex/dynblocks.sty (limited to 'Master/texmf-dist/doc') diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/dynblocks.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/dynblocks.pdf deleted file mode 100644 index 9f4fd83d051..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/dynblocks.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/dynblocks.tex b/Master/texmf-dist/doc/latex/dynblocks/doc/dynblocks.tex deleted file mode 100644 index 8b877e963ae..00000000000 --- a/Master/texmf-dist/doc/latex/dynblocks/doc/dynblocks.tex +++ /dev/null @@ -1,637 +0,0 @@ -\documentclass[a4paper,11pt]{article} -\usepackage[T1]{fontenc} -\usepackage[utf8]{inputenc} -\usepackage[english]{babel} -\usepackage{graphicx} -\usepackage{microtype} -\usepackage[osf]{mathpazo} -\usepackage[x11names]{xcolor} -\usepackage[font=footnotesize,labelfont={bf}]{caption} -\usepackage{subfig} -\usepackage{listings} - \lstset{language=[LaTeX]TeX,% - basicstyle=\footnotesize\ttfamily, - keywordstyle=\footnotesize\ttfamily\color{DodgerBlue1}, - commentstyle=\footnotesize\ttfamily\color{DarkOrchid1}, - showstringspaces=false, - morecomment=[s][\footnotesize\ttfamily\color{brown!87!black}]\[ \], - morecomment=[s][\footnotesize\ttfamily\color{brown!87!black}]< >, - texcsstyle=*\color{DodgerBlue1}, - morekeywords={invblock,opaqueblock,setalignment,dynalert,usetheme,alert,setinvopacity, - setblockcolor,setbordercolor,setinnercolor,setoutercolor,settopcolor,setbottomcolor, - setleftcolor,setrightcolor,fancyblock,vshadeblock,oshadeblock,DeclareOption,setbeamercolor}, - framerule=2pt, - rulecolor=\color{DodgerBlue1}, - rulesep=4pt, - framesep=5pt - } -%\lstdefinestyle{myslash}{% -% literate={\textbackslash}{{\textcolor{DodgerBlue1}{\textbackslash}}}{1}% -%} -\usepackage[pdfpagelabels,plainpages=false,colorlinks=true,hyperindex=true, - urlcolor=OrangeRed1,linkcolor=DodgerBlue1]{hyperref} - -\newcommand*{\mcmd}[1]{\texttt{\{}\normalfont\texttt{#1}\texttt{\}}} -\newcommand*{\mbcmd}[1]{\texttt{[}\normalfont\texttt{#1}\texttt{]}} -\newcommand*{\meta}[1]{{\normalfont\ensuremath{\langle}\textit{#1}\ensuremath{\rangle}}} -\newcommand*{\marg}[1]{\texttt{\{\meta{#1}\}}} -\newcommand*{\sarg}[1]{\texttt{<\meta{#1}>}} -\newcommand*{\mbarg}[1]{\texttt{[\meta{#1}]}} -\newcommand*{\cs}[1]{\texttt{\char92#1}} - -\renewcommand\labelitemi{\color{DodgerBlue1!60}$\bullet$} -\renewcommand\labelitemii{\color{DodgerBlue1!60}$\circ$} - -\newcommand{\name}{\textsf{dynblocks}} -\newcommand{\version}{0.2} -\newcommand{\versiondate}{20/09/2012} - -\author{Claudio Fiandrino \\ \footnotesize{\href{mailto:claudio.fiandrino@gmail.com}{claudio.fiandrino@gmail.com}}} -\title{The \name{} package \footnote{This package has version number \textit{v}\version{} of \versiondate{}}} - -\begin{document} -\maketitle -\begin{abstract} -The \name{} package allows to fully customize blocks aspect and dimension inside a presentation. - -The original idea for this package came from \href{http://tex.stackexchange.com/questions/53784/overlay-images-and-block-in-beamer}{this question} in \href{http://tex.stackexchange.com/}{TeX.SE} and the core of the package is based on \href{http://tex.stackexchange.com/questions/53784/overlay-images-and-block-in-beamer/53797#53797}{this answer}. -\end{abstract} - -\tableofcontents - -\section{Introduction} -The purpose of the package is to have an instrument to customize several aspects of blocks (here called \emph{dynblocks}): -\begin{itemize} -\item the width; -\item the color -\begin{itemize} -\item of the background; -\item of the border; -\end{itemize} -\item the text: -\begin{itemize} -\item alignment; -\item opacity -\end{itemize} -\end{itemize} -Notice that \emph{dynblocks} defined by \name{} differ mainly from usual beamer's blocks because no title is given. - -The package has the following requirements: -\begin{itemize} -\item \textsf{TikZ}; -\item \textsf{etoolbox}; -\item \textsf{xparse}. -\end{itemize} - -\section{Usage} -To load the package use as usual: \cs{usepackage}\mbarg{options}\mcmd{dynblocks}. - -The different options that can be adopted will be analysed in detail in section \ref{sec:options}. - -\subsection{Basic usage} -Using the package in basic mode allows to define a block with: -\begin{itemize} -\item \emph{justified} alignment; -\item width equal to \cs{textwidth}; -\item border color \cs{blue} and fill color \cs{blue!10}. -\end{itemize} -thanks to the command \cs{opaqueblock}\sarg{overlay spec}\mbarg{width}\marg{text}. -Moreover, it is also possible to make it \emph{invisible} forcing colors to become \texttt{gray} by means of \cs{invblock}\sarg{overlay spec}. For example, the following code, generates the two frames shown in figures \ref{fig:basic1} and \ref{fig:basic2}. -\medskip -\begin{lstlisting}[frame=lines] -\documentclass{beamer} -\usepackage{dynblocks} - -\usetheme{Luebeck} - -\begin{document} -\begin{frame}{The frame title} -\begin{columns}[T] - \begin{column}{0.4\textwidth} - \begin{dynblock} - \opaqueblock<1>[0.8\textwidth]{hello this is a dynamic block - with an itemize environment: - \begin{itemize} - \item hello - \item hello again - \end{itemize} - } - \invblock<2-> - \end{dynblock} - \end{column} - \begin{column}{0.4\textwidth} - \begin{dynblock} - \opaqueblock<2>{hello this is another dynamic block} - \end{dynblock} - \end{column} -\end{columns} -\end{frame} - -\end{document} -\end{lstlisting} - -\begin{figure}[ht] -\centering -\subfloat[First frame]{ -\includegraphics[scale=0.45]{./images/basic_1} -\label{fig:basic1}% -} -\hspace*{0.25cm} -\subfloat[Second frame]{ -\includegraphics[scale=0.45]{./images/basic_2} -\label{fig:basic2}% -} -\caption{The basic example} -\end{figure} - -In this example, it is possible to notice that the second \cs{opaqueblock} has not \texttt{width} specified; the default value is \cs{textwidth}, but if the block is placed inside a \emph{column} environment it inherits the \texttt{width} given there. To set different values of \texttt{width}, it is necessary to specify the optional argument as did for the first \cs{opaqueblock} of the example. - -The presence of an \cs{invblock} makes the first \cs{opaqueblock} invisible; this command needs to be placed immediately after an \cs{opaqueblock} because of two facts: -\begin{itemize} -\item it automatically inherits the \texttt{width} from the \cs{opaqueblock}; -\item it automatically shows the text of the previous \cs{opaqueblock}. -\end{itemize} - -Finally, both \cs{opaqueblock} and \cs{invblock} needs to be placed inside a \texttt{dynblock} environment. - -\subsection{Change text alignment} -Thanks to the command \cs{setalignment}\marg{text spec} the text alignment changes according to the \meta{text spec} (for all possibilities please refer to the pgfmanual section 16.4.3 - version October 25, 2010). - -Suppose, for instance, to modify the previous example in order to display the second block with center aligned text. The only change to do is: -\medskip -\begin{lstlisting}[frame=lines] -\begin{dynblock} -\setalignment{center} -\opaqueblock<2>{hello this is another dynamic block} -\end{dynblock} -\end{lstlisting} - -and this will lead to figure \ref{fig:align}. - -\begin{figure}[ht] -\centering -\includegraphics[scale=0.7]{./images/align} -\caption{Second frame with text center aligned for the second block}% -\label{fig:align}% -\end{figure} - -Notice that alignments can be local or global: if there is a definition in the preamble, perfectly admissible, all \emph{dynblocks} will be set according to this definition. Whereas the definition is set inside a group, the \emph{columns} environment or simply the \emph{dynblock} environment, it affects just local \emph{dynblocks}. It is even possible set a global definition and then change things locally. - -\subsection{Text opacity and word alert} -By default: -\begin{itemize} -\item \cs{opaqueblock}s have an opacity set to $0.9$; -\item \cs{invblock}s have an opacity set to $0.4$. -\end{itemize} -To change these values two commands have been introduced: -\begin{itemize} -\item \cs{setvisopacity}\marg{opacity spec}; -\item \cs{setinvopacity}\marg{opacity spec}; -\end{itemize} -where \meta{opacity spec} is a value in the interval $[0 \, , \, 1]$. Also these commands can be set locally or in a global fashion in the preamble. - -Due to the opacity the usual \cs{alert} command is not more useful with \cs{invblock}s. The package provides a method to alert a word even in this case; the command to be used is \cs{dynalert}\sarg{overlay spec}\marg{text}; notice that through the proper usage of \meta{overlay spec}, \cs{dynalert} must not fall inside a \cs{opaqueblock}. This is a limitation, but the purpose for which it has been developed is different. - -Assume, for example, to modify the reference example such that the opacity of \cs{invblock} will be set to $0.1$; furthermore, for the first block, the word ``\emph{itemize}'' will be alerted with \cs{alert}, while ``\emph{dynamic block}'' with \cs{dynalert} and for the second block (that does not have the correspondent \cs{invblock}) it is shown what happens with a wrong usage of \cs{dynalert}. The code is: -\medskip -\begin{lstlisting}[frame=lines] -\documentclass{beamer} -\usepackage{dynblocks} - -\usetheme{Luebeck} -\setinvopacity{0.1} - -\begin{document} -\begin{frame}{The frame title} -\begin{columns}[T] -\begin{column}{0.4\textwidth} -\begin{dynblock} -\opaqueblock<1>[0.8\textwidth]{hello this is a - \dynalert<2>{dynamic block} with an \alert<1,2>{itemize} - environment: -\begin{itemize} -\item hello -\item hello again -\end{itemize} -} -\invblock<2-> -\end{dynblock} -\end{column} -\begin{column}{0.4\textwidth} -\begin{dynblock} -\opaqueblock<2>{hello this is another - \dynalert<2>{dynamic} block} -\end{dynblock} -\end{column} -\end{columns} -\end{frame} - -\end{document} -\end{lstlisting} - -\begin{figure}[ht] -\centering -\subfloat[First frame]{ -\includegraphics[scale=0.45]{./images/alert_1} -\label{fig:alert1}% -} -\hspace*{0.1cm} -\subfloat[Second frame]{ -\includegraphics[scale=0.45]{./images/alert_2} -\label{fig:alert2}% -} -\caption{Example with different opacity and alerts} -\end{figure} - -As it is possible to see from figures \ref{fig:alert1} and \ref{fig:alert2}, the usual \cs{alert}, when used inside an \cs{invblock}, is set with the opacity of the block while the proper \cs{dynalert} no. Anyway, a wrong usage of \cs{dynalert} lead to the output shown in figure \ref{fig:alert2}: the subsequent text of the alerted word is set with the opacity of an \cs{invblock}. - -The suggested use, in conclusion, is: -\begin{itemize} -\item \cs{alert} with \meta{overlay spec} equal specified in the related \cs{opaqueblock}; -\item \cs{dynalert} to highlight words inside an \cs{invblock}; -\item never do something like: \cs{dynalert}\texttt{<1,2>}\mcmd{word} if the \cs{opaqueblock} is shown in \meta{overlay spec}$=1$ and the \cs{invblock} in \meta{overlay spec}$=2$. -\end{itemize} - -To change colors: -\begin{itemize} -\item for \cs{alert} the usual Beamer command works:\\ \cs{setbeamercolor}\mcmd{alerted text}\marg{color spec}; -\item for \cs{dynalert} a different command has been introduced to differentiate them from standard Beamer's alerts: \cs{setwordscolor}\marg{color}; the default value is set to \textit{blue}. -\end{itemize} - -\section{Options and advanced examples}\label{sec:options} -In this section the package's options are introduced with examples. They allow to customize more deeply the aspect of \emph{dynblocks}: -\begin{itemize} -\item adding the shadow and the rounded corners (subsection \ref{subse:shrc}); -\item customizing the fill color (subsection \ref{subse:cfill}); -\item adapting the fill color to the current Beamer theme used (subsection \ref{subse:cadapt}). -\end{itemize} - -\subsection{The shadow and the rounded corners}\label{subse:shrc} -To load: -\begin{itemize} -\item the shadow option use: \cs{usepackage}\mbcmd{shadow}\mcmd{dynblocks}; it is possible to set the \emph{shadow opacity} by means of the following command: \cs{setshadowopacity}\marg{opacity spec} (default value $0.4$); -\item the option to have rounded corners for \emph{dynblocks} use: \\ \cs{usepackage}\mbcmd{roundedcorners}\mcmd{dynblocks}. -\end{itemize} - -For example: -\begin{lstlisting}[frame=lines] -\documentclass{beamer} -\usepackage[shadow,roundedcorners]{dynblocks} - -\usetheme{Luebeck} - -\begin{document} -\begin{frame}{The frame title} -\begin{columns}[T] -\begin{column}{0.4\textwidth} -\begin{dynblock} -\opaqueblock<1>[0.8\textwidth]{hello this is a - \dynalert<2>{dynamic block} with an - \alert<1,2>{itemize} environment: -\begin{itemize} -\item hello -\item hello again -\end{itemize} -} -\invblock<2-> -\end{dynblock} -\end{column} -\begin{column}{0.4\textwidth} -\begin{dynblock} -\setalignment{center} -\opaqueblock<2>{hello this is another dynamic block} -\end{dynblock} -\end{column} -\end{columns} -\end{frame} - -\end{document} -\end{lstlisting} -allows to get the frames shown in figures \ref{fig:shdrndc1} and \ref{fig:shdrndc2}. - -\begin{figure}[ht] -\centering -\subfloat[First frame]{ -\includegraphics[scale=0.45]{./images/shdrndc_1} -\label{fig:shdrndc1}% -} -\hspace*{0.1cm} -\subfloat[Second frame]{ -\includegraphics[scale=0.45]{./images/shdrndc_2} -\label{fig:shdrndc2}% -} -\caption{Example with \texttt{shadow} and \texttt{roundedcorners} options} -\end{figure} -\pagebreak -\subsection{Customized fill colors}\label{subse:cfill} -By activating this option it is possible to fully customize the \emph{dynblocks} colors because several command become available: -\begin{itemize} -\item \cs{setblockcolor}\marg{color spec} and \cs{setbordercolor}\marg{color spec} for the \cs{opaqueblock}s (default values are \textit{blue!10} and \textit{blue} respectively); -\item \cs{setinnercolor}\marg{color spec} and \cs{setoutercolor}\marg{color spec} for the \cs{fancyblock}s (default values are \textit{white} and \textit{blue!10} respectively); -\item \cs{settopcolor}\marg{color spec} and \cs{setbottomcolor}\marg{color spec} for the \cs{vshadeblock}s (default values are \textit{white} and \textit{blue!10} respectively); -\item \cs{setleftcolor}\marg{color spec} and \cs{setrightcolor}\marg{color spec} for the \cs{oshadeblock}s (default values are \textit{white} and \textit{blue!10} respectively). -\end{itemize} -Similarly to the \texttt{shadow} and the \texttt{roundedcorners} options, to load the \texttt{customcolors} option use \cs{usepackage}\mbcmd{customcolors}\mcmd{dynblocks}. - -In the following example, all \emph{dynblocks} types are used and it is possible to see how local and global setting work. - -\begin{lstlisting}[frame=lines] -\documentclass{beamer} -\usepackage[shadow, roundedcorners,customcolors]{dynblocks} -% some global settings -\setblockcolor{red!10} -\setbordercolor{red} -\setbottomcolor{orange!40} -\setrightcolor{orange!40} - -\usetheme{Luebeck} - -\begin{document} -\begin{frame}{The frame title} -\begin{columns}[T] -\begin{column}{0.4\textwidth} -\begin{dynblock} -\opaqueblock<1>[0.8\textwidth]{hello this is a - \dynalert<2>{dynamic block} with an - \alert<1,2>{itemize} environment: -\begin{itemize} -\item hello -\item hello again -\end{itemize} -} -\invblock<2-> -\end{dynblock} -\end{column} -\begin{column}{0.4\textwidth} -\setalignment{center} -\begin{dynblock} -% default settings since no -% \setinnercolor or \setoutercolor -% are there -\fancyblock<2>{hello this is another dynamic block} -\invblock<3-> -\end{dynblock} -\\[2ex] -\setbordercolor{orange} % local definition -% that overwrites the global one -\begin{dynblock} -\vshadeblock<3>{replica: hello this a another dynamic block} -\invblock<4-> -\end{dynblock} -\\[2ex] -\begin{dynblock} -\oshadeblock<4>{replica 2: hello this a another dynamic block} -\end{dynblock} -\end{column} -\end{columns} -\end{frame} - -\end{document} -\end{lstlisting} - -The four frames obtained by this example are shown in figures \ref{fig:custcol1}, \ref{fig:custcol2}, \ref{fig:custcol3} and \ref{fig:custcol4}; more in detail: -\begin{itemize} -\item an example of \cs{opaqueblock} customization through \cs{setblockcolor} and \cs{setbordercolor} could be seen in figure \ref{fig:custcol1}; -\item an example of \cs{fancyblock} with default settings could be seen in figure \ref{fig:custcol2} (notice that it inherits the \texttt{bordercolor} from the global setting); -\item an example of \cs{vshadeblock} with customization of \cs{setbottomcolor} and locally \cs{setbordercolor} (\cs{settopcolor} at default value) could be seen in figure \ref{fig:custcol3}; -\item finally, an example of \cs{oshadeblock} with \cs{setrightcolor} and local \cs{setbordercolor} customization (\cs{settopcolor} at default value) could be seen in figure \ref{fig:custcol4}. -\end{itemize} - -\begin{figure}[ht] -\centering -\subfloat[First frame]{ -\includegraphics[scale=0.45]{./images/custcol_1} -\label{fig:custcol1}% -} -\hspace*{0.25cm} -\subfloat[Second frame]{ -\includegraphics[scale=0.45]{./images/custcol_2} -\label{fig:custcol2}% -} -\\ -\subfloat[Third frame]{ -\includegraphics[scale=0.45]{./images/custcol_3} -\label{fig:custcol3}% -} -\hspace*{0.25cm} -\subfloat[Fourth frame]{ -\includegraphics[scale=0.45]{./images/custcol_4} -\label{fig:custcol4}% -} -\caption{Example with \texttt{customcolor} option and all \emph{dynblocks} types} -\end{figure} - -\subsection{Color adaptation to the Beamer theme}\label{subse:cadapt} -The purpose of this option is to use the Beamer's color of the theme currently adopted; as it will be possible to see, the \texttt{getthemecolors} option should be used with particular care. To load the option there is the usual \cs{usepackage}\mbcmd{getthemecolors}\mcmd{dynblocks}. - -This option is defined inside the package as: -\begin{lstlisting}[frame=lines] -\DeclareOption{getthemecolors}{ -% redefinition opaqueblock -\renewcommand{\thecol}{structure.fg!10} -\renewcommand{\thebordercol}{structure.fg} -% redefinition fancyblock -\def\@setinnercolor{white} -\def\@setoutercolor{structure.fg!10} -% redefinition vshadeblock -\def\@settopcolor{white} -\def\@setbottomcolor{structure.fg!10} -% redefinition oshadeblock -\def\@setleftcolor{white} -\def\@setrightcolor{structure.fg!10} -} -\end{lstlisting} -thus it works properly if the current \texttt{beamercolortheme} set the \emph{structure} definition. - -For example: -\begin{lstlisting}[frame=lines] -\documentclass{beamer} -\usepackage[shadow, roundedcorners,getthemecolors, - customcolors]{dynblocks} - -\usetheme{CambridgeUS} - -\begin{document} -\begin{frame}{The frame title} -\begin{columns}[T] -\begin{column}{0.4\textwidth} -\begin{dynblock} -\opaqueblock<1>[0.8\textwidth]{hello this is a -\dynalert<2>{dynamic block} with an -\alert<1,2>{itemize} environment: -\begin{itemize} -\item hello -\item hello again -\end{itemize} -} -\invblock<2-> -\end{dynblock} -\end{column} -\begin{column}{0.4\textwidth} -\setalignment{center} -\begin{dynblock} -\opaqueblock<2>{hello this is another dynamic block} -\end{dynblock} -\end{column} -\end{columns} -\end{frame} - -\end{document} -\end{lstlisting} -will lead to figures \ref{fig:cmbx1} and \ref{fig:cmbx2}. -\begin{figure}[ht] -\centering -\subfloat[First frame]{ -\includegraphics[scale=0.45]{./images/cmbx_1} -\label{fig:cmbx1}% -} -\hspace*{0.1cm} -\subfloat[Second frame]{ -\includegraphics[scale=0.45]{./images/cmbx_2} -\label{fig:cmbx2}% -} -\caption{Example with a theme that does not define structure color} -\end{figure} - -The result can be improved in the following way: -\begin{lstlisting}[frame=lines] -\documentclass{beamer} -\usepackage[shadow, roundedcorners,getthemecolors, - customcolors]{dynblocks} - -\usetheme{CambridgeUS} -% definition of structure -\setbeamercolor*{structure}{parent=palette primary} - -\begin{document} -\begin{frame}{The frame title} -\begin{columns}[T] -\begin{column}{0.4\textwidth} -\begin{dynblock} -\opaqueblock<1>[0.8\textwidth]{hello this is a -\dynalert<2>{dynamic block} with an -\alert<1,2>{itemize} environment: -\begin{itemize} -\item hello -\item hello again -\end{itemize} -} -\invblock<2-> -\end{dynblock} -\end{column} -\begin{column}{0.4\textwidth} -\setalignment{center} -\begin{dynblock} -\opaqueblock<2>{hello this is another dynamic block} -\end{dynblock} -\end{column} -\end{columns} -\end{frame} - -\end{document} -\end{lstlisting} -obtaining as result the frames shown in figures \ref{fig:cmby1} and \ref{fig:cmby2}. - -\begin{figure}[ht] -\centering -\subfloat[First frame]{ -\includegraphics[scale=0.45]{./images/cmby_1} -\label{fig:cmby1}% -} -\hspace*{0.1cm} -\subfloat[Second frame]{ -\includegraphics[scale=0.45]{./images/cmby_2} -\label{fig:cmby2}% -} -\caption{Example of a theme with a posteriori structure color definition} -\end{figure} -\pagebreak - -Here is another example: -\begin{lstlisting}[frame=lines] -\documentclass{beamer} -\usepackage[getthemecolors]{dynblocks} - -\usetheme{EastLansing} -\setbeamercolor*{structure}{parent=palette primary} - -\begin{document} -\begin{frame}{The frame title} -\begin{dynblock} -\opaqueblock<1>{hello this is a -dynamic block with an -itemize environment: -\begin{itemize} -\item hello -\item hello again -\end{itemize} -} -\end{dynblock} -\end{frame} - -\end{document} -\end{lstlisting} -with the final output shown in figure \ref{fig:estl}. - -\begin{figure}[ht] -\centering -\includegraphics[scale=0.7]{./images/estl} -\caption{Second example of a theme with a posteriori structure color definition}% -\label{fig:estl}% -\end{figure} - -The decision of adopting the \emph{structure} as reference is due to the fact that this parameter assume an high relevance when customizing a theme. In the following example, it is shown a color customization of the Szeged theme and a particular effect that can be realized thanks to multiple \emph{dynblocks} inside the same \texttt{dynblock} environment: -\begin{lstlisting}[frame=lines] -\documentclass{beamer} -\usepackage[getthemecolors,roundedcorners,shadow]{dynblocks} - -\usetheme{Szeged} -\setbeamercolor{structure}{bg=red!20,fg=red} - -\begin{document} - - -\begin{frame}{A title} -\begin{center} -\begin{dynblock} -\opaqueblock<1>[0.6\textwidth]{hello this is a dynamic block - with an itemize environment: -\begin{itemize} -\item hello -\item hello again -\end{itemize} -} -\invblock<2-> -\setalignment{center} -\opaqueblock<2>{hello this is another dynamic block} -\end{dynblock} -\end{center} -\end{frame} - -\end{document} -\end{lstlisting} -The two frames obtained as outcome are shown in figures \ref{fig:szeg1} and \ref{fig:szeg2}. -\begin{figure} -\centering -\subfloat[First frame]{ -\includegraphics[scale=0.45]{./images/szeg_1} -\label{fig:szeg1}% -} -\hspace*{0.1cm} -\subfloat[Second frame]{ -\includegraphics[scale=0.45]{./images/szeg_2} -\label{fig:szeg2}% -} -\caption{Example of a customized theme} -\end{figure} -\pagebreak - -Notice that the \texttt{getthemecolors} option has some drawbacks when used with particular Beamer color themes like: -\begin{itemize} -\item albatross; -\item beetle. -\end{itemize} - - -\end{document} - diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/images/alert_1.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/images/alert_1.pdf deleted file mode 100644 index bfe688be746..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/images/alert_1.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/images/alert_2.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/images/alert_2.pdf deleted file mode 100644 index 01955b88636..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/images/alert_2.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/images/align.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/images/align.pdf deleted file mode 100644 index 2f141e0e38d..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/images/align.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/images/basic_1.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/images/basic_1.pdf deleted file mode 100644 index 5665f1714d3..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/images/basic_1.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/images/basic_2.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/images/basic_2.pdf deleted file mode 100644 index dc27df07ed7..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/images/basic_2.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/images/cmbx_1.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/images/cmbx_1.pdf deleted file mode 100644 index be40f3e35d8..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/images/cmbx_1.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/images/cmbx_2.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/images/cmbx_2.pdf deleted file mode 100644 index 455f45f01bc..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/images/cmbx_2.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/images/cmby_1.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/images/cmby_1.pdf deleted file mode 100644 index 73a13167138..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/images/cmby_1.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/images/cmby_2.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/images/cmby_2.pdf deleted file mode 100644 index fa3eab65393..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/images/cmby_2.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/images/custcol_1.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/images/custcol_1.pdf deleted file mode 100644 index a8e2a08d5db..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/images/custcol_1.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/images/custcol_2.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/images/custcol_2.pdf deleted file mode 100644 index b2b2dac9a3c..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/images/custcol_2.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/images/custcol_3.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/images/custcol_3.pdf deleted file mode 100644 index 625650fd5e4..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/images/custcol_3.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/images/custcol_4.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/images/custcol_4.pdf deleted file mode 100644 index 6a91f4bc3bf..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/images/custcol_4.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/images/estl.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/images/estl.pdf deleted file mode 100644 index d719863e3ed..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/images/estl.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/images/shdrndc_1.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/images/shdrndc_1.pdf deleted file mode 100644 index a3e98433f12..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/images/shdrndc_1.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/images/shdrndc_2.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/images/shdrndc_2.pdf deleted file mode 100644 index 7ae5a128a50..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/images/shdrndc_2.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/images/szeg_1.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/images/szeg_1.pdf deleted file mode 100644 index fd85cbced1f..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/images/szeg_1.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/doc/images/szeg_2.pdf b/Master/texmf-dist/doc/latex/dynblocks/doc/images/szeg_2.pdf deleted file mode 100644 index 9e8bad152cd..00000000000 Binary files a/Master/texmf-dist/doc/latex/dynblocks/doc/images/szeg_2.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/dynblocks.pdf b/Master/texmf-dist/doc/latex/dynblocks/dynblocks.pdf new file mode 100644 index 00000000000..9f4fd83d051 Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/dynblocks.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/dynblocks.tex b/Master/texmf-dist/doc/latex/dynblocks/dynblocks.tex new file mode 100644 index 00000000000..8b877e963ae --- /dev/null +++ b/Master/texmf-dist/doc/latex/dynblocks/dynblocks.tex @@ -0,0 +1,637 @@ +\documentclass[a4paper,11pt]{article} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage[english]{babel} +\usepackage{graphicx} +\usepackage{microtype} +\usepackage[osf]{mathpazo} +\usepackage[x11names]{xcolor} +\usepackage[font=footnotesize,labelfont={bf}]{caption} +\usepackage{subfig} +\usepackage{listings} + \lstset{language=[LaTeX]TeX,% + basicstyle=\footnotesize\ttfamily, + keywordstyle=\footnotesize\ttfamily\color{DodgerBlue1}, + commentstyle=\footnotesize\ttfamily\color{DarkOrchid1}, + showstringspaces=false, + morecomment=[s][\footnotesize\ttfamily\color{brown!87!black}]\[ \], + morecomment=[s][\footnotesize\ttfamily\color{brown!87!black}]< >, + texcsstyle=*\color{DodgerBlue1}, + morekeywords={invblock,opaqueblock,setalignment,dynalert,usetheme,alert,setinvopacity, + setblockcolor,setbordercolor,setinnercolor,setoutercolor,settopcolor,setbottomcolor, + setleftcolor,setrightcolor,fancyblock,vshadeblock,oshadeblock,DeclareOption,setbeamercolor}, + framerule=2pt, + rulecolor=\color{DodgerBlue1}, + rulesep=4pt, + framesep=5pt + } +%\lstdefinestyle{myslash}{% +% literate={\textbackslash}{{\textcolor{DodgerBlue1}{\textbackslash}}}{1}% +%} +\usepackage[pdfpagelabels,plainpages=false,colorlinks=true,hyperindex=true, + urlcolor=OrangeRed1,linkcolor=DodgerBlue1]{hyperref} + +\newcommand*{\mcmd}[1]{\texttt{\{}\normalfont\texttt{#1}\texttt{\}}} +\newcommand*{\mbcmd}[1]{\texttt{[}\normalfont\texttt{#1}\texttt{]}} +\newcommand*{\meta}[1]{{\normalfont\ensuremath{\langle}\textit{#1}\ensuremath{\rangle}}} +\newcommand*{\marg}[1]{\texttt{\{\meta{#1}\}}} +\newcommand*{\sarg}[1]{\texttt{<\meta{#1}>}} +\newcommand*{\mbarg}[1]{\texttt{[\meta{#1}]}} +\newcommand*{\cs}[1]{\texttt{\char92#1}} + +\renewcommand\labelitemi{\color{DodgerBlue1!60}$\bullet$} +\renewcommand\labelitemii{\color{DodgerBlue1!60}$\circ$} + +\newcommand{\name}{\textsf{dynblocks}} +\newcommand{\version}{0.2} +\newcommand{\versiondate}{20/09/2012} + +\author{Claudio Fiandrino \\ \footnotesize{\href{mailto:claudio.fiandrino@gmail.com}{claudio.fiandrino@gmail.com}}} +\title{The \name{} package \footnote{This package has version number \textit{v}\version{} of \versiondate{}}} + +\begin{document} +\maketitle +\begin{abstract} +The \name{} package allows to fully customize blocks aspect and dimension inside a presentation. + +The original idea for this package came from \href{http://tex.stackexchange.com/questions/53784/overlay-images-and-block-in-beamer}{this question} in \href{http://tex.stackexchange.com/}{TeX.SE} and the core of the package is based on \href{http://tex.stackexchange.com/questions/53784/overlay-images-and-block-in-beamer/53797#53797}{this answer}. +\end{abstract} + +\tableofcontents + +\section{Introduction} +The purpose of the package is to have an instrument to customize several aspects of blocks (here called \emph{dynblocks}): +\begin{itemize} +\item the width; +\item the color +\begin{itemize} +\item of the background; +\item of the border; +\end{itemize} +\item the text: +\begin{itemize} +\item alignment; +\item opacity +\end{itemize} +\end{itemize} +Notice that \emph{dynblocks} defined by \name{} differ mainly from usual beamer's blocks because no title is given. + +The package has the following requirements: +\begin{itemize} +\item \textsf{TikZ}; +\item \textsf{etoolbox}; +\item \textsf{xparse}. +\end{itemize} + +\section{Usage} +To load the package use as usual: \cs{usepackage}\mbarg{options}\mcmd{dynblocks}. + +The different options that can be adopted will be analysed in detail in section \ref{sec:options}. + +\subsection{Basic usage} +Using the package in basic mode allows to define a block with: +\begin{itemize} +\item \emph{justified} alignment; +\item width equal to \cs{textwidth}; +\item border color \cs{blue} and fill color \cs{blue!10}. +\end{itemize} +thanks to the command \cs{opaqueblock}\sarg{overlay spec}\mbarg{width}\marg{text}. +Moreover, it is also possible to make it \emph{invisible} forcing colors to become \texttt{gray} by means of \cs{invblock}\sarg{overlay spec}. For example, the following code, generates the two frames shown in figures \ref{fig:basic1} and \ref{fig:basic2}. +\medskip +\begin{lstlisting}[frame=lines] +\documentclass{beamer} +\usepackage{dynblocks} + +\usetheme{Luebeck} + +\begin{document} +\begin{frame}{The frame title} +\begin{columns}[T] + \begin{column}{0.4\textwidth} + \begin{dynblock} + \opaqueblock<1>[0.8\textwidth]{hello this is a dynamic block + with an itemize environment: + \begin{itemize} + \item hello + \item hello again + \end{itemize} + } + \invblock<2-> + \end{dynblock} + \end{column} + \begin{column}{0.4\textwidth} + \begin{dynblock} + \opaqueblock<2>{hello this is another dynamic block} + \end{dynblock} + \end{column} +\end{columns} +\end{frame} + +\end{document} +\end{lstlisting} + +\begin{figure}[ht] +\centering +\subfloat[First frame]{ +\includegraphics[scale=0.45]{./images/basic_1} +\label{fig:basic1}% +} +\hspace*{0.25cm} +\subfloat[Second frame]{ +\includegraphics[scale=0.45]{./images/basic_2} +\label{fig:basic2}% +} +\caption{The basic example} +\end{figure} + +In this example, it is possible to notice that the second \cs{opaqueblock} has not \texttt{width} specified; the default value is \cs{textwidth}, but if the block is placed inside a \emph{column} environment it inherits the \texttt{width} given there. To set different values of \texttt{width}, it is necessary to specify the optional argument as did for the first \cs{opaqueblock} of the example. + +The presence of an \cs{invblock} makes the first \cs{opaqueblock} invisible; this command needs to be placed immediately after an \cs{opaqueblock} because of two facts: +\begin{itemize} +\item it automatically inherits the \texttt{width} from the \cs{opaqueblock}; +\item it automatically shows the text of the previous \cs{opaqueblock}. +\end{itemize} + +Finally, both \cs{opaqueblock} and \cs{invblock} needs to be placed inside a \texttt{dynblock} environment. + +\subsection{Change text alignment} +Thanks to the command \cs{setalignment}\marg{text spec} the text alignment changes according to the \meta{text spec} (for all possibilities please refer to the pgfmanual section 16.4.3 - version October 25, 2010). + +Suppose, for instance, to modify the previous example in order to display the second block with center aligned text. The only change to do is: +\medskip +\begin{lstlisting}[frame=lines] +\begin{dynblock} +\setalignment{center} +\opaqueblock<2>{hello this is another dynamic block} +\end{dynblock} +\end{lstlisting} + +and this will lead to figure \ref{fig:align}. + +\begin{figure}[ht] +\centering +\includegraphics[scale=0.7]{./images/align} +\caption{Second frame with text center aligned for the second block}% +\label{fig:align}% +\end{figure} + +Notice that alignments can be local or global: if there is a definition in the preamble, perfectly admissible, all \emph{dynblocks} will be set according to this definition. Whereas the definition is set inside a group, the \emph{columns} environment or simply the \emph{dynblock} environment, it affects just local \emph{dynblocks}. It is even possible set a global definition and then change things locally. + +\subsection{Text opacity and word alert} +By default: +\begin{itemize} +\item \cs{opaqueblock}s have an opacity set to $0.9$; +\item \cs{invblock}s have an opacity set to $0.4$. +\end{itemize} +To change these values two commands have been introduced: +\begin{itemize} +\item \cs{setvisopacity}\marg{opacity spec}; +\item \cs{setinvopacity}\marg{opacity spec}; +\end{itemize} +where \meta{opacity spec} is a value in the interval $[0 \, , \, 1]$. Also these commands can be set locally or in a global fashion in the preamble. + +Due to the opacity the usual \cs{alert} command is not more useful with \cs{invblock}s. The package provides a method to alert a word even in this case; the command to be used is \cs{dynalert}\sarg{overlay spec}\marg{text}; notice that through the proper usage of \meta{overlay spec}, \cs{dynalert} must not fall inside a \cs{opaqueblock}. This is a limitation, but the purpose for which it has been developed is different. + +Assume, for example, to modify the reference example such that the opacity of \cs{invblock} will be set to $0.1$; furthermore, for the first block, the word ``\emph{itemize}'' will be alerted with \cs{alert}, while ``\emph{dynamic block}'' with \cs{dynalert} and for the second block (that does not have the correspondent \cs{invblock}) it is shown what happens with a wrong usage of \cs{dynalert}. The code is: +\medskip +\begin{lstlisting}[frame=lines] +\documentclass{beamer} +\usepackage{dynblocks} + +\usetheme{Luebeck} +\setinvopacity{0.1} + +\begin{document} +\begin{frame}{The frame title} +\begin{columns}[T] +\begin{column}{0.4\textwidth} +\begin{dynblock} +\opaqueblock<1>[0.8\textwidth]{hello this is a + \dynalert<2>{dynamic block} with an \alert<1,2>{itemize} + environment: +\begin{itemize} +\item hello +\item hello again +\end{itemize} +} +\invblock<2-> +\end{dynblock} +\end{column} +\begin{column}{0.4\textwidth} +\begin{dynblock} +\opaqueblock<2>{hello this is another + \dynalert<2>{dynamic} block} +\end{dynblock} +\end{column} +\end{columns} +\end{frame} + +\end{document} +\end{lstlisting} + +\begin{figure}[ht] +\centering +\subfloat[First frame]{ +\includegraphics[scale=0.45]{./images/alert_1} +\label{fig:alert1}% +} +\hspace*{0.1cm} +\subfloat[Second frame]{ +\includegraphics[scale=0.45]{./images/alert_2} +\label{fig:alert2}% +} +\caption{Example with different opacity and alerts} +\end{figure} + +As it is possible to see from figures \ref{fig:alert1} and \ref{fig:alert2}, the usual \cs{alert}, when used inside an \cs{invblock}, is set with the opacity of the block while the proper \cs{dynalert} no. Anyway, a wrong usage of \cs{dynalert} lead to the output shown in figure \ref{fig:alert2}: the subsequent text of the alerted word is set with the opacity of an \cs{invblock}. + +The suggested use, in conclusion, is: +\begin{itemize} +\item \cs{alert} with \meta{overlay spec} equal specified in the related \cs{opaqueblock}; +\item \cs{dynalert} to highlight words inside an \cs{invblock}; +\item never do something like: \cs{dynalert}\texttt{<1,2>}\mcmd{word} if the \cs{opaqueblock} is shown in \meta{overlay spec}$=1$ and the \cs{invblock} in \meta{overlay spec}$=2$. +\end{itemize} + +To change colors: +\begin{itemize} +\item for \cs{alert} the usual Beamer command works:\\ \cs{setbeamercolor}\mcmd{alerted text}\marg{color spec}; +\item for \cs{dynalert} a different command has been introduced to differentiate them from standard Beamer's alerts: \cs{setwordscolor}\marg{color}; the default value is set to \textit{blue}. +\end{itemize} + +\section{Options and advanced examples}\label{sec:options} +In this section the package's options are introduced with examples. They allow to customize more deeply the aspect of \emph{dynblocks}: +\begin{itemize} +\item adding the shadow and the rounded corners (subsection \ref{subse:shrc}); +\item customizing the fill color (subsection \ref{subse:cfill}); +\item adapting the fill color to the current Beamer theme used (subsection \ref{subse:cadapt}). +\end{itemize} + +\subsection{The shadow and the rounded corners}\label{subse:shrc} +To load: +\begin{itemize} +\item the shadow option use: \cs{usepackage}\mbcmd{shadow}\mcmd{dynblocks}; it is possible to set the \emph{shadow opacity} by means of the following command: \cs{setshadowopacity}\marg{opacity spec} (default value $0.4$); +\item the option to have rounded corners for \emph{dynblocks} use: \\ \cs{usepackage}\mbcmd{roundedcorners}\mcmd{dynblocks}. +\end{itemize} + +For example: +\begin{lstlisting}[frame=lines] +\documentclass{beamer} +\usepackage[shadow,roundedcorners]{dynblocks} + +\usetheme{Luebeck} + +\begin{document} +\begin{frame}{The frame title} +\begin{columns}[T] +\begin{column}{0.4\textwidth} +\begin{dynblock} +\opaqueblock<1>[0.8\textwidth]{hello this is a + \dynalert<2>{dynamic block} with an + \alert<1,2>{itemize} environment: +\begin{itemize} +\item hello +\item hello again +\end{itemize} +} +\invblock<2-> +\end{dynblock} +\end{column} +\begin{column}{0.4\textwidth} +\begin{dynblock} +\setalignment{center} +\opaqueblock<2>{hello this is another dynamic block} +\end{dynblock} +\end{column} +\end{columns} +\end{frame} + +\end{document} +\end{lstlisting} +allows to get the frames shown in figures \ref{fig:shdrndc1} and \ref{fig:shdrndc2}. + +\begin{figure}[ht] +\centering +\subfloat[First frame]{ +\includegraphics[scale=0.45]{./images/shdrndc_1} +\label{fig:shdrndc1}% +} +\hspace*{0.1cm} +\subfloat[Second frame]{ +\includegraphics[scale=0.45]{./images/shdrndc_2} +\label{fig:shdrndc2}% +} +\caption{Example with \texttt{shadow} and \texttt{roundedcorners} options} +\end{figure} +\pagebreak +\subsection{Customized fill colors}\label{subse:cfill} +By activating this option it is possible to fully customize the \emph{dynblocks} colors because several command become available: +\begin{itemize} +\item \cs{setblockcolor}\marg{color spec} and \cs{setbordercolor}\marg{color spec} for the \cs{opaqueblock}s (default values are \textit{blue!10} and \textit{blue} respectively); +\item \cs{setinnercolor}\marg{color spec} and \cs{setoutercolor}\marg{color spec} for the \cs{fancyblock}s (default values are \textit{white} and \textit{blue!10} respectively); +\item \cs{settopcolor}\marg{color spec} and \cs{setbottomcolor}\marg{color spec} for the \cs{vshadeblock}s (default values are \textit{white} and \textit{blue!10} respectively); +\item \cs{setleftcolor}\marg{color spec} and \cs{setrightcolor}\marg{color spec} for the \cs{oshadeblock}s (default values are \textit{white} and \textit{blue!10} respectively). +\end{itemize} +Similarly to the \texttt{shadow} and the \texttt{roundedcorners} options, to load the \texttt{customcolors} option use \cs{usepackage}\mbcmd{customcolors}\mcmd{dynblocks}. + +In the following example, all \emph{dynblocks} types are used and it is possible to see how local and global setting work. + +\begin{lstlisting}[frame=lines] +\documentclass{beamer} +\usepackage[shadow, roundedcorners,customcolors]{dynblocks} +% some global settings +\setblockcolor{red!10} +\setbordercolor{red} +\setbottomcolor{orange!40} +\setrightcolor{orange!40} + +\usetheme{Luebeck} + +\begin{document} +\begin{frame}{The frame title} +\begin{columns}[T] +\begin{column}{0.4\textwidth} +\begin{dynblock} +\opaqueblock<1>[0.8\textwidth]{hello this is a + \dynalert<2>{dynamic block} with an + \alert<1,2>{itemize} environment: +\begin{itemize} +\item hello +\item hello again +\end{itemize} +} +\invblock<2-> +\end{dynblock} +\end{column} +\begin{column}{0.4\textwidth} +\setalignment{center} +\begin{dynblock} +% default settings since no +% \setinnercolor or \setoutercolor +% are there +\fancyblock<2>{hello this is another dynamic block} +\invblock<3-> +\end{dynblock} +\\[2ex] +\setbordercolor{orange} % local definition +% that overwrites the global one +\begin{dynblock} +\vshadeblock<3>{replica: hello this a another dynamic block} +\invblock<4-> +\end{dynblock} +\\[2ex] +\begin{dynblock} +\oshadeblock<4>{replica 2: hello this a another dynamic block} +\end{dynblock} +\end{column} +\end{columns} +\end{frame} + +\end{document} +\end{lstlisting} + +The four frames obtained by this example are shown in figures \ref{fig:custcol1}, \ref{fig:custcol2}, \ref{fig:custcol3} and \ref{fig:custcol4}; more in detail: +\begin{itemize} +\item an example of \cs{opaqueblock} customization through \cs{setblockcolor} and \cs{setbordercolor} could be seen in figure \ref{fig:custcol1}; +\item an example of \cs{fancyblock} with default settings could be seen in figure \ref{fig:custcol2} (notice that it inherits the \texttt{bordercolor} from the global setting); +\item an example of \cs{vshadeblock} with customization of \cs{setbottomcolor} and locally \cs{setbordercolor} (\cs{settopcolor} at default value) could be seen in figure \ref{fig:custcol3}; +\item finally, an example of \cs{oshadeblock} with \cs{setrightcolor} and local \cs{setbordercolor} customization (\cs{settopcolor} at default value) could be seen in figure \ref{fig:custcol4}. +\end{itemize} + +\begin{figure}[ht] +\centering +\subfloat[First frame]{ +\includegraphics[scale=0.45]{./images/custcol_1} +\label{fig:custcol1}% +} +\hspace*{0.25cm} +\subfloat[Second frame]{ +\includegraphics[scale=0.45]{./images/custcol_2} +\label{fig:custcol2}% +} +\\ +\subfloat[Third frame]{ +\includegraphics[scale=0.45]{./images/custcol_3} +\label{fig:custcol3}% +} +\hspace*{0.25cm} +\subfloat[Fourth frame]{ +\includegraphics[scale=0.45]{./images/custcol_4} +\label{fig:custcol4}% +} +\caption{Example with \texttt{customcolor} option and all \emph{dynblocks} types} +\end{figure} + +\subsection{Color adaptation to the Beamer theme}\label{subse:cadapt} +The purpose of this option is to use the Beamer's color of the theme currently adopted; as it will be possible to see, the \texttt{getthemecolors} option should be used with particular care. To load the option there is the usual \cs{usepackage}\mbcmd{getthemecolors}\mcmd{dynblocks}. + +This option is defined inside the package as: +\begin{lstlisting}[frame=lines] +\DeclareOption{getthemecolors}{ +% redefinition opaqueblock +\renewcommand{\thecol}{structure.fg!10} +\renewcommand{\thebordercol}{structure.fg} +% redefinition fancyblock +\def\@setinnercolor{white} +\def\@setoutercolor{structure.fg!10} +% redefinition vshadeblock +\def\@settopcolor{white} +\def\@setbottomcolor{structure.fg!10} +% redefinition oshadeblock +\def\@setleftcolor{white} +\def\@setrightcolor{structure.fg!10} +} +\end{lstlisting} +thus it works properly if the current \texttt{beamercolortheme} set the \emph{structure} definition. + +For example: +\begin{lstlisting}[frame=lines] +\documentclass{beamer} +\usepackage[shadow, roundedcorners,getthemecolors, + customcolors]{dynblocks} + +\usetheme{CambridgeUS} + +\begin{document} +\begin{frame}{The frame title} +\begin{columns}[T] +\begin{column}{0.4\textwidth} +\begin{dynblock} +\opaqueblock<1>[0.8\textwidth]{hello this is a +\dynalert<2>{dynamic block} with an +\alert<1,2>{itemize} environment: +\begin{itemize} +\item hello +\item hello again +\end{itemize} +} +\invblock<2-> +\end{dynblock} +\end{column} +\begin{column}{0.4\textwidth} +\setalignment{center} +\begin{dynblock} +\opaqueblock<2>{hello this is another dynamic block} +\end{dynblock} +\end{column} +\end{columns} +\end{frame} + +\end{document} +\end{lstlisting} +will lead to figures \ref{fig:cmbx1} and \ref{fig:cmbx2}. +\begin{figure}[ht] +\centering +\subfloat[First frame]{ +\includegraphics[scale=0.45]{./images/cmbx_1} +\label{fig:cmbx1}% +} +\hspace*{0.1cm} +\subfloat[Second frame]{ +\includegraphics[scale=0.45]{./images/cmbx_2} +\label{fig:cmbx2}% +} +\caption{Example with a theme that does not define structure color} +\end{figure} + +The result can be improved in the following way: +\begin{lstlisting}[frame=lines] +\documentclass{beamer} +\usepackage[shadow, roundedcorners,getthemecolors, + customcolors]{dynblocks} + +\usetheme{CambridgeUS} +% definition of structure +\setbeamercolor*{structure}{parent=palette primary} + +\begin{document} +\begin{frame}{The frame title} +\begin{columns}[T] +\begin{column}{0.4\textwidth} +\begin{dynblock} +\opaqueblock<1>[0.8\textwidth]{hello this is a +\dynalert<2>{dynamic block} with an +\alert<1,2>{itemize} environment: +\begin{itemize} +\item hello +\item hello again +\end{itemize} +} +\invblock<2-> +\end{dynblock} +\end{column} +\begin{column}{0.4\textwidth} +\setalignment{center} +\begin{dynblock} +\opaqueblock<2>{hello this is another dynamic block} +\end{dynblock} +\end{column} +\end{columns} +\end{frame} + +\end{document} +\end{lstlisting} +obtaining as result the frames shown in figures \ref{fig:cmby1} and \ref{fig:cmby2}. + +\begin{figure}[ht] +\centering +\subfloat[First frame]{ +\includegraphics[scale=0.45]{./images/cmby_1} +\label{fig:cmby1}% +} +\hspace*{0.1cm} +\subfloat[Second frame]{ +\includegraphics[scale=0.45]{./images/cmby_2} +\label{fig:cmby2}% +} +\caption{Example of a theme with a posteriori structure color definition} +\end{figure} +\pagebreak + +Here is another example: +\begin{lstlisting}[frame=lines] +\documentclass{beamer} +\usepackage[getthemecolors]{dynblocks} + +\usetheme{EastLansing} +\setbeamercolor*{structure}{parent=palette primary} + +\begin{document} +\begin{frame}{The frame title} +\begin{dynblock} +\opaqueblock<1>{hello this is a +dynamic block with an +itemize environment: +\begin{itemize} +\item hello +\item hello again +\end{itemize} +} +\end{dynblock} +\end{frame} + +\end{document} +\end{lstlisting} +with the final output shown in figure \ref{fig:estl}. + +\begin{figure}[ht] +\centering +\includegraphics[scale=0.7]{./images/estl} +\caption{Second example of a theme with a posteriori structure color definition}% +\label{fig:estl}% +\end{figure} + +The decision of adopting the \emph{structure} as reference is due to the fact that this parameter assume an high relevance when customizing a theme. In the following example, it is shown a color customization of the Szeged theme and a particular effect that can be realized thanks to multiple \emph{dynblocks} inside the same \texttt{dynblock} environment: +\begin{lstlisting}[frame=lines] +\documentclass{beamer} +\usepackage[getthemecolors,roundedcorners,shadow]{dynblocks} + +\usetheme{Szeged} +\setbeamercolor{structure}{bg=red!20,fg=red} + +\begin{document} + + +\begin{frame}{A title} +\begin{center} +\begin{dynblock} +\opaqueblock<1>[0.6\textwidth]{hello this is a dynamic block + with an itemize environment: +\begin{itemize} +\item hello +\item hello again +\end{itemize} +} +\invblock<2-> +\setalignment{center} +\opaqueblock<2>{hello this is another dynamic block} +\end{dynblock} +\end{center} +\end{frame} + +\end{document} +\end{lstlisting} +The two frames obtained as outcome are shown in figures \ref{fig:szeg1} and \ref{fig:szeg2}. +\begin{figure} +\centering +\subfloat[First frame]{ +\includegraphics[scale=0.45]{./images/szeg_1} +\label{fig:szeg1}% +} +\hspace*{0.1cm} +\subfloat[Second frame]{ +\includegraphics[scale=0.45]{./images/szeg_2} +\label{fig:szeg2}% +} +\caption{Example of a customized theme} +\end{figure} +\pagebreak + +Notice that the \texttt{getthemecolors} option has some drawbacks when used with particular Beamer color themes like: +\begin{itemize} +\item albatross; +\item beetle. +\end{itemize} + + +\end{document} + diff --git a/Master/texmf-dist/doc/latex/dynblocks/images/alert_1.pdf b/Master/texmf-dist/doc/latex/dynblocks/images/alert_1.pdf new file mode 100644 index 00000000000..bfe688be746 Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/images/alert_1.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/images/alert_2.pdf b/Master/texmf-dist/doc/latex/dynblocks/images/alert_2.pdf new file mode 100644 index 00000000000..01955b88636 Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/images/alert_2.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/images/align.pdf b/Master/texmf-dist/doc/latex/dynblocks/images/align.pdf new file mode 100644 index 00000000000..2f141e0e38d Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/images/align.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/images/basic_1.pdf b/Master/texmf-dist/doc/latex/dynblocks/images/basic_1.pdf new file mode 100644 index 00000000000..5665f1714d3 Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/images/basic_1.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/images/basic_2.pdf b/Master/texmf-dist/doc/latex/dynblocks/images/basic_2.pdf new file mode 100644 index 00000000000..dc27df07ed7 Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/images/basic_2.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/images/cmbx_1.pdf b/Master/texmf-dist/doc/latex/dynblocks/images/cmbx_1.pdf new file mode 100644 index 00000000000..be40f3e35d8 Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/images/cmbx_1.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/images/cmbx_2.pdf b/Master/texmf-dist/doc/latex/dynblocks/images/cmbx_2.pdf new file mode 100644 index 00000000000..455f45f01bc Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/images/cmbx_2.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/images/cmby_1.pdf b/Master/texmf-dist/doc/latex/dynblocks/images/cmby_1.pdf new file mode 100644 index 00000000000..73a13167138 Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/images/cmby_1.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/images/cmby_2.pdf b/Master/texmf-dist/doc/latex/dynblocks/images/cmby_2.pdf new file mode 100644 index 00000000000..fa3eab65393 Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/images/cmby_2.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/images/custcol_1.pdf b/Master/texmf-dist/doc/latex/dynblocks/images/custcol_1.pdf new file mode 100644 index 00000000000..a8e2a08d5db Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/images/custcol_1.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/images/custcol_2.pdf b/Master/texmf-dist/doc/latex/dynblocks/images/custcol_2.pdf new file mode 100644 index 00000000000..b2b2dac9a3c Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/images/custcol_2.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/images/custcol_3.pdf b/Master/texmf-dist/doc/latex/dynblocks/images/custcol_3.pdf new file mode 100644 index 00000000000..625650fd5e4 Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/images/custcol_3.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/images/custcol_4.pdf b/Master/texmf-dist/doc/latex/dynblocks/images/custcol_4.pdf new file mode 100644 index 00000000000..6a91f4bc3bf Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/images/custcol_4.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/images/estl.pdf b/Master/texmf-dist/doc/latex/dynblocks/images/estl.pdf new file mode 100644 index 00000000000..d719863e3ed Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/images/estl.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/images/shdrndc_1.pdf b/Master/texmf-dist/doc/latex/dynblocks/images/shdrndc_1.pdf new file mode 100644 index 00000000000..a3e98433f12 Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/images/shdrndc_1.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/images/shdrndc_2.pdf b/Master/texmf-dist/doc/latex/dynblocks/images/shdrndc_2.pdf new file mode 100644 index 00000000000..7ae5a128a50 Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/images/shdrndc_2.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/images/szeg_1.pdf b/Master/texmf-dist/doc/latex/dynblocks/images/szeg_1.pdf new file mode 100644 index 00000000000..fd85cbced1f Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/images/szeg_1.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/images/szeg_2.pdf b/Master/texmf-dist/doc/latex/dynblocks/images/szeg_2.pdf new file mode 100644 index 00000000000..9e8bad152cd Binary files /dev/null and b/Master/texmf-dist/doc/latex/dynblocks/images/szeg_2.pdf differ diff --git a/Master/texmf-dist/doc/latex/dynblocks/latex/dynblocks.sty b/Master/texmf-dist/doc/latex/dynblocks/latex/dynblocks.sty deleted file mode 100644 index 8c52e8bed98..00000000000 --- a/Master/texmf-dist/doc/latex/dynblocks/latex/dynblocks.sty +++ /dev/null @@ -1,224 +0,0 @@ -% * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -% Copyright 2012 Claudio Fiandrino -% -% This work may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.3 -% 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.3 or later is part of all distributions of LaTeX -% version 2005/12/01 or later. -% -% This work has the LPPL maintenance status `maintained'. -% -% 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.] -\RequirePackage{tikz} -\RequirePackage{etoolbox} -\RequirePackage{xparse} - -%% Colors definition and initial setting - -\newcommand{\thecol}{blue!10} -\newcommand{\thebordercol}{blue} - -%% Package options - -% Customization colors -\DeclareOption{customcolors}{% -\def\setblockcolor#1{\def\@setcolor{#1}} -\def\@setcolor{blue!10} -\renewcommand{\thecol}{\@setcolor} - -\def\setbordercolor#1{\def\@setbordercolor{#1}} -\def\@setbordercolor{blue} -\renewcommand{\thebordercol}{\@setbordercolor} - -\def\setinnercolor#1{\def\@setinnercolor{#1}} -\def\@setinnercolor{white} - -\def\setoutercolor#1{\def\@setoutercolor{#1}} -\def\@setoutercolor{blue!10} - -\def\settopcolor#1{\def\@settopcolor{#1}} -\def\@settopcolor{white} - -\def\setbottomcolor#1{\def\@setbottomcolor{#1}} -\def\@setbottomcolor{blue!10} - -\def\setleftcolor#1{\def\@setleftcolor{#1}} -\def\@setleftcolor{white} - -\def\setrightcolor#1{\def\@setrightcolor{#1}} -\def\@setrightcolor{blue!10} -} - -% Customization colors adequate to the theme -\DeclareOption{getthemecolors}{% -% redefinition opaqueblock -\renewcommand{\thecol}{structure.fg!10} -\renewcommand{\thebordercol}{structure.fg} -% redefinition fancyblock -\def\@setinnercolor{white} -\def\@setoutercolor{structure.fg!10} -% redefinition vshadeblock -\def\@settopcolor{white} -\def\@setbottomcolor{structure.fg!10} -% redefinition oshadeblock -\def\@setleftcolor{white} -\def\@setrightcolor{structure.fg!10} -} - -\newbool{rndcorners} -\boolfalse{rndcorners} -\DeclareOption{roundedcorners}{% -\booltrue{rndcorners} -} - -\newbool{shadowed} -\boolfalse{shadowed} -\DeclareOption{shadow}{% -\usetikzlibrary{shadows} -\booltrue{shadowed} -} - -\ProcessOptions - -%% Opacity - -\def\setvisopacity#1{\def\@visopacity{#1}} -\def\@visopacity{0.9} - -\def\setinvopacity#1{\def\@invopacity{#1}} -\def\@invopacity{0.4} - -\def\setshadowopacity#1{\def\@shadowopacity{#1}} -\def\@shadowopacity{0.4} - -%% Alignment - -\def\setalignment#1{\def\@alignment{#1}} -\def\@alignment{justify} - -%% Word alert color -\def\setwordscolor#1{\def\@setwordscolor{#1}} -\def\@setwordscolor{blue} - -\newcommand{\myalert}[1]{\textcolor{\@setwordscolor}{#1}} - -%% Macro to save text and recall it afterwards - -\newcounter{thistext} -\newcommand{\savetext}[2]{% - «#1»% - \addtocounter{thistext}{1}% - \@namedef{thistext\thethistext}{#2}} -\newcommand{\printthistext}[1]{\@nameuse{thistext#1}} - - -%% Settings - -\tikzset{visib/.style={rectangle,color=\thebordercol,fill=\thecol,text=black,draw,text opacity=\@visopacity, text width=#1,align=\@alignment}} -\tikzset{fancyvisib/.style={rectangle,color=\thebordercol,inner color=\@setinnercolor, outer color=\@setoutercolor,text=black,draw,text opacity=\@visopacity, text width=#1,align=\@alignment}} -\tikzset{vshadevisib/.style={rectangle,color=\thebordercol,top color=\@settopcolor, bottom color=\@setbottomcolor,text=black,draw,text opacity=\@visopacity, text width=#1,align=\@alignment}} -\tikzset{oshadevisib/.style={rectangle,color=\thebordercol,left color=\@setleftcolor, right color=\@setrightcolor,text=black,draw,text opacity=\@visopacity, text width=#1,align=\@alignment}} -\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}{% - \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}} -\tikzset{fancyvisib/.append style={rounded corners}} -\tikzset{vshadevisib/.append style={rounded corners}} -\tikzset{oshadevisib/.append style={rounded corners}} -\tikzset{invisib/.append style={rounded corners}} -}{%false -} - -%% Definition of user commands and environment - -\newenvironment{dynblock}{\begin{tikzpicture}}{\end{tikzpicture}} - -\newlength\intdimension - -\NewDocumentCommand{\opaqueblock}{r<> O{\textwidth} m}{% -\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}; -}{% false -\node[visib=#2,visible on=<#1>] (X) {\begingroup #3 \endgroup}; -} -\savetext{mytext}{#3} -} - -\NewDocumentCommand{\fancyblock}{r<> O{\textwidth} m}{% -\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}; -}{% false -\node[fancyvisib=#2,visible on=<#1>] (X) {\begingroup #3 \endgroup}; -} -\savetext{mytext}{#3} -} - -\NewDocumentCommand{\vshadeblock}{r<> O{\textwidth} m}{% -\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}; -}{% false -\node[vshadevisib=#2,visible on=<#1>] (X) {\begingroup #3 \endgroup}; -} -\savetext{mytext}{#3} -} - -\NewDocumentCommand{\oshadeblock}{r<> O{\textwidth} m}{% -\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}; -}{% false -\node[oshadevisib=#2,visible 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}}; -}{% false -\node[invisib=\intdimension,visible on=<#1>] (X) {\printthistext{\thethistext}}; -} -} - -\NewDocumentCommand{\dynalert}{r<> m}{\alt<#1>{\pgfsetfillopacity{1}\myalert{#2}\pgfsetfillopacity{\@invopacity}}{#2}} - -\endinput -- cgit v1.2.3