| 1 |
% $Header$ |
| 2 |
|
| 3 |
% This file is a demonstration on how a seminar file should be |
| 4 |
% changed to make it work with beamer. |
| 5 |
|
| 6 |
|
| 7 |
% Copyright notice: |
| 8 |
|
| 9 |
% Except for the changes indicated by CHANGED, this file is the original |
| 10 |
% file texpower-0.0.9d/doc/seminardemo.tex, which is part of the |
| 11 |
% examples of the texpower package. |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
% seminardemo.tex,v 1.2 2002/11/14 20:46:00 hansfn Exp |
| 16 |
% |
| 17 |
% TeXPower bundle - dynamic online presentations with LaTeX |
| 18 |
% Copyright (C) 1999-2002 Stephan Lehmke |
| 19 |
% |
| 20 |
% This program is free software; you can redistribute it and/or |
| 21 |
% modify it under the terms of the GNU General Public License |
| 22 |
% as published by the Free Software Foundation; either version 2 |
| 23 |
% of the License, or (at your option) any later version. |
| 24 |
% |
| 25 |
% This program is distributed in the hope that it will be useful, |
| 26 |
% but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 27 |
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 28 |
% GNU General Public License for more details. |
| 29 |
% |
| 30 |
%----------------------------------------------------------------------------------------------------------------- |
| 31 |
% File: seminardemo.tex |
| 32 |
% |
| 33 |
% Simple examples the for combining the seminar class with the dynamic features provided by the package texpower.sty. |
| 34 |
% |
| 35 |
%----------------------------------------------------------------------------------------------------------------- |
| 36 |
% Autor: Stephan Lehmke <[email protected]> |
| 37 |
% |
| 38 |
% v0.0.1 Jun 02, 2000: First version for the pre-alpha release of TeXPower. |
| 39 |
% |
| 40 |
|
| 41 |
|
| 42 |
% CHANGED: commented |
| 43 |
%\documentclass{seminar} |
| 44 |
% |
| 45 |
%% We need fixseminar for setting the page size correctly. |
| 46 |
% |
| 47 |
%\usepackage{fixseminar} |
| 48 |
% |
| 49 |
% |
| 50 |
%%----------------------------------------------------------------------------------------------------------------- |
| 51 |
%% The texpower package is loaded. |
| 52 |
%% We give the display option so dynamic features are enabled. |
| 53 |
%% |
| 54 |
%\usepackage[display]{texpower} |
| 55 |
|
| 56 |
% CHANGED: Added |
| 57 |
\documentclass[slidestop,usepdftitle=false]{beamer} |
| 58 |
\usepackage[accumulated]{beamerseminar} |
| 59 |
\usepackage{beamertexpower} |
| 60 |
\usepackage{beamerthemeshadow} |
| 61 |
|
| 62 |
|
| 63 |
% CHANGED: Moved \title and \author outside of slide |
| 64 |
\title{The \code{texpower} Package\\ {\normalfont \texttt{seminar} Demo}} |
| 65 |
\author[Stephan Lehmke]{Stephan Lehmke\\\code{mailto:[email protected]}} |
| 66 |
|
| 67 |
\begin{document} |
| 68 |
\begin{slide} |
| 69 |
|
| 70 |
\maketitle |
| 71 |
|
| 72 |
\newslide |
| 73 |
|
| 74 |
\tableofcontents |
| 75 |
\end{slide} |
| 76 |
|
| 77 |
% CHANGED: Added \frame, moved \section out, added \frametitle |
| 78 |
\section{A list environment} |
| 79 |
\frame{ |
| 80 |
\begin{slide} |
| 81 |
\centerslidesfalse |
| 82 |
\frametitle{A list environment} |
| 83 |
|
| 84 |
% The \pause command `splits' the current page at the place it appears, producing two pages, one with everything which |
| 85 |
% came before the \pause command, one containing this and additionally the stuff coming after \pause. When these pages |
| 86 |
% are presented with acrobar reader in full screen mode (or any other viewer with this capability), the presentation |
| 87 |
% will appear to `stop' at the point the \pause command was issued and `resume' in the moment the presenter switches to |
| 88 |
% the next page. |
| 89 |
|
| 90 |
\pause |
| 91 |
|
| 92 |
% As \pause forces a paragraph break, it can not be used to separate a description label from the associated text. For |
| 93 |
% this, we use the (very flexible) \stepwise command. Inside the argument of \stepwise, an arbitrary number of \step |
| 94 |
% commands may occur. \stepwise will produce as many pages as there are \step commands, making the arguments of the |
| 95 |
% \step commands appear ``one by one''. |
| 96 |
|
| 97 |
\stepwise |
| 98 |
{% |
| 99 |
\begin{description} |
| 100 |
\item[foo.] \step{bar.} |
| 101 |
\step{\item[baz.]} \step{qux.} |
| 102 |
\end{description} |
| 103 |
} |
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
\end{slide} |
| 108 |
} |
| 109 |
|
| 110 |
% CHANGED: Added \frame, moved \section out |
| 111 |
\section{An aligned equation} |
| 112 |
\frame{ |
| 113 |
\begin{slide} |
| 114 |
\centerslidesfalse |
| 115 |
\frametitle{An aligned equation} |
| 116 |
|
| 117 |
\pause |
| 118 |
|
| 119 |
% Normally for \stepwise, if a \step is not yet active, its argument is ignored completely. This would disturb |
| 120 |
% alignments, because the width changes with every new activated \step. |
| 121 |
% \parstepwise is a variant of \stepwise where the argument of an inactive \step is put into a \phantom, leaving the |
| 122 |
% proper amount of white space. |
| 123 |
|
| 124 |
\parstepwise |
| 125 |
{% |
| 126 |
% Using eqnarray with equation numbers here means all equation numbers will be visible from the outset, because only |
| 127 |
% the contents of the lines are `filled in'. See the full demo for an example of aligned equations where equation |
| 128 |
% numbers `appear'. |
| 129 |
\begin{eqnarray} |
| 130 |
% |
| 131 |
% When the argument of \step is put into a box (as it happens with \parstepwise), tabulators can not go in there. As |
| 132 |
% we want the equals sign to appear at the same time as the right side of the equation, we use \restep for the |
| 133 |
% latter. \restep is like \step, but it appears at the same time as the previous \step command. |
| 134 |
% |
| 135 |
\sum_{i=1}^{n} i & \step{=} & \restep{1 + 2 + \cdots + (n-1) + n}\\ |
| 136 |
% |
| 137 |
& \step{=} & \restep{1 + n + 2 + (n-1) + \cdots}\\ |
| 138 |
% |
| 139 |
& \step{=} & \restep |
| 140 |
{% We can nest \step commands inside each other. The order of execution is just the |
| 141 |
% order of appearance, independent of nesting. |
| 142 |
% \switch is a variant of \step which takes two arguments and toggles between them on |
| 143 |
% activation. This way, we can make the \underbrace `appear'. |
| 144 |
% We insert a \vphantom in the first argument so that the equation numbers will be |
| 145 |
% placed correctly whether or not the underbrace is didplayed. |
| 146 |
\switch |
| 147 |
{% |
| 148 |
\vphantom{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}% |
| 149 |
(1 + n) + \cdots + (1 + n)% |
| 150 |
} |
| 151 |
{\underbrace{(1 + n) + \cdots + (1 + n)}_{\times\frac{n}{2}}}% |
| 152 |
} |
| 153 |
\\ |
| 154 |
% |
| 155 |
% This is another nested application of \step. Note that the spacing of \cdot has to be corrected manually by |
| 156 |
% inserting {} left of it, because otherwise it would behave like a prefix operator. |
| 157 |
% |
| 158 |
& \step{=} & \restep{\frac{(1 + n)\step{{}\cdot n}}{\restep{2}}} |
| 159 |
\end{eqnarray} |
| 160 |
} |
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
\end{slide} |
| 166 |
} |
| 167 |
|
| 168 |
% CHANGED: Added \frame, moved \section out |
| 169 |
\section{An array} |
| 170 |
\frame{ |
| 171 |
\begin{slide} |
| 172 |
\centerslidesfalse |
| 173 |
\frametitle{An array} |
| 174 |
|
| 175 |
\stepwise |
| 176 |
{% With arrays, beware of problems with automatic calculation of cell widths. |
| 177 |
% |
| 178 |
% If you want all widths to be calculated automatically, you need to use \parstepwise, with the consequence that |
| 179 |
% a) tabulators or newlines can not go into the argument of \step, |
| 180 |
% b) the array `structure' (rules) will be completely visible right from the beginning. |
| 181 |
% |
| 182 |
% If you want to use \stepwise for being able to build the `structure' (like \hilne's) dynamically (as done in the |
| 183 |
% following), you have to make sure that the cell widths are correct from the very first line, because otherwise the |
| 184 |
% array will expand horizontally, destroying the dynamic effect. This can be assured by |
| 185 |
% a) using only p cells, |
| 186 |
% b) making sure all the cells in the first line are at least as wide as the widest cell which will appear later. If |
| 187 |
% you are using the calc package, this is easiest by putting \makebox[\widthof{widest entry}]{first entry} into |
| 188 |
% the first cell. Otherwise, you can use \settowidth. |
| 189 |
% |
| 190 |
\begin{displaymath} |
| 191 |
\begin{array}{rrrrr} |
| 192 |
\step |
| 193 |
{% |
| 194 |
n & \log n & n\log n & \lefteqn{n^2}\phantom{25} & \lefteqn{2^n}\phantom{32} \\ |
| 195 |
\hline% |
| 196 |
}% |
| 197 |
\step{0 &} \step{\textrm{---} &} \step{\textrm{---} &} \step{0 &} \step{1 \\}% |
| 198 |
\step{1 &} \step{0\phantom{.6} &} \step{0\phantom{.8} &} \step{1 &} \step{2 \\}% |
| 199 |
\step{2 &} \step{1\phantom{.6} &} \step{2\phantom{.8} &} \step{4 &} \step{4 \\}% |
| 200 |
\step{3 &} \step{1.6 &} \step{4.8 &} \step{9 &} \step{8 \\}% |
| 201 |
\step{4 &} \step{2\phantom{.6} &} \step{8\phantom{.8} &} \step{16 &} \step{16 \\}% |
| 202 |
\step{5 &} \step{2.3 &} \step{11.6 &} \step{25 &} \step{32 }% |
| 203 |
\end{array} |
| 204 |
\end{displaymath} |
| 205 |
} |
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
\end{slide} |
| 211 |
} |
| 212 |
|
| 213 |
% CHANGED: Added \frame, moved \section out |
| 214 |
\section{A picture} |
| 215 |
\frame{ |
| 216 |
\begin{slide} |
| 217 |
\centerslidesfalse |
| 218 |
\frametitle{A picture} |
| 219 |
|
| 220 |
\pause |
| 221 |
|
| 222 |
\begin{center}% |
| 223 |
\stepwise |
| 224 |
{% |
| 225 |
\setlength{\unitlength}{1.5\semcm}% |
| 226 |
\delimitershortfall-1sp% Just for the nested braces |
| 227 |
\begin{picture}(14,2) |
| 228 |
\put(0,1){\vector(1,0){1}} |
| 229 |
\put(0.5,0.5){\makebox(0,0){\small $x(t)$}} |
| 230 |
\put(13,1){\vector(1,0){1}} |
| 231 |
\put(13.5,0.5){\makebox(0,0){\small $y(t)$}} |
| 232 |
\step |
| 233 |
{ |
| 234 |
\put(1,1){\line(3,2){1.5}} |
| 235 |
\put(1,1){\line(3,-2){1.5}} |
| 236 |
\put(2.5,0){\line(0,1){2}} |
| 237 |
\put(2,1){\makebox(0,0){\large $\varphi$}} |
| 238 |
} |
| 239 |
\step |
| 240 |
{ |
| 241 |
\put(2.5,1){\vector(1,0){3.5}} |
| 242 |
\put(4.25,0.5){\makebox(0,0){\small $F_t = \varphi\left(x(t)\right)$}} |
| 243 |
} |
| 244 |
\step |
| 245 |
{ |
| 246 |
\put(6,0){\framebox(2,2){\large $\Phi$}} |
| 247 |
} |
| 248 |
\step |
| 249 |
{ |
| 250 |
\put(8,1){\vector(1,0){3.5}} |
| 251 |
% |
| 252 |
% Here, we find another nested use of \step inside \step. |
| 253 |
% \bstep is a variant of \step which _always_ puts its argument into a box for leaving the correct amount of |
| 254 |
% white space. We cannot use \parstepwise here because \put can't go into a box. Hence, just using \step for |
| 255 |
% building the nested formula on the next line would give the wrong size for the nested braces. |
| 256 |
% |
| 257 |
\put(9.75,0.5){\makebox(0,0){\footnotesize $G_t = \Phi\left(\bstep{\varphi\left(\bstep{x(t)}\right)}\right)$}} |
| 258 |
} |
| 259 |
\step |
| 260 |
{ |
| 261 |
\put(13,1){\line(-3,2){1.5}} |
| 262 |
\put(13,1){\line(-3,-2){1.5}} |
| 263 |
\put(11.5,0){\line(0,1){2}} |
| 264 |
\put(12,1){\makebox(0,0){\large $\delta$}} |
| 265 |
} |
| 266 |
\end{picture}% |
| 267 |
}% |
| 268 |
\end{center}% |
| 269 |
\end{slide} |
| 270 |
} |
| 271 |
\end{document} |