Doubleline intersection

Denis Girou Denis.Girou at idris.fr
Thu Sep 10 18:36:11 CEST 1998


-----------------------------------------------------------------------------
This is the PSTricks mailing list, devoted to discussions about computational
graphics in (La)TeX using the PSTricks package from Timothy van Zandt.
For help using this mailing list, see instructions at the end of message.
-----------------------------------------------------------------------------

>>>>> "Michael.Bech" == Michael M Bech <mmb at iet.auc.dk> writes:

    Michael.Bech> For some block diagrams in control theory I need draw a lot of node
    Michael.Bech> connections with [doubleline=true]. A sample diagram is here:

    Michael.Bech>   |--------|                    \ |---------|
    Michael.Bech>   |        |---------------------\|         |
    Michael.Bech>   |   A    |----------   --------/|    C    |
    Michael.Bech>   |        |          | |       / |         |
    Michael.Bech>   |--------|          | |         |---------|
    Michael.Bech>                       | |
    Michael.Bech>   |--------| /        | |
    Michael.Bech>   |        |/---------  |
    Michael.Bech>   |   B    |\-----------| 
    Michael.Bech>   |        | \          
    Michael.Bech>   |--------|          

    Michael.Bech> The node connections are made by:
              
    Michael.Bech> \ncline[doubleline=true]{->}{A}{C}%
    Michael.Bech> \ncbar[doubleline=true, armA=0.5cm]{->}{A}{B}%

    Michael.Bech> Now, the problem is the intersection point of the double lines:
    Michael.Bech> I get something like this

    Michael.Bech>   |--------|                    \ |---------|
    Michael.Bech>   |        |----------|-|--------\|         |
    Michael.Bech>   |   A    |----------| |--------/|    C    |
    Michael.Bech>   |        |          | |       / |         |
    Michael.Bech>   |--------|          | |         |---------|

    Michael.Bech> but I would like the intersection to be "open" as shown in the first figure.

  I clearly don't think that it can be done directly, but "with some
experience and wiliness" it is rather easy to obtain (special care must be
taken to arrows, to keep them correct). Remember that in PostScript you can
always override some parts of previous results by usage of new commands
executed later. In some cases, it is a very useful and powerful technique.

\documentclass{article}

\usepackage{pst-node}

\pagestyle{empty}

\begin{document}

\begin{psmatrix}[mnode=r,colsep=5,rowsep=3]
  [name=A] \psframebox{\Huge A} & [name=C] \psframebox{\Huge C} \\[0pt]
  [name=B] \psframebox{\Huge B}
\end{psmatrix}

\psset{doubleline=true,doublesep=0.2,arrows=->}
\ncline{A}{C}
\ncbar[armA=2]{A}{B}
\ncline[linewidth=0,doublecolor=white,arrows=-,nodesepB=1]{A}{C}

\end{document}

D.G.

-----------------------------------------------------------------------------
The list interface (subscription, information, access to the archives) is on:
http://www.tug.org/cgi-bin/lwgate/pstricks
Otherway to unsubscribe, send mail to pstricks-request at mail.tug.org
with a blank subject and in body the line unsubscribe <email-address>
-----------------------------------------------------------------------------



More information about the PSTricks mailing list