Am 24.06.2013 um 16:36 schrieb Christian Prim <christian.p...@gmx.ch>:

> Hi list
> 
> I wonder if I can typeset a cloze text using context. The gaps (__________) 
> must have a given length (say in cm or the length of a given word, given 
> sentence) and must break at the end of a line.
> 
> \hl[4] is nice but won't do the trick since it won't break. \fillinline and 
> others fill the hole line, but I only want to fill a given size.
> 
> Are there some ideas how to deal with it?

\def\TextGap[#1]%
  {\scratchdimen#1\relax
   \divide\scratchdimen\plusten
   \dorecurse\plusten
     {\vrule width \scratchdimen height \linewidth\relax
      \ifnum\recurselevel<10 \hskip\zeropoint\relax \fi}}

\starttext
a \TextGap[4cm] b \TextGap[4cm] c \TextGap[4cm] d \TextGap[4cm] e
\stoptext

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to