My problem is identical to Phantom and line break, however, I am using ConTeXt.

I am creating a cloze test, e.g.:

Frogs have four ____ and two eyes.

The original text in the source appears like this:

Froms have four \cloze{legs} and two eyes.

How can I get any text appearing inside \cloze to be replaced with underscores of the same length? E.g. "elephant" is replaced with 8 underscores.

  • Do you want underscore or will an underline equal to the length of the word will do? Should it break across lines? If so, do you want underscores under spaces as well?
    – Aditya
    Jun 12, 2012 at 0:58
  • It should simply appear as a continuous rule, which does not break across line. Anything between the \cloze is treated as one part, spaces also are replaced with underscores.
    – Village
    Jun 12, 2012 at 1:15

1 Answer 1


If you don't need \cloze to break across lines, then the solution is simple:

\defineframed[cloze][frame=off, bottomframe=on, empty=yes]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .