# [metapost] Labeling an angle

bob rjerrard at math.concordia.ab.ca
Sat Dec 23 20:10:31 CET 2006

On Sat, 2006-12-23 at 20:02 +0100, mailanholgerpeters at web.de wrote:
> Hi,
>
> I started writing summaries of the lectures I'm taking. For geometric drawings, I use metapost.
>
> There, I often have to label angles (alpha, beta, gamma, etc) for example between two straight lines. How do I do that?
>
> Holger

Hi Holger, I use commands like:

label.rt(btex $\theta=\frac{\pi}{3}$ etex, (0,0)) withcolor (1,0,0);

which gives a red theta=pi/3 in latex style at location (0,0). Of
course, you can use any latex symbol instead of theta, drop or change
the withcolor, and change the location easily enough. The label.rt will
place the label to the right of the specified location and center it
vertically (.top, .bot, lft, .urt, .lrt, .ulft, and .llft, are possible
label extensions).

To have this work, I also need to use:

verbatimtex
%&latex
\documentclass{article}
\usepackage{colordvi}
\begin{document}
etex;

at the beginning of the metapost file and

verbatimtex
\end{document}
etex;

at the end of the metapost file.

Hope that helps, Bob
--
Dr. Robert J. Jerrard, Professor of Mathematics,
Concordia University College of Alberta,