%% %% This is file `picpsexample.tex', %% generated with the docstrip utility. %% %% The original source files were: %% %% texpower-doc.dtx (with options: `picpsexample') %% %% -------------------------------------------------------------- %% TeXPower bundle - dynamic online presentations with LaTeX %% Copyright (C) 1999-2004 Stephan Lehmke %% Copyright (C) 2003-2005 Hans Fredrik Nordhaug %% %% This program is free software; you can redistribute it and/or %% modify it under the terms of the GNU General Public License %% as published by the Free Software Foundation; either version 2 %% of the License, or (at your option) any later version. %% %% This program is distributed in the hope that it will be useful, %% but WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %% GNU General Public License for more details. %% -------------------------------------------------------------- %% %% The list of all files belonging to the TeXPower bundle is %% given in the file `00readme.txt'. %% % % Code for the PSTricks picture example for the package texpower.sty. % % This file is input by others. Don't compile it separately. % %----------------------------------------------------------------------------------------------------------------- % % This has nothing to do with \stepwise, just setting up the picture... % \newcommand{\Block}[1] {% \begin{pspicture}(-4,-2)(4,2) \pspolygon(-4,0)(-2,2)(2,2)(4,0)(2,-2)(-2,-2) \rput(0,0){#1} \end{pspicture}% }% \ifthenelse{\boolean{TPcolor}} {\psset{unit=3mm,fillstyle=solid,fillcolor=highlightcolor,linecolor=textcolor}}% {\psset{unit=3mm}}% % % In the following picture, picture items are built incrementally. % % \parstepwise generates a sequence of slides, all alike. The only difference ist that on every slide, one more of the % \step commands occurring in the argument of \stepwise are `activated'. This way the stuff inside the argument of % \parstepwise is gone through `step by step'. (\parstepwise is a special case of \stepwise.) % \parstepwise {% \begin{center} \large \begin{pspicture}(-1,-13)(33,9) \rput(0,0){\rnode{x}{\fboxrule0pt\fbox{$x[t]$}}} \rput(32,0){\rnode{y}{\fboxrule0pt\fbox{$y(t)$}}} {% % The effect of the \step command is to `hide' its argument on the first slide of the sequence generated by % \stepwise and display it on all other slides of this sequence. The second \step command starts displaying on % the third slide and so on... % % Usually `hiding' means ignoring altogehter. For the following application however, the box displayed by % \step is used as an node in the picture. This means that instead of ignoring its argument, it's better if % \step displays an appropriate amount of blank space. % This behaviour (create blank space) is exhibited by the command \bstep. \rput(4,0){\rnode{V}{\bstep{\psframebox{\Large$V$}}}} \ncline{->}{x}{V} % % The command \rebstep allows both boxes to appear simultaneously. % \rput(28,0){\rnode{plus}{\rebstep{\psframebox{\Large$+$}}}} }% \ncline{->}{plus}{y} % By using \restep again, the two boxes defining the operators appear at the same time as the first block of the % diagram, which is produced by the following commands. \restep {% % We use \afterstep{\pageTransitionDissolve} to make this first step of the diagram appear with a fancy page % transition. We have to use \afterstep because the page transition setting would be undone by the group % closing contained in \end{pspicture}. \afterstep{\pageTransitionDissolve}% \rput(16,0){\rnode{IBlk}{\Block{I-Block}}} \ncline{->}{V}{IBlk} \Aput{$x[t]$} \ncline{->}{IBlk}{plus} \Aput {% % % Here, one use of \step is nested inside the other. $% % Note how the math spacing is corrected manually by adding {} after \cdot. Otherwise, \cdot wouldn't be % aware that something is following and act as a postfix (instead of infix) operator. % \afterstep is used again to reset the page transition to Replace for the building of the formula. \bstep{\afterstep{\pageTransitionReplace}{}b\cdot{}}% \bstep{\int\limits^t_0 x(\tau)\,d\tau}% $% }% }% \step {% \afterstep{\pageTransitionDissolve}% \rput(16,6){\rnode{PBlk}{\Block{P-Block}}} \ncangle[angleA=90,angleB=180,fillstyle=none]{->}{V}{PBlk} \Aput{$x(t)$} \ncangle[angleB=90,fillstyle=none]{->}{PBlk}{plus} \aput(.5){$a\cdot x(t)$} }% \step {% \rput(16,-6){\rnode{DBlk}{\Block{D-Block}}} \ncangle[angleA=-90,angleB=180,fillstyle=none]{->}{V}{DBlk} \Aput{$x(t)$} \ncangle[angleB=-90,fillstyle=none]{->}{DBlk}{plus} \aput(.5){$\displaystyle c\cdot \left(\frac{dx}{d\tau}\right)(t)$} } \end{pspicture}% \end{center} }% % The whole execution of \stepwise is encapsuled in a group to make all changes local. This affects also the setting % of the page transition to dissolve in the last but one step. We set it again explicitly to make the last step appear % with this page transition as well. \pageTransitionDissolve \endinput %% %% End of file `picpsexample.tex'.