1
2
3
4
5
6
7
8
9
10
11
12
13
14\startmodule[presentwindows]
15
16
17
18
19
20
21\doifelsemode {asintended} {
22 \setupbodyfont[ludicaot,14.4pt]
23} {
24 \setupbodyfont[pagella,14.4pt]
25}
26
27
28
29
30
31
32
33
34\setuppapersize
35 [S6][S6]
36
37\setuplayout
38 [topspace=0cm,
39 backspace=0cm,
40 header=0pt,
41 footer=0pt,
42 width=middle,
43 height=middle]
44
45
46
47
48
49\let\TextSettings \empty
50\let\SampleSettings\empty
51
52\startsetups [text] \TextSettings \stopsetups
53\startsetups [sample] \SampleSettings \stopsetups
54
55
56
57\def\FrameWidth {448pt}
58\def\FrameHeight {348pt}
59\def\FrameOffset {24pt}
60\def\FrameSkip {12pt}
61
62
63
64\def\FrameWidth {408pt}
65\def\FrameHeight {318pt}
66
67
68
69\definecolor[PageColor] [s=.40]
70\definecolor[TextColor] [s=.90]
71\definecolor[InteractionColor][r=.40]
72\definecolor[LineColor] [r=.60,g=.60]
73
74
75
76
77\setupinteraction
78 [color=InteractionColor,
79 contrastcolor=LineColor,
80 display=new,
81 state=start]
82
83\setupinteractionscreen
84 [option=max]
85
86
87
88\setupitemize
89 [1][packed]
90
91\setuptyping
92 [blank=medium]
93
94
95
96
97\setupbackgrounds
98 [page]
99 [backgroundcolor=PageColor]
100
101
102
103\defineoverlay [background] [\uniqueMPgraphic{background}]
104
105\startuniqueMPgraphic{background}
106 pickup pencircle scaled (1.5\FrameSkip) ;
107 draw OverlayBox withcolor "PageColor" ;
108 pickup pencircle scaled \FrameSkip ;
109 fill OverlayBox withcolor "TextColor" ;
110 draw OverlayBox withcolor "LineColor" ;
111\stopuniqueMPgraphic
112
113
114
115
116
117\defineoverlay [nextpage] [\overlaybutton{nextpage}]
118\defineoverlay [previouspage] [\overlaybutton{previouspage}]
119\defineoverlay [skippage] [\overlaybutton{realpage(\number\numexpr\realpageno2\relax)}]
120\defineoverlay [samepage] [\overlaybutton{realpage(\number\numexpr\realpageno \relax)}]
121
122
123
124
125
126\defineoverlay [text] [\composedlayer{text}]
127\defineoverlay [sample] [\composedlayer{sample}]
128\defineoverlay [common] [\composedlayer{common}]
129
130
131
132
133
134
135\definelayer
136 [text]
137 [x=\makeupwidth,
138 y=\makeupheight,
139 location=lt,
140 hoffset=\FrameSkip,
141 voffset=\FrameSkip]
142
143\definelayer
144 [sample]
145 [hoffset=\FrameSkip,
146 voffset=\FrameSkip]
147
148\definelayer
149 [common]
150 [x=.5\makeupwidth,
151 y=.5\makeupheight,
152 location=c]
153
154
155
156\defineoverlay [topic] [\composedlayer{topic}]
157
158\definelayer
159 [topic]
160 [x=\FrameWidth,
161 y=\FrameHeight,
162 location=lt,
163 hoffset=\FrameOffset,
164 voffset=\FrameSkip]
165
166
167
168
169
170
171
172
173
174
175
176
177\unexpanded\def\Topic#1
178 {\doifsomething{#1}
179 {\setlayer [topic]
180 {\bfb\setstrut
181 \inframed
182 [frame=off,
183 foregroundcolor=PageColor,
184 offset=0pt,
185 background=color,
186 backgroundcolor=TextColor]
187 {#1}}}}
188
189
190
191
192
193\resetbuffer[sample]
194\resetbuffer[text]
195
196
197
198\defineframedtext
199 [SampleText]
200 [width=\FrameWidth,
201 height=\FrameHeight,
202 offset=\FrameOffset,
203 frame=off,
204 align=normal,
205 strut=no,
206 before=,
207 after=,
208 background=background]
209
210
211
212\unexpanded\def\DoSampleText#1#2#3
213 {\setupframedtexts[SampleText][background={background,#3}]
214 \setlayer[#2]
215 {\startSampleText[none]
216 \setups[#1]
217 \getbuffer[#1]
218 \stopSampleText}}
219
220\unexpanded\def\StartSample{\dostartbuffer[sample][StartSample][StopSample]}
221\unexpanded\def\StartText {\dostartbuffer[text] [StartText] [StopText]}
222
223
224
225\unexpanded\def\StopSample
226 {\startstandardmakeup
227 \DoSampleText{sample}{common}{samepage}
228 \stopstandardmakeup
229 \resetbuffer[sample]}
230
231\unexpanded\def\StopText
232 {\startstandardmakeup
233 \DoSampleText{text}{common}{topic,samepage}
234 \stopstandardmakeup
235 \resetbuffer[text]}
236
237\setupbackgrounds[page][background={color,nextpage}]
238\setupbackgrounds[text][background=common]
239
240
241
242
243
244\unexpanded\def\StartIdea
245 {\bgroup
246 \let\StopSample\relax
247 \let\StopText \relax}
248
249\unexpanded\def\StopIdea
250 {\setupbackgrounds[page][background={color,skippage}]
251 \setupbackgrounds[text][background={text,sample}]
252 \startstandardmakeup
253 \DoSampleText{sample}{sample}{nextpage}
254 \DoSampleText{text} {text} {topic,nextpage}
255 \stopstandardmakeup
256 \setupbackgrounds[page][background={color,nextpage}]
257 \setupbackgrounds[text][background={sample,text}]
258 \startstandardmakeup
259 \DoSampleText{sample}{sample}{previouspage}
260 \DoSampleText{text} {text} {topic,previouspage}
261 \stopstandardmakeup
262 \egroup}
263
264
265
266
267\defineoverlay[joke] [\useMPgraphic{joke}{n=0}]
268
269\startuseMPgraphic{joke}{n}
270 StartPage ;
271 path p, q ; numeric w ; pair xy ;
272 set_grid(OverlayWidth,OverlayHeight,OverlayWidth8,OverlayHeight8) ;
273 if \MPvar{n}=1 :
274 p := fulldiamond ; fill Page withcolor \MPcolor{TextColor} ;
275 else :
276 p := fullsquare ; fill Page withcolor \MPcolor{PageColor} ;
277 fi ;
278 forever :
279 xy := center Page randomized (OverlayWidth,OverlayHeight) ;
280 if new_on_grid(xpart xy, ypart xy) :
281 q := (p xyscaled (OverlayWidth5,OverlayHeight5))
282 randomized (\FrameSkip,\FrameSkip)
283 shifted xy ;
284 w := (\FrameSkip) randomized (\FrameSkip2) ;
285 draw q withcolor \MPcolor{PageColor} withpen pencircle scaled (1.5w) ;
286 fill q withcolor \MPcolor{TextColor} ;
287 draw q withcolor \MPcolor{LineColor} withpen pencircle scaled ( w) ;
288 fi ;
289 exitif grid_full ;
290 endfor ;
291 StopPage ;
292\stopuseMPgraphic
293
294\defineoverlay[fuzzy][\useMPgraphic{fuzzy}]
295
296\startuseMPgraphic{fuzzy}
297 path p ; numeric w ;
298 p := (fullsquare xyscaled (OverlayWidth,OverlayHeight))
299 randomized (\FrameSkip,\FrameSkip) ;
300 w := (\FrameSkip) randomized (\FrameSkip2) ;
301 draw p withcolor \MPcolor{PageColor} withpen pencircle scaled (1.5w) ;
302 fill p withcolor \MPcolor{TextColor} ;
303 draw p withcolor \MPcolor{LineColor} withpen pencircle scaled ( w) ;
304\stopuseMPgraphic
305
306
307
308
309\unexpanded\def\StartTitlePage
310 {\bgroup
311 \setupbackgrounds[page][background={joke,nextpage}]
312 \startstandardmakeup
313 \switchtobodyfont[big]
314 \setupframedtexts
315 [SampleText]
316 [background=fuzzy,
317 foregroundcolor=PageColor,
318 width=fit,
319 height=fit,
320 align=middle]
321 \startSampleText[middle]
322 \bfd\setupinterlinespace
323 \enforced\protected\def\\{\bfb\setupinterlinespace\vfil\enforced\protected\def\\{\vfil}}}
324
325\unexpanded\def\StopTitlePage
326 {\stopSampleText
327 \stopstandardmakeup
328 \egroup}
329
330\unexpanded\def\TitlePage#1
331 {\StartTitlePage#1\StopTitlePage}
332
333
334
335\let\Subject \Topic
336\let\Topics \gobbleoneargument
337\let\Subjects \relax
338
339
340
341\dontcomplain
342
343\stopmodule
344
345\continueifinputfile{spresentwindows.mkiv}
346
347\usemodule[presentcommon]
348
349\inputpresentationfile{examplespresentwindows001.tex}
350
351 |