diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-09 00:44:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-09 00:44:40 +0000 |
commit | b4fc5f639874db951177ec539299d20908adb654 (patch) | |
tree | 52f08823ca58fffe3db6a9b075635038c567626c /Master/texmf-dist/doc/latex/texpower/picpsexample.tex | |
parent | dec3d98ebe442d7ea93efbaa8dd2e2be8149a467 (diff) |
doc 4
git-svn-id: svn://tug.org/texlive/trunk@80 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/texpower/picpsexample.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/texpower/picpsexample.tex | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/texpower/picpsexample.tex b/Master/texmf-dist/doc/latex/texpower/picpsexample.tex new file mode 100644 index 00000000000..9408ce07a3b --- /dev/null +++ b/Master/texmf-dist/doc/latex/texpower/picpsexample.tex @@ -0,0 +1,141 @@ +%% +%% 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 +%% +%% 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. +% +%----------------------------------------------------------------------------------------------------------------- +% Autor: Stephan Lehmke <Stephan.Lehmke@cs.uni-dortmund.de> +% +% v0.0.1 Mar 21, 2000: First version for the pre-alpha release of TeXPower. +% +% v0.0.2 Apr 19, 2000: Using \bstep instead of \boxedsteps. +% +% v0.0.3 Apr 28, 2000: Some small changes in preparation of the update to TeXpower v0.0.7. +% + +%----------------------------------------------------------------------------------------------------------------- +% +% 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. +% +% \stepwise 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 +% \stepwise is gone through `step by step'. +% +\stepwise +{% + \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'. |