[pstricks] How do you do if then?
David Arnold
dwarnold45 at suddenlink.net
Sat Mar 7 06:48:06 CET 2009
All,
This produces a 2 by 4 arrow of boxes. I'd like the first row to have
four boxes, but the second row to stop at three boxes. This shoud use
some sort of if then statement, I would imagine, to limit the second
row to three boxes. How do you use if then in pstricks to get what I
want?
\documentclass{article}
\usepackage{pstricks}
\usepackage{pstricks-add}
\include{pst-func}
\def\Box{\psframebox{\rule{3mm}{0pt}\rule{0pt}{3mm}}}
\begin{document}
\begin{pspicture}(1,0.5)(4,2.5)
\multido{\iA=1+1}{4}{%
\multido{\iB=1+1}{2}{%
\rput(\iA,\iB){\rnode{p\iA\iB}{\Box}}}}
\ncbox[linearc=0.35,nodesep=0.2,linecolor=blue]{p11}{p31}
\ncbox[linearc=0.35,nodesep=0.2,linecolor=blue]{p12}{p32}
\end{pspicture}
\end{document}
Thanks.
David.
More information about the PSTricks
mailing list