[pstricks] N/A
Ludwig Meyerhoff
ludwig at www.antar.de
Mon Jan 18 20:43:13 CET 2010
Hallo!
I am writing some documentation and have often to describe a sequence of steps.
For I do not like to work with MS Visio and some dozens of layers and hiding
blocks, I prefer to use PSTricks.
First I used to hide and reveal the code sections I wanted by commenting them
manually, when I realized I could hide them by a state-machine whose state is
defined by a counter:
\newcount\Graph
\setcount\Graph=0
...
\ifnum\Graph<5
\doSth
\fi
...
This worked fine until now, when I have to describe a tree.
One version relying only on \ovalnode and \rnode works fine this way.
For a second version I am using pst-tree, and my hiding approach does not compile.
I am using the following code (snippet), \Rect is just a convenience macro.
The code compiles if I hide the \TR{yyy} node within the \ifnum block.
...
\def\Rect#1#2{ \TR[name=#1]{ \psframebox{ \parbox{40mm}{ \begin{center} #2
\end{center}}}}}
\def\psedge{\nccurve[nodesepB=3pt, fillstyle=none, angleB=90, angleA=-90,
linewidth=3pt, linecolor=blue ]}
...
\psTree{ \Rect{FLUGHH6}{Flughafen HH (6)} }
\ifnum\Graph<10
\TR{yyy}
\fi
\Rect{TERMB}{Term. B (8) }
\psedge{TRANSPORT}{TERMB}
\endpsTree
If I reveal the \TR{yyy} node (like in the snippet above), I get an error I
have no idea what it complains about:
! Argument of \nccurve at ii has an extra }.
<inserted text>
\par
l.50 \psedge
{TRANSPORT}{TERMB}
?
I am using pst-tree version 1.11 -- can anyone show me the link between \ifnum
and \psTree? Is there a better way to create a sequence of pictures?
Saluti!
Ludwig
--
Open WebMail Project (http://openwebmail.org)
More information about the PSTricks
mailing list