5

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 '12 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 '12 at 1:15
8

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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