# How to show a wide bar over a letter?

I want to have a wide bar over XY but it just shows a small bar. Any idea?

\item In the standard $(x,y)$ coordinate plane, point $X$ has coordinates $(-4,0)$ and point $Y$ has coordinates $(0,-8)$. What is the coordinates of the midpoint of $\bar{XY}$?\hfill
\begin{enumerate}
\item $(-6,-1)$
\item $(-2,-4)$
\item $(0,2)$
\item $(2,4)$
\item $(6,-1)$
\end{enumerate}

• Did you try \overline{XY}? – gniourf_gniourf May 20 '14 at 18:01
• – Werner May 20 '14 at 18:14

To get an overline, well, just use the \overline macro!

\overline{XY}


You might want to add some semantic meaning. E.g., define a macro

\newcommand*\midpoint[1]{\overline{#1}}


and use as

\midpoint{XY}


or something similar.