Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
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

1 Answer 1

up vote 8 down vote accepted

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

\defineframed[cloze][frame=off, bottomframe=on, empty=yes]
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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