I'd like to put some lines on a page where a student can answer a question, and I'd like that line to go from the prompt to the right edge of the text. The most simpleminded and (therefore?) unsuccessful of doing so is with the following MWE:
\documentclass{article}
\begin{document}
\begin{enumerate}
\item Prompt: \underline{\hspace{\linewidth}}
\underline{\hspace{\linewidth}}
\end{enumerate}
\end{document}
The problem is that the first line extends into the right margin. What I need is to find an expression that tells the first line how much space is left from the insertion point (right after "Prompt:") to the left margin.
The second line is exactly the right length.
\item Prompt: \hrulefill– egreg Mar 20 '16 at 13:12