s-present-punk.mkiv /size: 3807 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=s-present-punk,
3
%D version=2008.04.15,
4
%D title=\CONTEXT\ Style File,
5
%D subtitle=Presentation Environment Punk,
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
-
punk
]
15 16
%D At the cost of more runtime and a larger output file, we
17
%D turn on randomization. The instances are cached in the
18
%D MkIV cache, so successive runs use the same shapes.
19 20
% \usemodule[punk] \usetypescript[punk] \setupbodyfont[punk,20pt]
21
%
22
% \EnableRandomPunk
23 24
\setupbodyfont
[
punknova
,
2
0
pt
]
% we now use the opentype variant
25 26
%D We use the regular screen size paper and layout setup.
27 28
\setuppapersize
29
[
S
6
][
S
6
]
30 31
\setuplayout
32
[
topspace
=
3
0
pt
,
33
backspace
=
3
0
pt
,
34
width
=
middle
,
35
height
=
fit
,
36
header
=
0
pt
,
37
footer
=
0
pt
,
38
bottomdistance
=
2
4
pt
,
39
bottom
=
3
0
pt
,
40
bottom
=
1
8
pt
,
41
top
=
0
pt
]
42 43
\setupinterlinespace
44
[
top
=
height
,
45
line
=
1
.
2
5
\bodyfontsize
]
46 47
\setupcolors
48
[
state
=
start
,
49
textcolor
=
white
]
50 51
\setupinteraction
52
[
state
=
start
,
53
%click=off,
54
menu
=
on
]
55 56
%D We predefine a few palets. Of course you can define more.
57 58
\definecolor
[
punkblue
]
[
r
=
.
4
,
b
=
.
8
,
g
=
.
4
]
59
\definecolor
[
punkgreen
]
[
r
=
.
4
,
b
=
.
4
,
g
=
.
8
]
60
\definecolor
[
punkred
]
[
r
=
.
8
,
b
=
.
4
,
g
=
.
4
]
61
\definecolor
[
punkyellow
][
r
=
.
6
,
g
=
.
6
,
b
=
.
2
]
62 63
\definepalet
[
punk
-
one
]
[
textcolor
=
punkblue
,
pagecolor
=
punkgreen
]
64
\definepalet
[
punk
-
two
]
[
textcolor
=
punkred
,
pagecolor
=
punkyellow
]
65
\definepalet
[
punk
-
three
]
[
textcolor
=
punkblue
,
pagecolor
=
punkyellow
]
66
\definepalet
[
punk
-
one
-
reverse
]
[
textcolor
=
punkgreen
,
pagecolor
=
punkblue
]
67
\definepalet
[
punk
-
two
-
reverse
]
[
textcolor
=
punkyellow
,
pagecolor
=
punkred
]
68
\definepalet
[
punk
-
three
-
reverse
]
[
textcolor
=
punkyellow
,
pagecolor
=
punkblue
]
69 70
\setuppalet
[
punk
-
one
]
71 72
%D We use a few backgrounds. The hyperlink that invokes the stepper is hooked
73
%D into the text background.
74 75
\definelayer
76
[
page
]
77
[
width
=
\paperwidth
,
78
height
=
\paperheight
]
79 80
\setupbackgrounds
81
[
page
]
82
[
background
=
{
color
,
page
}
,
83
backgroundcolor
=
pagecolor
,
84
setups
=
pagestuff
]
85 86
\setupbackgrounds
87
[
text
]
88
[
background
=
{
color
,
invoke
}
,
89
backgroundoffset
=
1
2
pt
,
90
backgroundcolor
=
textcolor
]
91 92
%D We need different symbols for itemized lists.
93 94
\definesymbol
[
1
][
\hbox
{
\lower
1
ex
\hbox
{
*
}}
]
95
\definesymbol
[
2
][
\endash
]
96
\definesymbol
[
3
][
\letterhash
]
97
\definesymbol
[
3
][>]
98 99
%D We don't want these reversed clicked areas in Acrobat.
100 101
\setupinteraction
102
[
click
=
no
,
103
color
=
white
,
% pagecolor,
104
contrastcolor
=
white
]
% pagecolor,
105 106
%D We define a rather simple navigational panel at the bottom
107 108
\setupinteractionmenu
109
[
bottom
]
110
[
color
=
white
,
% pagecolor,
111
contrastcolor
=
white
,
% pagecolor,
112
background
=
color
,
113
backgroundcolor
=
textcolor
,
114
frame
=
off
,
115
height
=
2
4
pt
,
116
left
=
\hfill
,
117
middle
=
\hskip
1
2
pt
]
118 119
\setupsubpagenumber
120
[
state
=
start
]
121 122
\startinteractionmenu
[
bottom
]
123
\starttxt
124
\interactionbar
125
[
alternative
=
d
,
126
symbol
=
yes
,
127
color
=
white
,
128
contrastcolor
=
textcolor
]
129
\stoptxt
130
\hfilll
131
\startbut
[
previouspage
]
<
<
<
\stopbut
132
\startbut
[
nextpage
]
>
>
>
\stopbut
133
\stopinteractionmenu
134 135
%D Instead of the normal symbols we use more punky ones.
136 137
\startsymbolset
[
punk
]
138
\definesymbol
[
previous
]
[
\string
<
\string
<]
139
\definesymbol
[
somewhere
]
[
\string
^
\string
^
]
140
\definesymbol
[
next
]
[
\string
>
\string
>]
141
\stopsymbolset
142 143
\setupinteraction
144
[
symbolset
=
punk
]
145 146
%D Because the font is rather large, we use less whitespace.
147 148
\setuphead
149
[
chapter
]
150
[
after
=
{
\blank
[
big
]
}
]
151 152
\stopmodule
153 154
\continueifinputfile
{
s
-
present
-
punk
.
mkiv
}
155 156
\usemodule
[
present
-
common
]
157 158
\inputpresentationfile
{
examples
/
present
-
punk
-
0
0
1
.
tex
}
159