1\documentclass[30pt,landscape,footrule]{foils} 2\usepackage[english,german]{babel} % language support for german/english 3\usepackage[latin1]{inputenc} % allow Latin1 characters 4\usepackage{ifvtex} 5\usepackage{ifpdf} 6% If we use vtex, we are likely to create pdf... 7\ifvtexpdf\pdftrue\fi 8\ifpdf 9\usepackage{pause} % loads also color.sty 10\usepackage{background} 11\usepackage{graphicx} % for including graphics 12\usepackage{geometry} 13\usepackage{hyperref} 14\ifvtex\relax 15\else 16%%\pdfcompresslevel=0 17\DeclareGraphicsRule{*}{mps}{*}{} 18\fi 19\else 20\usepackage[dvipdfm]{pause} % loads also color.sty 21\usepackage[dvipdfm]{background} 22\usepackage[dvips]{graphicx} 23\usepackage[dvips]{geometry} 24\usepackage[dvipdfm]{hyperref} 25\fi 26\usepackage{tabularx} 27\usepackage{pp4link} 28\usepackage{mpmulti} 29\usepackage{amssymb} 30 31\geometry{headsep=3ex,hscale=0.9} 32\hypersetup{pdftitle={pp4extensions}, 33 pdfsubject={More extensions to PPower4}, 34 pdfauthor={Klaus Guntermann, FG Systemprogrammierung, TU Darmstadt 35 <guntermann@iti.informatik.tu-darmstadt.de>}, 36 pdfkeywords={acrobat, ppower4}, 37 pdfpagemode={FullScreen}, 38 colorlinks={true}, 39 linkcolor={red} 40 } 41 42\begin{document} 43\parindent 0mm\raggedright 44%% Inserting this pauselevel into the Logo we will have the logo appear 45%% immediately. But we still need a \pause at the end of the page, 46%% otherwise the last page material will also come out first. 47%% In highlighted sections we need to keep the link colored for all 48%% levels, so better give a wide range for its appearance. 49%% Watch your step! 50\MyLogo{\pauselevel{highlight =1 :12}PPower4 more extensions demo / \today \qquad 51 \Acrobatmenu{FirstPage}{back to start}\quad} 52 53\foilhead{Contents} 54 55You can go ahead through the complete file or jump to 56any of the example pages with the following links. 57 58{\small 59\toplink{tablesone}{Table builds} \qquad 60\toplink{filltable}{Filling tables} \qquad 61\toplink{buildtable}{Building tables by column} \qquad 62\toplink{moretables}{More filled tables} \qquad 63\toplink{backward}{Forward and/or backward} \qquad 64\toplink{tour}{Taking a tour} \qquad 65\toplink{highitems}{Highlighting itemized lists} \qquad 66\toplink{list}{Going through a list} \qquad 67\toplink{morehigh}{More highlighting effects} \qquad 68\toplink{morelist}{Still more list effects} \qquad 69\toplink{picture}{Including pictures}\par 70} 71 72%% We start it easy. Just build a table line by line. 73%% Well not THAT easy. We do not really want only line by line 74%% building, after all. 75%% To build entries field by field we have to split also 76%% the following \hline into 3 \cline commands to be able to 77%% insert \pause commands in between. And, it works! 78%% Make the last two lines build bottom up counting down the steps 79%% after advancing enough steps (keep in mind, that the preceding 80%% \pause has advanced by one already; but it would not really pose 81%% a problem, if you advance too much: levels without new parts 82%% will be omitted, when the pages are built, so it will cost you only 83%% some processing time). 84\foilhead{Table builds} 85\toptarget{tablesone} 86\begin{center} 87 \begin{tabular}{|l|l|l|} 88 \hline 89 Building & your & table\\\hline\noalign{\pause} 90 line& by& line,\\\hline\noalign{\pause} 91 entry &\pause by &\pause entry,\\\noalign{\pause\pauselevel{=-3}} 92 \cline{1-1}\noalign{\pause}\cline{2-2}\noalign{\pause}\cline{3-3} 93 \noalign{\pause\pauselevel{=+1 -1}} 94 from & the & bottom\\\noalign{\pause}\hline 95 growing & up, & too. \\\hline 96 \end{tabular}\pause 97\end{center} 98\vfill 99\pauselevel{=+3 +1} 100{\small Did you notice, that we have a footer from the very beginning 101 and not only, when the page is complete? 102 \par} 103\pause 104 105%% Now let a table build column by colum, just inserting the \pause 106%% commands into the specification line. 107%% Advance for each column content and reset level to 1 for each 108%% vertical line. Easy, isn't it? 109\foilhead{Filling tables} 110\toptarget{filltable} 111\newcommand\plone{\pause\pauselevel{=1}} 112\begin{center} 113 \begin{tabular}{|>{\pause}l<{\plone}|>{\pause\pauselevel{=+1}}l<{\plone}|>{\pause\pauselevel{=+2}}l<{\plone}|} 114 \hline 115 Fill & then & finally,\\\hline 116 the & the & also\\\hline 117 first & second, & the \\\hline 118 column, & and & third. \\\hline 119 \end{tabular}\pause 120\end{center} 121 122%% Next we build a similar table, but want it to appear column by 123%% column, including the border lines. 124%% The first column will appear immediately. The second and third will 125%% have their \pause created through the tabular pattern. 126%% The hardest part is again, to break the vertical lines. 127%% We define a special command for that, which resets the level 128%% for the number of columns and then places the pieces in the 129%% same steps as the column entries are built. Finally we must reset 130%% the level counter for the next line of entries. And that's it. 131\foilhead{Building tables by column} 132\toptarget{buildtable} 133\newcommand\buildline{\noalign{\pause\pauselevel{=-3}} 134 \cline{1-1}\noalign{\pause}\cline{2-2}\noalign{\pause}\cline{3-3} 135 \noalign{\pause\pauselevel{=-3}}} 136\begin{center}\pause 137 \pauselevel{=+2}% increment for first decrement by 3 in \buildline 138 \begin{tabular}{|l|>{\pause}l|>{\pause}l|} 139 \buildline 140 Show & then & finally,\\\buildline 141 the & the & also\\\buildline 142 first & second, & the \\\buildline 143 column, & and & third. \\\buildline 144 \end{tabular}%\pause 145\end{center} 146 147%% Now try this selecting "random" builds. Actually we must reset the 148%% level for each vertical line and the \hrules by setting the level 149%% after each entry through the specification line. Because the \pause 150%% is also inserted magically, we need to specify only, when what 151%% item should appear. Let's color the items to make the text at least 152%% somewhat "readable". 153%% As a special effect let one item vanish... 154\foilhead{More filled tables} 155\toptarget{moretables} 156\begin{center} 157 \begin{tabular}{|>{\pause}l<{\plone}|>{\pause}l<{\plone}|>{\pause}l<{\plone}|} 158 \hline 159 \pauselevel{=2}\textcolor{blue}{Fill} & 160 \pauselevel{=5}\textcolor{magenta}{leave} & 161 \pauselevel{=3 :5}\textcolor{red}{at}\\\hline 162 \pauselevel{=5}\textcolor{magenta}{some} & 163 \pauselevel{=2}\textcolor{blue}{the} & 164 \pauselevel{=6}\textcolor{yellow}{well,}\\\hline 165 \pauselevel{=4}\textcolor{red}{random} & 166 \pauselevel{=6}\textcolor{yellow}{almost} & 167 \pauselevel{=5}\textcolor{magenta}{empty} \\\hline 168 \pauselevel{=6}\textcolor{yellow}{empty} & 169 \pauselevel{=4}\textcolor{red}{positions} & 170 \pauselevel{=2}\textcolor{blue}{table} \\\hline 171 \end{tabular}\pause 172\end{center} 173\pauselevel{=7} 174{\small Did you notice, that the element in the upper right corner has 175vanished? 176\par} 177\pause 178 179%% Now for something, which was impossible before: 180%% write backwards. With just one specification and a lot of \pause 181\foilhead{Forward and/or backward} 182\toptarget{backward} 183Writing \pause{}sentences \pause{}word \pause{}by \pause{}word \pause{}has 184\pause{}always \pause{}been \pause{}possible \pause{}with \pause{}PPower4. 185\pause\pauselevel{=-1 -1}% 186But \pause{}now \pause{}you \pause{}can, \pause{}if \pause{}you \pause{}need 187\pause{}that, \pause{}also \pause{}write \pause{}backwards.\pause 188 189%% This example was inspired by Wilfried Pascher asking for it, 190%% when ppower4 could not yet do this... 191\foilhead{Taking a tour} 192\toptarget{tour} 193\begin{center} 194 \begin{tabular}[c]{r} 195 \pause \pauselevel{=3 :8}\rlap{2}% appear and vanish 196 \pause \pauselevel{=9}8 \\ % replacement after vanishing 197 \pause \pauselevel{=1 : 7}\rlap{1}% the same at 198 \pause \pauselevel{= 8}7 % different levels 199 \end{tabular}% 200 \begin{tabular}[c]{c} 201 \pause \pauselevel{=4}3 \\ 202 \pause \pauselevel{=2}$\circlearrowright$ \\ 203 \pause \pauselevel{=7}6 204 \end{tabular}% 205 \begin{tabular}[c]{l} 206 \pause \pauselevel{=5}4 \\ 207 \pause 5 % this gets level 6 by incrementing automatically 208 \end{tabular}\pause 209\end{center} 210 211 212%% It is rather easy to highlight a normal itemized list. 213%% We just need to specify our color mapping and proceed as usually, 214%% selecting the proper color. 215\foilhead{Highlighting itemized lists} 216\toptarget{highitems} 217\definecolor{dimmed}{gray}{0.4} 218\pausecolors{magenta}{dimmed}{magenta} 219{\color{magenta} 220\begin{itemize} 221\item This is an important topic.\pause 222\item But only, until the next appears.\pause 223\item And both are less important, when the third item is here.\\ 224 And of course we can highlight 225 also long items now. 226\end{itemize} 227\pause} 228 229%% Also going through a list is as easy. We use the same color setup 230%% as above and switch to highlight mode. 231\foilhead{Going through a list} 232\toptarget{list} 233{\color{magenta}\pausehighlight 234\begin{itemize} 235\item You can also walk through a list,\pause 236\item which is visible from the very beginning,\pause 237\item and highlights the item, that is currently most important. 238\end{itemize} 239\pause} 240 241%% Now we want to show some extras. Keep a highlighted item standing 242%% out longer and let something else appear, although we normally 243%% show everything from the beginning. Still using \pausehighlight. 244\foilhead{More highlighting effects\pause} 245\toptarget{morehigh} 246{\color{magenta} 247\begin{itemize} 248\item We start this highlighted and keep it for a while. 249 \pauselevel{=1 :2}\pause 250\item To show the effects we need more items.\pauselevel{=2}\pause 251\item Still more text. \pause 252\item And the final text on this slide. \pause Something to appear is 253 here.\pauselevel{=2, build =3 :3}%appear highlighted and vanish later 254\end{itemize} 255\pause} 256 257%% Back to builing up item lists. Now highlight items longer. 258%% And have them stand out again later. 259\foilhead{Still more list effects} 260\toptarget{morelist} 261{\color{magenta}\pausebuild 262\begin{itemize} 263\item Hi! \pause Again this starts highlighted here. \pauselevel{=1 :2}\pause 264 And we want to come back to this later.\pauselevel{highlight 265 =1,=2,highlight =3 :4}\pause% highlight it most of the time. 266\item Sorry for these boring items.\pauselevel{=2}\pause 267\item But somehow we must fill this slide.\pause 268\item And we got it. 269\end{itemize} 270\pause} 271 272%% In this section we use a figure created by xfig and exported to 273%% MetaPost with multiple frames. In this section we use another color 274%% mapping. 275%% 276\foilhead{Including pictures} 277\toptarget{picture} 278\pausecolorreset 279\pausecolors{red}{black}{red} 280%% this part should be seen completely from the very beginning 281%% and we wish to highlight the current action. 282\null\vskip-2\baselineskip\leavevmode 283\begin{minipage}{0.5\textwidth} 284\small 285\def\pointer{\mathord{-\mkern-1.5\thickmuskip >}} 286$\textbf{void}\ \textbf{dlink}{::}\textit{append}(\ \textbf{dlink}\ {*}p\ ) 287\ \{$ 288 \pause\pauselevel{highlight =+1}\\ 289\null\qquad{\color{red}$p\pointer{}\textit{suc}=\textit{suc};$\pause 290 \pauselevel{highlight}\\ 291\null\qquad$p\pointer{}\textit{pre}=\textbf{this};$\pause 292 \pauselevel{highlight}\\ 293\null\qquad$suc\pointer{}\textit{pre}=p;$\pause\pauselevel{highlight}\\ 294\null\qquad$suc=p;$}\pause\pauselevel{=1}\\ 295$\}$ 296\end{minipage}\hfill 297\begin{minipage}{0.42\textwidth}\raggedright 298\small We can also highlight pieces of program code and 299present a corresponding illustration, which shows the 300resulting changes in a data structure. 301\end{minipage} 302\pause 303%\null\vskip-1.5\baselineskip\leavevmode 304\newcount\pausecount 305\pausecount=0 306\def\mypause{\ifcase\pausecount\pauselevel{=-1 :+2}\or\pauselevel{=-1 :+3}\or 307 \pauselevel{=-1}\else\relax\fi\pause\advance\pausecount1\relax} 308\multiinclude[pause=\mypause,graphics={scale=1.5}]{example} 309\pause 310 311\foilhead{Thanks for having a look} 312\pausecolorreset 313 314The features demonstrated here can be created with \verb|pdflatex|, 315\verb|vtex| and the combination of \verb|latex| and \verb|dvipdfm| 316using the post processor PPower4. 317\\ 318If you would like to check this out, see the 319\href{http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4/}{homepage} 320of PPower4. Please send comments concerning features and the documentation. 321I would appreciate also suggestions for more examples.\\ 322Thank you for your cooperation! 323 324 325\end{document} 326 327