s-present-fuzzy.mkiv /size: 5408 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=s-present-fuzzy, % was s-pre-05
3
%D version=1998.12.12,
4
%D title=\CONTEXT\ Style File,
5
%D subtitle=Presentation Environment Fuzzy,
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
\usemodule
[
present
-
general
]
15 16
\startmodule
[
present
-
fuzzy
]
17 18
%D As all styles sofar, this one has the same structuring commands.
19 20
\doifelsemode
{
asintended
}
{
21
\setupbodyfont
[
ludicaot
,
1
4
.
4
pt
]
22
}
{
23
\setupbodyfont
[
pagella
,
1
4
.
4
pt
]
24
}
25 26
\definecolor
[
BackgroundColor
]
[
s
=
.
9
5
]
27
\definecolor
[
OrnamentColor
]
[
r
=
.
6
,
g
=
.
7
,
b
=
.
8
]
28 29
\setuppapersize
30
[
S
6
][
S
6
]
31 32
\setuplayout
33
[
width
=
4
3
0
pt
,
34
height
=
4
0
0
pt
,
35
header
=
0
pt
,
36
footer
=
0
pt
,
37
margin
=
0
pt
,
38
backspace
=
2
5
pt
,
39
topspace
=
2
5
pt
,
40
rightedgedistance
=
2
0
pt
,
41
rightedge
=
1
1
0
pt
]
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
=
2
0
pt
]
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
%D Watch how we use a list alternative that matches the menu.
73 74
\setupinteractionmenu
75
[
right
]
76
[
background
=
HashFrameB
,
77
style
=
smallbold
,
78
frame
=
off
,
79
offset
=
1
0
pt
,
80
height
=
3
5
pt
,
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
=
3
0
pt
]
99
\but
[
CloseDocument
]
Close
\\
100
\stopinteractionmenu
101 102
\setupwhitespace
103
[
big
]
104 105
\setupblank
106
[
big
]
107 108
%D \macros
109
%D {TitlePage}
110
%D
111
%D Now the main layout and navigational definitions are done, it makes sense to
112
%D define and tune some structuring commands. First we build the titlepage.
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
=
5
5
0
pt
,
rightedge
=
0
pt
]
123
\startstandardmakeup
124
\switchtobodyfont
[
2
4
pt
]
125
\bfd
\setupinterlinespace
126
\setupalign
[
middle
]
127
\vfil
128
\let
\\
=
\vfil
}
129 130
\unexpanded
\def
\StopTitlePage
131
{
\vfil\vfil\vfil
132
\stopstandardmakeup
133
\setuplayout
[
width
=
4
3
0
pt
,
rightedge
=
1
1
0
pt
]
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
%D \macros
143
%D {Topics,Subjects}
144
%D
145
%D Because the lists are in the menu, we don't honor list placement macros.
146 147
\unexpanded
\def
\Topics
#
1
{}
148
\unexpanded
\def
\Subjects
{}
149 150
%D \macros
151
%D {Topic, Nopic, Subject}
152
%D
153
%D Since this style is meant for rather flat structured documents, only \type
154
%D {\Topic} makes sense.
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
%D We use only one kind of base graphic, which is sligthly
177
%D tuned for the different usage.
178 179
\startMPdefinitions
180
def
random_hash_frame
(
expr
width
,
height
,
offset
,
linewidth
)
=
181 182
def
delta
=
(
(
uniformdeviate
.5
offset
)
+
.25
offset
)
enddef
;
183
x
1
:
=
offset
;
y
1
:
=
offset
;
x
2
:
=
width
-
offset
;
y
2
:
=
height
-
offset
;
184 185
drawoptions
(
withpen
pencircle
scaled
linewidth
withcolor
\MPcolor
{
BackgroundColor
}
)
;
186
fill
z
1
--
(
x
2
,
y
1
)
-
-
z
2
--
(
x
1
,
y
2
)
-
-
cycle
;
187 188
drawoptions
(
withpen
pencircle
scaled
linewidth
withcolor
\MPcolor
{
OrnamentColor
}
)
;
189
draw
(
x
1
-
delta
,
y
1
)
--
(
x
2
+
delta
,
y
1
)
;
190
draw
(
x
2
,
y
1
-
delta
)
--
(
x
2
,
y
2
+
delta
)
;
191
draw
(
x
2
+
delta
,
y
2
)
--
(
x
1
-
delta
,
y
2
)
;
192
draw
(
x
1
,
y
2
+
delta
)
--
(
x
1
,
y
1
-
delta
)
;
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
,
15
pt
,
2
pt
)
;
201
\stopuseMPgraphic
202 203
\startuseMPgraphic
{
HashFrameB
}
204
random_hash_frame
(
OverlayWidth
,
OverlayHeight
,
5
pt
,
2
pt
)
;
205
\stopuseMPgraphic
206 207
\startuseMPgraphic
{
TitleGraphic
}
208
numeric
offset
,
width
,
height
;
209
for
i
=
1
upto
300
:
210
offset
:
=
uniformdeviate
10
pt
;
211
width
:
=
2
*
offset
+
30
pt
+
uniformdeviate
30
pt
;
212
height
:
=
2
*
offset
+
10
pt
+
uniformdeviate
10
pt
;
213
addto
currentpicture
also
214
image
(
random_hash_frame
(
width
,
height
,
offset
,
1
pt
)
)
shifted
215
(
uniformdeviate
OverlayWidth
,
uniformdeviate
OverlayHeight
)
;
216
endfor
;
217
\stopuseMPgraphic
218 219
\stopmodule
220 221
\continueifinputfile
{
s
-
present
-
fuzzy
.
mkiv
}
222 223
\usemodule
[
present
-
common
]
224 225
\inputpresentationfile
{
examples
/
present
-
fuzzy
-
0
0
1
.
tex
}
226