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