[pstricks] Questions about pst-node

Herbert Voss Herbert.Voss at FU-Berlin.DE
Sat May 8 08:02:04 CEST 2010


Am 07.05.2010 17:12, schrieb Martin Chicoine:

> I use pst-node to draw the following diagram. I have some questions:
> 
> 1) Why is the "Wide Gray Common Box 1" not well centered on the central
> arrow?
> 
> 2) Is there a way to draw the top and bottom horizontal arrows without
> having to specify the 2cm offsets?
> 
> 3) Is there a better way to draw the gray frame?

\documentclass{article}
\usepackage{pst-node}

\begin{document}

\psset{arrowscale=2}
\newcommand{\cadre}[1]{\fcolorbox{black}{cyan}{\parbox{6cm}{\centering #1}}}

\psmatrix[colsep=1.5cm,rowsep=1cm]
  \psframe[fillstyle=solid,fillcolor=lightgray](-3.5,0)(3.5,-7.8) \\
   Title & \\
  \cadre{Box 1\\ (B1)} & \\
  \cadre{Box 2\\ (B2)} & [mnode=r]
    \rput[b]{-90}{\colorbox{lightgray}{Wide Gray Common Box 1}} \\
  \cadre{Box 3\\ (B3)} & \\
  \cadre{Box 4\\ (B4)} & \\
\endpsmatrix
\ncline{->}{3,1}{4,1}
\ncline{->}{4,1}{5,1}
\ncline{->}{5,1}{6,1}
\ncline{<-}{3,1}{3,2}
\ncline{<-}{4,1}{4,2}
\ncline{<-}{5,1}{5,2}

\end{document}


Herbert


More information about the PSTricks mailing list