[pstricks] Re: pstricks qustion

Herbert Voss Herbert.Voss at gmx.net
Thu Mar 3 16:32:50 CET 2005


Aaron Jackson wrote:
> I would like to draw two parallel vertical lines of different lengths 
> and widths that touch.  The problem I am having is knowing where to 
> place the second line so that the parallel lines scale properly.  For 
> example:
> 
> \begin{pspicture}(0,0)(3,2)
> \psline[linewidth=2pt](0,1)(0,-1)
> \psline[linewidth=4pt](0.1,0.3)(0.1,-0.3)
> \end{pspicture}
> 
> works for the given widths.  However if I change the thickness of either 
> line, then I have to recalculate the x offset (0.1 in this case) so that 
> the lines are tangent to each other.  Two solutions come to mind.

choose pcline from pst-node, then the offset can be
set with the option and it is half the width of both
lines

\begin{pspicture}(0,0)(3,2)
   \pcline[linewidth=8pt,offset=-11pt](0,1)(0,-1)
   \pcline[linewidth=14pt](0,0.3)(0,-0.3)
\end{pspicture}


Herbert



-- 
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