[pstricks] pst-eucl question -- labeling sides of a triangle

Christoph Bersch usenet at bersch.net
Sun Apr 19 17:19:31 CEST 2009


David Arnold wrote:
> 
> I would like to label the side of the right triangle produced by the  
> code below with the lower case letter of the upper case letter  
> marking the vertex directly opposite each side.
> 
> What's the best way to do this?
> 
> If I were just using nodes, I would:
> 
> \ncline{A}{B}
> \nbput{$c$}

\pstTriangle creates new nodes which you can use like normal:

\documentclass{article}
\usepackage{pst-eucl}
\begin{document}

\begin{center}
\begin{pspicture}(0,-0.2)(4,3.2)
\pstTriangle[PointSymbol=none,linecolor=blue](0,0){A}(4,3){B}(4,0){C}
\ncline[linestyle=none]{A}{B}\naput{first}
\ncline[linestyle=none]{B}{C}\naput{second}
\ncline[linestyle=none]{A}{C}\nbput{third}
\pstRightAngle[linecolor=blue]{A}{C}{B}
\end{pspicture}
\end{center}

\end{document}


More information about the PSTricks mailing list