s-pre-93.tex /size: 6263 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=s-pre-20,
3
%D version=2000.08.07,
4
%D title=\CONTEXT\ Style File,
5
%D subtitle=Presentation Environment 20,
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
\setupbodyfont
15
[
lbr
,
1
4
.
4
pt
]
16 17
\setuppapersize
18
[
S
6
][
S
6
]
19 20
\setuplayout
21
[
topspace
=
0
cm
,
22
backspace
=
0
cm
,
23
header
=
0
pt
,
24
footer
=
0
pt
,
25
width
=
middle
,
26
height
=
middle
]
27 28
\setupcolors
29
[
state
=
start
]
30 31
\setupinteraction
32
[
state
=
start
,
33
click
=
no
,
34
display
=
new
,
35
color
=
LineColor
,
36
contrastcolor
=
LineColor
]
37 38
\setupinteractionscreen
39
[
option
=
max
]
40 41
\setupsystem
42
[
random
=
big
]
% once per hour
43 44
\startreusableMPgraphic
{
page
}
45
StartPage
;
46
filldraw
Page
withcolor
\MPcolor
{
PageColor
}
;
47
pickup
pencircle
scaled
(
.25
cm
+
uniformdeviate
.25
cm
)
;
48
for
i
=
1
upto
200
:
49
drawdot
50
(
uniformdeviate
PaperWidth
,
uniformdeviate
PaperHeight
)
51
withcolor
\MPcolor
{
LineColor
}
;
52
endfor
;
53
StopPage
;
54
\stopreusableMPgraphic
55 56
\startuseMPgraphic
{
idea
}
57
StartPage
;
58
path
p
;
59
p
:
=
unitsquare
xyscaled
(
\MPw
{
idea:\realfolio
}
,
\MPh
{
idea:\realfolio
}
)
superellipsed
.90
;
60
p
:
=
p
shifted
\MPxy
{
idea:\realfolio
}
;
61
draw
p
withpen
pencircle
scaled
.500
cm
withcolor
\MPcolor
{
PageColor
}
;
62
fill
p
withcolor
\MPcolor
{
\overlaycolor
}
;
63
draw
p
withpen
pencircle
scaled
.250
cm
withcolor
\MPcolor
{
LineColor
}
;
64
p
:
=
unitsquare
xyscaled
(
\MPw
{
title:\realfolio
}
,
\MPh
{
title:\realfolio
}
)
superellipsed
.90
;
65
p
:
=
p
shifted
\MPxy
{
title:\realfolio
}
;
66
draw
p
withpen
pencircle
scaled
.250
cm
withcolor
\MPcolor
{
PageColor
}
;
67
fill
p
withcolor
\MPcolor
{
\overlaycolor
}
;
68
draw
p
withpen
pencircle
scaled
.125
cm
withcolor
\MPcolor
{
LineColor
}
;
69
StopPage
;
70
\stopuseMPgraphic
71 72
\definecolor
[
PageColor
][
s
=
.
5
0
]
73
\definecolor
[
TextColor
][
s
=
.
8
0
]
74
\definecolor
[
DoneColor
][
s
=
.
6
5
]
75
\definecolor
[
LineColor
][
r
=
.
7
,
g
=
.
6
,
b
=
.
5
]
76 77
\defineoverlay
[
idea
]
[
\useMPgraphic
{
idea
}
]
78
\defineoverlay
[
page
]
[
\reuseMPgraphic
{
page
}
]
79 80
\setupbackgrounds
81
[
page
]
82
[
background
=
{
page
,
forward
}
]
83 84
\defineoverlay
[
forward
][
\overlaybutton
{
forward
}
]
85 86
% alternatief: buffer en ander regime, zodat lokale kleuren
87
% kunnen worden genilled. Pos gebruiken om te positioneren.
88 89
\definereference
[
thispage
][
page
(
\realfolio
)]
90 91
\newbox
\firstideabox
\setbox
\firstideabox
=
\null
92
\newbox
\secondideabox
\setbox
\secondideabox
=
\null
93
\newbox
\thirdideabox
\setbox
\thirdideabox
=
\null
94 95
\def
\StartTopic
% bottom title, top title
96
{
\dodoublegroupempty
\doStartTopic
}
97 98
\def
\doStartTopic
#
1
#
2
% the positions end up at each page -)
99
{
\setbox
\firstideabox
=
100
\vbox
to
\makeupheight
101
\bgroup
102
\getrandomdimen
\scratchdimen
{
.
5
cm
}
\makeupheight
103
\vskip
0
cm
plus
\scratchdimen
104
\hbox
to
\makeupwidth
105
\bgroup
106
\getrandomdimen
\scratchdimen
{
.
5
cm
}
\makeupwidth
107
\hskip
0
cm
plus
\scratchdimen
108
\setbox
\scratchbox
=
\hbox
\bgroup
\hpos
{
idea
:
\realfolio
}
109
\bgroup
110
\getrandomdimen
\hsize
{
.
5
\makeupwidth
}{
.
7
\makeupwidth
}
%
111
\framed
112
[
offset
=
3
ex
,
align
=
middle
,
strut
=
no
,
frame
=
off
,
113
before
=
,
after
=]
114
\bgroup
115
\setupwhitespace
[
big
]
%
116
\doifsomething
{
#
2
}{
\Title
{
#
2
}}
%
117
\def
\StopTopic
{
%
118
\egroup
119
\egroup
120
\egroup
121
\gotobox
{
\box
\scratchbox
}
[
thispage
]
%
122
\getrandomdimen
\scratchdimen
{
.
5
cm
}
\makeupwidth
123
\hskip
0
cm
plus
\scratchdimen
124
\egroup
125
\getrandomdimen
\scratchdimen
{
.
5
cm
}
\makeupheight
126
\vskip
0
cm
plus
\scratchdimen
127
\hbox
to
\makeupwidth
128
\bgroup
129
\hfill
130
\hpos
{
title
:
\realfolio
}
131
{
\button
[
offset
=
1
.
5
ex
,
frame
=
off
]
{
#
1
}
[
backward
]
}
%
132
\getrandomdimen
\scratchdimen
{
.
5
cm
}{
2
.
5
cm
}
%
133
\hskip
\scratchdimen
134
\egroup
135
\getrandomdimen
\scratchdimen
{
.
5
cm
}{
1
.
5
cm
}
136
\vskip
\scratchdimen
137
\egroup
138
\setbox
\secondideabox
=
\vbox
139
{
\framed
140
[
offset
=
overlay
,
frame
=
off
,
background
=
idea
,
backgroundcolor
=
TextColor
]
141
{
\copy
\firstideabox
}}
142
\setbox
\firstideabox
=
\vbox
143
{
\framed
144
[
offset
=
overlay
,
frame
=
off
,
background
=
idea
,
backgroundcolor
=
DoneColor
]
145
{
\LineColor
\copy
\firstideabox
}}
146
\startstandardmakeup
147
\startoverlay
148
{
\copy
\thirdideabox
}
149
{
\copy
\secondideabox
}
150
\stopoverlay
151
\stopstandardmakeup
152
\setbox
\thirdideabox
=
\vbox
153
{
\startoverlay
154
{
\copy
\thirdideabox
}
155
{
\copy
\firstideabox
}
156
\stopoverlay
}}}
157 158
\long\def
\TitlePage
#
1
#
2
%
159
{
\bgroup
160
\switchtobodyfont
[
3
2
pt
]
161
\StartTopic
{
#
1
}
#
2
\StopTopic
162
\egroup
}
163 164
\def
\Title
#
1
{
\midaligned
{
\bfb
#
1
}
\blank
}
165 166
\doifnotmode
{
demo
}{
\endinput
}
167 168
% \usemodule[pre-super] % super ellipse as well as superpositioned
169 170
\starttext
171 172
\TitlePage
{
August
2
0
0
0
}{
Something
Very
Important
}
173 174
\StartTopic
{
Alpha
}
175
A
simple
and
not
too
long
text
just
to
show
the
idea
.
176
A
simple
and
not
too
long
text
just
to
show
the
idea
.
177
A
simple
and
not
too
long
text
just
to
show
the
idea
.
178
\StopTopic
179 180
\StartTopic
{
Beta
and
Gamma
}
181
A
simple
and
not
too
long
text
just
to
show
the
idea
.
182
A
simple
and
not
too
long
text
just
to
show
the
idea
.
183
\StopTopic
184 185
\StartTopic
{
Delta
}
186
A
simple
and
not
too
long
text
just
to
show
the
idea
.
187
\StopTopic
188 189
\StartTopic
{
Epsilon
}
190
A
simple
and
not
too
long
text
just
to
show
the
idea
.
191
A
simple
and
not
too
long
text
just
to
show
the
idea
.
192
A
simple
and
not
too
long
text
just
to
show
the
idea
.
193
\StopTopic
194 195
\StartTopic
{
Zeta
,
Eta
and
Theta
}
196
A
simple
and
not
too
long
text
just
to
show
the
idea
.
197
A
simple
and
not
too
long
text
just
to
show
the
idea
.
198
A
simple
and
not
too
long
text
just
to
show
the
idea
.
199
\StopTopic
200 201
\StartTopic
{
Omega
}
202
A
simple
and
not
too
long
text
just
to
show
the
idea
.
203
A
simple
and
not
too
long
text
just
to
show
the
idea
.
204
A
simple
and
not
too
long
text
just
to
show
the
idea
.
205
A
simple
and
not
too
long
text
just
to
show
the
idea
.
206
\StopTopic
207 208
\stoptext
209