Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

from what I could find on the net, the picture environment does not offer the triangle shape. It is possible to get something similar with lines but not when you want the triangle to be fill up with a solid color. Do you confirm? Maybe the bezier curves could be an option.

\setlength{\unitlength}{2pt}
\begin{picture}(50,200)
\linethickness{1pt}
\bezier{20}(0,0)(10,30)(50,30)
\put(0,0){\circle*{1}}
\put(50,30){\line(-1,0){40}}
\put(50,31){\makebox(0,0)[b]{C}}
\end{picture} 
share|improve this question

1 Answer 1

up vote 13 down vote accepted

picture environment is too old to use. You'd better use TikZ or PSTricks instead, which are the most powerful packages to draw pictures. And if you are so familar with standard picture environment that you don't want to change, you can also use pict2e to improve the standard picture environment.

Examples:

In TikZ,

\begin{tikzpicture}
\filldraw[fill=orange,line width=1pt] (0,0) -- (4,3) -- (5,0) -- cycle;
\end{tikzpicture}

In PSTricks,

\begin{pspicture}(5,4)
\pspolygon[linewidth=1pt,fillstyle=solid,fillcolor=orange]
  (0,0)(4,3)(5,0)
\end{pspicture}

In pict2e

\setlength\unitlength{1cm}
\begin{picture}(5,4)
{\color{orange}\polygon*(0,0)(4,3)(5,0)}
{\linethickness{1pt}\polygon(0,0)(4,3)(5,0)}
\end{picture}

enter image description here

share|improve this answer
1  
thanks. I know it is old and I'm using it in a very limited manner. I like the pict2e package. –  pluton Feb 2 '11 at 13:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.