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