[pstricks] Drawing flowchart with pst-node
Martin Buchmann
Martin_Buchmann at gmx.net
Mon Feb 17 17:55:49 CET 2003
Hi all,
i'm drawing flowcharts for a Fortran90 program i'm working on at the
moment. I found the very inspiring example by Denis Girou at the tug's
website and have used this for some easy if constructs:
<-- Flowchart-exp.tex -->
%&latex
\documentclass{article}
\usepackage{pst-node}
\newlength\breite
\newcommand{\strukbox}[2]{%
\settowidth{\breite}{#1}
\addtolength{\breite}{0.1\breite}
\psframebox%
{\parbox{\breite}{\centering #2}}}
\pagestyle{empty}
\begin{document}
\begin{center}
\begin{psmatrix}[rowsep=0.5cm,colsep=0.8cm]
% the flowchart
\\
\psdiabox{\itshape logical\_expr} \\
\strukbox{Statement 1}{Statement 1 Statement 2} \\
\\
% the links
\ncline{->}{1,1}{2,1}
\ncline{->}{3,1}{5,1}
\ncline{->}{2,1}{3,1}>{.TRUE.}
\ncbar{->}{2,1}{4,1}
\naput[npos=0.8]{.FALSE.}
\end{psmatrix}
\end{center}
\end{document}
<-- eof -->
That's working fine therefore i hope it is correct :-)
But now i want to draw some do loops which look basically like this:
(please excuse the ASCII-art)
/-----------\
/ #1 | \
|------| #2 |
\ #3 | /
\-----------/
where #1 is the index start value, #2 is the end condition and #3 is the increase.
I would love to have a real markup solution like:
\DoLoop{#1}{#2}{#3}
which draws the right polygon and that can be used inside the
psmatrix-environment but i'm a bit unsure about starting to hack in some
code. So, i thought maybe someone did things like this already or can
give me a short hint how to start and which erros to avoid, etc.
Thanks in advance,
Martin
P.S.: Please don't get me wrong! I don't want someone to do my work i'm
just looking for some advice :-)
--
Smiley #11 The Angry Amiley :-||
You have reached your limit.
You are seething mad.
More information about the PSTricks
mailing list