Go to the previous page, next page (p3)

# The picture environment in latex

• You can draw in the "picture" environment. For example, the following code
 \documentstyle[12pt]{article} \begin{document} \setlength{\unitlength}{1cm} \begin{picture}(5,5) \linethickness{2pt} \put(0,0){\vector(1,2){1}} \put(2,3){\vector(2,3){1}} \put(2.2,3.2){$a_1$} \end{picture} \end{document} 
Produce ...
• In latex2e we can do more complicated drawing like the example below
 \documentstyle[12pt]{article} \begin{document} \setlength{\unitlength}{2pt} \begin{picture}(50,200) \linethickness{1pt} \bezier{20}(0,0)(10,30)(50,30) \bezier{200}(0,0)(40,0)(50,30) \thinlines \put(0,0){\circle*{1}} \put(0,0){\line(1,3){10}} \put(0,-1){\makebox(0,0)[t]{A}} \put(10,30){\circle*{1}} \put(10,31){\makebox(0,0)[b]{B}} \put(50,30){\circle*{1}} \put(50,30){\line(-1,0){40}} \put(50,31){\makebox(0,0)[b]{C}} \end{picture} \end{document} 
Produce ...
• There are even simpler commands that allow you to create commutative diagrams. For example (using the packages amstex.sty and amscd.sty),

 {\Huge \begin{equation*} \begin{CD} {\Bbb R^2} @>F>> {\Bbb R^2} \\ @VhVV @VVkV \\ {\Bbb R^2} @>>G> {\Bbb R^2} \end{CD} \end{equation*} } {\Huge \begin{equation*} \begin{CD} {\Bbb R^2} @>>F> {\Bbb R^2} @>>H> {\Bbb R^2} @>I>> {\Bbb R^2} \\ @VVhV @VkVV \\ {\Bbb R^2} @>G>> {\Bbb R^2} \end{CD} \end{equation*} }  creates ...

• There are many applications that allow you to make diagrams or graphs such as showcase, idraw, xfig and so on.
[Page 2]