1
2
3\usemodule[s][abr02]
4\usemodule[s][pre60]
5
6\definecolor[red:fullcolor] [r=1]
7\definecolor[red:lightcolor] [r=.5]
8\definecolor[red:darkcolor] [r=.375]
9
10\definecolor[green:fullcolor] [g=1]
11\definecolor[green:lightcolor] [g=.5]
12\definecolor[green:darkcolor] [g=.375]
13
14\definecolor[blue:fullcolor] [b=1]
15\definecolor[blue:lightcolor] [b=.5]
16\definecolor[blue:darkcolor] [b=.375]
17
18\definepalet[redscheme] [fullcolor=red:fullcolor, lightcolor=red:lightcolor, darkcolor=red:darkcolor]
19\definepalet[greenscheme][fullcolor=green:fullcolor,lightcolor=green:lightcolor,darkcolor=green:darkcolor]
20\definepalet[bluescheme] [fullcolor=blue:fullcolor, lightcolor=blue:lightcolor, darkcolor=blue:darkcolor]
21
22\setuppalet[redscheme]
23
24\setupcolors
25 [textcolor=darkcolor]
26
27\setupinteraction
28 [color=darkcolor,
29 contrastcolor=darkcolor]
30
31\startuseMPgraphic{bullet}
32 path b, p ;
33 p := fullsquare scaled .5LineHeight ;
34 b := boundingbox p ;
35 p := p rotatedaround(center p, 45) ;
36 p := p shifted (0,-.125StrutDepth) ;
37 fill p withcolor \MPcolor{lightcolor} ;
38 setbounds currentpicture to b ;
39\stopuseMPgraphic
40
41\startuseMPgraphic{bar}
42 path b, p ;
43 p := fullsquare scaled .25LineHeight ;
44 b := boundingbox p ;
45 p := p rotatedaround(center p, 45) ;
46 p := p shifted (0,+.25StrutDepth) ;
47 fill p withcolor \MPcolor{lightcolor} ;
48 setbounds currentpicture to b ;
49\stopuseMPgraphic
50
51\startuseMPgraphic{page}
52 StartPage ;
53 fill Page enlarged 5mm withcolor .1[white,\MPcolor{fullcolor}] ;
54 interim linecap := butt ;
55 numeric h ; h := bbheight(Page)4 ;
56 numeric w ; w := bbwidth(Page)4 ;
57 h := h randomized(h) ;
58 w := w randomized(w) ;
59 draw
60 ulcorner Page shifted (0,h) -- ulcorner Page -- ulcorner Page shifted (w,0)
61 withpen pensquare scaled .5cm
62 withcolor \MPcolor{lightcolor} ;
63 numeric h ; h := bbheight(Page)4 ;
64 numeric w ; w := bbwidth(Page)4 ;
65 h := h randomized(h) ;
66 w := w randomized(w) ;
67 draw
68 lrcorner Page shifted (0,h) -- lrcorner Page -- lrcorner Page shifted (w,0)
69 withpen pensquare scaled .5cm
70 withcolor \MPcolor{lightcolor} ;
71 setbounds currentpicture to Page ;
72 StopPage ;
73\stopuseMPgraphic
74
75\defineoverlay[page][\useMPgraphic{page}]
76
77\definesymbol[1][\reuseMPgraphic{bullet}]
78\definesymbol[2][\reuseMPgraphic{bar}]
79
80\setupitemgroup[itemize][2][width=1em]
81
82\setupinteraction
83 [state=start,
84 click=no]
85
86\setuppapersize
87 [S6][S6]
88
89\setuplayout
90 [width=middle,
91 height=middle,
92 header=0pt,
93 footer=0pt,
94 backspace=1cm,
95
96 topspace=.5cm]
97
98\setupbackgrounds
99 [page]
100 [background=page]
101
102\setuphead
103 [chapter]
104 [command=\MyCommand,
105 before=,
106 after={\blank[disable]},
107 color=lightcolor,
108 style=\bfc]
109
110\definelayer
111 [title]
112 [width=\paperwidth,
113 height=\paperheight]
114
115\setupbackgrounds
116 [page]
117 [background={page,title}]
118
119\setupwhitespace
120 [big]
121
122\unexpanded\def\MyCommand#1#2
123 {\setlayer[title][preset=rightbottom,x=.75cm,y=.5cm]{#2}}
124
125\def\titlepage#1#2
126 {\startstandardmakeup
127 \definefont[LargeFont][Normal at 100pt]
128 \setlayerframed
129 [title]
130 [preset=lefttop,x=1cm,y=.25cm]
131 [align=flushleft,foregroundstyle=\LargeFont,offset=0pt,foregroundcolor=lightcolor,frame=off]
132 {#1}
133 \definefont[SmallFont][Normal at 50pt]
134 \setlayerframed
135 [title]
136 [preset=rightbottom,x=1cm,y=.5cm]
137 [align=flushright,foregroundstyle=\SmallFont,offset=0pt,foregroundcolor=lightcolor,frame=off]
138 {#2}
139 \stopstandardmakeup}
140
141\let\Title\title
142\let\TitlePage\titlepage
143
144\doifnotmode{demo}{\endinput}
145
146\starttext
147 \chapter{Test}
148 \startitemize
149 \startitem test \stopitem
150 \startitem test \stopitem
151 \startitem test \stopitem
152 \stopitemize
153\stoptext
154
155\endinput
156 |