s-present-weird.mkiv /size: 8012 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=s-present-weird, % s-pre-17,
3
%D version=1999.08.20,
4
%D title=\CONTEXT\ Style File,
5
%D subtitle=Presentation Environment Weird,
6
%D author=Hans Hagen,
7
%D date=\currentdate,
8
%D copyright={PRAGMA ADE \& \CONTEXT\ Development Team}]
9
%C
10
%C This module is part of the \CONTEXT\ macro||package and is
11
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
12
%C details.
13 14
\startmodule
[
present
-
balls
]
15 16
%D This is a rather old style, adn I used it for a presentation about \MATHML\
17
%D around the turn of the century. Unfortunately I can't find back that weird
18
%D presentation. I didn't change the code apart from loading the body font. One can
19
%D clock on an area and get it large. Clicking elsewhere brings back the main page.
20
%D It was actualy a zoom test at that time.
21 22
\setupbodyfont
23
[
dejavu
,
1
1
pt
,
ss
]
24 25
\setupsystem
26
[
random
=
medium
]
27 28
\setupbackgrounds
29
[
state
=
repeat
]
30 31
\setupbackgrounds
32
[
page
]
33
[
background
=
{
page
,
forward
}
]
34 35
\setupbackgrounds
36
[
text
][
text
]
37
[
background
=
blowdown
]
38 39
\setupinteraction
40
[
state
=
start
,
41
% click=off,
42
color
=
TitleColor
,
43
contrastcolor
=
TitleColor
]
44 45
\setupinteractionscreen
46
[
option
=
max
]
47 48
\setuptolerance
49
[
verytolerant
,
stretch
]
50 51
\definecolor
[
BackColor
]
[
s
=
.
3
0
]
52
\definecolor
[
PageColor
]
[
g
=
1
]
53
\definecolor
[
FrameColor
]
[
r
=
1
]
54
\definecolor
[
TitleColor
]
[
y
=
1
]
55
\definecolor
[
ArrowColor
]
[
b
=
1
]
56 57
\defineoverlay
[
title
]
[
\useMPgraphic
{
title
}
]
58
\defineoverlay
[
page
]
[
\useMPgraphic
{
page
}
]
59
\defineoverlay
[
blowup
]
[
{
\hboxreference
[
whatever
:
\CurrentBlaBla
]
{
\overlaybutton
{
whatever
:
\CurrentBlaBla
}}}
]
60
\defineoverlay
[
blowdown
]
[
{
\hboxreference
[
page
:
\realfolio
]
{
\overlaybutton
{
page
:
\realfolio
}}}
]
61
\defineoverlay
[
forward
]
[
\overlaybutton
{
forward
}
]
62 63
\startMPpositiongraphic
{
mppos:connection
}
64
path
pa
,
pb
,
pc
;
pair
ca
,
cb
;
65
initialize_box
(
\MPpos
{
\MPvar{self}
}
)
;
pa
:
=
pxy
;
ca
:
=
cxy
;
66
initialize_box
(
\MPpos
{
\MPvar{prev}
}
)
;
pb
:
=
pxy
;
cb
:
=
cxy
;
67
pickup
pencircle
scaled
.5
pt
;
68
pa
:
=
pa
enlarged
10
pt
;
69
pb
:
=
pb
enlarged
10
pt
;
70
for
i
=
1
upto
10
:
71
draw
pa
randomized
20
pt
withcolor
\MPcolor
{
FrameColor
}
;
72
endfor
;
73
if
\MPp
{
\MPvar{prev}
}
>
0
:
74
pair
a
,
b
,
c
,
d
;
75
for
i
=
1
upto
25
:
76
a
:
=
.5
[
ulcorner
pa
,
urcorner
pa
]
randomized
(
10
pt
,
10
pt
)
;
77
b
:
=
.5
[
llcorner
pb
,
lrcorner
pb
]
randomized
(
20
pt
,
10
pt
)
;
78
c
:
=
.5
[
a
,
b
]
rotatedaround
(
a
,
-25
)
randomized
(
5
pt
,
5
pt
)
;
79
d
:
=
.5
[
a
,
b
]
rotatedaround
(
a
,
+25
)
randomized
(
5
pt
,
5
pt
)
;
80
draw
(
a
-
-
b
)
withcolor
\MPcolor
{
ArrowColor
}
;
81
draw
(
d
-
-
a
-
-
c
)
withcolor
\MPcolor
{
ArrowColor
}
;
82
endfor
;
83
fi
;
84
anchor_box
(
\MPanchor
{
\MPvar{self}
}
)
;
85
\stopMPpositiongraphic
86 87
\startuseMPgraphic
{
title
}
88
pickup
pencircle
scaled
.5
pt
;
89
for
i
=
1
upto
10
:
90
draw
fullsquare
91
xyscaled
(
OverlayWidth
,
OverlayHeight
)
92
enlarged
10
pt
randomized
20
pt
93
withcolor
\MPcolor
{
TitleColor
}
;
94
endfor
;
95
\stopuseMPgraphic
96 97
\startuseMPgraphic
{
page
}
98
StartPage
;
99
pickup
pencircle
scaled
.5
pt
;
100
fill
Page
withcolor
\MPcolor
{
BackColor
}
;
101
for
i
=
1
upto
20
:
102
draw
Page
enlarged
-50
pt
randomized
50
pt
withcolor
\MPcolor
{
PageColor
}
;
103
endfor
;
104
StopPage
;
105
\stopuseMPgraphic
106 107
\newcounter
\CurrentBlaBla
108 109
\defineframedtext
110
[
ZoomText
]
111
[
before
=
,
112
after
=
,
113
width
=
fit
,
114
align
=
flushleft
,
115
frame
=
off
,
116
foregroundcolor
=
white
]
117 118
\starttexdefinition
StartText
119
\begingroup
120
\getrandomdimen
\scratchdimen
{
2
5
0
pt
}{
3
5
0
pt
}
121
\edef
\TextWidth
{
\the
\scratchdimen
}
122
\setbox
\scratchbox
\hbox
\bgroup
123
\hsize
\TextWidth
124
\ZoomText
\bgroup
125
\stoptexdefinition
126 127
\starttexdefinition
StartTextSimple
128
\begingroup
129
\setbox
\scratchbox
\hbox
\bgroup
130
\framed
[
131
frame
=
off
,
132
foregroundcolor
=
white
133
]
134
\bgroup
135
\stoptexdefinition
136 137
\starttexdefinition
StopTextSimple
138
\StopText
139
\stoptexdefinition
140 141
\starttexdefinition
StopText
142
\egroup
143
\egroup
144
\doglobal
\increment
\CurrentBlaBla
145
\let
\PrevBlaBla
\CurrentBlaBla
\doglobal
\decrement
\PrevBlaBla
146
\let
\NextBlaBla
\CurrentBlaBla
\doglobal
\increment
\NextBlaBla
147
\setMPpositiongraphic
{
148
connection
:
\CurrentBlaBla
149
}{
150
mppos
:
connection
151
}{
152
seed
=
\CurrentBlaBla
,
153
prev
=
connection
:
\PrevBlaBla
,
154
next
=
connection
:
\NextBlaBla
155
}
156
\hbox
to
6
0
0
pt
\bgroup
157
\setupinteraction
[
focus
=
frame
]
158
\getrandomdimen
\scratchdimen
{
5
0
pt
}{
7
5
pt
}
159
\hskip
0
pt
plus
\scratchdimen
minus
\scratchdimen
160
\hpos
{
161
connection
:
\CurrentBlaBla
162
}{
163
\framed
[
164
frame
=
off
,
165
offset
=
overlay
,
166
backgroundoffset
=
5
0
pt
,
167
background
=
blowup
168
]
{
169
\box
\scratchbox
170
}
171
}
172
\getrandomdimen
\scratchdimen
{
5
0
pt
}{
7
5
pt
}
173
\hskip
0
pt
plus
\scratchdimen
minus
\scratchdimen
174
\egroup
175
\getrandomdimen
\scratchdimen
{
7
5
pt
}{
1
2
5
pt
}
176
\vskip
\scratchdimen
177
\endgroup
178
\stoptexdefinition
179 180
\dontcomplain
181 182
\disablemode
[
SpreadPage
]
183 184
\starttexdefinition
StartPage
#
1
185
\doglobal
\increment
(
\CurrentBlaBla
,
1
0
0
)
%
186
\setvariables
[
StartPage
][
title
=
{
#
1
}
]
187
\setbox
\scratchbox
\hbox
\bgroup
188
\valign
\bgroup
189
\ignorespaces
190
\alignmark\alignmark
191
\vss
192
\cr
193
\stoptexdefinition
194 195
\starttexdefinition
StopPage
196
\cr
197
\egroup
198
\egroup
199
\setbox
\scratchbox
\vbox
\bgroup
200
\vskip
1
0
0
pt
201
\doifelsemode
{
SpreadPage
}
{
202
\hbox
spread
2
0
0
pt
203
}
{
204
\hbox
to
\wd
\scratchbox
205
}
206
\bgroup
207
\setupinteraction
[
focus
=
frame
]
208
\hss
209
\switchtobodyfont
[
big
]
%
210
\bfd
211
\doglobal
\increment
\CurrentBlaBla
212
\setupinterlinespace
213
\hpos
{
214
title
:
\realfolio
215
}{
216
\framed
[
217
frame
=
off
,
218
offset
=
overlay
,
219
backgroundoffset
=
5
0
pt
,
220
background
=
blowup
221
]
{
222
\framed
[
223
frame
=
off
,
224
align
=
middle
,
225
foregroundcolor
=
white
,
226
background
=
title
227
]
{
228
\getvariable
{
StartPage
}{
title
}
229
}
230
}
231
}
232
\hss
233
\egroup
234
\vskip
1
0
0
pt
235
\box
\scratchbox
236
\egroup
237
\normalexpanded
{
238
\definepapersize
[
239
MasterPage
240
]
[
241
width
=
\the\dimexpr\wd
\scratchbox
+
1
0
0
pt
\relax
,
242
height
=
\the\dimexpr\ht
\scratchbox
+
\dp
\scratchbox
+
1
0
0
pt
\relax
243
]
244
}
245
\setuppapersize
246
[
MasterPage
]
247
[
MasterPage
]
248
\setuplayout
[
249
topspace
=
5
0
pt
,
250
backspace
=
5
0
pt
,
251
width
=
middle
,
252
header
=
0
pt
,
253
footer
=
0
pt
,
254
height
=
middle
255
]
256
\centerbox
{
257
\box
\scratchbox
258
}
259
\page
260
\stoptexdefinition
261 262
\starttexdefinition
StartTopic
#
1
263
\removeunwantedspaces
264
\cr
265
\doglobal
\increment
(
\CurrentBlaBla
,
1
0
0
)
%
266
\vbox
\bgroup
267
\vskip
1
0
0
pt
268
\bgroup
269
\definecolor
[
FrameColor
][
TitleColor
]
270
\switchtobodyfont
[
big
]
271
\bfd
272
\setupinterlinespace
273
\StartTextSimple
274
\ignorespaces
275
#
1
276
\removeunwantedspaces
277
\StopTextSimple
278
\vskip
2
5
pt
279
\egroup
280
\stoptexdefinition
281 282
\starttexdefinition
StopTopic
283
\vskip
-
\lastskip
284
\vskip
1
0
0
pt
285
\egroup
286
\ignorespaces
287
\stoptexdefinition
288 289
\starttexdefinition
TitlePage
#
1
290
\begingroup
291
\def
\\
{
\vskip
1
ex
\bfc
\def
\\
{
\vskip
1
ex
\bfb
}}
292
\enablemode
[
SpreadPage
]
293
\StartPage
{
#
1
}
294
\StopPage
295
\endgroup
296
\stoptexdefinition
297 298
\stopmodule
299 300
\continueifinputfile
{
s
-
present
-
balls
.
mkiv
}
301 302
\inputpresentationfile
{
examples
/
present
-
weird
-
0
0
1
.
tex
}
303