# How do I make a line for unit conversions? [duplicate]

For example, I want to create an image like this:

48 inches = _____yd

• Jun 18 '13 at 8:30

There are several possibilities, e.g. \underline:

\documentclass{article}
\begin{document}
48 inches = \underline{\hspace{2em}} yd
\end{document}


A variant with \rule and \raisebox, that can easier be configured:

• line thickness by the second argument of \rule;
• depth of the line by the first argument of \raisebox.

The next optional arguments of \raisebox together with \phantom{Ay} let TeX know that it should leave the vertical space of Ay.

\documentclass{article}

\newcommand*{\phantomline}[1]{%
\raisebox{-\depth}[\height][\depth]{%
\vphantom{Ay}%
\rule{#1}{.5pt}%
}%
}

\begin{document}
48 inches = \phantomline{2em} yd
\end{document}