2

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

48 inches = _____yd

5

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

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

Result

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}

Result

|improve this answer|||||

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