back-4.tex /size: 760 b    last modification: 2020-07-01 14:35
1\environment back-0
2
3\startuseMPgraphic{mpos:par:color}
4  for i=1 upto nofmultipars :
5    fill multipars[i] withcolor
6      if     multikind[i]="single" : "darkgray" ;
7      elseif multikind[i]="first"  : "red" ;
8      elseif multikind[i]="middle" : "green" ;
9      elseif multikind[i]="last"   : "blue" ;
10      else                         : "black" ;
11      fi ;
12  endfor ;
13\stopuseMPgraphic
14
15\definecolumnset
16  [three]
17  [n=3,
18   distance=5mm]
19
20\definetextbackground
21  [shade]
22  [location=paragraph,
23   mp=mpos:par:color,
24   before=\blank,
25   after=\blank]
26
27\starttext
28
29\startcolumnset[three]
30
31  \dorecurse {20} {
32    \starttextbackground[shade]
33      \simulatewords[n=50,m=500,min=1,max=5,color=gray]%
34    \stoptextbackground
35  }
36
37\stopcolumnset
38
39\stoptext
40