@Martin Scharrer suggested me the following amazing solution to make cloze texts: https://tex.stackexchange.com/a/16004/4011
\documentclass{article}
\usepackage[normalem]{ulem}
\makeatletter
\def\UL@putbox{\ifx\UL@start\@empty \else % not inner
\vrule\@width\z@ \LA@penalty\@M
{\UL@skip\wd\UL@box \UL@leaders \kern-\UL@skip}%
\phantom{\box\UL@box}%
\fi}
\makeatother
\begin{document}
Some text \uline{some text to complete some text to complete
some text to complete some text to complete some text to complete some text
to complete some text to complete} some more text.
\end{document}
Now I have some follow up questions about this approach:
- How can I adjust this such that I can choose all the "underline styles" offered by the ulem package
\dotuline,\dashuline,\uwaveand\uuline? - How can I adjust the vertical space between the phantom text and the underline?
- Is it possible to get a normal working version of
\ulineat the same time? (Call it for example\Uline,\Uulineetc.).



\ifulphantomadded that enables/disables the phantom versions of the macros from packageulem. – Heiko Oberdiek Oct 30 '12 at 15:27