1
2
3
4
5
6
7
8
9
10
11
12
13
14\usemodule[presentgeneral]
15
16\startmodule[presentfuzzy]
17
18
19
20\doifelsemode {asintended} {
21 \setupbodyfont[ludicaot,14.4pt]
22} {
23 \setupbodyfont[pagella,14.4pt]
24}
25
26\definecolor [BackgroundColor] [s=.95]
27\definecolor [OrnamentColor] [r=.6,g=.7,b=.8]
28
29\setuppapersize
30 [S6][S6]
31
32\setuplayout
33 [width=430pt,
34 height=400pt,
35 header=0pt,
36 footer=0pt,
37 margin=0pt,
38 backspace=25pt,
39 topspace=25pt,
40 rightedgedistance=20pt,
41 rightedge=110pt]
42
43\setupinteractionscreen
44 [option=max]
45
46\setupbackgrounds
47 [state=repeat]
48
49\setupbackgrounds
50 [page]
51 [backgroundcolor=white]
52
53\setupbackgrounds
54 [text][text]
55 [background={HashFrameA,NextPage},
56 backgroundoffset=20pt]
57
58\defineoverlay
59 [HashFrameA]
60 [\useMPgraphic{HashFrameA}]
61
62\defineoverlay
63 [HashFrameB]
64 [\useMPgraphic{HashFrameB}]
65
66\setupinteraction
67 [state=start,
68 menu=on,
69 color=OrnamentColor,
70 contrastcolor=OrnamentColor]
71
72
73
74\setupinteractionmenu
75 [right]
76 [background=HashFrameB,
77 style=smallbold,
78 frame=off,
79 offset=10pt,
80 height=35pt,
81 before=,
82 after=,
83 inbetween=\endgraf,
84 width=\rightedgewidth]
85
86\startinteractionmenu[right]
87 \placelist
88 [Topic]
89 [criterium=all,
90 alternative=right,
91 maxwidth=.8\rightedgewidth,
92 interaction=all,
93 before=,
94 after=]
95 \vfill
96 \setupinteractionmenu
97 [right]
98 [height=30pt]
99 \but [CloseDocument] Close \\
100\stopinteractionmenu
101
102\setupwhitespace
103 [big]
104
105\setupblank
106 [big]
107
108
109
110
111
112
113
114\defineoverlay [TitleGraphic] [\useMPgraphic{TitleGraphic}]
115\defineoverlay [NextPage] [\overlaybutton{forward}]
116
117\unexpanded\def\StartTitlePage
118 {\setupbackgrounds[page][background={color,TitleGraphic,NextPage}]
119 \setupbackgrounds[text][text][background=]
120 \setupinteraction[menu=off]
121 \setupinteractionbar[state=stop]
122 \setuplayout[width=550pt,rightedge=0pt]
123 \startstandardmakeup
124 \switchtobodyfont[24pt]
125 \bfd\setupinterlinespace
126 \setupalign[middle]
127 \vfil
128 \enforced\let\\\vfil}
129
130\unexpanded\def\StopTitlePage
131 {\vfil\vfil\vfil
132 \stopstandardmakeup
133 \setuplayout[width=430pt,rightedge=110pt]
134 \setupinteraction[menu=on]
135 \setupinteractionbar[state=start]
136 \setupbackgrounds[page][background=color]
137 \setupbackgrounds[text][text][background={HashFrameA,NextPage}]}
138
139\unexpanded\def\TitlePage#1
140 {\StartTitlePage#1\StopTitlePage}
141
142
143
144
145
146
147\unexpanded\def\Topics#1{}
148\unexpanded\def\Subjects{}
149
150
151
152
153
154
155
156\definehead [Topic] [chapter]
157\definehead [Nopic] [title]
158\definehead [Subject] [section]
159
160\setuphead
161 [Topic, Nopic]
162 [after={\blank[3*medium]},
163 number=no,
164 style=\tfb,
165 page=yes,
166 alternative=middle]
167
168\setuphead
169 [Subject]
170 [after=\blank,
171 number=no,
172 page=yes,
173 continue=no,
174 style=\tfa]
175
176
177
178
179\startMPdefinitions
180 def random_hash_frame (expr width, height, offset, linewidth ) =
181
182 def delta = ((uniformdeviate .5offset) .25offset) enddef ;
183 x1 := offset ; y1 := offset ; x2 := widthoffset ; y2 := heightoffset ;
184
185 drawoptions(withpen pencircle scaled linewidth withcolor \MPcolor{BackgroundColor}) ;
186 fill z1--(x2,y1)z2--(x1,y2)cycle ;
187
188 drawoptions(withpen pencircle scaled linewidth withcolor \MPcolor{OrnamentColor}) ;
189 draw (x1delta,y1)--(x2delta,y1) ;
190 draw (x2,y1delta)--(x2,y2delta) ;
191 draw (x2delta,y2)--(x1delta,y2) ;
192 draw (x1,y2delta)--(x1,y1delta) ;
193
194 drawoptions();
195 setbounds currentpicture to unitsquare xscaled width yscaled height ;
196 enddef ;
197\stopMPdefinitions
198
199\startuseMPgraphic{HashFrameA}
200 random_hash_frame(OverlayWidth,OverlayHeight,15pt,2pt) ;
201\stopuseMPgraphic
202
203\startuseMPgraphic{HashFrameB}
204 random_hash_frame(OverlayWidth,OverlayHeight, 5pt,2pt) ;
205\stopuseMPgraphic
206
207\startuseMPgraphic{TitleGraphic}
208 numeric offset, width, height ;
209 for i=1 upto 300 :
210 offset := uniformdeviate 10pt ;
211 width := 2offset 30pt uniformdeviate 30pt ;
212 height := 2offset 10pt uniformdeviate 10pt ;
213 addto currentpicture also
214 image(random_hash_frame(width,height,offset,1pt)) shifted
215 (uniformdeviate OverlayWidth, uniformdeviate OverlayHeight) ;
216 endfor ;
217\stopuseMPgraphic
218
219\stopmodule
220
221\continueifinputfile{spresentfuzzy.mkiv}
222
223\usemodule[presentcommon]
224
225\inputpresentationfile{examplespresentfuzzy001.tex}
226 |