1
2
3
4
5
6
7
8
9
10
11
12
13
14\startmodule [ cdr 0 1 ]
15
16\setupmodule [ cdr 0 1 ][ option =]
17
18\def \PDFMPformoffset { 2 0 cm }
19
20\definepapersize
21 [ CDcover ]
22 [ width = 1 2 . 5 cm ,
23 height = 1 2 . 4 cm ]
24
25\definelayout
26 [ CDcover ]
27 [ topspace = 5 mm ,
28 backspace = 5 mm ,
29 header = 0 pt ,
30 footer = 0 pt ,
31 width = middle ,
32 height = middle ]
33
34\setuparranging
35 [ 2 SIDE ]
36
37\setuppapersize
38 [ CDcover ]
39 [ A 4 , landscape ]
40
41\setuplayout
42 [ CDcover ]
43
44\setuplayout
45 [ location = middle ]
46
47\setupcolors
48 [ state = start ]
49
50\setupbackgrounds
51 [ leftpage ]
52 [ background = leftcover ]
53
54\setupbackgrounds
55 [ rightpage ]
56 [ background = rightcover ]
57
58\setuppagenumbering
59 [ alternative = doublesided ]
60
61\defineoverlay [ leftcover ] [ \useMPgraphic { leftcover } ]
62\defineoverlay [ rightcover ][ \useMPgraphic { rightcover } ]
63
64\definecolor [ cd color ] [ s = 0 ]
65\definemeasure [ cd linewidth ][ . 4 pt ]
66
67\doif { \moduleparameter { cdr 0 1 }{ option }} { light } {
68 \definecolor [ cd color ] [ s = . 8 5 ]
69 \definemeasure [ cd linewidth ][ . 2 pt ]
70}
71
72\startuseMPgraphic { leftcover }
73 StartPage ;
74 pickup pencircle scaled \measure { cd linewidth } ;
75 draw
76 bottomboundary Page &
77 rightboundary Page &
78 topboundary Page withcolor \MPcolor { cd-color } ;
79 draw
80 bottomboundary ( Page enlarged 3 mm ) &
81 rightboundary ( Page enlarged 3 mm ) &
82 topboundary ( Page enlarged 3 mm ) dashed evenly withcolor \MPcolor { cd-color } ;
83 StopPage ;
84\stopuseMPgraphic
85
86\startuseMPgraphic { rightcover }
87 StartPage ;
88 pickup pencircle scaled \measure { cd linewidth } ;
89 draw
90 topboundary Page &
91 leftboundary Page &
92 bottomboundary Page withcolor \MPcolor { cd-color } ;
93 draw
94 topboundary ( Page enlarged 3 mm ) &
95 leftboundary ( Page enlarged 3 mm ) &
96 bottomboundary ( Page enlarged 3 mm ) dashed evenly withcolor \MPcolor { cd-color } ;
97 draw
98 bottomboundary Page --
99 lrcorner Page shifted ( -5 mm , -1 cm ) --
100 llcorner Page shifted ( 5 mm , -1 cm ) -- cycle withcolor \MPcolor { cd-color } ;
101 draw
102 topboundary Page --
103 ulcorner Page shifted ( 5 mm , 1 cm ) --
104 urcorner Page shifted ( -5 mm , 1 cm ) -- cycle withcolor \MPcolor { cd-color } ;
105 StopPage ;
106 setbounds currentpicture to Page ;
107\stopuseMPgraphic
108
109\setupmakeup
110 [ standard ]
111 [ doublesided = no , page =]
112
113\setuplayout
114 [ topspace = 5 mm ,
115 backspace = 5 mm ,
116 header = 0 pt ,
117 footer = 0 pt ,
118 width = middle ,
119 height = middle ]
120
121\defineframedtext
122 [ maintext ]
123 [ background = { foreground , color } ,
124 backgroundcolor = a bit white ,
125 frame = off ,
126 before = ,
127 after = ,
128 align = right ,
129 strut = no ,
130 height = fit ,
131 width = \textheight ]
132
133\stopmodule
134
135\doifnotmode { demo }{ \endinput }
136
137\starttext
138 \startstandardmakeup
139 page 1
140 \stopstandardmakeup
141
142 \startstandardmakeup
143 page 2
144 \stopstandardmakeup
145\stoptext
146 |