| 1 |
%% |
| 2 |
%% This is file `picltxexample.tex', |
| 3 |
%% generated with the docstrip utility. |
| 4 |
%% |
| 5 |
%% The original source files were: |
| 6 |
%% |
| 7 |
%% texpower-doc.dtx (with options: `picltxexample') |
| 8 |
%% |
| 9 |
%% -------------------------------------------------------------- |
| 10 |
%% TeXPower bundle - dynamic online presentations with LaTeX |
| 11 |
%% Copyright (C) 1999-2004 Stephan Lehmke |
| 12 |
%% Copyright (C) 2003-2005 Hans Fredrik Nordhaug |
| 13 |
%% |
| 14 |
%% This program is free software; you can redistribute it and/or |
| 15 |
%% modify it under the terms of the GNU General Public License |
| 16 |
%% as published by the Free Software Foundation; either version 2 |
| 17 |
%% of the License, or (at your option) any later version. |
| 18 |
%% |
| 19 |
%% This program is distributed in the hope that it will be useful, |
| 20 |
%% but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 |
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 |
%% GNU General Public License for more details. |
| 23 |
%% -------------------------------------------------------------- |
| 24 |
%% |
| 25 |
%% The list of all files belonging to the TeXPower bundle is |
| 26 |
%% given in the file `00readme.txt'. |
| 27 |
%% |
| 28 |
% |
| 29 |
% Code for the LaTeX picture example for the package texpower.sty. |
| 30 |
% |
| 31 |
% This file is input by others. Don't compile it separately. |
| 32 |
% |
| 33 |
%----------------------------------------------------------------------------------------------------------------- |
| 34 |
|
| 35 |
% |
| 36 |
% This has nothing to do with \stepwise, just setting up the picture... |
| 37 |
% |
| 38 |
\newcommand{\leftm}{\left\{\!\!\left\{} |
| 39 |
\newcommand{\rightm}{\right\}\!\!\right\}} |
| 40 |
\newcommand{\cls}[3]{\left[#1,#2,#3\right]} |
| 41 |
\newcommand{\WT}[2]{\fbox{${#1}#2$}} |
| 42 |
\newcommand{\GEQ}[1]{\WT{\geq}{#1}} |
| 43 |
|
| 44 |
% |
| 45 |
% In the following picture, picture items are built incrementally. |
| 46 |
% |
| 47 |
% \parstepwise generates a sequence of slides, all alike. The only difference ist that on every slide, one more of the |
| 48 |
% \step commands occurring in the argument of \stepwise are `activated'. This way the stuff inside the argument of |
| 49 |
% \parstepwise is gone through `step by step'. (\parstepwise is a special case of \stepwise.) |
| 50 |
% |
| 51 |
{% |
| 52 |
\setlength{\unitlength}{1.35\semcm}% |
| 53 |
\footnotesize% |
| 54 |
\setlength{\fboxsep}{1.5pt}% |
| 55 |
\parstepwise |
| 56 |
{% |
| 57 |
\begin{center} |
| 58 |
\begin{picture}(12,13)(-7,-16) |
| 59 |
\put(-3,-3.5){\makebox(0,0){$\cls{\leftm p_1, p_2\rightm}{1}{\GEQ{0.2}}$}} |
| 60 |
\put(3,-3.5){\makebox(0,0){$\cls{\leftm \neg p_2,p_1\rightm}{1}{\GEQ{0.1}}$}} |
| 61 |
% |
| 62 |
% In the following, we see the very first occurrence of the \step command. Its effect is to `hide' its |
| 63 |
% argument on the first slide of the sequence generated by \stepwise and display it on all other slides of |
| 64 |
% this sequence. The second \step command starts displaying on the third slide and so on... |
| 65 |
% |
| 66 |
\step{% |
| 67 |
% We use \afterstep{\pageTransitionDissolve} to make this first step of the diagram appear with a fancy page |
| 68 |
% transition. We have to use \afterstep because the page transition setting would be undone by the group |
| 69 |
% closing contained in \end{picture}. |
| 70 |
\afterstep{\pageTransitionDissolve}% |
| 71 |
\put(-3,-4){\line(3,-1){3}} |
| 72 |
\put(3,-4){\line(-3,-1){3}} |
| 73 |
\put(0,-4.5){\makebox(0,0){(ass.)}} |
| 74 |
\put(0,-5.5){% |
| 75 |
\makebox(0,0){% |
| 76 |
% |
| 77 |
% Here, one use of \step is nested inside the other. |
| 78 |
% |
| 79 |
% Usually `hiding' means ignoring altogehter. For the following application however, the `hidden' objects |
| 80 |
% are nested inside a brace. This means that instead of ignoring its argument, it's better if |
| 81 |
% \step displays an appropriate amount of blank space. This behaviour (create blank space) is exhibited by |
| 82 |
% the custom command \bstep (for `boxed' step). |
| 83 |
% |
| 84 |
% The command \rebstep allows both boxes to appear simultaneously. |
| 85 |
% |
| 86 |
% \afterstep is used again to reset the page transition to Replace for the building of the formula. |
| 87 |
% |
| 88 |
% Setting \activatestep to \highlightboxed makes the additional formulae `stick out' when they are filled |
| 89 |
% in. |
| 90 |
% |
| 91 |
\let\activatestep=\highlightboxed |
| 92 |
$ |
| 93 |
\cls |
| 94 |
{\leftm p_1, \bstep{\afterstep{\pageTransitionReplace}p_1}, p_2,\rebstep{\neg p_2}\rightm} |
| 95 |
{2.2} |
| 96 |
{\rebstep{\GEQ{0.1}}}% |
| 97 |
$% |
| 98 |
}% |
| 99 |
} |
| 100 |
} |
| 101 |
\step{% |
| 102 |
\afterstep{\pageTransitionDissolve}% |
| 103 |
\put(0,-6){\line(0,-1){1}} |
| 104 |
\put(0.2,-6.5){\makebox(0,0)[l]{(removing)}} |
| 105 |
\put(0,-7.5){\makebox(0,0){$\cls{\leftm p_1, p_1\rightm}{1.2}{\GEQ{0.1}}$}} |
| 106 |
} |
| 107 |
\step{% |
| 108 |
\put(-8,-7.5){\makebox(0,0){$\left[\neg p_1,\GEQ{0.4}\right]$}} |
| 109 |
\put(-8,-8){\line(5,-1){5}} |
| 110 |
\put(0,-8){\line(-3,-1){3}} |
| 111 |
\put(-3,-8.5){\makebox(0,0){(ass.)}} |
| 112 |
\put(-3,-9.5){\makebox(0,0){$\cls{\leftm p_1, p_1,\neg p_1\rightm}{1.6}{\GEQ{0.1}}$}} |
| 113 |
\put(-3,-10){\line(0,-1){1}} |
| 114 |
\put(-2.8,-10.5){\makebox(0,0)[l]{(removing)}} |
| 115 |
\put(-3,-11.5){\makebox(0,0){$\cls{\leftm p_1\rightm}{0.6}{\GEQ{0.1}}$}} |
| 116 |
} |
| 117 |
\step{% |
| 118 |
\put(-8,-8){\line(0,-1){4}} |
| 119 |
\put(-8,-12){\line(5,-1){5}} |
| 120 |
\put(-3,-12){\line(0,-1){1}} |
| 121 |
\put(-2.8,-12.5){\makebox(0,0)[l]{(assembling)}} |
| 122 |
\put(-3,-13.5){\makebox(0,0){$\cls{\leftm p_1,\neg p_1\rightm}{1.0}{\GEQ{0.1}}$}} |
| 123 |
\put(-3,-14){\line(0,-1){1}} |
| 124 |
\put(-2.8,-14.5){\makebox(0,0)[l]{(removing)}} |
| 125 |
\put(-3,-15.5){\makebox(0,0){$\left[\fbox{\phantom{x}},\GEQ{0.1}\right]$}} |
| 126 |
} |
| 127 |
\end{picture}% |
| 128 |
\end{center} |
| 129 |
}% |
| 130 |
} |
| 131 |
|
| 132 |
% The whole execution of \stepwise is encapsuled in a group to make all changes local. This affects also the setting |
| 133 |
% of the page transition to dissolve in the last but one step. We set it again explicitly to make the last step appear |
| 134 |
% with this page transition as well. |
| 135 |
|
| 136 |
\pageTransitionDissolve |
| 137 |
\endinput |
| 138 |
%% |
| 139 |
%% End of file `picltxexample.tex'. |