1\environment back0
2
3\startuseMPgraphic{mpos:par:columnset:shade}
4 numeric h ;
5 for i=1 upto nofmultipars :
6 h := bbheight(p) ;
7 if multikind[i] = "single" :
8 fill multipars[i] topenlarged -.5h
9 withshademethod "linear"
10 withshadedirection shadedup
11 withcolor boxfillcolor shadedinto .8white ;
12 fill multipars[i] bottomenlarged -.5h
13 withshademethod "linear"
14 withshadedirection shadedup
15 withcolor .8white shadedinto boxfillcolor ;
16 elseif multikind[i] = "first" :
17 fill multipars[i]
18 withshademethod "linear"
19 withshadedirection shadedup
20 withcolor boxfillcolor shadedinto .8white ;
21 elseif multikind[i] = "middle" :
22 fill multipars[i] topenlarged -.5h
23 withshademethod "linear"
24 withshadedirection shadedup
25 withcolor boxfillcolor shadedinto .8white ;
26 fill multipars[i] bottomenlarged -.5h
27 withshademethod "linear"
28 withshadedirection shadedup
29 withcolor .8white shadedinto boxfillcolor ;
30 elseif multikind[i] = "last" :
31 fill multipars[i]
32 withshademethod "linear"
33 withshadedirection shadedup
34 withcolor .8white shadedinto boxfillcolor ;
35 fi ;
36 endfor ;
37\stopuseMPgraphic
38
39\definecolumnset
40 [four]
41 [n=4,
42 distance=5mm]
43
44\definetextbackground
45 [shade]
46 [location=paragraph,
47 backgroundcolor=shadecolor,
48 mp=mpos:par:columnset:shade,
49 before=\blank,
50 after=\blank]
51
52\starttext
53
54 \startcolumnset[four]
55
56 \dorecurse{15} {
57 \starttextbackground[shade]
58 \simulatewords[n=10,m=500,min=1,max=5,color=text]
59 \stoptextbackground
60 }
61
62 \stopcolumnset
63
64\stoptext
65 |