Debian Codegraph @

texmf-dist/doc/latex/texpower/fulldemo.tex

raw
1 %%
2 %% This is file `fulldemo.tex',
3 %% generated with the docstrip utility.
4 %%
5 %% The original source files were:
6 %%
7 %% texpower-doc.dtx (with options: `version,fulldemo')
8 %% texpower-doc.dtx (with options: `picexample-src')
9 %% texpower-doc.dtx (with options: `tabexample-src')
10 %% texpower-doc.dtx (with options: `mathexample-src')
11 %% texpower-doc.dtx (with options: `parexample-src')
12 %% texpower-doc.dtx (with options: `bckwrdexample-src')
13 %% texpower-doc.dtx (with options: `hilitexample-src')
14 %% texpower-doc.dtx (with options: `divexample-src')
15 %% texpower-doc.dtx (with options: `fulldemo-middle,docu,end')
16 %%
17 %% --------------------------------------------------------------
18 %% TeXPower bundle - dynamic online presentations with LaTeX
19 %% Copyright (C) 1999-2004 Stephan Lehmke
20 %% Copyright (C) 2003-2005 Hans Fredrik Nordhaug
21 %%
22 %% This program is free software; you can redistribute it and/or
23 %% modify it under the terms of the GNU General Public License
24 %% as published by the Free Software Foundation; either version 2
25 %% of the License, or (at your option) any later version.
26 %%
27 %% This program is distributed in the hope that it will be useful,
28 %% but WITHOUT ANY WARRANTY; without even the implied warranty of
29 %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 %% GNU General Public License for more details.
31 %% --------------------------------------------------------------
32 %%
33 %% The list of all files belonging to the TeXPower bundle is
34 %% given in the file `00readme.txt'.
35 %%
36 \ProvidesFile{fulldemo.tex}%
37 [2005/04/07 TeXPower full demo and manual]
38
39 % Version info used in titles
40 \def\tpversion{v0.2 of April 8, 2005}
41
42 % Enable all color emphasis and highlighting options; use a light background and slifonts.
43
44 \PassOptionsToPackage{coloremph,colormath,colorhighlight,lightbackground}{texpower}
45 \RequirePackage{tpslifonts}
46
47 % Input the generic preamble.
48
49 \input{__TPpreamble}
50 \hypersetup{pdftitle={texpower full demo and documentation}}
51
52 % To get correct links in the index (and remove annoying warnings)
53 \pausesafecounter{slide}
54
55 % Setting up indexing and custom indexing commands
56 \input{__TPindexing}
57
58 \backgroundstyle{vgradient}
59
60 \setlength{\unitlength}{5mm}
61
62 \ifthenelse{\boolean{psspecialsallowed}}% Can we use PSTricks?
63 {% Yes.
64 % PsTricks is used for creating the picture example.
65
66 \usepackage[noxcolor]{pstricks}
67 \usepackage{pstcol}
68 \usepackage{pst-node}
69
70 \psset{unit=\unitlength}
71 }
72 {% No. We'll make do without.
73 }
74
75
76 % We also include an mps (metapost postscript) image...
77 \usepackage{graphicx}
78 % The mps extension isn't supported out-of-the-box for latex+dvips
79 \ifthenelse{\boolean{psspecialsallowed}}{%
80 \DeclareGraphicsExtensions{.mps}}{}
81
82 % ... and write some aligned equations.
83 \usepackage{amsmath}
84 % Make nested braces grow.
85 \delimitershortfall-1sp
86
87
88 % The package soul is needed for \highlighttext to work.
89
90 \usepackage{soul}
91
92
93 % The following package makes code look a little nicer, but it may not be present on all systems.
94
95 \IfFileExists{cmtt.sty}{\usepackage[override]{cmtt}}{}
96
97 % Hack to override seminar's definition of twocolumn needed by theindex
98 \makeatletter
99 \let\slidebox@restore@orig=\slidebox@restore%
100 \def\slidebox@restore{%
101 \slidebox@restore@orig%
102 \long\def\twocolumn[##1]{\section{Index}}%
103 }
104 \makeatother
105
106
107 %-----------------------------------------------------------------------------------------------------------------
108 % Finally, everything is set up. Here we go...
109 %
110 \begin{document}
111 \begin{slide}
112 %
113 % First, some words of explanation.
114 %
115 \title
116 {%
117 The \TeX Power bundle\\
118 {%
119 \normalfont
120 Creating dynamic online presentations with \LaTeX\\
121 Full demo and documentation for \TeX Power \tpversion%
122 }%
123 }
124
125 \author{Stephan Lehmke\\\url{mailto:[email protected]}}
126
127 \maketitle
128
129 \newslide
130
131 This document is a demonstration and manual for the \TeX Power bundle which allows to create dynamic
132 presentations in a very flexible way.
133
134 The heart of the bundle is the package \code{texpower} which implements some commands for presentation effects. This
135 includes setting page transitions, color highlighting and displaying pages incrementally.
136
137 All features of \code{texpower} are implemented entirely using \TeX{} and \LaTeX; they are meant for `online'
138 presentation with \concept{Adobe Acrobat\textsuperscript{\textregistered} Reader} and work with all ways of \code{pdf}
139 creation. The combination of \LaTeX{} + \code{dvips} + Acrobat Distiller /
140 \code{ps2pdf} is possible as well as pdf\LaTeX{} and other \code{pdf} creation
141 methods.
142
143 \newslide
144
145 \minisec{Disclaimer}
146 This is still work inprogress.
147
148 During the subsequent error correction and extension of the functionality, the syntax and implementation of the macros
149 described here are liable to change.
150
151 Even though we are using dtx-files, these are still not fully documented dtx-files.
152
153 \newslide
154
155 \minisec{Credits}%
156 I am indepted to \href{mailto:[email protected]}{\name{Klaus Guntermann}}. His package
157 \href{http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4/pp4sty.zip}{\code{texpause}} from the \concept{Pdf
158 Presentation Post Processor} \href{http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4/}{PPower4} bundle
159 is the basis for the code of \code{texpower}.
160
161 Further thanks go to \href{mailto:[email protected]}{\name{Marc van Dongen}} for allowing me to include his code for
162 page transitions and to \href{mailto:[email protected]}{\name{Martin Schr\"oder}} for permission to use his
163 \concept{everyshi} code.
164
165 Useful hints for error corrections and improvements of code have been provided by \name{Marc van Dongen},
166 \name{Friedrich Eisenbrand}, \name{Thomas Emmel}, \name{Ross Moore}, \name{Heiko Oberdiek}, \name{Heiner Richter}, and
167 \name{Robert J.\ Vanderbei}.
168
169 \newslide
170
171 \tableofcontents
172 \end{slide}
173 \begin{slide}
174 %-----------------------------------------------------------------------------------------------------------------
175 %
176 \section{Examples}\label{Sec:Ex}
177 First, two simple examples for the \macroname{pause} command.
178
179 All other examples are meant to illustrate the expressive power of the \macroname{stepwise} command.
180
181 Looking at the code for the examples will probably be the best way of understanding how certain effects can be
182 achieved.
183
184 \newslide
185
186 %-----------------------------------------------------------------------------------------------------------------
187 %
188 \subsection{Some examples for \macroname{pause}}
189 % It doesn't hurt to put \pause inside a paragraph, but a new paragraph is forced at each occurrence of \pause.
190 \begin{center}
191 a\pause b\pause c
192 \end{center}
193
194 \pause
195
196 % We set Page Transitions to Dissolve for the rest of this slide.
197 \pageTransitionDissolve
198 \begin{itemize}
199 \item foo\pause
200 \item bar\pause
201 \item baz
202 \end{itemize}
203
204 \newslide
205 % Page Transitions are set back to Replace.
206 \pageTransitionReplace
207
208 %-----------------------------------------------------------------------------------------------------------------
209 % The `titles' for the examples are simply subsection headings.
210
211 \renewcommand{\makeslidetitle}[1]
212 {%
213 \subsection{#1}%
214 }
215
216
217 %-----------------------------------------------------------------------------------------------------------------
218 %
219 \makeslidetitle{\macroname{stepwise} Example: A Picture}\label{Sec:ExPic}
220
221 \ifthenelse{\boolean{psspecialsallowed}}% Can we use PSTricks?
222 {\input{picpsexample}}{\input{picltxexample}}
223 \newslide
224 \pageTransitionReplace
225
226
227 %-----------------------------------------------------------------------------------------------------------------
228 %
229 \makeslidetitle{\macroname{stepwise} Example: A Tabular}
230
231 % In the following, a tabular object is built incrementally.
232 % Observe how & and \\ are placed inside the following step to avoid `opening' empty cells.
233 % The macro \tabend is redefined to `replace' the final \hline by \cline's when a line is not yet complete.
234 %
235 \newcommand{\tabend}{\\\hline}%
236
237 \liststepwise{%
238 \begin{center}
239 \step{%
240 \begin{tabular}{|l|l|l|}
241 \hline
242 They can & be built & line by line%
243 \step{\\\hline or cell\renewcommand{\tabend}{\\\cline{1-1}}}%
244 \step{& by\renewcommand{\tabend}{\\\cline{1-2}}}%
245 \step{& cell\renewcommand{\tabend}{\\\hline}}%
246 \step
247 {%
248 \\\hline
249 %
250 % Again, \step's are nested inside each other...
251 %
252 \step{or}&\step{like}&\step{this.}%
253 }%
254 \step{\\\hline But\renewcommand{\tabend}{\\\cline{1-1}}}%
255 \step{& beware\renewcommand{\tabend}{\\\cline{1-2}}}%
256 \step{& of cells growing horizontally!\renewcommand{\tabend}{\\\hline}}%
257 \tabend
258 \end{tabular}%
259 }%
260 \end{center}%
261 }%
262 \newslide
263 %-----------------------------------------------------------------------------------------------------------------
264 %
265 \makeslidetitle{\macroname{stepwise} Example: An Aligned Equation}\label{Sec:ExEq}
266 % In the following, an aligned system of equations is built incrementally. We use the custom command \liststepwise to
267 % avoid glitches in vertical spacing.
268 %
269 \liststepwise%
270 {%
271 %
272 % This is just for compressing the equations so they can be squeezed on one slide.
273 %
274 \fontsize{7.8pt}{9pt}\selectfont
275 \renewcommand{\arraystretch}{0}%
276 \setlength{\arraycolsep}{0pt}%
277 \setlength{\abovedisplayskip}{0pt}%
278 \setlength{\belowdisplayskip}{0pt}%
279 %
280 % \highlightboxed will be used for underlaying some formulas with color. To minimize overlap, the width of the outer
281 % frame is reduced.
282 \setlength{\highlightboxsep}{1pt}%
283 %
284 \begin{align*}
285 \lefteqn
286 {%
287 \min
288 \left(
289 % The nested braces are filled `from outer to inner'. This means nesting a lot of steps inside each other...
290 % The outermost brace is displayed from the outset.
291 % The first step (which follows right here) displays the next inner brace (the first argument of \min), filled
292 % with an almost `empty' array (apart from one comma and some dots).
293 % \bstep is used to get appropriate white space when the step is not yet active.
294 \bstep
295 {\max
296 \left(
297 \begin{array}{l}
298 % The next two steps fill in the lines of the array.
299 \bstep{\min\left(F'(x),\min\left(F_1(x),G_1(y)\right)\right)},\\[-2ex]
300 \vdots\\
301 \bstep{\min\left(F'(x),\min\left(F_n(x),G_n(y)\right)\right)}
302 \end{array}
303 \right)
304 },
305 % After the first brace is filled, the next step provides the second argument of \min.
306 \bstep{\min\left(G_i(y),H_i(z)\right)}
307 \right)
308 }
309 &
310 % The next couple of steps will create the remaining lines of the aligned equations. These need to be
311 % insubstantial (as is the default for \liststepwise), because & can't go in a box.
312 % As a consequence, the horizontal alignment cannot kick in until the last step is performed. This would make the
313 % alignment `flicker' sidewise.
314 % So we have to bite the bullet and duplicate the widest entry here (invisibly), so that the horizontal alignment
315 % is constant during all steps. *sigh*
316 \phantom
317 {%
318 {}=
319 \min
320 \left(
321 F'(x),
322 \min
323 \left(
324 \max
325 \left(
326 \begin{array}{l}
327 \min\left(F_1(x),\min\left(G_1(y),G_i(y)\right)\right),\\[-1.5ex]
328 \vdots\\[-.5ex]
329 \min\left(F_n(x),\min\left(G_n(y),G_i(y)\right)\right)
330 \end{array}
331 \right),
332 H_i(z)
333 \right)
334 \right)
335 }
336 % The next step displays two lines at a time, but incompletely, i.e. some parts are missing (which are inside
337 % nested calls of \bstep).
338 % This way, it is demonstrated how the arguments of the nested \min's are reordered.
339 \step
340 {%
341 \\
342 &=
343 \max
344 \left(
345 % The macro \activatestep is used by \stepwise to `wrap' the argument of a \bstep command at the _first_ time
346 % it appears.
347 % Usually, it does nothing. Now, we redefine it to highlight its background, so it is easier to spot the
348 % places where the additional arguments were inserted.
349 \let\activatestep\highlightboxed
350 \begin{array}{l}
351 \min
352 \left(
353 % The inner \bstep's display the missing arguments, which are completely identical in both lines.
354 % It is intended that all the missing arguments appear at the same time, so \rebstep is used for the
355 % remaining arguments which have been left out.
356 \min\left(\bstep{F'(x)},\min\left(\rebstep{F_1(x),G_1(y)}\right)\right),\min\left(G_i(y),H_i(z)\right)
357 \right),\\[-2ex]
358 \vdots\\[-1ex]
359 \min
360 \left(
361 \min\left(\rebstep{F'(x)},\min\left(\rebstep{F_n(x),G_n(y)}\right)\right),\min\left(G_i(y),H_i(z)\right)
362 \right)
363 \end{array}
364 \right)
365 \\
366 &=
367 \max
368 \left(
369 \let\activatestep\highlightboxed
370 \begin{array}{l}
371 \min
372 \left(
373 \min\left(
374 % Here are the remaining arguments of \min which are all to be displayed in one step (together with
375 % those from the previous line).
376 \rebstep{F'(x)},\min\left(\rebstep{F_1(x)},\min\left(\rebstep{G_1(y)},G_i(y)\right)\right)
377 \right),
378 H_i(z)
379 \right),\\[-2.5ex]
380 \vdots\\[-1.5ex]
381 \min
382 \left(
383 \min\left(
384 \rebstep{F'(x)},\min\left(\rebstep{F_n(x)},\min\left(\rebstep{G_n(y)},G_i(y)\right)\right)
385 \right),
386 H_i(z)
387 \right)
388 \end{array}
389 \right)
390 }
391 \step
392 {%
393 \\
394 &=
395 \min
396 \left(
397 F'(x),
398 \min
399 \left(
400 \max
401 \left(
402 \begin{array}{l}
403 \min\left(F_1(x),\min\left(G_1(y),G_i(y)\right)\right),\\[-1.5ex]
404 \vdots\\[-.5ex]
405 \min\left(F_n(x),\min\left(G_n(y),G_i(y)\right)\right)
406 \end{array}
407 \right),
408 H_i(z)
409 \right)
410 \right)
411 }
412 \end{align*}
413 }%
414 \newslide
415 %
416 %-----------------------------------------------------------------------------------------------------------------
417 %
418 \makeslidetitle{\macroname{stepwise} Example: Inside A Paragraph}\label{Sec:ExPar}
419
420 %
421 % We show that \stepwise can be used for highlighting words within a paragraph.
422 % Furthermore, it is demonstrated how the order in which \step's are executed can be changed.
423 %
424 % We define a `placeholder' which will mark the place of missing words (instead of \displayphantom).
425 %
426 \newcommand{\placeholder}[1]{\leavevmode\phantom{#1}\llap{\rule{\widthof{\phantom{#1}}}{\fboxrule}}}%
427 %
428 % We use the custom command \parstepwise which not only wraps the whole argument of \stepwise into a minipage (because
429 % otherwise vertical spacing goes haywire, don't ask me why), but also gives substance to steps.
430 %
431 % All variants of \stepwise take an optional argument the contents of which are executed inside a group before the
432 % inner loop of starts. It can be used to set parameters locally.
433 % Here, we redefine \activatestep (which has been explained in the equation example) to highlight the first
434 % appearance of any word.
435 % \hidestepcontents is used as a `wrapper' for those arguments of \step which should not appear yet. It either
436 % displays nothing (this is the default for \stepwise and \liststepwise) or puts its argument into a \phantom
437 % (the default for \parstepwise); this behaviour is also toggled by \boxedsteps and \nonboxedsteps.
438 % Here, we redefine it to use our selfdefined \placeholder to mark `missing' words.
439 %
440 \parstepwise[\let\hidestepcontents=\placeholder\let\activatestep=\highlightboxed]%
441 {%
442 \begin{quote}
443 \Huge We can \step{create} a \step{fill-in-the-blanks}
444 %
445 % \step takes an optional argument with which it can be specified _when_ its argument is to appear. This is
446 % expressed in \ifthenelse syntax (see the documentation of the ifthen package).
447 % Here, we refer to the counter step which is advanced by \stepwise and contains the number of the current step.
448 % This way, steps can be made to appear in any order.
449 \step[\value{step}=5]{text} which is then
450 \step[\value{step}=4]{filled} in in
451 \step[\value{step}=3]{\textbf{any}} order!
452 \end{quote}
453 }%
454
455 \newslide
456
457 % The \hidetext command hides its argument while respecting automatic line breaks and such. The command needs the soul
458 % package to work. Read the documentation of soul for restrictions as to what can go in the argument of \hidetext.
459
460 \stepwise[\let\hidestepcontents=\hidetext\let\activatestep=\highlighttext]
461 {%
462 \vspace*{\fill}
463 \begin{minipage}{\linewidth}
464 \begin{quote}
465 \Huge We can step through a \step{paragraph} of \step{free text}
466 \step{without disturbing} line breaks!
467 \end{quote}
468 \end{minipage}
469 \vspace*{\fill}\vspace*{\fill}
470 }
471 \newslide
472
473 %-----------------------------------------------------------------------------------------------------------------
474 %
475 \makeslidetitle{\macroname{stepwise} Example: Writing Backwards}\label{Sec:ExBackwards}
476 %
477 % The following example doesn't really demonstrate a useful application. Its purpose is twofold:
478 % a) Show how the functionality of \stepwise can be extended by the user by referring to the macros provided by the
479 % package.
480 % b) Show that \steps can appear in any order, and can be made to appear simultaneously in several places (and mention
481 % the problems this raises).
482
483 % We define a new macro \backstep which will call \step, but the steps will be executed in _reverse_ order.
484 % This is achieved as follows:
485 % * We refer to the counter totalsteps, which gives the total number of steps occurring in this argument of
486 % \stepwise.
487 % * From this, we subtract the value of the counter stepcommand, which gives the number of this \step command (in the
488 % order of appearance).
489 % * The result is compared with the counter step, which gives the number of the current step.
490 % (the default for `triggering' a \step is the condition \value{step}=\value{stepcommand})
491 %
492 % Note that if the ifthen Package would support this syntax, we could use the bracketed optional argument of \step (as
493 % in the previous example), defining \backstep like this:
494 %
495 % \newcommand{\backstep}{\step[\value{totalsteps}-\value{stepcommand}+1=\value{step}]}
496 %
497 % As \ifthenelse doesn't offer this syntax, we have to calculate \value{totalsteps}-\value{stepcommand}+1 in a separate
498 % counter. This doesn't fit the intended use of \step's optional argument. But hey, there is another syntax ;-)
499 % If the optional argument is specified with braces (...), then it can contain an arbitrary test which takes two
500 % arguments and selects the first if it succeeds and the second if it fails. We use this variant here.
501 %
502 \newcounter{reversestepno}%
503 \newcommand{\backstep}{\step(\setcounter{reversestepno}{\value{totalsteps}-\value{stepcommand}+1}\ifthenelse{\value{step}=\value{reversestepno}})}%
504 %
505 % We use the custom command \parstepwise which not only wraps the whole argument of \stepwise into a minipage (because
506 % otherwise vertical spacing goes haywire, don't ask me why), but also gives substance to steps.
507 %
508 % If the following \stepwise command would only contain the calls to \backstep, everything would be fine.
509 % But we _had_ to add something else....
510 % In the second part of this application of \stepwise, several steps are executed simultaneously with those executed
511 % backwards in the first part. This means the value of the counter totalsteps is 14, i.e. the calls to \backstep
512 % correspond to steps 8...14. To remedy this, we decree that the first step performed shall be number 7, by setting
513 % the counter firststep accordingly in the optional argument of \stepwise.
514 %
515 \parstepwise[\setcounter{firststep}{\value{totalsteps}/2+\value{firststep}}]
516 {%
517 \begin{quote}
518 \Huge
519 \backstep{Is} \backstep{now} \backstep{it}
520 \backstep{backwards} \backstep{write} \backstep{to}
521 \backstep{possible\,!}
522
523 \bigskip
524
525 % By determining explicitly the times at which the following steps are executed, we make them appear
526 % simultaneously with the preceding flock of \backsteps. As we have set the counter firststep to 7, we start
527 % counting with 8.
528 %
529 \step[\value{step}=8]{\includegraphics[width=2cm]{fig-1}}
530 \step[\value{step}=9]{\includegraphics[width=2cm]{fig-1}}
531 \step[\value{step}=10]{\includegraphics[width=2cm]{fig-1}}
532 \step[\value{step}=11]{\includegraphics[width=2cm]{fig-1}}
533 \step[\value{step}=12]{\includegraphics[width=2cm]{fig-1}}
534 \step[\value{step}=13]{\includegraphics[width=2cm]{fig-1}}
535 \step[\value{step}=14]{\includegraphics[width=2cm]{fig-1}}%
536 \end{quote}
537 }%
538 \newslide
539 %-----------------------------------------------------------------------------------------------------------------
540 %
541 \makeslidetitle{\macroname{stepwise} Example: Highlighting Text}\label{Sec:Exhl}
542 % The default for \step's which are not yet `active' is to be `invisible'. In preceding examples, we have redefined
543 % internal macros like \hidestepcontents or \activatestep to achieve special `highlighting' effects.
544 % Here, we demonstrate how make text `stand out' from the background incrementally without having it appear from thin
545 % air.
546
547 % The first example demonstrates how to make \step its argument `stand out' instead of making it appear `out of
548 % nowhere'.
549
550 \makeatletter
551 \ifthenelse{\boolean{TPcolor}}% Can we use colors?
552 {% Yes. In this case \step should change colors from `dimmed' to `active'.
553
554 % The command \hidedimmed switches colors to `dimmed', the command \highlightenhanced switches colors to `enhanced'.
555 \liststepwise[\let\hidestepcontents=\hidedimmed\let\activatestep=\highlightenhanced]
556 {%
557 \vspace*{\fill}
558 \begin{quote}
559 \Large%
560 \step{Instead of making things appear out of `thin air',} \step{we can also make them appear `out of the
561 background'} \step{by incrementally changing color from \concept{inactive}} \step{to \concept{active}.}
562 \step{This also works with \emph{color emphasis}} \step{and \concept{math coloring}: $a=b^2$.}
563 \end{quote}
564 \vspace*{\fill}\vspace*{\fill}
565 }%
566 }
567 {% No. In this case we have to `handwave' using the soul package.
568 % Instead of hiding its argument, the new command \myhide just changes the font size (maintaining the overall text
569 % length though).
570 \def\myhide
571 {%
572 \leavevmode%
573 \SOUL@setup
574 \def\SOUL@everytoken{\makebox[\widthof{\the\SOUL@token}][s]{\rule[\depthof{\the\SOUL@token}*-1]{0pt}{\depthof{\the\SOUL@token}+\heightof{\the\SOUL@token}}\hrulefill\tiny\the\SOUL@token\hrulefill}\SOUL@setkern\SOUL@charkern}%
575 \SOUL@%
576 }
577
578 \liststepwise[\let\hidestepcontents=\myhide\setcounter{firststep}{0}]
579 {%
580 \vspace*{\fill}
581 \begin{quote}
582 \LARGE%
583 \step{Instead of making things appear out of `thin air',} \step{we can also make them appear `out of the
584 background'} \step{incrementally.}
585 \end{quote}
586 \vspace*{\fill}\vspace*{\fill}
587 }%
588 }
589 \makeatother
590
591 \newslide
592
593 % Next, it is demonstrated how we can `flip through' an itemize environment by just highlighting the items in turn
594 % instead of making them appear one by one.
595 %
596 % Define a macro \mystep which implements the highlighting effect.
597 \ifthenelse{\boolean{TPcolor}}% Can we use colors?
598 {% Yes. In this case highlighting is implemented by switching color.
599 \def\mystep% Note that \mystep takes no argument. It just changes the way the next item is displayed.
600 {%
601 \usecolorset{stwcolors}% Restore the undimmed colors valid at the beginning of \stepwise.
602 \dstep[][\boolean{firstactivation}]% \dstep switches colors. The optional argument makes it appear only once.
603 }%
604 }
605 {% No. In this case highlighting is implemented by redefining \labelitemi.
606 \def\mystep
607 {%
608 \switch[][\boolean{firstactivation}]% The optional arguments make \switch act only once.
609 {\def\labelitemi{\origmath{\gg}}}{\def\labelitemi{\origmath{\cdot}}}%
610 }%
611 }
612
613 % We define a custom itemize environment which automatically adds calls to \mystep:
614 \newenvironment{stepitemize}
615 {%
616 \huge
617 \begin{itemize}
618 \let\origitem=\item
619 % Here, the \mystep command is hidden inside \item
620 \renewcommand{\item}{\mystep\origitem}%
621 }
622 {%
623 \end{itemize}
624 }
625
626 Instead of displaying incrementally, we can just `flip through' some items by highlighting them:
627
628 % Note that we use the starred version of \liststepwise so that the first item is highlighted on the first slide
629 % produced by \liststepwise.
630 %
631 \liststepwise*
632 {%
633 \begin{stepitemize}
634 \item Item 1
635 \item Item 2
636 \item Item 3
637 \end{stepitemize}
638 }
639
640 \pause
641
642 % The following example demonstrates highlighting inside a paragraph using \highlighttext. By redefining \activatestep
643 % to \highlighttext, the argument of every \step will be highlighted when the \step is activated for the first
644 % time. Note that highlighting doesn't influence line breaks because \highlighttext is implemented using the soul
645 % package.
646 %
647 % Again, we define \hidestepcontents to display its argument, so that the complete text is visible from the outset.
648
649 \stepwise[\let\activatestep=\highlighttext\let\hidestepcontents=\displayidentical]
650 {%
651 \vspace*{\fill}
652 \begin{minipage}{\linewidth}
653 \LARGE
654 \step{Inside} a paragraph, we can \step{highlight} text \step{without influencing} \step{line breaks}.
655 \end{minipage}
656 \vspace*{\fill}
657 }
658 \newslide
659 %-----------------------------------------------------------------------------------------------------------------
660 %
661 \makeslidetitle{\macroname{stepwise} Example: Fooling Around}\label{Sec:ExFooling}
662 % The following example is just to show that a lot of fancy things are possible by appropriately defining the diverse
663 % `hooks' offererd by \stepwise.
664 `Tweaking' the hooks a little allows some truly bizarre applications\dots
665
666 % In the following \stepwise command, \activatestep will be set to \textbf. This means the `first' occurrence of a number
667 % is wider (because bf is an extended font) than all other occurrences of it. To avoid glitches in line breaks, all
668 % other occurrences of numbers (visible and invisible) need to be of the same width. Hence we define new versions of
669 % \displaystepcontents and \hidestepcontents.
670 \def\mydisplay#1{\makebox[\widthof{\textbf{#1}}]{#1}}
671 \def\myhide#1{\phantom{\makebox[\widthof{\textbf{#1}}]{#1}}}
672
673 \newcounter{modulo}
674 \newcounter{i}
675
676 % Finally, we define a custom \step command which sets the optional arguments of \step.
677 % We already have introduced the first optional argument, which determines when a \step is activated for the first
678 % time. Here, this one is left at its default value (\value{step}=\value{stepcommand}).
679 % Here, we also use the second optional argument, which has the same syntax as the first one (i.e. it can be surrounded
680 % either by square brackets or braces), but determines when a \step is active _at all_ (i.e. whether
681 % \displaystepcontents or \hidestepcontents is used). The default is the internal check \if@first@TP@true, which determines
682 % whether step number \value{stepcommand} has already been activated for the first time (this is saved internally for
683 % every step). Now, we redefine this condition to be fulfilled whenever the value of the counter step is divisible by
684 % the value of the counter stepcommand.
685 \def\mystep{\step[](\setcounter{modulo}{\value{step}/\value{stepcommand}*\value{stepcommand}}\ifthenelse{\value{step}=\value{modulo}})}%
686
687
688 % By setting the page duration to 0.5 seconds, we make the following sequence of slides appear automatically one by one,
689 % one every half second.
690
691 \pageDuration{0.5}
692
693 %
694 % We use the custom command \parstepwise which not only wraps the whole argument of \stepwise into a minipage (because
695 % otherwise vertical spacing goes haywire, don't ask me why), but also gives substance to steps. We use the starred
696 % version of this command so that the number 1 appears on the first slide generated by \parstepwise.
697 %
698 % \activatestep is set to \textbf to emphasize the number the divisors of which are displayed.
699 \parstepwise*[\let\activatestep=\textbf\let\displaystepcontents=\mydisplay\let\hidestepcontents=\myhide]
700 {%
701 \huge
702 \setcounter{i}{0}%
703 Divisibility demo:
704
705 % We just have to generate the appropriate number of \mystep commands which display `their' numbers.
706 \whiledo{\value{i}<40}{\stepcounter{i}\mystep{\arabic{i}} }%
707
708 }
709
710 % Stop automatic advancing of pages.
711
712 \stopAdvancing
713 \end{slide}
714
715 \begin{slide}\relax
716
717 %-----------------------------------------------------------------------------------------------------------------
718 % The `title' for the documentation is a section heading. As sectioning in the manual (doc-tag) file starts with
719 % \section, we have to `downgrade' sectioning commands.
720
721 \let\origsection=\section
722
723 \renewcommand{\makeslidetitle}[1]
724 {%
725 \let\section\subsection
726 \let\subsection\subsubsection
727 \def\thanks##1{}%
728 \origsection{#1}
729 }
730
731 \addtocontents{toc}{\protect\clearpage}
732
733
734 \makeslidetitle
735 {%
736 Documentation%
737 \thanks{Documentation for \TeX Power \tpversion .}%
738 }%
739
740 The \TeX Power bundle contains style and class files for creating dynamic online presentations with \LaTeX.
741
742 The heart of the bundle is the package \code{texpower.sty} which implements some commands for presentation effects. This
743 includes setting page transitions, color highlighting and displaying pages incrementally.
744
745 For finding out how to achieve special effects (as shown in the \nameref{Sec:Ex}),
746 please look at the comments inside the files ending with \code{example.tex} and \code{demo.tex}
747 and read this manual to find out what's going on.
748
749 \newslide
750
751 For your own first steps with \TeX Power, the simple demo file \code{simpledemo.tex} is the best starting
752 place. There, some basic applications of the dynamic features provided by the \code{texpower} package are
753 demonstrated. You can make your own dynamic presentations by modifying that demo to your convenience.
754
755 \code{simpledemo.tex} uses the \code{article} document class for maximum
756 compatibility. There are other simple demos named
757 \code{slidesdemo.tex}, \code{foilsdemo.tex}, \code{seminardemo.tex},
758 \code{pp4sldemo.tex}, \code{pdfslidemo.tex}, \code{pdfscrdemo.tex},
759 \code{prosperdemo.tex}, and \code{ifmslidemo.tex}
760 which demonstrate how to combine \TeX Power with the
761 most popular presentation-making document classes and packages.
762
763 \newslide
764
765 The other, more sophisticated examples demonstrate the expressive power of the
766 \code{texpower} package. Look at the commented code of these examples to find out how to achieve special effects and
767 create your own presentation effects with \TeX Power.
768
769 \newslide
770
771 %-----------------------------------------------------------------------------------------------------------------
772 %
773 \section{Usage and general options}
774 The \code{texpower} package is loaded by putting
775 \begin{center}
776 \present{\commandapp{usepackage}{texpower}}
777 \end{center}
778 into the preamble of a document.
779
780 There are no specific restrictions as to which document classes can be used.
781
782 It should be stressed that \TeX Power is \underl{not} (currently) a complete presentation package. It just adds dynamic
783 presentation effects (and some other gimmicks specifically interesting for dynamic presentations) and should always be
784 combined with a document class dedicated to designing presentations (or a package like
785 \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/pdfslide.html}{\code{pdfslide}}).
786
787 Some of the presentation effects created by \code{texpower} require special capabilities of the viewer which is used for
788 presenting the resulting document. The target for the development of \code{texpower} has so far been
789 \href{http://www.adobe.com/products/acrobat/readermain.html}%
790 {\concept{Adobe Acrobat\textsuperscript{\textregistered} Reader}}, which means the
791 document should (finally) be produced in \code{pdf} format. The produced
792 \code{pdf} documents should display well in
793 \href{http://www.cs.wisc.edu/~ghost/gsview/}{\concept{GSview}} also, but that
794 viewer doesn't support page transitions and duration.
795
796 There are no specific restrictions as to which way the \code{pdf} format is produced. All demos and examples
797 have been tested with pdf\LaTeX{} and standard \LaTeX, using
798 \code{dvips} and \href{http://www.adobe.com/products/acrobat/}%
799 {\concept{Adobe Acrobat\textsuperscript{\textregistered} Distiller}}
800 or \code{dvips} and \code{ps2pdf} (from the \href{http://www.ghostscript.com/}%
801 {\concept{Ghostscript suite}}) for generating \code{pdf}.
802
803 \newslide
804
805 \subsection{General options}\label{Sec:GenOpt}
806 \begin{description}
807 \item[\present{option: \code{display}}.]\indexpckopt{texpower}{display} Enable `dynamic' features. If not set, it is assumed that the document is to be
808 printed, and all commands for dynamic presentations, like \macroname{pause} or \macroname{stepwise} have no effect.
809
810 \item[\present{option: \code{printout} (default)}.]\indexpckopt{texpower}{printout} Disable `dynamic' features. As this is the default behaviour,
811 setting this option explicitly is useful only if the option \code{display} is set by default for instance in the
812 \code{tpoptions.cfg} file (see section \ref{Sec:Config}).
813
814 \item[\present{option: \code{verbose}}.]\indexpckopt{texpower}{verbose} Output some administrative info.
815 \end{description}
816 Some font options are listed in section \ref{Sec:BaseFont}.
817
818 \newslide
819
820 \subsection{Side effects of page contents duplication}\label{Sec:Dupl}
821 In the implementation of the \macroname{pause} and \macroname{stepwise} commands, it is neccessary to duplicate some
822 material on the page.
823
824 This way, not only `visible' page contents will be duplicated, but also some `invisible' control code stored in
825 \concept{whatsits} (see the \TeX book for an explanation of this concept). Duplicating whatsits can lead to undesirable
826 side effects.
827
828 For instance, a \macroname{section} command creates a whatsit for writing the table of contents entry. Duplicating this
829 whatsit will also duplicate the toc entry. So, whatsit items effecting file access are inhibited when duplicating page
830 material.
831
832 \newslide
833
834 The current version of \code{texpower} is a little smarter when handling whatsits. Some commands (related to writing to
835 files and hyperlinks) are made stepwise-aware. This means that links can point to the actual subpage where the
836 anchor is and not to the last (sub)page of an incremental page. However, if you want the old behaviour just use
837 \begin{description}
838 \item[\present{option: \code{oldfiltering}}]\indexpckopt{texpower}{oldfiltering} switches on the old
839 (pre 0.2) very aggressive/robust filtering of whatsits.
840 \end{description}
841 The \code{oldfiltering} can be turned on and off inside the document using \macroname{oldfilteringon/off}. This command is
842 useful if \code{texpower} isn't smart enough...
843
844 \newslide
845
846 A second type of whatsits is created by \TeX's \macroname{special} command which is used for instance for color
847 management. Some drivers, like \code{dvips} and \code{textures}, use a color stack which is controlled by
848 \macroname{special} items included in the dvi file. When page contents are duplicated, then these \macroname{special}s
849 are also duplicated, which can seriously mess up the color stack.
850
851 \newslide
852
853 \code{texpower} implements a `color stack correction' method by maintaining a stack of color corrections, which should
854 counteract this effect. Owing to potential performance problems, this method is turned off by default.
855 \begin{description}
856 \item[\present{option: \code{fixcolorstack}}]\indexpckopt{texpower}{fixcolorstack} switches on color stack correction. Use it if you experience strange color
857 switches in your document.
858 \end{description}
859
860 \newslide
861
862 \subsection{Setting the base font}\label{Sec:BaseFont}
863 \code{texpower} offers no options for setting the base font of the document.
864 Use the \code{tpslifonts} package in stead. Read more in section \ref{Sec:TPslifonts}.
865
866 Further, there are packages like \code{cmbright} or \code{beton} which change the whole set of fonts to something less
867 fragile than cmr.
868
869 \newslide
870
871 \subsection{Switches}
872 There are some boolean registers provided and set automatically by \code{texpower}.
873
874 \begin{description}
875 \item[\present{boolean: \code{psspecialsallowed}}]\indexpckswitch{texpower}{psspecialsallowed} True if PostScript\textsuperscript{\textregistered} specials may be
876 used.
877
878 \code{texpower} tries to find out whether or not PostScript\textsuperscript{\textregistered} specials may be used in
879 the current document. For instance, pdf\LaTeX{} can't interpret arbitrary specials. This switch is set automatically
880 and can be used inside a document to enable/disable parts which need PostScript\textsuperscript{\textregistered}
881 specials.
882
883 \newslide
884
885 \item[\present{boolean: \code{display}}]\indexpckswitch{texpower}{display} True if \code{display} option was given.
886
887 This switch indicates whether `dynamic' features of \code{texpower} are enabled. Use it inside your document
888 to distinguish between the `presented' and the printed version of your document.
889
890 \item[\present{boolean: \code{TPcolor}}]\indexpckswitch{texpower}{TPcolor} True if any of the color highlighting options (see section
891 \ref{Sec:ColorEmphasis}) were given.
892
893 This switch indicates whether `color' features of \code{texpower} are enabled (compare section
894 \ref{Sec:ColorEmphasis}). You can use it inside your document to distinguish between a `colored' and a `monochrome'
895 version of your document.
896 \end{description}
897
898 \newslide
899
900 \subsection{Configuration files}\label{Sec:Config}
901 \code{texpower} loads three configuration files (if present):
902 \begin{description}
903 \item[\present{file: \code{tpoptions.cfg}}]\indexcode{tpoptions.cfg}
904 is loaded before options are processed. Can be used to set default options
905 in a system-specific way. See the comments inside the file
906 \code{tpoptions.cfg} which is part of the \TeX Power bundle
907 for instructions.
908
909 \item[\present{file: \code{tpsettings.cfg}}]\indexcode{tpsettings.cfg}
910 is loaded at the end of \code{texpower}. Here, you can do some
911 system-specific settings. See the comments inside the
912 file \code{tpsettings.cfg} which is part of the
913 \TeX Power bundle for instructions.
914
915 \item[\present{file: \code{tpcolors.cfg}}]\indexcode{tpcolors.cfg}
916 is loaded if \code{TPcolor} is true. The file defines the standard
917 colors/colorsets (see section \ref{Sec:ColorEmphasis}). See the
918 comments inside the file \code{tpcolors.cfg} which is part of the
919 \TeX Power bundle for instructions.
920 \end{description}
921
922 \newslide
923
924 \subsection{Miscellaneous commands}\label{Sec:MiscCmd}
925 Some important commands that don't fit in the latter sections:
926 \begin{description}
927 \item[\present{\macroname{oldfilteringon}}]\indexmacro{oldfilteringon}
928 reverts to the old (pre v0.2) aggressive/robust filtering of whatsits.
929 \item[\present{\macroname{oldfilteringoff}}]\indexmacro{oldfilteringoff}
930 turns on the new better treatment of whatsits.
931 \item[\present{\commandapp{currentpagevalue}{\carg{value}}}]\indexmacro{currentpagevalue}
932 sets how to find the number of the current page, \commandapp{value}{page} is default.
933 Used to name the hyper target on the first subpage of every page. Also used in the
934 TeXPower navigation buttons.
935 \item[\present{\commandapp{pausesafecounter}{\carg{counter}}}]\indexmacro{pausesafecounter}
936 is used to add counters that are to be restored to their original value after \macroname{pause}. The \code{page}
937 counter is always restored. In addition the \code{slide} counter is restored if the \code{seminar} class is used. If
938 you need more counters to be restored after \macroname{pause}, use \macroname{pausesafecounter}.
939 \end{description}
940
941 \newslide
942
943 \subsection{Page Anchors}\label{Sec:PageAnch}
944
945 For each physical page \TeX Power (when in display mode) makes a number of subpages - this is
946 the dynamics. For convenience \TeX Power defines an anchor to the first subpage of physical page n,
947 \code{firstpage.n}\indexcode{firstpage.n}. The standard page anchor for physical page n,
948 \code{page.n}\indexcode{page.n}, points to the last subpage of physical page n. If you want to
949 link to any other subpage just insert a \macroname{hyperlink} in the standard way assuming you haven't
950 turned on the old filtering (\ref{Sec:Dupl}).
951
952 \newslide
953
954 \subsection{Dependencies on other packages}
955 \code{textpower} always loads the packages \code{ifthen} and \code{calc}, as the extended command syntax provided by
956 these is indispensable for the macros to work. They are in the \code{base} and \code{tools} area of the \LaTeX{}
957 distribution, respectively, so I hope they are available on all systems.
958
959 Furthermore, \code{texpower} loads the package \code{color} if any color-specific options are set (see section
960 \ref{Sec:ColorEmphasis}).
961
962 Further packages are \emph{not} loaded automatically by \code{texpower} to avoid incompatibilities, although some
963 features of \code{texpower} are enabled \emph{only} if a certain package is loaded. If you wish to use these features,
964 you are responsible for loading the respective package yourself.
965
966 If some necessary package is \emph{not} loaded, \code{texpower} will issue a warning and disable the respective
967 features.
968
969 The following packages are neccessary for certain features of \code{texpower}:
970 \begin{description}
971 \item[\present{package: \code{hyperref}}]\indexfile{hyperref}{package}
972 is neccessary for page transition effects to work (see section
973 \ref{Sec:PageTrans}).
974
975 In particular, the \macroname{pageDuration} (see section \ref{Sec:PageDuration}) command only works if the version of
976 hyperref loaded is at least v6.70a (where the \code{pdfpageduration} key was introduced).
977
978 Commands which work only when \code{hyperref} is loaded are marked with \textbf{\textsf{h}} in the description.
979
980 \newslide
981
982 \item[\present{package: \code{soul}}]\indexfile{soul}{package}
983 is neccessary for the implementation of the commands \macroname{hidetext} and
984 \macroname{highlighttext} (see section \ref{Sec:displaycustom}).
985
986 Commands which work only when \code{soul} is loaded are marked with \textbf{\textsf{s}} in the description.
987 \end{description}
988
989 \newslide
990
991 \subsection{What else is part of the \TeX Power bundle?}
992 Besides the package \code{texpower} (which is described here), there are four
993 more packages, \code{tpslifonts}, \code{fixseminar}, \code{automata} and
994 \code{tplists}, and one document class, \code{powersem}, in the \TeX Power bundle.
995 Except for \code{tpslifonts} and \code{tplists} these files have no documentation
996 of their own. They will be described in this section until they are turned
997 into \code{dtx} files producing their own documentation.
998
999 See the file \code{00readme.txt} which is part of the \TeX Power bundle for a short description of all files.
1000
1001 \newslide
1002
1003 \minisec{The document class \code{powersem}}\indexfile{powersem}{class}
1004 This is planned to provide a more `modern' version of \code{seminar} which can be used for creating dynamic
1005 presentations.
1006
1007 Currently, this document class doesn't do much more than load \code{seminar} and apply some fixes, but it is planned to
1008 add some presentation-specific features (like navigation panels).
1009
1010 \newslide
1011
1012 There are three new options which are specific for \code{powersem}, all other options are passed to \code{seminar}:
1013 \begin{description}
1014 \item[\present{option: \code{display}}]\indexpckopt{powersem}{display}
1015 Turns off all features of \code{seminar} (notes, vertical centering of slides)
1016 which can disturb dynamic presentations.
1017
1018 \item[\present{option: \code{calcdimensions}}]\indexpckopt{powersem}{calcdimensions}
1019 \code{seminar} automatically calculates the slide dimensions
1020 \macroname{slidewidth} and \macroname{slideheight} only for the default \code{letter} and for its own option
1021 \code{a4}. For all the other paper sizes which are possible with the \code{KOMA} option, the slide dimensions are not
1022 calculated automatically.
1023
1024 The \code{calcdimensions} option makes \code{powersem} calculate the slide dimensions automatically from paper size
1025 and margins.
1026
1027 \newslide
1028
1029 \item[\present{option: \code{truepagenumbers}}]\indexpckopt{powersem}{truepagenumbers}
1030 The truepagenumbers option makes powersem count pages with the counter page, independently of the counter slide. This
1031 enables proper working of TeXPowers navigation buttons (some of which calculate relative page numbers) even when the
1032 counter slide is reset frequently (for slide numberings of the type \verb|<l>.<n>.<m>|).
1033
1034 \item[\present{option: \code{KOMA}}]\indexpckopt{powersem}{KOMA} Makes
1035 \code{seminar} load \code{scrartcl} (from the KOMA-Script bundle) instead of
1036 \code{article} as its base class. All new features of \code{scrartcl} are then available also for slides.
1037
1038 \item[\present{option: \code{UseBaseClass}}]\indexpckopt{powersem}{UseBaseClass}
1039 Makes \code{seminar} load the class \macroname{baseclass} (initially \code{article}) instead of
1040 \code{article} as its base class.
1041
1042 \item[\present{option: \code{reportclass}}]\indexpckopt{powersem}{reportclass}
1043 Makes \code{seminar} load the class \macroname{baseclass} (initially \code{report}) instead of
1044 \code{article}.
1045
1046 \item[\present{option: \code{bookclass}}]\indexpckopt{powersem}{bookclass}
1047 Makes \code{seminar} load the class \macroname{baseclass} (initially \code{book}) instead of
1048 \code{article}.
1049
1050 \end{description}
1051
1052 There is one change in \code{powersem} which will lead to incompatibilities with \code{seminar}. \code{seminar} has the
1053 unfortunate custom of \emph{not} exchanging \macroname{paperwidth} and \macroname{paperheight} when making landscape
1054 slides, as for instance \code{typearea} and \code{geometry} do.
1055
1056 This leads to problems with setting the paper size for \code{pdf} files, as done for instance by the \code{hyperref}
1057 package.
1058
1059 \code{powersem} effectively turns off \code{seminar}'s papersize management and leaves this to the base class (with the
1060 pleasant side effect that you can use e.\,g.\ \commandapp[KOMA,a0paper]{documentclass}{powersem} for making posters).
1061
1062 In consequence, the \code{portrait} option of \code{seminar} is turned on by \code{powersem} to avoid confusing
1063 \code{seminar}. You have to explicitly use the \code{landscape} option (and a base class or package which understands
1064 this option) to get landscape slides with powersem.
1065
1066 \newslide
1067
1068 \minisec{The package \code{fixseminar}}\indexfile{fixseminar}{package}
1069 Unfortunately, there are some fixes to seminar which can \emph{not} be applied in \code{powersem} because they have to
1070 be applied after \code{hyperref} is loaded (if this package should be loaded).
1071
1072 The package \code{fixseminar} applies these fixes, so this package should be loaded after \code{hyperref} (if
1073 \code{hyperref} is loaded at all, otherwise \code{fixseminar} can be loaded anywhere in the preamble).
1074
1075 \newslide
1076
1077 It applies two fixes:
1078 \begin{itemize}
1079 \item In case \code{pdflatex} is being run, the lengths \macroname{pdfpageheight} and \macroname{pdfpagewidth} have to
1080 be set in a `magnification-sensitive' way.
1081
1082 \item \code{hyperref} introduces some code at the beginning of every page which can produce spurious vertical space,
1083 which in turn disturbs building dynamic pages. This code is `fixed' so it cannot produce vertical space.
1084 \end{itemize}
1085
1086 \newslide
1087
1088 \minisec{The package \code{tpslifonts}}
1089 \indexfile{tpslifonts}{package}\label{Sec:TPslifonts}
1090 Presentations to be displayed `online' with a video beamer have special needs concerning font configuration owing to low
1091 `screen' resolution and bad contrast caused by possibly bad light conditions combined with color highlighting.
1092
1093 This package tries to cater to these needs by offering a holistic configuration of all document fonts, including text,
1094 typewriter, and math fonts. Special features are `smooth scaling' of Type1 fonts and careful design size selection for
1095 optimal readability.
1096
1097 \newslide
1098
1099 For more information on package options and used fonts (and on implementation) read the documentation coming with the
1100 package - check the \code{tpslifonts} directory.
1101
1102 \minisec{The package \code{automata}}\indexfile{automata}{package}
1103 Experimental package for drawing automata in the sense of theoretical computer
1104 science (using PSTricks) and animating them with TeXPower. Only DFA and Mealy
1105 automata are supported so far.
1106
1107 \newslide
1108
1109 \minisec{The package \code{tplists}}\indexfile{tplists}{package}
1110 Experimental package providing easy dynamic lists. Currently there are stepped, flipped and dimmed versions of itemize
1111 and enumerate (and corresponding lists from the \code{eqlist} and \code{paralist} package). For more information
1112 and an example, compile (and then read) the file \code{tplists.dtx}.
1113
1114 \newslide
1115
1116 %-----------------------------------------------------------------------------------------------------------------
1117 %
1118 \section{The \macroname{pause} command}\label{Sec:pause}
1119 \present{\macroname{pause}}\indexmacro{pause} is derived from the \macroname{pause} command from the package
1120 \href{http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4/pp4sty.zip}{\code{texpause}} which is part of the
1121 \href{http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4/}{PPower4 suite} by
1122 \href{mailto:[email protected]}{Klaus Guntermann}.
1123
1124 It will ship out the current page, start a new page and copy whatever was on the current page onto the new page, where
1125 typesetting is resumed.
1126
1127 \ifthenelse{\boolean{display}}{Here, let's do a little demo\pause}{}
1128
1129 This will create the effect of a \concept{pause} in the presentation, i.\,e.\ the presentation stops because the
1130 current page ends at the point where the \macroname{pause} command occurred and is resumed at this point when the
1131 presenter switches to the next page.
1132
1133 \newslide
1134
1135 \minisec{Things to pay attention to}
1136 \begin{enumerate}
1137 \item \macroname{pause} should appear in \concept{vertical mode} only, i.\,e.\ between paragraphs or at places where
1138 ending the current paragraph doesn't hurt.
1139
1140 \item This means \macroname{pause} is forbidden in all \concept{boxed} material (including \code{tabular}),
1141 \concept{headers/footers}, and \concept{floats}.
1142
1143 \item \macroname{pause} shouldn't appear either in environments which have to be \emph{closed} to work properly, like
1144 \code{picture}, \code{tabbing}, and (unfortunately) environments for \concept{aligned math formulas}.
1145
1146 \item \macroname{pause} does work in all environments which mainly influence paragraph formatting, like \code{center},
1147 \code{quote} or all \concept{list} environments.
1148
1149 \newslide
1150
1151 \item \macroname{pause} doesn't really have problems with automatic page breaking, but beware of \emph{overfull}
1152 pages/slides. In this case, it may occur that only the last page(s)/slide(s) of a sequence are overfull, which
1153 changes vertical spacing, making lines `wobble' when switching to the last page/slide of a sequence.
1154
1155 \newslide
1156
1157 \item The duplication of page material done by \macroname{pause} can lead to unwanted side effects. See section
1158 \ref{Sec:Dupl} for further explanations. In particular, if you should experience strange color switches when using
1159 \macroname{pause} (and you are \underl{not} using \code{pdftex}), turn on color stack correction with the option
1160 \code{fixcolorstack}. In addition you should be aware of \macroname{pausesafecounter}, see section
1161 \ref{Sec:MiscCmd}.
1162
1163 \end{enumerate}
1164
1165 A lot of the restrictions for the use of pause can be avoided by using \macroname{stepwise} (see next section).
1166
1167 \newslide
1168
1169 %-----------------------------------------------------------------------------------------------------------------
1170 %
1171 \section{The \macroname{stepwise} command}
1172 \present{\commandapp{stepwise}{\carg{contents}}}\indexmacro{stepwise} is a command for displaying some part of a \LaTeX{} document (which
1173 is contained in \carg{contents}) `step by step'. As of itself, \macroname{stepwise} doesn't do very much. If
1174 \carg{contents} contains one or more constructs of the form \present{\commandapp{step}{\carg{stepcontents}}}\indexmacro{step}, the
1175 following happens:
1176 \begin{enumerate}
1177 \item The current contents of the page are saved (as with \macroname{pause}).
1178
1179 \item As many pages as there are \macroname{step} commands in \carg{contents} are produced.
1180
1181 Every page starts with what was on the current page when \macroname{stepwise} started.
1182
1183 \newslide
1184
1185 The first page also contains everything in \carg{contents} which is \emph{not} in \carg{stepcontents} for any
1186 \macroname{step} command.
1187
1188 The second page additionally contains the \carg{stepcontents} for the \emph{first} \macroname{step} command, and so
1189 on, until all \carg{stepcontents} are displayed.
1190
1191 \item When all \carg{stepcontents} are displayed, \macroname{stepwise} ends and typesetting is resumed (still on the
1192 current page).
1193 \end{enumerate}
1194
1195 \parstepwise{This will create the effect that the \macroname{step} commands are executed `\step{step} \step{by}
1196 \step{step}'.}
1197
1198 \newslide
1199
1200 \minisec{Things to pay attention to}
1201 \begin{enumerate}
1202 \item \macroname{stepwise} should appear in \concept{vertical mode} only, i.\,e.\ between paragraphs, just like
1203 \macroname{pause}.
1204
1205 \item Don't put \macroname{pause} or nested occurrences of \macroname{stepwise} into \carg{contents}.
1206
1207 \item Structures where \macroname{pause} does not work (like \code{tabular} or aligned equations) can go
1208 \emph{completely} into \carg{contents}, where \macroname{step} can be used freely (see \nameref{Sec:Ex}).
1209
1210 \item As \carg{contents} is read as a macro argument, constructs involving \concept{catcode} changes (like
1211 \macroname{verb} or language switches) won't work in \carg{contents} \textbf{unless} you use the
1212 \code{fragilesteps} environment (\ref{Sec:fragilesteps}).
1213
1214 \newslide
1215
1216 \item Several instances of \macroname{stepwise} may occur on one page, also combined with \macroname{pause} (outside
1217 of \carg{contents}).
1218
1219 But beware of page breaks in \carg{contents}. This will really mess things up.
1220
1221 Overfull pages/slides are also a problem, just like with \macroname{pause}. See the description of \macroname{pause}
1222 (section \ref{Sec:pause}) concerning this and also concerning side effects of duplicating page material.
1223
1224 \item \macroname{step} can go in \carg{stepcontents}. The order of execution of \macroname{step} commands is just the
1225 order in which they appear in \carg{contents}, independent of nesting within each other.
1226
1227 \newslide
1228
1229 \item As \carg{contents} is executed several times, \LaTeX{} constructs changing \concept{global counters}, accessing
1230 \concept{files} etc.\ are problematic. This concerns sections, numbered equations, labels, hyperlinks and the like.
1231
1232 Counters are taken care of explicitly by \macroname{stepwise}, so equation numbers are no problem.
1233
1234 Commands accessing toc files and such (like \macroname{section}) are taken care of by the whatsit suppression
1235 mechanism (compare section \ref{Sec:Dupl}).
1236 \end{enumerate}
1237
1238 \newslide
1239
1240 \subsection{\code{fragilesteps} environment}\label{Sec:fragilesteps}%
1241
1242 The \code{fragilesteps}\indexcode{fragilesteps} environment is a wrapper around \macroname{stepwise}
1243 that makes it possible to use verbatim. The code for this environment is based on similar code from beamer - an
1244 excellent presentation class written by Till Tantau - thanks! Using the \code{fragilesteps} environment
1245 enables the use of the \code{listings} package to display code line by line. There are some examples in
1246 \code{verbexample.tex}.
1247
1248 \newslide
1249
1250 \subsection{\macroname{boxedsteps} and \macroname{nonboxedsteps}}\label{Sec:boxedsteps}%
1251 By default, \carg{stepcontents} belonging to a \macroname{step} which is not yet `active' are ignored altogether. This
1252 makes it possible to include e.\,g.\ tabulators \code{\&} or line breaks into \carg{stepcontents} without breaking
1253 anything.
1254
1255 Sometimes, however, this behaviour is undesirable, for instance when stepping through an equation `from outer to
1256 inner', or when filling in blanks in a paragraph. Then, the desired behaviour of a \macroname{step} which is not yet
1257 `active' is to create an appropriate amount of \emph{blank space} where \carg{stepcontents} can go as soon as it is
1258 activated.
1259
1260 \newslide
1261
1262 The simplest and most robust way of doing this is to create an empty box (aka \macroname{phantom}) with the same
1263 dimensions as the text to be hidden.
1264
1265 This behaviour is toggled by the following commands. See section \ref{Sec:displaycustom} for more sophisticated
1266 (albeit more fragile) variants.
1267 \begin{description}
1268 \item[\present{\macroname{boxedsteps}}]\indexmacro{boxedsteps} makes \macroname{step} create a blank box the size of \carg{stepcontents} when
1269 inactive and put \carg{stepcontents} into a box when active.
1270 \item[\present{\macroname{nonboxedsteps}}]\indexmacro{nonboxedsteps} makes \macroname{step} ignore \carg{stepcontents} when inactive and leave
1271 \carg{stepcontents} alone when active (default).
1272 \end{description}
1273
1274 \newslide
1275
1276 \minisec{Things to pay attention to}
1277 \begin{enumerate}
1278 \item The settings effected by \macroname{boxedsteps} and \macroname{nonboxedsteps} are \emph{local}, i.\,e.\ whenever
1279 a group closes, the setting is restored to its previous value.
1280
1281 \item Putting stuff into boxes can break things like tabulators (\code{\&}). It can also mess up math spacing, which
1282 then has to be corrected manually. Compare the following examples:
1283
1284 \parstepwise{%
1285 \begin{displaymath}
1286 \left(\frac{a+b}{c}\right)\qquad\left(\frac{a\step{+b}}{c}\right)\qquad\left(\frac{a\restep{{}+b}}{c}\right)
1287 \end{displaymath}%
1288 }%
1289 \end{enumerate}
1290
1291 \newslide
1292
1293 \subsection{Custom versions of \macroname{stepwise}}%
1294 Sometimes, it might happen that vertical spacing is different on every page of a sequence generated by
1295 \macroname{stepwise}, making lines `wobble'. This is usually fixed if you use \macroname{liststepwise} or
1296 \macroname{parstepwise} (described below) in stead of \macroname{stepwise}.
1297
1298 \newslide
1299
1300 There are two custom versions of \macroname{stepwise} which should produce better vertical spacing.
1301 \begin{description}
1302 \item[\present{\commandapp{liststepwise}{\carg{contents}}}]
1303 \indexmacro{liststepwise} works exactly like \macroname{stepwise}, but adds
1304 an `invisible rule' before \carg{contents}. Use for list environments and
1305 aligned equations.
1306 \item[\present{\commandapp{parstepwise}{\carg{contents}}}]
1307 \indexmacro{parstepwise} works like \macroname{liststepwise}, but
1308 \macroname{boxedsteps} is turned on by default. Use for texts where
1309 \macroname{step}s are to be filled into blank spaces.
1310 \end{description}
1311
1312 \newslide
1313
1314 \subsection{Starred versions of \macroname{stepwise} commands}\label{Sec:StarredStepwise}%
1315 Usually, the first page of a sequence produced contains \emph{only} material which is \emph{not} part of any
1316 \carg{stepcontents}. The first \carg{stepcontents} are displayed on the second page of the sequence.
1317
1318 For special effects (see example \ref{Sec:Exhl}), it might be desirable to have the first \carg{stepcontents} active
1319 even on the first page of the sequence.
1320
1321 All variants of \macroname{stepwise} have a starred version (e.\,g.\ \macroname{stepwise*}) which does exactly that.
1322
1323 \newslide
1324
1325 \subsection{The optional argument of \macroname{stepwise}}%
1326 Every variant of \macroname{stepwise} takes an optional argument, like this
1327 \begin{center}
1328 \present{\commandapp[\carg{settings}]{stepwise}{\carg{contents}}}.
1329 \end{center}
1330 \carg{settings} will be placed right before the internal loop which produces the sequence of pages. It can
1331 contain settings of parameters which modify the behaviour of \macroname{stepwise} or \macroname{step}. \carg{settings}
1332 is placed inside a group so all changes are local to this call of \macroname{stepwise}.
1333
1334 Some internal macros and counters which can be adjusted are explained in the following.
1335
1336 \newslide
1337
1338 \subsection{Customizing the way \carg{stepcontents} is diplayed}\label{Sec:displaycustom}%
1339 Internally, there are three macros (taking one argument each) which control how \carg{stepcontents} is displayed:
1340 \macroname{displaystepcontents}\indexmacro{displaystepcontents},
1341 \macroname{hidestepcontents}\indexmacro{hidestepcontents}, and
1342 \macroname{activatestep}\indexmacro{activatestep}. Virtually, every
1343 \commandapp{step}{\carg{stepcontents}} is replaced by
1344 \begin{description}
1345 \item[\present{\commandapp{hidestepcontents}{\carg{stepcontents}}}]\mbox{}\\ when this step is not yet active.
1346 \item[\present{\commandapp{displaystepcontents}{\commandapp{activatestep}{\carg{stepcontents}}}}] when this step is
1347 activated \emph{for the first time}.
1348 \item[\present{\commandapp{displaystepcontents}{\carg{stepcontents}}}]\mbox{}\\
1349 when this step has been activated before.
1350 \end{description}
1351
1352 By redefining these macros, the behaviour of \macroname{step} is changed accordingly. You can redefine them inside
1353 \carg{contents} to provide a change affecting one \macroname{step} only, or in the optional argument of
1354 \macroname{stepwise} to provide a change for all \macroname{step}s inside \carg{contents}.
1355
1356 In the \nameref{Sec:Ex}, it is demonstrated how special effects can be achieved by redefining these macros.
1357
1358 \macroname{activatestep} is set to \macroname{displayidentical} by default, the default settings of
1359 \macroname{hidestepcontents} and \macroname{displaystepcontents} depend on whether \macroname{boxedsteps} or
1360 \macroname{nonboxedsteps} (default) is used.
1361
1362 \newslide
1363
1364 \code{texpower} offers nine standard definitions.
1365
1366 For interpreting \macroname{displaystepcontents}:
1367 \begin{description}
1368 \item[\present{\macroname{displayidentical}}]\indexmacro{displayidentical}
1369 Simply expands to its argument. The same as \LaTeX s
1370 \macroname{@ident}. Used by \macroname{nonboxedsteps} (default).
1371
1372 \item[\present{\macroname{displayboxed}}]\indexmacro{displayboxed}
1373 Expands to an \macroname{mbox} containing its argument. Used by
1374 \macroname{boxedsteps}.
1375 \end{description}
1376
1377 \newslide
1378
1379 For interpreting \macroname{hidestepcontents}:
1380 \begin{description}
1381 \item[\present{\macroname{hideignore}}]\indexmacro{hideignore}
1382 Expands to nothing. The same as \LaTeX s \macroname{@gobble}. Used by
1383 \macroname{nonboxedsteps} (default).
1384
1385 \item[\present{\macroname{hidephantom}}]\indexmacro{hidephantom}
1386 Expands to a \macroname{phantom} containing its argument. Used by
1387 \macroname{boxedsteps}.
1388
1389 \item[\present{\macroname{hidevanish}}]\indexmacro{hidevanish}
1390 In a colored document, makes its argument `vanish' by setting all colors to
1391 \macroname{vanishcolor} (defaults to \code{pagecolor}; compare section
1392 \ref{Sec:Colorcommands}). Note that this will give weird results with
1393 structures backgrounds.
1394
1395 For monochrome documents, there is no useful interpretation for this command, so it is disabled.
1396
1397 \newslide
1398
1399 \item[{\present[s]{\macroname{hidetext}}}]\indexmacro{hidetext}
1400 Produces blank space of the same dimensions as the space that would be
1401 occupied if its argument would be typeset in the current paragraph. Respects automatic hyphenation and line breaks.
1402
1403 This command needs the \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/soul.html}{\code{soul}} package
1404 to work, which is not loaded by \code{texpower} itself. Consult the documentation of
1405 \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/soul.html}{\code{soul}} concerning restrictions on
1406 commands implemented using \code{soul}. If you don't load the \code{soul} package yourself, there is no useful
1407 definition for this command, so it defaults to \macroname{hidephantom}.
1408
1409 \newslide
1410
1411 \item[\present{\macroname{hidedimmed}}]\indexmacro{hidedimmed}
1412 In a colored document, displays its argument with dimmed colors (compare
1413 section \ref{Sec:Colors}). Note that this doesn't make the argument completely invisible.
1414
1415 For monochrome documents, there is no useful interpretation for this command, so it is disabled.
1416 \end{description}
1417
1418 \newslide
1419
1420 For interpreting \macroname{activatestep}:
1421 \begin{description}
1422 \item[\present{\macroname{highlightboxed}}]\indexmacro{highlightboxed}
1423 If the \code{colorhighlight} option (see section \ref{Sec:ColorEmphasis})
1424 is set, expands to a \highlightboxed{box with colored background} containing its argument. Otherwise, expands to an
1425 \macroname{fbox} containing its argument. It is made sure that the resulting box has the same dimensions as the
1426 argument (the outer frame may overlap surrounding text).
1427
1428 There is a new length register \present{\macroname{highlightboxsep}}
1429 \indexmacro{highlightboxsep} which acts like \macroname{fboxsep} for the
1430 resulting box and defaults to \code{0.5\macroname{fboxsep}}.
1431
1432 \newslide
1433
1434 \item[{\present[s]{\macroname{highlighttext}}}]\indexmacro{highlighttext}
1435 If the \code{colorhighlight} option (see section \ref{Sec:ColorEmphasis})
1436 is set, puts its argument \highlighttext{on colored background}. Otherwise, underlines its
1437 argument. It is made sure that the resulting text has the same dimensions as the argument (the outer frame may
1438 overlap surrounding text).
1439
1440 \present{\macroname{highlightboxsep}} is used to determine the extent of the coloured box(es) used as background.
1441
1442 This command needs the \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/soul.html}{\code{soul}} package
1443 to work (compare the description of \macroname{hidetext}). If you don't load the \code{soul} package yourself, there
1444 is no useful definition for this command, so it is disabled.
1445
1446 \newslide
1447
1448 \item[\present{\macroname{highlightenhanced}}]\indexmacro{highlightenhanced}
1449 In a colored document, displays its argument \highlightenhanced{with
1450 enhanced colors} (compare section \ref{Sec:Colors}).
1451
1452 For monochrome documents, there is no useful interpretation for this command, so it is disabled.
1453 \end{description}
1454
1455 \newslide
1456
1457 \subsection{Variants of \macroname{step}}
1458 There are a couple of custom versions of \macroname{step} which make it easier to achieve special effects needed
1459 frequently.
1460 \begin{description}
1461 \item[\present{\macroname{bstep}}]\indexmacro{bstep}
1462 Like \macroname{step}, but is \emph{always} boxed (see section
1463 \ref{Sec:boxedsteps}). \commandapp{bstep}{\carg{stepcontents}} is
1464 implemented in principle as
1465 \code{\{\macroname{boxedsteps}\commandapp{step}{\carg{stepcontents}}\}}.
1466
1467 In aligned equations where \macroname{stepwise} is used for being able to put tabulators into \carg{stepcontents},
1468 but where nested occurrences of \macroname{step} should be boxed to assure correct sizes of growing braces or such,
1469 this variant of \macroname{step} is more convenient than using \macroname{boxedsteps} for every nested occurrence
1470 of \macroname{step}.
1471
1472 \item[\present{\commandapp{switch}{\carg{ifinactive}\}\{\carg{ifactive}}}]
1473 \indexmacro{switch} is a variant of \macroname{step} which,
1474 instead of making its argument appear, switches between \carg{ifinactive}
1475 and \carg{ifactive} when activated.
1476
1477 In fact, \commandapp{step}{\carg{stepcontents}} is in principle implemented by
1478 \begin{tabbing}
1479 \macroname{switch}\=\code{\{\commandapp{hidestepcontents}{\carg{stepcontents}}\}}\\
1480 \>\code{\{\commandapp{displaystepcontents}{\carg{stepcontents}}\}}
1481 \end{tabbing}
1482
1483 This command can be used, for instance, to add an \macroname{underbrace} to a formula, which is difficult using
1484 \macroname{step}.
1485
1486 Beware of problems when \carg{ifinactive} and \carg{ifactive} have different dimensions.
1487
1488 \newslide
1489
1490 \item[\present{\macroname{dstep}}]\indexmacro{dstep}
1491 A variant of \macroname{step} which takes \underl{no} argument, but simply
1492 switches colors to `dimmed' (compare section \ref{Sec:Colors}) if not
1493 active. Not that the scope of this color change will
1494 last until the next outer group closes. This command does nothing in a monochrome document.
1495
1496 \item[\present{\macroname{vstep}}]\indexmacro{vstep}
1497 A variant of \macroname{step} which takes \underl{no} argument, but simply
1498 switches all colors to \macroname{vanishcolor} (defaults to
1499 \code{pagecolor}; compare section \ref{Sec:Colorcommands}) if not
1500 active. Not that the scope of this color change will last until the next outer group closes. This command does
1501 nothing in a monochrome document.
1502
1503 \item[\present{\macroname{steponce}}]\indexmacro{steponce}
1504 % \steponce[<activatefirst>]{<stepcontents>}
1505 Like \macroname{step}, but goes inactive again in the subsequent step.
1506
1507 \item[\present{\macroname{multistep}}]\indexmacro{multistep}
1508 is a shorthand macro for executing several steps successively. In
1509 fact, it would better be called \macroname{multiswitch}, because it's
1510 functionality is based on \macroname{switch}, it only acts like a
1511 (simplified) \macroname{step} command which is executed `several times'.
1512 The syntax is
1513 \begin{center}
1514 \commandapp[\carg{activatefirst}]{multistep}{\carg{n}\}\{\carg{stepcontents}}
1515 \end{center}
1516 where \carg{n} is the number of steps. Only one instance of
1517 \carg{stepcontents} is displayed at a time. Inside \carg{stepcontents}, a
1518 counter \code{substep} can be evaluated which tells the number of the
1519 current instance. In the starred form the last instance of
1520 \carg{stepcontents} stays visible.
1521
1522 \item[\present{\macroname{movie}}]\indexmacro{movie}
1523 works like \macroname{multistep}, but between \macroname{steps}, pages are
1524 advanced automatically every \carg{dur} seconds. The syntax is
1525 \begin{center}
1526 \commandapp{movie}{\carg{n}\}\{\carg{dur}\}[\carg{stop}]\{\carg{stepcontents}}
1527 \end{center}
1528 where \carg{n} is the number of steps. The additional optional argument
1529 \carg{stop} gives the code (default: \macroname{stopAdvancing})
1530 \indexmacro{stopAdvancing} which stops the animation.
1531 (\macroname{movie} accepts the same first optional argument as
1532 \macroname{multistep} but it was left out above.)
1533
1534
1535 \item[\present{\macroname{overlays}}]\indexmacro{overlays}
1536 is another shorthand macro for executing several steps successively. In
1537 contrast to \macroname{multistep}, it doesn't print things \emph{after}
1538 each other, but \emph{over} each other. The syntax is
1539 \begin{center}
1540 \commandapp[\carg{activatefirst}]{overlays}{\carg{n}\}\{\carg{stepcontents}}
1541 \end{center}
1542 where \carg{n} is the number of steps. Inside \carg{stepcontents}, a
1543 counter \code{substep} can be evaluated which tells the number of the
1544 current instance.
1545 \newslide
1546
1547 \item[\small%
1548 \present{\macroname{restep}}\indexmacro{restep},
1549 \present{\macroname{rebstep}}\indexmacro{rebstep},
1550 \present{\macroname{reswitch}}\indexmacro{reswitch},
1551 \present{\macroname{redstep}}\indexmacro{redstep},
1552 \present{\macroname{revstep}}\indexmacro{revstep}.]\mbox{}\\
1553 Frequently, it is desirable for two or more steps to appear at the same
1554 time, for instance to fill in arguments at
1555 several places in a formula at once (see example \ref{Sec:ExEq}).
1556
1557 \present{\commandapp{restep}{\carg{stepcontents}}} is identical with \commandapp{step}{\carg{stepcontents}}, but is
1558 activated at the same time as the previous occurrence of \macroname{step}.
1559
1560 \present{\macroname{rebstep}}, \present{\macroname{reswitch}}, \present{\macroname{redstep}}, and
1561 \present{\macroname{revstep}} do the same for \macroname{bstep}, \macroname{switch}, \macroname{dstep}, and
1562 \macroname{vstep}.
1563 \end{description}
1564
1565 \newslide
1566
1567 \subsection{Optional arguments of \macroname{step}}%
1568 Sometimes, letting two \macroname{step}s appear at the same time (with \macroname{restep}) is not the only desirable
1569 modification of the order in which \macroname{step}s appear. \macroname{step}, \macroname{bstep} and
1570 \macroname{switch} take two optional arguments for influencing the mode of activation, like this:
1571 \begin{center}
1572 \present{\commandapp[{\carg{activatefirst}][\carg{whenactive}}]{step}{\carg{stepcontents}}}.
1573 \end{center}
1574 Both \carg{activatefirst} and \carg{whenactive} should be conditions in the syntax of the \macroname{ifthenelse}
1575 command (see the documentation of the
1576 \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/ifthen.html}{\code{ifthen}} package for details).
1577
1578 \newslide
1579
1580 \present{\carg{activatefirst}} checks whether this \macroname{step} is to be activated \emph{for the first time}. The
1581 default value is \present{\commandapp{value}{step}=\commandapp{value}{stepcommand}} (see section \ref{Sec:Internals}
1582 for a list of internal values). By using \commandapp{value}{step}=\carg{$n$}, this \macroname{step} can be forced to
1583 appear as the $n$th one. See example \ref{Sec:ExPar} for a demonstration of how this can be used to make
1584 \macroname{step}s appear in arbitrary order.
1585
1586 \present{\carg{whenactive}} checks whether this \macroname{step} is to be considered active \emph{at all}. The default
1587 behaviour is to check whether this \macroname{step} has been activated before (this is saved internally for every
1588 step). See example \ref{Sec:ExFooling} for a demonstration of how this can be used to make \macroname{step}s appear
1589 and disappear after a defined fashion.
1590
1591 \minisec{If you know what you're doing\dots}
1592 Both optional arguments allow two syntctical forms:
1593 \begin{enumerate}
1594 \item enclosed in square brackets \code{[]} like explained above.
1595 \item enclosed in braces \code{()}. In this case, \carg{activatefirst} and \carg{whenactive} are \emph{not} treated as
1596 conditions in the sense of \macroname{ifthenelse}, but as conditionals like those used internally by \LaTeX. That
1597 means, \carg{activatefirst} (when enclosed in braces) can contain arbitrary \TeX{} code which then takes two
1598 arguments and expands to one of them, depending on whether the condition is fulfilled or not fulfilled. For
1599 instance, \commandapp[{\carg{activatefirst}}]{step}{\carg{stepcontents}} could be replaced by
1600 \macroname{step}\code{(\commandapp{ifthenelse}{\carg{activatefirst}})\{\carg{stepcontents}\}}.
1601
1602 See example \ref{Sec:ExBackwards} for a simple application of this syntax.
1603 \end{enumerate}
1604
1605 Internally, the default for the treatment of \carg{whenactive} is \code{(\macroname{if@first@TP@true})}, where
1606 \macroname{if@first@TP@true} is an internal condition checking whether this \macroname{step} has been activated before.
1607
1608 \newslide
1609
1610 \subsection{Finding out what's going on}\label{Sec:Internals}%
1611 Inside \carg{settings} and \carg{contents}, you can refer to the following internal state variables which provide
1612 information about the current state of the process executed by \macroname{stepwise}:
1613 \begin{description}
1614 \item[\present{counter: \code{firststep}}]
1615 \indexstepwise{firststep}{counter}
1616 The number from which to start counting steps (see counter \code{step}
1617 below). Is $0$ by default and $1$ for starred versions (section \ref{Sec:StarredStepwise}) of \macroname{stepwise}.
1618 You can set this in \carg{settings} for special effects (see example \ref{Sec:ExBackwards}).
1619
1620 \item[\present{counter: \code{totalsteps}}]
1621 \indexstepwise{totalsteps}{counter}
1622 The total number of \macroname{step} commands occurring in \carg{contents}.
1623
1624 \newslide
1625
1626 \item[\present{counter: \code{step}}]
1627 \indexstepwise{step}{counter}
1628 The number of the current iteration, i.\,e.\ the number of the current page in
1629 the sequence of pages produced by \macroname{stepwise}. Runs from \commandapp{value}{firststep} to
1630 \commandapp{value}{totalsteps}.
1631
1632 \item[\present{counter: \code{stepcommand}}]
1633 \indexstepwise{stepcommand}{counter}
1634 The number of the \macroname{step} command currently being executed.
1635
1636 \item[\present{boolean: \code{firstactivation}}]
1637 \indexstepwise{firstactivation}{boolean}
1638 \code{true} if this \macroname{step} is active for the first time,
1639 \code{false} otherwise.
1640
1641 \item[\present{boolean: \code{active}}]\indexstepwise{active}{boolean}
1642 \code{true} if this \macroname{step} is currently active, \code{false}
1643 otherwise.
1644 \end{description}
1645 \code{stepcommand}, \code{firstactivation}, and \code{active} are useful only inside \carg{stepcontents}.
1646
1647
1648 \newslide
1649
1650 \subsection{\macroname{afterstep}}\indexmacro{afterstep}%
1651 It might be neccessary to set some parameters which affect the appearance of the \emph{page} (like page transitions)
1652 inside \carg{stepcontents}. However, the \macroname{step} commands are usually placed deeply inside some structure, so
1653 that all \emph{local} settings are likely to be undone by groups closing before the page is completed.
1654
1655 \present{\commandapp{afterstep}{\carg{settings}}} puts \carg{settings} right before the end of the page, after the
1656 current step is performed.
1657
1658 \newslide
1659
1660 \minisec{Things to pay attention to}
1661 \begin{enumerate}
1662 \item There can be only one effective value for \carg{settings}. Every occurrence of \macroname{afterstep} overwrites
1663 this value globally.
1664
1665 \item \macroname{afterstep} will \emph{not} be executed in \carg{stepcontents} if the corresponding \macroname{step}
1666 is not active, even if \carg{stepcontents} is displayed owing to a redefinition of \macroname{hidestepcontents},
1667 like in example \ref{Sec:Exhl}.
1668
1669 \item As \carg{settings} is put immediately before the page break, there is no means of restoring the original value
1670 of whatever has been set. So if you set something via \macroname{afterstep} and want it to be reset in some later
1671 step, you have to reset it explicitly with another call of \macroname{afterstep}.
1672 \end{enumerate}
1673
1674 \newslide
1675
1676 %-----------------------------------------------------------------------------------------------------------------
1677 %
1678 \section{Page transitions and automatic advancing}\label{Sec:PageTrans}
1679 \subsection{Page transitions}
1680 I am indepted to \href{mailto:[email protected]}{\name{Marc van Dongen}} for allowing me to include a suite of commands
1681 written by him and posted to the \href{http://www-sp.iti.informatik.tu-darmstadt.de/software/ppower4/}{PPower4}
1682 mailing list which set page transitions (using
1683 \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/hyperref.html}{\code{hyperref}s} \macroname{hypersetup}).
1684
1685 These commands work only if the \code{hyperref} package is loaded.
1686
1687 \newslide
1688
1689 The following page transition commands are defined:\pause
1690 \begin{description}
1691 \item[{\present[h]{\macroname{pageTransitionSplitHO}}}]
1692 \indexmacro{pageTransitionSplitHO}
1693 Split Horizontally to the outside. \pageTransitionSplitHO\pause
1694
1695 \item[{\present[h]{\macroname{pageTransitionSplitHI}}}]
1696 \indexmacro{pageTransitionSplitHI}
1697 Split Horizontally to the inside. \pageTransitionSplitHI\pause
1698
1699 \item[{\present[h]{\macroname{pageTransitionSplitVO}}}]
1700 \indexmacro{pageTransitionSplitVO}
1701 Split Vertically to the outside. \pageTransitionSplitVO\pause
1702
1703 \item[{\present[h]{\macroname{pageTransitionSplitVI}}}]
1704 \indexmacro{pageTransitionSplitVI}
1705 Split Vertically to the inside. \pageTransitionSplitVI\pause
1706
1707 \item[{\present[h]{\macroname{pageTransitionBlindsH}}}]
1708 \indexmacro{pageTransitionBlindsH}
1709 Horizontal Blinds. \pageTransitionBlindsH\pause
1710
1711 \item[{\present[h]{\macroname{pageTransitionBlindsV}}}]
1712 \indexmacro{pageTransitionBlindsV}
1713 Vertical Blinds. \pageTransitionBlindsV
1714
1715 \newslide
1716
1717 \item[{\present[h]{\macroname{pageTransitionBoxO}}}]
1718 \indexmacro{pageTransitionBoxO}
1719 Growing Box. \pageTransitionBoxO\pause
1720
1721 \item[{\present[h]{\macroname{pageTransitionBoxI}}}]
1722 \indexmacro{pageTransitionBoxI}
1723 Shrinking Box. \pageTransitionBoxI\pause
1724
1725 \item[{\present[h]{\commandapp{pageTransitionWipe}{\carg{angle}}}}]
1726 \indexmacro{pageTransitionWipe}\mbox{}\\
1727 Wipe from one edge of the page to the facing edge.
1728
1729 \stepwise
1730 {%
1731 \carg{angle} is a number between $0$ and $360$ which specifies the direction (in degrees) in which to wipe.
1732
1733 Apparently, only the values \afterstep{\pageTransitionWipe{0}}$0$, \step{\afterstep{\pageTransitionWipe{90}}$90$,}
1734 \step{\afterstep{\pageTransitionWipe{180}}$180$,} \step{$270$ are supported.}%
1735 }%
1736 \pageTransitionWipe{270}\pause
1737
1738 \item[{\present[h]{\macroname{pageTransitionDissolve}}}]
1739 \indexmacro{pageTransitionDissolve}
1740 Dissolve. \pageTransitionDissolve
1741
1742 \newslide
1743
1744 \item[{\present[h]{\commandapp{pageTransitionGlitter}{\carg{angle}}}}]
1745 \indexmacro{pageTransitionGlitter}\mbox{}\\
1746 Glitter from one edge of the page to the facing edge.
1747
1748 \stepwise
1749 {%
1750 \carg{angle} is a number between $0$ and $360$ which specifies the direction (in degrees) in which to glitter.
1751
1752 Apparently, only the values \afterstep{\pageTransitionGlitter{0}}$0$,
1753 \step{\afterstep{\pageTransitionGlitter{270}}$270$,} \step{$315$ are supported.}%
1754 }%
1755 \pageTransitionGlitter{315}\pause
1756
1757 \item[{\present[h]{\macroname{pageTransitionReplace}}}]
1758 \indexmacro{pageTransitionReplace}
1759 Simple Replace (the default).
1760 \end{description}
1761
1762 \pageTransitionReplace
1763
1764 \newslide
1765
1766 \minisec{Things to pay attention to}
1767 \begin{enumerate}
1768 \item The setting of the page transition is a property of the \emph{page}, i.~e.\ whatever page transition is in
1769 effect when a page break occurs, will be assigned to the corresponding pdf page.
1770
1771 \item The setting of the page transition is undone when a group ends.
1772
1773 Make sure no \LaTeX{} environment is ended between a \macroname{pageTransition} setting and the next page break. In
1774 particular, in \carg{stepcontents}, \macroname{afterstep} should be used (see example \ref{Sec:ExPic}).
1775
1776 \newslide
1777
1778 \item Setting page transitions works well with \macroname{pause}. Here, \macroname{pause} acts as a page break,
1779 i.\,e.\ a different page transition can be set before every occurrence of \macroname{pause}.
1780 \end{enumerate}
1781
1782 \newslide
1783
1784 \subsection{Automatic advancing of pages}\label{Sec:PageDuration}
1785 If you have loaded a sufficiently new version of the
1786 \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/hyperref.html}{\code{hyperref}} package (which allows to
1787 set \code{pdfpageduration}), then the following command is defined which enables automatic advancing of \code{pdf}
1788 pages.
1789
1790 \present[h]{\commandapp{pageDuration}{\carg{dur}}}\indexmacro{pageDuration}
1791 causes pages to be advanced automatically every \carg{dur}
1792 seconds. \carg{dur} should be a non-negative fixed-point number.
1793
1794 \pageDuration{2}\pause
1795
1796 Depending on the \code{pdf} viewer, this will happen only in full-screen mode.
1797
1798 See example \ref{Sec:ExFooling} for a demonstration of this effect.
1799
1800 \stopAdvancing
1801
1802 \newslide
1803
1804 The same restrictions as for \concept{page transitions} apply. In particular, the page duration setting is undone by
1805 the end of a group, i.\,e.\ it is useless to set the page duration if a \LaTeX{} environment ends before the next page
1806 break.
1807
1808 There is no `neutral' value for \carg{dur} ($0$ means advance as fast as possible). You can make automatic advancing
1809 stop by calling \commandapp{pageDuration}{}. \code{texpower} offers the custom command
1810 \begin{center}
1811 \present[h]{\macroname{stopAdvancing}}\indexmacro{stopAdvancing}
1812 \end{center}
1813 to do this.
1814
1815 \newslide
1816
1817 %-----------------------------------------------------------------------------------------------------------------
1818 %
1819 \section{Color management, color emphasis and highlighting}\label{Sec:ColorEmphasis}
1820 \TeX Power tries to find out whether you are making a colored document. This is assumed if
1821 \begin{itemize}
1822 \item the \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/color.html}{\code{color}} package has been
1823 loaded before the \code{texpower} package or
1824 \item a color-related option (see sections \ref{Sec:ColBgdOpt} and \ref{Sec:ColorOptions}) is given to the
1825 \code{texpower} package (in this case, the
1826 \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/color.html}{\code{color}} package is loaded
1827 automatically).
1828 \end{itemize}
1829 If this is the case, \TeX Power installs an extensive color management scheme on top of the kernel of the
1830 \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/color.html}{\code{color}} package.
1831
1832 In the following, some new concepts established by this management scheme are explained. Sections \ref{Sec:ColBgdOpt}
1833 and \ref{Sec:ColorOptions} list options for color activation, section \ref{Sec:Colorcommands} lists some new
1834 highlighting commands, and section \ref{Sec:Colors} gives the names and meaning of \TeX Power's predefined colors.
1835
1836 Note that parts of the kernel of the
1837 \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/color.html}{\code{color}} package are overloaded for
1838 special purposes (getting driver-independent representations of defined colors to be used by \macroname{colorbetween}
1839 (\ref{Sec:MiscColorCommands}), for instance), so it is recommended to execute color definition commands like
1840 \macroname{definecolor} \emph{after} the \code{texpower} package has been loaded (see also the next section on
1841 \macroname{defineTPcolor}).
1842
1843 \newslide
1844
1845 \subsection{Standard colors}\label{Sec:StdCols}
1846 \TeX Power maintains a list of \concept{standard colors} which are recognized and handled by \TeX Power's color
1847 management. Some commands like \macroname{dimcolors} (see section \ref{Sec:ColorVariants}) affect \emph{all} standard
1848 colors. There are some predefined colors which are in this list from the outset (see section \ref{Sec:Colors}).
1849
1850 If colors defined by the user are to be recognized by \TeX Power, they have to be included in this list. The easiest
1851 way is to use the following command for defining them.
1852
1853 \newslide
1854
1855 \present{\commandapp{defineTPcolor}{\carg{name}\}\{\carg{model}\}\{\carg{def}}}
1856 \indexmacro{defineTPcolor} acts like \macroname{definecolor}
1857 \indexmacro{defineTPcolor} from the \code{color} package, but the color
1858 \carg{name} is also added to the list of standard colors.
1859
1860 If you want to make a color a standard color which is defined elsewhere (by a document class, say), you can simply add
1861 it to the list of standard colors with the command
1862 \present{\commandapp{addTPcolor}{\carg{name}}}\indexmacro{addTPcolor}.
1863
1864 \newslide
1865
1866 \subsection{Color sets}
1867 Every standard color may be defined in one or several \concept{color sets}. There are two fundamentally different
1868 types of color set:
1869 \begin{description}
1870 \item[The current color set.] This contains the current definition of every standard color which is actually used at
1871 the moment. Every standard color should be defined at least in the current color set. The current color set is not
1872 distinguished by a special name.
1873
1874 \newslide
1875
1876 \item[Named color sets.] These are `containers' for a full set of color definitions (for the standard colors) which
1877 can be activated by respective commands (see below). The color sets are distinguished by their names. Color
1878 definitions in a named color set are not currently available, they have to be made available by activating the named
1879 color set.
1880
1881 There are four predefined color sets named \code{whitebg}\indexcode{whitebg},
1882 \code{lightbg}\indexcode{lightbg}, \code{darkbg}\indexcode{darkbg},
1883 \code{blackbg}\indexcode{blackbg}, each of which contains a full set of (predefined)
1884 standard colors customized for a white, light, dark, black background
1885 color, respectively.
1886 \end{description}
1887
1888 \newslide
1889
1890 There are the following commands for manipulating color sets:
1891 \begin{description}
1892 \item[\present{\commandapp{usecolorset}{\carg{name}}}]\indexmacro{usecolorset}
1893 Make the color set named \carg{name} the current color set.
1894 \emph{All standard colors in the current color set which are also in color set \carg{name} are overwritten.}
1895
1896 The standard color \code{textcolor} is set automatically after activating color set \carg{name}.
1897
1898 \item[\present{\commandapp{dumpcolorset}{\carg{name}}}]\indexmacro{dumpcolorset}
1899 Copy the definitions of \emph{all} standard colors in the
1900 current color set into color set named \carg{name}. All standard colors in color set \carg{name} will be
1901 overwritten.
1902 \end{description}
1903
1904 \newslide
1905
1906 Using \commandapp{defineTPcolor}{\carg{name}} or \commandapp{definecolor}{\carg{name}} will define the color
1907 \carg{name} in the \emph{current} color set. To define a color in color set \carg{cset}, use
1908 \present{\commandapp[\carg{cset}]{defineTPcolor}{\carg{name}}}.
1909
1910 \newslide
1911
1912 \minisec{Things to pay attention to}
1913 \begin{enumerate}
1914 \item Color sets are not really `\TeX{} objects', but are distinguished by color name suffixes. This means, a color
1915 named \code{foo} is automatically in the current color set. Executing \commandapp[\carg{cset}]{defineTPcolor}{foo}
1916 means executing \macroname{definecolor} for a specific color the name of which is a combination of \code{foo} and
1917 \carg{cset}.
1918
1919 Consequently, \macroname{usecolorset} and \macroname{dumpcolorset} do not copy color sets as composite objects, but
1920 simply all colors the names of which are generated from the list of standard colors.
1921
1922 \newslide
1923
1924 \item The command \commandapp{usecolorset}{\carg{name}} overwrites only those colors which have been defined in color
1925 set \carg{name}. If a standard color is defined in the current color set, but not in color set \carg{name}, it is
1926 preserved (but if \commandapp{dumpcolorset}{\carg{name}} is executed later, then it will also be copied back into
1927 the color set \carg{name}).
1928 \end{enumerate}
1929
1930 \newslide
1931
1932 \subsection{Color Background Options}\label{Sec:ColBgdOpt}
1933 For activating the predefined color sets, there are shorthands
1934 \macroname{whitebackground}\indexmacro{whitebackground},
1935 \macroname{lightbackground}\indexmacro{lightbackground},
1936 \macroname{darkbackground}\indexmacro{darkbackground},
1937 \macroname{blackbackground}\indexmacro{blackbackground} which execute
1938 \macroname{usecolorset} and additionally set the background color to its current value.
1939
1940 \newslide
1941
1942 When one of the following options is given, the respective command is executed automatically at the beginning of the
1943 document.
1944 \begin{description}
1945 \item[\present{option: \code{whitebackground} (default)}]
1946 \indexpckopt{texpower}{whitebackground}
1947 Set standard colors to match a white background color.
1948
1949 \item[\present{option: \code{lightbackground}}]
1950 \indexpckopt{texpower}{lightbackground}
1951 Set standard colors to match a light (but not white) background color.
1952
1953 \item[\present{option: \code{darkbackground}}]
1954 \indexpckopt{texpower}{darkbackground}
1955 Set standard colors to match a dark (but not black) background color.
1956
1957 \item[\present{option: \code{blackbackground}}]
1958 \indexpckopt{texpower}{blackbackground}
1959 Set standard colors to match a black background color.
1960 \end{description}
1961
1962 \newslide
1963
1964 \subsection{Color variants}\label{Sec:ColorVariants}
1965 In addition to color sets, \TeX Power implements a concept of \concept{color variant}. Currently, every color has three
1966 variants: \concept{normal}, \concept{dimmed}, and \concept{enhanced}. The normal variant is what is usually seen, text
1967 written in the dimmed variant appears ``faded into the background'' and text written in the enhanced variant appears
1968 to ``stick out''.
1969
1970 \newslide
1971
1972 When switching variants, for every color one of two cases can occur:
1973 \begin{enumerate}
1974 \item A \concept{designated color} for this variant has been defined.
1975
1976 For color \carg{color} the designated name of the \concept{dimmed}
1977 \indexcode{dimmed color variant} variant is \code{d\carg{color}}, the designated
1978 name of the \concept{enhanced}\indexcode{enhanced color variant} variant is
1979 \code{e\carg{color}}.
1980
1981 If a color by that name exists at the time the variant is switched to, then variant switching is executed by
1982 replacing color \carg{color} with the designated color.
1983
1984 \newslide
1985
1986 \item A \concept{designated color} for this variant has not been defined.
1987
1988 If a color by the designated name does not exist at the time a color variant is switched to, then variant switching
1989 is executed by \concept{automatically} calculating the color variant from the original color.
1990
1991 The method for calculation depends on the variant:
1992
1993 \newslide
1994
1995 \begin{description}
1996 \item[dimmed.] The dimmed variant is calculated by \concept{interpolating} between \code{pagecolor} and the color to
1997 be dimmed, using the \macroname{colorbetween} command (see \ref{Sec:MiscColorCommands}).
1998
1999 There is a command \present{\macroname{dimlevel}}\indexmacro{dimlevel}
2000 which contains the parameter \carg{weight} given to \macroname{colorbetween}
2001 (default: \code{0.7}). This default can be overridden by either redefining
2002 \macroname{dimlevel} or giving an alternative \carg{weight} as an optional
2003 argument to the color dimming command (see below).
2004
2005 \newslide
2006
2007 \item[enhanced.] The enhanced variant is calculated by \concept{extrapolating} the color to be enhanced (relative to
2008 \code{pagecolor}).
2009
2010 There is a command \present{\macroname{enhancelevel}}\indexmacro{enhancelevel}
2011 which gives the \concept{extent} of the extrapolation (default: \code{0.5}).
2012 The same holds for overriding this default as for \macroname{dimlevel}.
2013 \end{description}
2014 \end{enumerate}
2015
2016 \newslide
2017
2018 The following commands switch color variants:
2019 \begin{description}
2020 \item[\present{\commandapp[\carg{level}]{dimcolor}{\carg{color}}}]
2021 \indexmacro{dimcolor} switches color \carg{color} to the \concept{dimmed}
2022 variant. If given, \carg{level} replaces the value of \macroname{dimlevel} in automatic calculation of the dimmed
2023 variant (see above).
2024
2025 \item[\present{\code{\macroname{dimcolors}[\carg{level}]}}]
2026 \indexmacro{dimcolors} switches \emph{all} standard colors to the \concept{dimmed}
2027 variant. The optional argument \carg{level} acts as for \macroname{dimcolor}.
2028
2029 \newslide
2030
2031 \item[\present{\commandapp[\carg{level}]{enhancecolor}{\carg{color}}}]
2032 \indexmacro{enhancecolor} switches color \carg{color} to the
2033 \concept{enhanced} variant. If given, \carg{level} replaces the value of \macroname{enhancelevel} in automatic
2034 calculation of the enhanced variant (see above).
2035
2036 \item[\present{\code{\macroname{enhancecolors}[\carg{level}]}}]
2037 \indexmacro{enhancecolors} switches \emph{all} standard colors to the
2038 \concept{enhanceed} variant. The optional argument \carg{level} acts as for \macroname{enhancecolor}.
2039 \end{description}
2040
2041 \newslide
2042
2043 \minisec{Things to pay attention to}
2044 \begin{enumerate}
2045 \item While automatic calculation of a \concept{dimmed} color will almost always yield the desired result
2046 (interpolating between colors by calculating a weighted average is trivial), automatic calculation of an
2047 \concept{enhanced} color by `extrapolating' is tricky at best and will often lead to unsatisfactory results. This is
2048 because the idea of making a color `stronger' is very hard to formulate numerically.
2049
2050 \newslide
2051
2052 The following effects of the current algorithm should be kept in mind:
2053 \begin{itemize}
2054 \item if the background color is light, enhancing a color will make it darker;
2055 \item if the background color is dark, enhancing a color will make it lighter;
2056 \item sometimes, the numerical values describing an enhanced color have to be \concept{bounded} to avoid exceeding
2057 the allowed range, diminishing the enhancing effect. For instance, if the background color is black and the color
2058 to be enhanced is a `full-powered' yellow, there is no way of enhancing it by simple numeric calculation.
2059 \end{itemize}
2060
2061 \newslide
2062
2063 As a conclusion, for best results it is recommended to provide custom \code{e} variants of colors to be enhanced. By
2064 default, \TeX Power does not provide dedicated enhanced colors, but the file \code{tpsettings.cfg} contains complete
2065 sets of enhanced variants for the standard colors in the different color sets, which you can uncomment and
2066 experiment with as convenient.
2067
2068 \newslide
2069
2070 \item Currently, switching to a different color variant is done by simply overwriting the current definitions of all
2071 standard colors. This means
2072 \begin{itemize}
2073 \item there is no way of `undimming' a color once it has been dimmed,
2074 \item a dimmed color can not be enhanced and vice versa.
2075 \end{itemize}
2076 Maybe this will be solved in a slightly more clever way in subsequent releases of \TeX Power.
2077
2078 \newslide
2079
2080 Hence, it is recommended to
2081 \begin{itemize}
2082 \item restrict the \concept{scope} of a global variant switching command like \macroname{dimcolors},
2083 \macroname{enhancecolors} or \macroname{dstep} by enlcosing it into a \LaTeX{} group (like \code{\{\dots\}}) or
2084 \item use \macroname{dumpcolorset} before the command to save the current definitions of all colors, to be restored
2085 with \macroname{usecolorset}.
2086
2087 At the very beginning of a \macroname{stepwise} command, \TeX Power executes \commandapp{dumpcolorset}{stwcolors},
2088 so you can restore the colors anywhere in the argument of \macroname{stepwise} by saying
2089 \commandapp{usecolorset}{stwcolors}.
2090 \end{itemize}
2091
2092 \newslide
2093
2094 \item Some rudimentary attempts are made to keep track of which color is in what variant, to the effect that
2095 \begin{itemize}
2096 \item a color which is not in the normal variant will neither be dimmed nor enhanced;
2097 \item when \macroname{usecolorset} overwrites a color with its normal variant, this is registered.
2098 \end{itemize}
2099 Still, it is easy to get in trouble by mixing variant changes with color set changes (say, if not all standard
2100 colors are defined in a color set, or if a color set is dumped when not all colors are in normal variant), so it is
2101 recommended not to use or dump color sets when outside the normal variant (unless for special applications like
2102 undoing a variant change by \commandapp{usecolorset}{stwcolors}).
2103 \end{enumerate}
2104
2105
2106 \newslide
2107
2108 \subsection{Miscellaneous color management commands}\label{Sec:MiscColorCommands}
2109 \begin{description}
2110 \item[\present{\commandapp[\carg{tset}]{replacecolor}{\carg{tcolor}\}[\carg{sset}]\{\carg{scolor}}}]
2111 \indexmacro{} makes
2112 \carg{tcolor} have the same definition as \carg{scolor} (if \carg{scolor} is defined at all), where \carg{tcolor}
2113 and \carg{scolor} are color names as given in the first argument of \macroname{definecolor}. If (one of)
2114 \carg{tset} and \carg{sset} are given, the respective color is taken from the respective color set, otherwise from
2115 the current color set.
2116
2117 If \carg{scolor} is not defined (in color set \carg{sset}), \carg{tcolor} is left alone.
2118
2119 \newslide
2120
2121 \item[\present{\commandapp[\carg{weight}]{colorbetween}{\carg{src1}\}\{\carg{src2}\}\{\carg{target}}}]
2122 \indexmacro{colorbetween} calculates a
2123 `weighted average' between two colors. \carg{src1} and \carg{src2} are the names of the two colors. \carg{weight}
2124 (default: $0.5$) is a fixed-point number between $0$ and $1$ giving the `weight' for the interpolation between
2125 \carg{src1} and \carg{src2}. \carg{target} is the name to be given to the resulting mixed color.
2126
2127 If \carg{weight} is $1$, then \carg{target} will be identical to \carg{src1} (up to color model conversions, see
2128 below), if \carg{weight} is $0$, then \carg{target} will be identical to \carg{src2}, if \carg{weight} is $0.5$
2129 (default), then \carg{target} will be exactly in the middle between \carg{src1} and \carg{src2}.
2130
2131 \macroname{colorbetween} supports the following color models: \code{rgb}, \code{RGB}, \code{gray}, \code{cmyk},
2132 \code{hsb}. If both colors are of the same model, the resulting color is also of the respective model. If
2133 \carg{src1} and \carg{src2} are from \emph{different} models, then \carg{target} will \emph{always} be an \code{rgb}
2134 color. The only exception is the \code{hsb} color model: As I don't know how to convert \code{hsb} to \code{rgb},
2135 mixing \code{hsb} with another color model will always raise an error.
2136
2137 \newslide
2138
2139 \item[\present{\commandapp{mkfactor}{\carg{expr}\}\{\carg{macroname}}}]
2140 \indexmacro{mkfactor} is a helper command for automatically
2141 generating the fixed point numbers between $0$ and $1$ which are employed by the color calculation commands.
2142 \carg{expr} can be any expression which can stand behind \code{*} in expressions allowed by the
2143 \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/calc.html}{\code{calc}} package (for instance:
2144 \code{\commandapp{value}{counter}/\commandapp{value}{maxcounter}} or \macroname{ratio} or whatever).
2145 \carg{macroname} should be a valid macro name. \carg{expr} is converted into a fixed-point representation which is
2146 then assigned to \carg{macroname}.
2147
2148 \newslide
2149
2150 \item[\present{\code{\macroname{vanishcolors}[\carg{color}]}}]
2151 \indexmacro{vanishcolors} is similar to the color variant command
2152 \macroname{dimcolors}, but instead of dimming colors, all standard colors are replaced by a single color given by
2153 the new command \present{\macroname{vanishcolor}} (default: \code{pagecolor}). Hence, the result of calling
2154 \macroname{vanishcolors} should be that all text vanishes, as it is written in the background color (this doesn't
2155 work with structured backgrounds, of course).
2156
2157 For getting a color different from the default \code{pagecolor}, you can either redefinine \macroname{vanishcolor}
2158 or give an alternative \carg{color} as an optional argument to \macroname{vanishcolors}.
2159
2160 There is no dedicated command for making a single color vanish. To achieve this, use
2161 \commandapp{replacecolor}{\carg{color}\}\{\macroname{vanishcolor}}.
2162 \end{description}
2163
2164
2165 \subsection{Color Emphasis and Highlighting}\label{Sec:ColorOptions}
2166 \code{texpower} offers some support for text emphasis and highlighting with colors (instead of, say, font
2167 changes). These features are enabled by the following options:
2168 \begin{description}
2169 \item[\present{option: \code{coloremph}}]\indexpckopt{texpower}{coloremph}
2170 Make \macroname{em} and \macroname{emph} switch colors instead of fonts.
2171
2172 \item[\present{option: \code{colormath}}]\indexpckopt{texpower}{colormath}
2173 Color all mathematical formulae.
2174
2175 \item[\present{option: \code{colorhighlight}}]\indexpckopt{texpower}{colorhighlight}
2176 Make new highlighting and emphasis commands defined by \code{texpower}
2177 use colors.
2178 \end{description}
2179
2180 \minisec{Things to pay attention to}
2181 \begin{enumerate}
2182 \item You need the \code{color} package to use any of the color features.
2183
2184 \item To implement the options \code{coloremph} and \code{colormath}, it is neccessary to redefine some \LaTeX{}
2185 internals. This can lead to problems and incompatibilities with other packages. Use with caution.
2186
2187 \item If the \code{colorhighlight} option is \emph{not} given, new highlighting and emphasis commands defined by
2188 \code{texpower} are realized otherwise. Sometimes, however, there is no good alternative to colors, so different
2189 emphasis commands can become disabled or indistinguishable.
2190
2191 \newslide
2192
2193 \item Because of font changes, emphasized or highlighted text can have different dimensions whether or not the options
2194 \code{coloremph}, \code{colormath}, and \code{colorhighlight} are set. Prepare for different line and page breaks
2195 when changing one of these options.
2196
2197 \item Color emphasis and highlighting makes use of the predefined standard colors described in section
2198 \ref{Sec:Colors}. See sections \ref{Sec:StdCols} to \ref{Sec:ColBgdOpt} for further information on standard colors,
2199 color sets, and customization.
2200 \end{enumerate}
2201
2202 \newslide
2203
2204 \subsection{New commands for emphasis and highlighting elements}\label{Sec:Colorcommands}
2205 Some things like setting the page or text color, making emphasised text or math colored are done automatically when
2206 the respective options are set. There are some additional new commands for creating emphasis and highlighting
2207 elements.
2208
2209 \minisec{Concerning math:}
2210 \begin{description}
2211 \item[\present{\macroname{origmath}}]\indexmacro{origmath}
2212 When the \code{colormath} option is given, \emph{everything} which appears in
2213 math mode is colored accordingly. Sometimes, however, math mode is used for something besides mathematical formulae.
2214 Some \LaTeX{} commands which internally use math mode (like \code{tabular} or \macroname{textsuperscript}) are
2215 redefined accordingly when the \code{colormath} option is given (this is a potential source of trouble; beware of
2216 problems\dots).
2217
2218 If you need to use math mode for something which is not to be colored (like a symbol for \code{itemize}), you can
2219 use the \macroname{origmath} command which works exactly like \macroname{ensuremath} but doesn't color its argument.
2220 If a nested use of math mode should occur in the argument of \macroname{origmath}, it will again be colored.
2221 \end{description}
2222
2223 \newslide
2224
2225 \minisec{Documenting \TeX{} code:}
2226 \begin{description}
2227 \item[\present{\macroname{code}}]\indexmacro{code}
2228 Simple command for typesetting \code{code} (like shell commands).
2229
2230 \item[\present{\macroname{macroname}}]\indexmacro{macroname}
2231 For \macroname{macro names}. Like \macroname{code}, but with a \macroname{} in
2232 front.
2233
2234 \item[\present{\commandapp[\carg{opt arg}]{commandapp}{\carg{command}\}\{\carg{arg}}}]
2235 \indexmacro{commandapp} For \TeX{} commands. \carg{arg}
2236 stands for the command argument, \carg{opt arg} for an optional argument.
2237
2238 \item[\present{\macroname{carg}}]\indexmacro{carg}
2239 For \carg{macro arguments}.
2240 \end{description}
2241
2242 \newslide
2243
2244 \minisec{Additional emphasis commands:}
2245 \begin{description}
2246 \item[\present{\macroname{underl}}]\indexmacro{underl}
2247 Additional \underl{emphasis} command. Can be used like \macroname{emph}. Defaults
2248 to \textbf{bold face} if the \code{colorhighlight} option is not given.
2249
2250 \item[\present{\macroname{concept}}]\indexmacro{concept}
2251 Additional \concept{emphasis} command, especially for new concepts. Can be
2252 augmented by things like automatic index entry creation. Also defaults to \textbf{bold face} if the
2253 \code{colorhighlight} option is not given.
2254
2255 \item[\present{\macroname{inactive}}]\indexmacro{inactive}
2256 Additional \inactive{emphasis} command, this time for `de-emphasising'. There is
2257 no sensible default if the \code{colorhighlight} option is not given, as base \LaTeX{} doesn't offer an appropriate
2258 font. In this case, \macroname{inactive} defaults to \macroname{monochromeinactive}, which does nothing.
2259
2260 You can (re-)define \macroname{monochromeinactive} to provide some sensible behaviour in the absence of colors, for
2261 instance striking out if you're using the
2262 \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/soul.html}{\code{soul}} package.
2263 \end{description}
2264
2265
2266 \minisec{Color Highlighting:}
2267 \begin{description}
2268 \item[\present{\macroname{present}}]\indexmacro{present}
2269 Highlighting command which puts its argument into a \present{box with colored
2270 background}. Defaults to an \fbox{\macroname{fbox}} if the \code{colorhighlight} option is not given.
2271
2272 See section \ref{Sec:displaycustom} for some further highlighting commands.
2273 \end{description}
2274
2275 \newslide
2276
2277 \subsection{Predefined standard colors}\label{Sec:Colors}
2278 In previous subsections, it has been mentioned that \TeX Power predefines some standard colors which have appropriate
2279 values in the predefined color sets \code{whitebg}, \code{lightbg}, \code{darkbg}, and \code{blackbg} (see sections
2280 \ref{Sec:StdCols} to \ref{Sec:ColBgdOpt} for further information on standard colors, color sets, and customization).
2281 \begin{description}
2282 \item[\present{color: \code{pagecolor}}]\indexcode{pagecolor}
2283 Background color of the page. Is set automatically at the beginning of the
2284 document if color management is active.
2285
2286 \item[\present{color: \code{textcolor}}]\indexcode{textcolor}
2287 Color of normal text. Is set automatically at the beginning of the
2288 document if color management is active.
2289
2290 \item[\present{color: \code{emcolor}}]\indexcode{emcolor}
2291 Color used for \emph{emphasis} if the \code{coloremph} option is set.
2292
2293 \item[\present{color: \code{altemcolor}}]\indexcode{altemcolor}
2294 Color used \emph{for \emph{double} emphasis} if the \code{coloremph} option
2295 is set.
2296
2297 \item[\present{color: \code{mathcolor}}]\indexcode{mathcolor}
2298 Color used for math $a^2+b^2=c^2$ if the \code{colormath} option is set.
2299
2300 \item[\present{color: \code{codecolor}}]\indexcode{codecolor}
2301 Color used by the \macroname{code} command if the \code{colorhighlight}
2302 option is set.
2303
2304 \item[\present{color: \code{underlcolor}}]\indexcode{underlcolor}
2305 Color used by the \underl{\macroname{underl} command} if the
2306 \code{colorhighlight} option is set.
2307
2308 \item[\present{color: \code{conceptcolor}}]\indexcode{conceptcolor}
2309 Color used by the \concept{\macroname{concept} command} if the
2310 \code{colorhighlight} option is set.
2311
2312 \newslide
2313
2314 \item[\present{color: \code{inactivecolor}}]\indexcode{inactivecolor}
2315 Color used by the \inactive{\macroname{inactive} command} if the
2316 \code{colorhighlight} option is set.
2317
2318 \item[\present{color: \code{presentcolor}}]\indexcode{presentcolor}
2319 Color used as background color by the \present{\macroname{present}}
2320 command if the \code{colorhighlight} option is set.
2321
2322 \item[\present{color: \code{highlightcolor}}]\indexcode{highlightcolor}
2323 Color used as background color by the
2324 \highlightboxed{\macroname{highlightboxed}} and \macroname{highlighttext} commands (see section
2325 \ref{Sec:displaycustom}) if the \code{colorhighlight} option is set.
2326 \end{description}
2327
2328 \ifthenelse{\boolean{TPcolor}}
2329 {%
2330 \newslide
2331
2332 \whitebackground
2333
2334 \minisec{Color tables}
2335
2336 \newlength{\widthfirstcol}
2337 \settowidth{\widthfirstcol}{\textbf{\footnotesize white background}}
2338
2339 \vspace*{\fill}
2340 \begin{center}
2341 \begin{tabular}{|p{\widthfirstcol}*{3}{|p{2cm}}|}
2342 \cline{2-4}
2343 \multicolumn{1}{l|}{\textbf{\footnotesize white background}}&standard&dimmed&enhanced\\\hline
2344 \code{textcolor}&\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{textcolor}\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{textcolor}\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2345 \code{emcolor}&\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{emcolor}\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{emcolor}\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2346 \code{altemcolor}&\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{altemcolor}\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{altemcolor}\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2347 \code{mathcolor}&\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{mathcolor}\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{mathcolor}\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2348 \code{codecolor}&\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{codecolor}\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{codecolor}\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}\\\hline
2349 \code{underlcolor}&\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{underlcolor}\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{underlcolor}\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2350 \code{conceptcolor}&\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{conceptcolor}\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{conceptcolor}\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2351 \code{inactivecolor}&\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{inactivecolor}\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{inactivecolor}\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}\\\hline
2352 \code{presentcolor}&\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{presentcolor}\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{presentcolor}\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2353 \code{highlightcolor}&\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{highlightcolor}\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{highlightcolor}\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2354 \end{tabular}
2355 \end{center}
2356
2357 \newslide
2358
2359 \lightbackground
2360
2361 \vspace*{\fill}
2362 \begin{center}
2363 \begin{tabular}{|p{\widthfirstcol}*{3}{|p{2cm}}|}
2364 \cline{2-4}
2365 \multicolumn{1}{l|}{\textbf{\footnotesize light background}}&standard&dimmed&enhanced\\\hline
2366 \code{textcolor}&\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{textcolor}\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{textcolor}\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2367 \code{emcolor}&\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{emcolor}\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{emcolor}\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2368 \code{altemcolor}&\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{altemcolor}\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{altemcolor}\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2369 \code{mathcolor}&\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{mathcolor}\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{mathcolor}\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2370 \code{codecolor}&\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{codecolor}\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{codecolor}\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}\\\hline
2371 \code{underlcolor}&\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{underlcolor}\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{underlcolor}\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2372 \code{conceptcolor}&\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{conceptcolor}\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{conceptcolor}\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2373 \code{inactivecolor}&\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{inactivecolor}\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{inactivecolor}\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}\\\hline
2374 \code{presentcolor}&\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{presentcolor}\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{presentcolor}\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2375 \code{highlightcolor}&\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{highlightcolor}\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{highlightcolor}\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2376 \end{tabular}
2377 \end{center}
2378
2379 \newslide
2380
2381 \darkbackground
2382
2383 \vspace*{\fill}
2384 \begin{center}
2385 \begin{tabular}{|p{\widthfirstcol}*{3}{|p{2cm}}|}
2386 \cline{2-4}
2387 \multicolumn{1}{l|}{\textbf{\footnotesize dark background}}&standard&dimmed&enhanced\\\hline
2388 \code{textcolor}&\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{textcolor}\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{textcolor}\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2389 \code{emcolor}&\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{emcolor}\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{emcolor}\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2390 \code{altemcolor}&\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{altemcolor}\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{altemcolor}\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2391 \code{mathcolor}&\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{mathcolor}\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{mathcolor}\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2392 \code{codecolor}&\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{codecolor}\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{codecolor}\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}\\\hline
2393 \code{underlcolor}&\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{underlcolor}\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{underlcolor}\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2394 \code{conceptcolor}&\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{conceptcolor}\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{conceptcolor}\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2395 \code{inactivecolor}&\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{inactivecolor}\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{inactivecolor}\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}\\\hline
2396 \code{presentcolor}&\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{presentcolor}\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{presentcolor}\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2397 \code{highlightcolor}&\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{highlightcolor}\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{highlightcolor}\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2398 \end{tabular}
2399 \end{center}
2400
2401 \newslide
2402
2403 \blackbackground
2404
2405 \vspace*{\fill}
2406 \begin{center}
2407 \begin{tabular}{|p{\widthfirstcol}*{3}{|p{2cm}}|}
2408 \cline{2-4}
2409 \multicolumn{1}{l|}{\textbf{\footnotesize black background}}&standard&dimmed&enhanced\\\hline
2410 \code{textcolor}&\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{textcolor}\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{textcolor}\textcolor{textcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2411 \code{emcolor}&\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{emcolor}\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{emcolor}\textcolor{emcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2412 \code{altemcolor}&\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{altemcolor}\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{altemcolor}\textcolor{altemcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2413 \code{mathcolor}&\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{mathcolor}\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{mathcolor}\textcolor{mathcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2414 \code{codecolor}&\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{codecolor}\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{codecolor}\textcolor{codecolor}{\rule{2cm}{\heightof{l}}}\\\hline
2415 \code{underlcolor}&\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{underlcolor}\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{underlcolor}\textcolor{underlcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2416 \code{conceptcolor}&\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{conceptcolor}\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{conceptcolor}\textcolor{conceptcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2417 \code{inactivecolor}&\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{inactivecolor}\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{inactivecolor}\textcolor{inactivecolor}{\rule{2cm}{\heightof{l}}}\\\hline
2418 \code{presentcolor}&\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{presentcolor}\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{presentcolor}\textcolor{presentcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2419 \code{highlightcolor}&\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}&\dimcolor{highlightcolor}\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}&\enhancecolor{highlightcolor}\textcolor{highlightcolor}{\rule{2cm}{\heightof{l}}}\\\hline
2420 \end{tabular}
2421 \end{center}
2422 }{}
2423
2424 \newslide
2425
2426 \ifthenelse{\boolean{TPcolor}}{\lightbackground}{}
2427
2428 %-----------------------------------------------------------------------------
2429 %
2430 \section{Structured page backgrounds and panels}\label{Sec:PageBackPanel}
2431 \subsection{Structured page backgrounds}
2432
2433 \present{\commandapp[\carg{options}]{backgroundstyle}{\carg{style}}}
2434 \indexmacro{backgroundstyle}
2435 is the central command for structured page backgrounds. It works like
2436 \macroname{pagestyle} and other commands of this type. This means
2437 \carg{style} is a symbolic name specifying the general method by which the
2438 page background is constructed.
2439
2440 The detailed construction is influenced by parameters which can be set in
2441 \carg{options}. If given, the optional parameter \carg{options} should
2442 contain a list of settings in ``keyval'' manner. The keyval method
2443 % (which is used by the \includegraphics command from the graphicx package,
2444 %for instance)
2445 is based on associating a symbolic name with every parameter. \carg{options}
2446 is then a comma-separated list of parameter settings of the form
2447 \carg{name}=\carg{value}, where \carg{name} is the symbolic name of the
2448 parameter to be set and \carg{value} is the value it is to be set to.
2449
2450 Not every \carg{style} evaluates every parameter. In the following, a
2451 description of all styles, together with lists of the parameters employed, is
2452 given. It is followed by a list of all parameters. Note that some parameter
2453 names internally access the same parameter. For instance, parameters
2454 \code{startcolor} and \code{startcolordef} both set the start color of a color
2455 gradient. In case of conflict, the last setting in the list \carg{options}
2456 will prevail. It is noted in the list of parameters which other parameters
2457 are overwritten.
2458
2459 \newslide
2460
2461 \carg{style} may have one of the following values:
2462 \begin{description}
2463 \item[\present{Style: \code{none}}]
2464 \indexmacroopt{backgroundstyle}{none}%
2465 No background. This means the page background is whatever it would be if
2466 \macroname{backgroundstyle} wasn't used at all (for instance, a plain area
2467 of color pagecolor if one of the color options has been given).
2468
2469 Parameters used: none.
2470
2471 \item[\present{Style: \code{plain}}]
2472 \indexmacroopt{backgroundstyle}{plain}%
2473 Plain background. This means the page background is whatever it would be if
2474 \macroname{backgroundstyle} wasn't used at all (as for no background). In
2475 addition to background style \code{none}, the background style \code{plain}
2476 does produce panel backgrounds. The colors and dimensions of a \code{top
2477 panel}, \code{bottom panel}, \code{left panel}, and \code{right panel} can
2478 be specified.
2479
2480 \begin{flushleft}
2481 Parameters used: \code{hpanels}, \code{autopanels}, \code{toppanelcolor},
2482 \code{bottompanelcolor}, \code{leftpanelcolor}, \code{rightpanelcolor},
2483 \code{toppanelcolordef}, \code{bottompanelcolordef}, \code{leftpanelcolordef},
2484 \code{rightpanelcolordef}, \code{toppanelheight}, \code{bottompanelheight},
2485 \code{leftpanelwidth}, \code{rightpanelwidth}.
2486 \end{flushleft}
2487
2488 \item[\present{Style: \code{vgradient}}]
2489 \indexmacroopt{backgroundstyle}{vgradient}%
2490 Vertical gradient. The page background is constructed using the
2491 \macroname{vgradrule}\indexmacro{vgradrule} command. In addition to the
2492 usual parameters of gradient rules, the vgradient background style allows
2493 to leave space for headers, footers, or panels. The colors and dimensions
2494 of a \code{top panel}, \code{bottom panel}, \code{left panel}, and
2495 \code{right panel} can be specified. The gradient rule fills the
2496 rectangular space left between the specified panels.
2497
2498 \begin{flushleft}
2499 Parameters used: \code{stripes}, \code{firstgradprogression},
2500 \code{startcolor}, \code{startcolordef}, \code{endcolor}, \code{endcolordef}
2501 in addition to the parameters used for style \code{plain}.
2502 \end{flushleft}
2503
2504 \item[\present{Style: \code{hgradient}}]
2505 \indexmacroopt{backgroundstyle}{hgradient}%
2506 Horizontal gradient. The page background is constructed using the
2507 \macroname{hgradrule}\indexmacro{hgradrule} command. See the description of
2508 \macroname{vgradient} concerning panels.
2509
2510 Parameters used: See list for style \code{vgradient}.
2511
2512 \item[\present{Style: \code{doublevgradient}}]
2513 \indexmacroopt{backgroundstyle}{doublevgradient}%
2514 Double vertical gradient. The page background is constructed using the
2515 \macroname{dblvgradrule}\indexmacro{dblvgradrule} command. See the
2516 description of \macroname{vgradient} concerning panels.
2517
2518 \begin{flushleft}
2519 Parameters used: \code{gradmidpoint}, \code{secondgradprogression},
2520 \code{midcolor}, \code{midcolordef} in addition to the parameters used for
2521 style \code{vgradient} (and \code{plain}).
2522 \end{flushleft}
2523
2524 \item[\present{Style: \code{doublehgradient}}]
2525 \indexmacroopt{backgroundstyle}{doublehgradient}%
2526 Double horizontal gradient. The page background is constructed using the
2527 \macroname{dblhgradrule}\indexmacro{dblhgradrule} command. See the description of
2528 \macroname{vgradient} concerning panels.
2529
2530 Parameters used: See list for \code{doublevgradient}.
2531
2532 \end{description}
2533 Now, a list of all parameters and their meaning. In the following,
2534 \begin{itemize}\setlength{\itemsep}{0cm}
2535 \item[\carg{n}] denotes a (calc expression for a) nonnegative integer
2536 \item[\carg{i}] denotes a (calc expression for an) integer
2537 \item[\carg{r}] denotes a fixed-point number
2538 \item[\carg{l}] denotes a (calc expression for a) length
2539 \item[\carg{c}] denotes the name of a defined color
2540 \item[\carg{cm}] denotes a valid color model name (in the sense of the color
2541 package)
2542 \item[\carg{cd}] denotes a valid color definition (in the sense of the color
2543 package) wrt a given \carg{cm} parameter
2544 \item[\carg{t}] denotes a `truth value' in the sense of the ifthen package:
2545 either true or false. As usual for keyval, if =\carg{t} is omitted, the
2546 default true is assumed.
2547 \end{itemize}
2548 \begin{description}
2549 \item[\present{Option: \code{stripes=}\carg{n}}] Set the \carg{stripes}
2550 parameter of gradient rules to \carg{n}.\\
2551 Default: \macroname{bgndstripes}. \\
2552 Used by: \code{vgradient}, \code{hgradient}, \code{doublevgradient},
2553 \code{doublehgradient}.
2554
2555 \item[\present{Option: \code{gradmidpoint=}\carg{r}}] Set the \carg{midpoint}
2556 parameter of double gradient rules to \carg{r}.\\
2557 Default: \macroname{bgndgradmidpoint}\\
2558 Used by: doublevgradient, doublehgradient
2559
2560 \item[\present{Option: \code{firstgradprogression=}\carg{i}}]
2561 Set the first gradient progression of gradient rules to \carg{i}.\\
2562 Default: \macroname{bgndfirstgradprogression}\\
2563 Used by: vgradient, hgradient, doublevgradient, doublehgradient
2564
2565 \item[\present{Option: \code{secondgradprogression=}\carg{i}}]
2566 Set the second gradient progression of double gradient rules to \carg{i}.\\
2567 Default: \macroname{bgndsecondgradprogression}\\
2568 Used by: doublevgradient, doublehgradient
2569
2570 \item[\present{Option: \code{startcolor=}\carg{c}}]
2571 Set the \carg{startcolor} parameter of gradient rules to \carg{c}.\\
2572 Default: If neither startcolor nor startcolordef is given, the color
2573 bgndstartcolor is used as startcolor.\\
2574 Used by: vgradient, hgradient, doublevgradient, doublehgradient\\
2575 Overwrites: startcolordef
2576
2577 \item[\present{Option: \code{startcolordef=\{\carg{cm}\}\{\carg{cd}\}}}]
2578 Set the \carg{startcolor} parameter of gradient rules to color foo, which
2579 is obtained by \macroname{definecolor\{foo\}\{\carg{cm}\}\{\carg{cd}\}}.
2580 Note that the two pairs of curly braces are mandatory.\\
2581 Default: If neither startcolor nor startcolordef is given, the color
2582 bgndstartcolor is used as startcolor.\\
2583 Used by: vgradient, hgradient, doublevgradient, doublehgradient\\
2584 Overwrites: startcolor
2585
2586 \item[\present{Option: \code{endcolor=}\carg{c}}]
2587 Set the \carg{endcolor} parameter of gradient rules to \carg{c}.\\
2588 Default: If neither endcolor nor endcolordef is given, the color
2589 bgndendcolor is used as endcolor.\\
2590 Used by: vgradient, hgradient, doublevgradient, doublehgradient\\
2591 Overwrites: endcolordef
2592
2593 \item[\present{Option: \code{endcolordef=\{\carg{cm}\}\{\carg{cd}\}}}]
2594 Set the \carg{endcolor} parameter of gradient rules to color foo, which
2595 is obtained by \macroname{definecolor\{foo\}\{\carg{cm}\}\{\carg{cd}\}}.
2596 Note that the two pairs of curly braces are mandatory.\\
2597 Default: If neither endcolor nor endcolordef is given, the color
2598 bgndendcolor is used as endcolor.\\
2599 Used by: vgradient, hgradient, doublevgradient, doublehgradient\\
2600 Overwrites: endcolor
2601
2602 \item[\present{Option: \code{midcolor=}\carg{c}}]
2603 Set the \carg{midcolor} parameter of double gradient rules to \carg{c}.\\
2604 Default: If neither midcolor nor midcolordef is given, the color
2605 bgndmidcolor is used as midcolor.\\
2606 Used by: doublevgradient, doublehgradient\\
2607 Overwrites: midcolordef
2608
2609 \item[\present{Option: \code{midcolordef=\{\carg{cm}\}\{\carg{cd}\}}}]
2610 Set the \carg{midcolor} parameter of double gradient rules to color foo,
2611 which is obtained by \macroname{definecolor\{foo\}\{\carg{cm}\}\{\carg{cd}\}}.
2612 Note that the two pairs of curly braces are mandatory.\\
2613 Default: If neither midcolor nor midcolordef is given, the color
2614 bgndmidcolor is used as midcolor.\\
2615 Used by: doublevgradient, doublehgradient\\
2616 Overwrites: midcolor
2617
2618 \item[\present{Option: \code{hpanels=}\carg{t}}]
2619 Specifies the `direction' of panels produced. hpanels=true means the top
2620 and bottom panel span the full width of the screen. In the space left in
2621 the middle, the left panel, the background itself, and the right panel are
2622 displayed. hpanels=false means the left and right panel span the full
2623 height of the screen. In the space left in the middle, the top panel,
2624 the background itself, and the bottom panel are
2625 displayed.\\
2626 Default: hpanels=true is the default for plain, hgradient and
2627 doublehgradient. hpanels=false is the default for vgradient and
2628 doublevgradient.\\
2629 Used by: plain, vgradient, hgradient, doublevgradient, doublehgradient
2630
2631 \item[\present{Option: \code{autopanels=}\carg{t}}]
2632 Specifies whether the default values of the parameters toppanelheight,
2633 bottompanelheight, leftpanelwidth, rightpanelwidth should be calculated
2634 automatically from the contents of declared panels. The automatism used
2635 is analogous to that of \macroname{DeclarePanel*}. Note that for panel
2636 arrangement, both the width and the height of all declared panels are
2637 overwritten. If you don't want this, calculate the panel parameters
2638 yourself and set autopanels=false. In this case, the current panel
2639 dimensions of declared panels are used as defaults for toppanelheight,
2640 bottompanelheight, leftpanelwidth, rightpanelwidth.\\
2641 Default: true.\\
2642 Used by: plain, vgradient, hgradient, doublevgradient, doublehgradient
2643
2644 \item[\present{Option: \code{\carg{pos}panelheight=}\carg{l}}]
2645 Set the height/width of the space left for the top / bottom / left / right
2646 panel to \carg{l}. Note that the remaining dimensions of panels, for
2647 instance the width of the top panel, are always calculated automatically,
2648 depending on the setting of the hpanels parameter.\\
2649 Default: If a respective panel has been defined using
2650 \macroname{DeclarePanel}, the default used depends on the setting of the
2651 autopanels parameter. If autopanels=true, the correct dimension is
2652 calculated from the contents of the panel. The respective one of
2653 \macroname{toppanelheight}, \macroname{bottompanelheight},
2654 \macroname{leftpanelwidth}, \macroname{rightpanelwidth} is overwritten
2655 with the result. If autopanels=false, then the respective setting of
2656 \macroname{toppanelheight}, \macroname{bottompanelheight},
2657 \macroname{leftpanelwidth}, \macroname{rightpanelwidth} is taken as the
2658 default. If a panel has not been declared, the appropriate one of
2659 \macroname{bgndtoppanelheight}, \macroname{bgndbottompanelheight},
2660 \macroname{bgndleftpanelwidth}, \macroname{bgndrightpanelwidth} is used
2661 as default. \\
2662 Used by: plain, vgradient, hgradient, doublevgradient, doublehgradient
2663
2664 \item[\present{Option: \code{\carg{pos}panelcolor=}\carg{c}}]
2665 Set the color of the space left for the top / bottom / left / right panel
2666 to \carg{c}.\\
2667 Default: The standard colors toppanelcolor, bottompanelcolor, leftpanelcolor,
2668 rightpanelcolor are used as defaults.\\
2669 Used by: plain, vgradient, hgradient, doublevgradient, doublehgradient\\
2670 Overwrites: toppanelcolordef bottompanelcolordef leftpanelcolordef
2671 rightpanelcolordef
2672
2673 \item[\present{Option: \code{\carg{pos}panelcolordef=\{\carg{cm}\}\{\carg{cd}\}}}]
2674 Set the color of the space left for the top / bottom / left / right panel
2675 to color foo, which is obtained by
2676 \macroname{definecolor\{foo\}\{\carg{cm}\}\{\carg{cd}\}}.
2677 Note that the two pairs of curly braces are mandatory. \\
2678 Default: See the description of top/bottom/left/rightpanelcolor.\\
2679 Used by: plain, vgradient, hgradient, doublevgradient, doublehgradient\\
2680 Overwrites: toppanelcolor bottompanelcolor leftpanelcolor rightpanelcolor
2681
2682 \end{description}
2683
2684 \newslide
2685
2686 \subsection{Panel-specific user level commands}
2687 If you're using a package that has it own panel (as
2688 \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/pdfscreen.html}%
2689 {\code{pdfscreen}}) don't even consider using the following.
2690
2691 \present{\commandapp[\carg{name}]{DeclarePanel}{\carg{pos}\}\{\carg{contents}}}
2692 \indexmacro{DeclarePanel}
2693 declares the contents \carg{contents} of the panel at position \carg{pos}.
2694 Afterwards, on every page the panel contents are set in a parbox of
2695 dimensions and position specified by \carg{pos}panelwidth,
2696 \carg{pos}panelheight, \macroname{panelmargin} and \carg{pos}panelshift for
2697 top and bottom panels and \carg{pos}panelraise for left and right panels. The
2698 parbox is constructed anew on every page, so all changes influencing panel
2699 contents or parameters (like a \macroname{thepage} in the panel contents) are
2700 respected.
2701
2702 The panel contents are set in color \carg{pos}paneltextcolor. There is
2703 another standard color \carg{pos}panelcolor, which is however not activated by
2704 \macroname{DeclarePanel} but by selecting an appropriate background style.
2705
2706 Note that \macroname{backgroundstyle} must be called after the panel
2707 declaration.
2708
2709 \newslide
2710
2711 Pages are constructed as follows: first the page background, then
2712 the panels, and then the page contents. \emph{Hence, panels overwrite the background
2713 and the page contents overwrite the panels.} The user is supposed to make sure
2714 themselves that there is enough space left on the page for the panels
2715 (document class specific settings). The panel declaration is global. A panel
2716 can be `undeclared' by using \macroname{DeclarePanel\{\carg{pos}\}\{\}}.
2717
2718 If the optional argument \carg{name} is given, the panel contents and
2719 (calculated) size will also be stored under the given name, to be restored
2720 later with \macroname{restorepanels}. This is nice for switching between
2721 different sets of panels.
2722
2723 \newslide
2724
2725 For an example look at the files \code{simplepanel.tex} and \code{panelexample.tex}.
2726 A very simple example follows:
2727
2728 \begin{verbatim}
2729 \DeclarePanel{left}{%
2730 \textsf{Your Name}
2731
2732 \vfill
2733
2734 \button{\Acrobatmenu{PrevPage}}{Back}
2735 \button{\Acrobatmenu{NextPage}}{Next} }
2736 \end{verbatim}
2737
2738 \newslide
2739
2740 There is a starred version which will (try to) automatically calculate the
2741 \indexmacro{DeclarePanel*} `flexible' dimension of each panel. For top and
2742 bottom panels this is the height, for left and right panels this is the width.
2743 Make sure the panel contents are `valid' at the time \macroname{DeclarePanel*}
2744 is called so the calculation can be carried out in a meaningful way.
2745
2746 While the automatic calculation of the height of top and bottom panels is
2747 trivial (using \macroname{settoheight}), there is a sophisticated procedure
2748 for calculating a `good' width for the parbox containing the panel. Owing to
2749 limitations set by TeX, there are certain limits to the sophistication of the
2750 procedure.
2751
2752 \newslide
2753
2754 For instance, any `whatsits' (specials (like color changes), file
2755 accesses (like \macroname{label}), or hyper anchors)
2756 or rules which are inserted directly in the vertical list of the parbox
2757 `block' the analysis, so the procedure can't `see' past them (starting at the
2758 bottom of the box) when analysing the contents of the parbox.
2759
2760 The user should make sure such items are set in horizontal mode (by using
2761 \macroname{leavevmode} or enclosing stuff in boxes). Furthermore, only
2762 overfull and underfull hboxes which occur while setting the parbox are
2763 considered when judging which width is `best'. This will reliably make the
2764 width large enough to contain `wide' objects like tabulars, logos and buttons,
2765 but might not give optimal results for justified text. vboxes occurring
2766 directly in the vbox are ignored.
2767
2768 \newslide
2769
2770 Note further that hboxes with fixed width
2771 (made by \macroname{hbox} to...) which occur directly in the vbox may disturb
2772 the procedure, because the fixed width cannot be recovered. These hboxes will
2773 be reformatted with the width of the vbox, generating an extremely large
2774 badness, unsettling the calculation of maximum badness. To avoid this such
2775 hboxes should be either contained in a vbox or set in horizontal mode with
2776 appropriate glue at the end.
2777
2778 \newslide
2779
2780 \subsection{Navigation buttons}
2781 The following provides only the very basics for navigation buttons. If you're
2782 using a package that has it's own naviagtion buttons (as
2783 \href{ftp://ftp.dante.de/tex-archive/help/Catalogue/entries/pdfscreen.html}%
2784 {\code{pdfscreen}}) don't even consider using the following.
2785
2786 \present{\macroname{button\{\carg{navcommand}\}\{\carg{text}\}}}
2787 \indexmacro{button}
2788 creates a button labelled \carg{text} which executes \carg{navcommand} when
2789 pressed. The command takes four optional arguments (left out above):
2790 \carg{width}, \carg{height}, \carg{depth} and \carg{alignment} in that order.
2791 \carg{navcommand} can be for instance \commandapp{Acrobatmenu}{\carg{command}} or
2792 \commandapp{hyperlink}{\carg{target}} (note that \carg{navcommand} should take
2793 one (more) argument specifying the sensitive area which is provided by
2794 \macroname{button}). If given, the optional parameters \carg{width}, \carg{height}, and
2795 \carg{depth} give the width, height and depth, respectively, of the framed
2796 area comprising the button (excluding the shadow, but including the
2797 frame). Default are the `real' width, height and depth, respectively, of
2798 \carg{text}, plus allowance for the frame. If given, the optional parameter
2799 \carg{alignment} (one of l,c,r) gives the alignment of \carg{text} inside the
2800 button box (makes sense only if \carg{width} is given).
2801
2802 The button appearence is defined by some configurable button parameters:
2803 \begin{description}
2804 \item[\present{\macroname{buttonsep}}]
2805 \indexmacro{buttonsep}
2806 Space between button label and border. (Default: \macroname{fboxsep})
2807
2808 \item[\present{\macroname{buttonrule}}]
2809 \indexmacro{buttonrule}
2810 Width of button frame. (Default: \code{0pt})
2811
2812 \item[\present{\macroname{buttonshadowhshift}}]
2813 \indexmacro{buttonshadowhshift}
2814 Horizontal displacement of button shadow. (Default: 0.3\macroname{fboxsep})
2815
2816 \item[\present{\macroname{buttonshadowvshift}}]
2817 \indexmacro{buttonshadowvshift}
2818 Vertical displacement of button shadow. (Default: 0.3\macroname{fboxsep})
2819 \end{description}
2820
2821 A list of predefined buttons follows:
2822 \begin{description}
2823
2824 \item[\present{\macroname{backpagebutton[\carg{width}]}}]
2825 \indexmacro{backpagebutton}
2826 Last subpage of previous page.
2827
2828 \item[\present{\macroname{backstepbutton[\carg{width}]}}]
2829 \indexmacro{backstepbutton}
2830 Previous step.
2831
2832 \item[\present{\macroname{gobackbutton[\carg{width}]}}]
2833 \indexmacro{gobackbutton}
2834 `Undo action' (go back to whatever was before last action).
2835
2836 \item[\present{\macroname{nextstepbutton[\carg{width}]}}]
2837 \indexmacro{nextstepbutton}
2838 Next step.
2839
2840 \item[\present{\macroname{nextpagebutton[\carg{width}]}}]
2841 \indexmacro{nextpagebutton}
2842 First subpage of next page.
2843
2844 \item[\present{\macroname{nextfullpagebutton[\carg{width}]}}]
2845 \indexmacro{nextfullpagebutton}
2846 Last subpage of next page.
2847
2848 \item[\present{\macroname{fullscreenbutton[\carg{width}]}}]
2849 \indexmacro{fullscreenbutton}
2850 Toggle fullscreen mode.
2851
2852 \end{description}
2853
2854 \clearpage
2855 \printindex
2856 \end{slide}
2857 \end{document}
2858 \endinput
2859 %%
2860 %% End of file `fulldemo.tex'.