[pstricks] Re: two pstricks/pst-node questions

Herbert Voss Herbert.Voss at gmx.net
Thu Aug 5 23:27:33 CEST 2004


John Richard Zimmerman wrote:
> I am doing a flow chart using pst-node, and I have two questions.
> 
> First, is it possible to control where on a side a connecting arrow leaves
> (or points to) an object?  I see how to choose the correct side of the
> object, but the connecting arrows are only leaving or pointing to the
> center of the side.  I would like one arrow (the E-F arrow below), to
> leave the box below where it is leaving now.
> 
> Second, if you compile the picture, you will see that there is a small
> gap between the box and the arrow between the two big boxes.  How can I
> get rid of that gap?  The code for my main file and for two \input files
> is shown below.  Thanks, John

Here is my example with a correct bounding box for the whole
graphic

Herbert


\documentclass[a4paper,10pt]{article}
\usepackage{pstricks,pst-node}

\def\tI{%
\psframebox[boxsep=0pt,linecolor=red]{%
   \begin{pspicture}(-1,7)(10,10)
 
\rput(-3,8.5){\rnode{D}{\psframebox{\parbox{24mm}{Inputs:\\Input\\Input 
\\Input}}}}
     \rput(0.5,8.5){\rnode{A}{\psframebox{\parbox{20mm}{Mod 1\\X, X}}}}
     \rput(4.5,8.5){\rnode{B}{\psframebox{\parbox{28mm}{Mod 2:\\X, X, X}}}}
     \rput(8.5,8.5){\rnode{C}{\psframebox{\parbox{15mm}{Mod 3:\\X,X}}}}
     \psset{arrows=->,armA=0.5,angleB=90}
     \ncline{->}{D}{A}
     \ncline{->}{A}{B}
     \ncline{->}{B}{C}
     \ncangles{->}{C}{A}
   \end{pspicture}}%
}
\def\tII{%
\psframebox{%
   \begin{pspicture}(-1,0)(10,3)
     \rput(0.5,1.5){\rnode{G}{\psframebox{\parbox{20mm}{Mod 1\\X, X}}}}
     \rput(4.5,1.5){\rnode{H}{\psframebox{\parbox{28mm}{Mod 2:\\X, X, X}}}}
     \rput(8.5,1.5){\rnode{I}{\psframebox{\parbox{15mm}{Mod 3:\\X,X}}}}
     \psset{arrows=->,armA=0.5,angleB=90}
     \ncline{->}{G}{H}
     \ncline{->}{H}{I}
     \ncline{->}{B}{C}
     \ncangles{->}{I}{G}
\end{pspicture}}%
}

\begin{document}

\makebox[\textwidth]{%
\psframebox{\begin{pspicture}(-4,1.75)(11.25,10.25)
   \rput(5,8.5){\rnode{E}{\tI}}%
   \rput(-2.5,3.5){\rnode{F}{\psframebox{\parbox{24mm}{Inputs:
       \\Input\\Input\\Input}}}}%
   \rput(5,3.5){\tII}%
   \ncangles[armA=0.5,nodesepA=0,angleB=90,armB=1.5]{->}{E}{F}
\end{pspicture}}
}

\end{document}


-- 
http://TeXnik.de/
http://PSTricks.de/
ftp://ftp.dante.de/tex-archive/info/math/voss/Voss-Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes




More information about the PSTricks mailing list