diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/overlays/sample.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/overlays/sample.tex | 202 |
1 files changed, 202 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/overlays/sample.tex b/Master/texmf-dist/doc/latex/overlays/sample.tex new file mode 100644 index 00000000000..d48c28a161f --- /dev/null +++ b/Master/texmf-dist/doc/latex/overlays/sample.tex @@ -0,0 +1,202 @@ +\documentclass[fontsize=9pt,landscape,parskip=half]{scrartcl} +\usepackage{scrlayer-scrpage} +\usepackage[paperwidth=128mm, + paperheight=96mm, + margin=8mm, + footskip=6mm]{geometry} +\usepackage{overlays} +\usepackage[breaklinks,hidelinks]{hyperref} +\usepackage{url} +\usepackage[normalem]{ulem} +\usepackage{doc} +\usepackage{alltt} +\lofoot{\hspace{-4mm}% + \hyperlink{titlepage}{Andreas Nolda \textbar{} + The \textrm{overlays} package} \textbar{} + \hyperlink{page.\thepage}{\thepage}/% + \pageref{lastpage}} +\cofoot{} +\renewcommand{\familydefault}{\sfdefault} +\definecolor{alert}{rgb}{0.7,0.15,0.35} +\definecolor{structure}{rgb}{0.1,0.25,0.5} +\setkomafont{pagefoot}{\color{structure}\normalfont\bfseries\scriptsize} +\addtokomafont{sectioning}{\color{structure}} +\let\hrefsave\href +\renewcommand{\href}[2]{\hrefsave{#1}{\uline{#2}}} +\frenchspacing +\sloppy + +\begin{document} +\pagestyle{scrheadings} +\raggedright + +\thispagestyle{empty} +\label{titlepage} +{\color{structure}% +{\Large \textbf{The \textrm{overlays} package} \\ +\textit{A sample presentation}} \\[\baselineskip] +Andreas Nolda \\ +\url{http://andreas.nolda.org}}\vfill +{\small Version 2.0 \\ +30 September 2016} +\clearpage + +\begin{fragileoverlays}{6} +\subsubsection*{Overlays} +The \textrm{overlays} package allows to write presentations with incremental +slides. It does not presuppose any specific document class. Rather, it is a +lightweight alternative to full-fledged presentation classes like +\href{http://www.ctan.org/pkg/beamer}{\textrm{beamer}}. + +\visible{2-}{Every single state of a incremental slide will called an +\emph{overlay} of that slide.} + +\visible{3-}{For incremental slides, the following environment is provided:} +\begin{quote} +\begin{alltt} +\visible{3-}{\alert{3}{\textbackslash{}begin\{overlays\}\{\meta{total overlay number}\} +\alert{4-}{\meta{slide content}} +\textbackslash{}end\{overlays\}}} +\end{alltt} +\end{quote} + +\visible{4-}{In the slide content, the following commands can be used in order +to specify the content of the overlays: +\only{4}{\texttt{\textbackslash{}alert}.}% +\only{5}{\texttt{\textbackslash{}visible}.}% +\only{6}{\texttt{\textbackslash{}only}.}} +\end{fragileoverlays} +\clearpage + +% Slide with verbatim content. + +\begin{fragileoverlays}{6} +\subsubsection*{Highlightning} +For highlightning some content, the \textrm{overlays} package provides +following command: +\begin{quote} +\begin{alltt} +\alert{1}{\textbackslash{}alert\{\alert{2-5}{\meta{overlay specification}}\}\{\meta{content}\}} +\end{alltt} +\end{quote} + +\visible{2-}{Overlay specifications are either +\alert{3}{single numbers}, +\alert{4}{sequences of numbers}, or +\alert{5}{ranges of numbers}. +\visible{3-}{For example: +\begin{itemize} +\item{} \alert{3}{\texttt{1}} +\visible{4-}{\item{} \alert{4}{\texttt{1,4}}} +\visible{5-}{\item{} \alert{5}{\texttt{1-4}} +\item{} \alert{5}{\texttt{1-}}} +\end{itemize}}} + +\visible{6}{The \texttt{alert} color is red by default and can be changed to, +say, \alert{6}{magenta} as follows: +\begin{quote} +\begin{alltt} +\textbackslash{}definecolor\{alert\}\{rgb\}\{\alert{6}{0.7,0.15,0.35}\} +\end{alltt} +\end{quote}} +\end{fragileoverlays} +\clearpage + +\begin{fragileoverlays}{5} +\subsubsection*{Visibility} +The visibility of content is specified by means of the following commands: +\begin{quote} +\begin{alltt} +\alert{1-3}{\textbackslash{}visible\{\meta{overlay specification}\}\{\meta{content}\}} +\end{alltt} +\end{quote} +\begin{quote} +\begin{alltt} +\alert{1,4-}{\textbackslash{}only\{\meta{overlay specification}\}\{\meta{content}\}} +\end{alltt} +\end{quote} + +\only{2,3}{The \texttt{\textbackslash{}visible} command uncovers its content on +the overlays which are specified in the overlay specification.} + +\only{3}{On unspecified overlays, the content is hidden, but still takes up +space. Technically speaking, it is rendered in the \texttt{background} color, +which, by default, is white.}% +\only{4-}{ +The \texttt{\textbackslash{}only} command also uncovers its content on the +overlays specified in the overlay specification. + +The content is absent from unspecified overlays and does not take up space +there.} + +\only{5}{This is particularly useful for alternating content.} +\end{fragileoverlays} +\clearpage + +\begin{fragileoverlays}{3} +\subsubsection*{Verbatim content} +For incremental slides with verbatim content, the following environment should +be used instead of the \texttt{overlay} environment: +\begin{quote} +\begin{alltt} +\alert{1}{\textbackslash{}begin\{fragileoverlays\}\{\meta{total overlay number}\} +\meta{slide content} +\textbackslash{}end\{fragileoverlays\}} +\end{alltt} +\end{quote} + +\visible{2-}{Note that the \alert{2,3}{\texttt{\textbackslash{}alert}}, +\alert{2,3}{\texttt{\textbackslash{}visible}}, and +\alert{2,3}{\texttt{\textbackslash{}only}} commands themselves must not contain +verbatim commands or environments.\visible{3}{ They may be used in the content +of the \texttt{alltt} environment of the +\href{http://www.ctan.org/pkg/alltt}{\textrm{alltt} package}, though.}} +\end{fragileoverlays} +\clearpage + +\begin{overlays}{6} +\subsubsection*{Caveats} +The package expects that the slide content in the \texttt{overlays} environment +fits on a single page. This can be ensured by means of +\texttt{\textbackslash{}clearpage} commands before or after the environment. + +\visible{2-}{The \texttt{page} counter is not incremented between overlays. +Other counters may give rise to unexpected results.} + +\visible{3-}{In the \texttt{tabular} environment, the +\alert{3}{\texttt{\textbackslash{}alert}}, +\alert{4}{\texttt{\textbackslash{}visible}} and +\alert{5}{\texttt{\textbackslash{}only}} commands have to be put into braces: +\begin{quote} +\begin{tabular}[t]{ll} +outside \texttt{tabular} & inside \texttt{tabular} \\\hline +{\alert{3}{\texttt{\textbackslash{}alert\{\ldots\}\{\ldots\}}}} & +{\alert{3}{\texttt{\{\textbackslash{}alert\{\ldots\}\{\ldots\}\}}}} \\ +{\visible{4-}{{\alert{4}{\texttt{\textbackslash{}visible\{\ldots\}\{\ldots\}}}}}} & +{\visible{4-}{{\alert{4}{\texttt{\{\textbackslash{}visible\{\ldots\}\{\ldots\}\}}}}}} \\ +{\visible{5-}{{\alert{5}{\texttt{\textbackslash{}only\{\ldots\}\{\ldots\}}}}}} & +{\visible{5-}{{\alert{5}{\texttt{\{\textbackslash{}only\{\ldots\}\{\ldots\}\}}}}}} +\end{tabular} +\end{quote}} +\visible{6-}{In addition, make sure not to include the cell delimiter +\texttt{\&} or the row delimiter \texttt{\textbackslash{}\textbackslash{}} into +the content of these commands.} +\end{overlays} +\clearpage + +\begin{overlays}{3} +\subsubsection*{Credits} +The code of the \textrm{overlays} package is inspired by +\href{http://www.ctan.org/pkg/present}{Matthias Meister's \textrm{present} +package}. + +\visible{2-}{In addition, it uses +\href{http://tex.stackexchange.com/q/19000/}{an algorithm by Martin Scharrer} +for testing numbers in numerical ranges.} + +\visible{3}{The code for processing overlays with verbatim content is taken from +the \textrm{texpower} package, which in turn took it from Till Tantau's +\textrm{beamer} package.} +\end{overlays} +\label{lastpage} +\end{document} |