s-pre-16.tex /size: 4482 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=s-pre-16,
3
%D version=1999.09.01,
4
%D title=\CONTEXT\ Style File,
5
%D subtitle=Presentation Environment 16,
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
%D The first version of this style was made late summer 1999,
15
%D but its first usage was during a course I gave in BRNO.
16
%D It's a rather simple style with a dominating background.
17 18
\setuppapersize
19
[
S
6
][
S
6
]
20 21
\setupbodyfont
22
[
pos
,
1
4
.
4
pt
]
23 24
\setuplayout
25
[
topspace
=
1
0
0
pt
,
26
backspace
=
1
2
0
pt
,
27
header
=
0
pt
,
28
footer
=
0
pt
,
29
width
=
middle
,
30
height
=
middle
]
31 32
\setupbackgrounds
33
[
text
]
34
[
backgroundoffset
=
8
0
pt
,
35
background
=
GoOn
]
36 37
\setupbackgrounds
38
[
page
]
39
[
background
=
{
FuzzyCircle
,
Again
}
]
40 41
\setupcolors
42
[
state
=
start
]
43 44
\definecolor
[
gray
]
[
s
=
.
4
]
45
\definecolor
[
white
][
s
=
.
8
]
46 47
\definecolor
[
red
]
[
r
=
.
8
]
\definecolor
[
cyan
]
[
g
=
.
8
,
b
=
.
8
]
48
\definecolor
[
green
][
g
=
.
8
]
\definecolor
[
magenta
][
r
=
.
8
,
b
=
.
8
]
49
\definecolor
[
blue
]
[
b
=
.
8
]
\definecolor
[
yellow
]
[
r
=
.
8
,
g
=
.
8
]
50 51
\definecolor
[
PageColor
][
gray
]
52
\definecolor
[
TextColor
][
yellow
]
53
\definecolor
[
LineColor
][
blue
]
54 55
\setupinteraction
56
[
state
=
start
,
57
color
=
LineColor
,
58
contrastcolor
=
LineColor
]
59 60
\setupinteractionscreen
61
[
option
=
max
]
62 63
\setupitemize
64
[
each
]
65
[
color
=
blue
,
66
symbol
=
FuzzyDot
]
67 68
\startuseMPgraphic
{
FuzzyCircle
}
69
path
p
;
numeric
w
,
h
,
l
;
70
w
:
=
OverlayWidth
;
h
:
=
OverlayHeight
;
71
def
dd
=
(
1
randomized
(
1
/
5
)
)
enddef
;
72
pickup
pencircle
xscaled
10
pt
yscaled
2
pt
rotated
30
;
73
for
i
:
=
1
upto
50
:
74
p
:
=
(
-
dd
,
-
dd
)
..
(
dd
,
-
dd
)
..
(
dd
,
dd
)
..
(
-
dd
,
dd
)
.
.
cycle
;
75
p
:
=
p
rotatedaround
(
center
p
,
uniformdeviate
360
)
;
76
p
:
=
p
xscaled
(
w
/
2
)
yscaled
(
h
/
2
)
;
77
l
:
=
length
(
p
)
/
2
;
78
p
:
=
p
cutbefore
point
(
uniformdeviate
l
)
of
p
;
79
p
:
=
p
cutafter
point
(
l
+
uniformdeviate
l
)
of
p
;
80
draw
p
withcolor
\MPcolor
{
LineColor
}
randomized
(
.4
,
1
)
;
81
endfor
;
82
picture
s
;
s
:
=
currentpicture
xysized
(
w
-15
,
h
-15
)
;
83
currentpicture
:
=
nullpicture
;
84
fill
boundingbox
s
enlarged
60
pt
withcolor
\MPcolor
{
PageColor
}
;
85
addto
currentpicture
also
s
;
86
\stopuseMPgraphic
87 88
\startuseMPgraphic
{
FuzzyDot
}
89
path
p
;
numeric
w
;
90
w
:
=
BodyFontSize
/
2
;
91
def
dd
=
(
w
randomized
(
w
/
2
)
)
enddef
;
92
pickup
pencircle
xscaled
(
w
/
2
)
yscaled
(
w
/
3
)
rotated
30
;
93
for
i
=
0
step
45
until
135
:
94
p
:
=
(
-
dd
,
0
)
--
(
dd
,
0
)
;
95
p
:
=
p
rotatedaround
(
origin
,
i
-
w
+
uniformdeviate
w
)
;
96
draw
p
withcolor
\MPcolor
{
LineColor
}
randomized
(
.3
,
.8
)
;
97
endfor
;
98
\stopuseMPgraphic
99 100
\defineoverlay
[
FuzzyCircle
]
[
\useMPgraphic
{
FuzzyCircle
}
]
101
\defineoverlay
[
GoOn
]
[
{
\setupinteraction
[
click
=
no
]
\overlaybutton
{
forward
}}
]
102
\defineoverlay
[
Again
]
[
\overlaybutton
{
firstpage
}
]
103 104
\definesymbol
105
[
FuzzyDot
]
106
[
\lower\dp
\strutbox
\hbox
{
\useMPgraphic
{
FuzzyDot
}
}
]
107 108
\def
\Item
%
109
{
\par\noindent
\symbol
[
FuzzyDot
]
\hskip
.
5
em
\nobreak
}
110 111
\setupitemize
112
[
all
]
113
[
packed
]
114
[
symbol
=
FuzzyDot
]
115 116
\def
\NextIdea
%
117
{
\blank
[
back
,
medium
]
118
\midaligned
{
\symbol
[
FuzzyDot
]
}
119
\blank
[
medium
]
120
\blank
[
disable
]
}
121 122
\definehead
[
Topic
]
[
chapter
]
123
\definehead
[
Nopic
]
[
title
]
124 125
\setuphead
126
[
Topic
,
Nopic
]
127
[
alternative
=
middle
,
128
before
=
,
129
number
=
no
,
130
style
=
\bfb
]
131 132
\setuplist
133
[
Topic
]
134
[
alternative
=
g
,
135
interaction
=
all
]
136 137
%D Since we want a colored text, and since color directive
138
%D can spoil the spacing, we use a foregroundcolor.
139 140
\setupbackgrounds
141
[
text
]
142
[
foregroundcolor
=
TextColor
]
143 144
%D Unfortunately this does not work when on the page colors
145
%D are set, so we play safe and say:
146 147
\setupmakeup
148
[
standard
]
149
[
color
=
TextColor
]
150 151
\def
\StartIdea
%
152
{
\startstandardmakeup
153
\setupwhitespace
[
medium
]
154
\setupblank
[
medium
]
155
\setupalign
[
broad
,
middle
]
}
156 157
\def
\StopIdea
%
158
{
\stopstandardmakeup
}
159 160
\def
\Topics
#
1
%
161
{
\Nopic
{
#
1
}
162
\startcolumns
163
\setupinteraction
[
color
=
TextColor
,
contrastcolor
=
TextColor
]
164
\placelist
[
Topic
]
165
\stopcolumns
166
\page
}
167 168
%D Some fakes.
169 170
\def
\Subject
{
\Topic
}
171
\def
\Subjects
{}
172 173
%D A bonus (copied from \type {s-pre-02} but with a different
174
%D vertical alignment.
175 176
\def
\StartTitlePage
%
177
{
\startstandardmakeup
178
\bfd
\setupinterlinespace
179
\setupalign
[
middle
]
180
\vfil
181
\let
\\
=
\vfil
}
182 183
\def
\StopTitlePage
%
184
{
\vfil
185
\stopstandardmakeup
}
186 187
\def
\TitlePage
#
1
%
188
{
\StartTitlePage
#
1
\StopTitlePage
}
189 190
\doifnotmode
{
demo
}{
\endinput
}
191 192
\starttext
193 194
\Topics
{
.
.
.
}
195 196
\StartIdea
197
\Topic
{
.
.
.
}
198
.
.
.
199
\NextIdea
200
.
.
.
201
\StopIdea
202 203
\stoptext
204