1
2
3
4
5
6
7
8
9
10
11
12
13
14\usemodule[presentgeneral]
15
16\startmodule[presentcolorful]
17
18
19
20
21
22
23
24
25\setupbodyfont[postscript,14.4pt]
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43\setupcolors [state=start]
44
45\definecolor [NoneColor] [s=.6]
46\definecolor [GotoColor] [b=.6] \definecolor[blue] [GotoColor]
47\definecolor [ExitColor] [r=.6] \definecolor[red] [ExitColor]
48\definecolor [JumpColor] [s=.6]
49\definecolor [UserColor] [g=.6] \definecolor[green] [UserColor]
50
51\definecolor [StepColor] [y=.8] \definecolor[yellow][StepColor]
52
53\definecolor [PageColor] [s=.80] \definecolor[gray] [PageColor]
54\definecolor [TextColor] [s=.90]
55\definecolor [TitleColor][s=.90]
56
57
58
59
60
61
62\setuppapersize
63 [S6][S6]
64
65
66
67
68
69
70
71\setuplayout
72 [width=530pt,
73 height=400pt,
74 header=0pt,
75 footer=0pt,
76 backspace=15pt,
77 topspace=15pt,
78 bottomdistance=15pt,
79 bottom=10pt,
80 margin=0pt,
81 rightedgedistance=15pt,
82 rightedge=30pt]
83
84\setupinteractionscreen
85 [option=max]
86
87
88
89
90
91
92
93
94\setupbackgrounds
95 [page]
96 [background=color,
97 backgroundcolor=PageColor]
98
99\setupbackgrounds
100 [text][text]
101 [background=color,
102 backgroundcolor=TextColor,
103 backgroundoffset=5pt]
104
105
106
107
108
109
110\setupinteraction
111 [state=start,
112 menu=on,
113 color=UserColor,
114 contrastcolor=NoneColor]
115
116
117
118
119
120
121
122\setupsubpagenumber
123 [state=start,
124 way=bytext]
125
126
127
128
129
130
131
132\setupinteractionmenu
133 [right]
134 [state=start,
135 frame=off,
136 strut=no,
137 offset=0pt,
138 inbetween=,
139 bottomoffset=5pt,
140 topoffset=5pt]
141
142
143
144
145
146
147
148
149
150\startinteractionmenu[right]
151 \setupinteraction[color=GotoColor]
152 \but [previoussubpage] \Triangle {90}\hsize\interactioncolor \\
153 \vskip10pt
154 \but [nextsubpage] \Triangle{270}\hsize\interactioncolor \\
155 \vfill
156 \but [PreviousJump] \Triangle{180}\hsize{NoneColor} \\
157 \vskip5pt
158 \but [NextJump] \Triangle {0}\hsize{NoneColor} \\
159\stopinteractionmenu
160
161
162
163
164
165
166
167\setupinteractionbar
168 [width=\textwidth,
169 height=\bottomheight,
170 distance=10pt,
171 color=NoneColor,
172 contrastcolor=StepColor]
173
174
175
176
177
178
179\setupbottomtexts
180 [{\interactionbar[alternative=f]}]
181
182
183
184\unexpanded\def\CloseButton
185 {\ifnum\realpageno>\plusone
186 \button
187 [width=\rightedgewidth,
188 height=\bottomheight,
189 offset=overlay,
190 background=color,
191 backgroundcolor=ExitColor,
192 frame=off]
193 {}
194 [CloseDocument]
195 \fi}
196
197\setupbottomtexts
198 [edge][][\CloseButton]
199
200
201
202
203
204
205
206\definesymbol[1][\blacktriangleright]
207\definesymbol[2][\blacktriangledown]
208\definesymbol[3][\blacktriangleright]
209\definesymbol[4][\blacktriangledown]
210
211\setupitemize[each][color=NoneColor]
212
213
214
215
216
217
218
219
220
221\defineoverlay [TitleGraphic] [\useMPgraphic{title}]
222\defineoverlay [NextPage] [\overlaybutton{nextpage}]
223
224\unexpanded\def\StartTitlePage
225 {\setupbackgrounds[page][background={color,TitleGraphic,NextPage}]
226 \setupbackgrounds[text][text][background=]
227 \setupinteraction[menu=off]
228 \setupinteractionbar[state=stop]
229 \startpagemakeup
230 \switchtobodyfont[24pt]
231 \bfd\setupinterlinespace
232 \setupalign[middle]
233 \vfil
234 \enforced\let\\\vfil
235 \scale
236 [factor=max]\bgroup
237 \framed
238 [frame=off,
239 align=middle,
240 foregroundcolor=TitleColor,
241 offset=.05\textwidth]
242 \bgroup}
243
244\unexpanded\def\StopTitlePage
245 {\egroup
246 \egroup
247 \vfil\vfil\vfil
248 \stoppagemakeup
249 \setupinteraction[menu=on]
250 \setupinteractionbar[state=start]
251 \setupbackgrounds[page][background=color]
252 \setupbackgrounds[text][text][background=color]}
253
254\unexpanded\def\TitlePage#1
255 {\StartTitlePage#1\StopTitlePage}
256
257
258
259
260
261
262
263
264\definehead [Topic] [chapter]
265\definehead [Nopic] [title]
266\definehead [Subject] [section]
267
268\setuphead
269 [Topic,Nopic]
270 [after={\blank[3*medium]},
271 number=no,
272 style=\bfb,
273 page=yes,
274 alternative=middle]
275
276\setuphead
277 [Subject]
278 [after=\blank,
279 number=no,
280 page=yes,
281 continue=no,
282 style=\bfa]
283
284
285
286
287
288
289
290
291
292\setuplist
293 [Topic,Subject]
294 [alternative=g,
295 interaction=all,
296 before=,
297 after=]
298
299\setuplist
300 [Topic]
301 [criterium=all]
302
303\unexpanded\def\Topics#1
304 {\determinelistcharacteristics[Topic]
305 \ifnum\utilitylistlength>0
306 \Nopic[Topics]{#1}
307 \ifnum\utilitylistlength>12
308 \startcolumns
309 \placelist[Topic]
310 \stopcolumns
311 \else
312 \placelist[Topic]
313 \fi
314 \fi}
315
316\unexpanded\def\Subjects
317 {\placelist[Subject]}
318
319
320
321\setupMPvariables
322 [triangle]
323 [width=1cm,
324 rotation=0,
325 color=black]
326
327\startuniqueMPgraphic{triangle}{width,rotation,color}
328 fill triangle xsized \MPvar{width} rotated \MPvar{rotation} withcolor \MPvar{color} ;
329\stopuniqueMPgraphic
330
331\unexpanded\def\Triangle#1#2#3
332 {\uniqueMPgraphic{triangle}{rotation=#1,width=#2,c:color=#3}}
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354\startuseMPgraphic{title}
355 path p ; numeric sx, sy, cc ;
356 fill Page withcolor "StepColor" ;
357 for i=1 upto 1000 :
358 sx := 50 uniformdeviate 50 ;
359 sy := 50 uniformdeviate 50 ;
360 cc := round(uniformdeviate 2) ;
361 if round(uniformdeviate 1) = 0 :
362 p := unitsquare xscaled sx yscaled sy ;
363 else :
364 p := unittriangle scaled sx rotated (round(uniformdeviate 3) 90) ;
365 fi ;
366 p := p shifted (uniformdeviate OverlayWidth,uniformdeviate OverlayHeight) ;
367 fill p
368 withcolor
369 if cc = 0 : "GotoColor"
370 elseif cc = 1 : "ExitColor"
371 elseif cc = 2 : "StepColor" fi ;
372 draw p
373 withpen pencircle scaled 12
374 withcolor white ;
375 endfor ;
376\stopuseMPgraphic
377
378\stopmodule
379
380\continueifinputfile{spresentcolorful.mkiv}
381
382\usemodule[presentcommon]
383
384\inputpresentationfile{examplespresentcolorful001.tex}
385 |