1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19\startuseMPgraphic{pagegrid}
20 StartPage ;
21 drawoptions(withcolor .8white) ;
22 fill Field[Text][Text] ;
23 drawoptions(withcolor .65white) ;
24 fill Field[Footer][Text] ;
25 fill Field[Header][Text] ;
26 fill Field[LeftMargin][Text] ;
27 fill Field[RightMargin][Text] ;
28 drawoptions(withcolor .65yellow) ;
29 fill Field[LeftEdge][Text] ;
30 fill Field[RightEdge][Text] ;
31 fill Field[Bottom][Text] ;
32 fill Field[Top][Text] ;
33 drawoptions(withpen pencircle scaled .3pt withcolor .65white) ;
34 for i=-3cm step 1cm until PaperWidth+3cm :
35 draw (i,-3cm)--(i,PaperHeight+3cm) ;
36 endfor ;
37 for i=PaperHeight+3cm step -1cm until -3cm :
38 draw (-3cm,i)--(PaperWidth+3cm,i) ;
39 endfor ;
40 drawoptions(withpen pencircle scaled .15pt) ;
41 for i=.5cm-3cm step 1cm until PaperWidth+3cm :
42 draw (i,-3cm)--(i,PaperHeight+3cm) ;
43 endfor ;
44 for i=PaperHeight-.5cm+3cm step -1cm until -3cm :
45 draw (-3cm,i)--(PaperWidth+3cm,i) ;
46 endfor ;
47 drawoptions(withpen pencircle scaled .3pt withcolor .65red) ;
48 for i=0 step 1cm until PaperWidth :
49 draw (i,0)--(i,PaperHeight) ;
50 endfor ;
51 for i=PaperHeight step -1cm until 0 :
52 draw (0,i)--(PaperWidth,i) ;
53 endfor ;
54 drawoptions(withpen pencircle scaled .15pt withcolor .65red) ;
55 for i=.5cm step 1cm until PaperWidth :
56 draw (i,0)--(i,PaperHeight) ;
57 endfor ;
58 for i=PaperHeight-.5cm step -1cm until 0 :
59 draw (0,i)--(PaperWidth,i) ;
60 endfor ;
61 drawoptions(withpen pencircle scaled 5pt withcolor .65red) ;
62 draw ulcorner Page ;
63 StopPage ;
64\stopuseMPgraphic
65
66\defineoverlay[pagegrid][\useMPgraphic{pagegrid}]
67
68\endinput
69 |