s-pre-27.tex /size: 4040 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=s-pre-27,
3
%D version=1999.08.20,
4
%D title=\CONTEXT\ Style File,
5
%D subtitle=Presentation Environment 27,
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
\setuppapersize
15
[
S
6
][
S
6
]
16 17
% \setupbodyfont[ppl]
18 19
\definetypeface
[
main
][
rm
][
casual
][
informal
][
default
]
20
\loadmapfile
[
original
-
micropress
-
informal
.
map
]
21 22
\setupbodyfont
[
main
,
1
0
pt
]
23 24
\setuplayout
25
[
footerdistance
=
2
0
pt
,
26
footer
=
4
0
pt
,
27
%footer=24pt,
28
%bottomdistance=10pt,
29
%bottom=12pt,
30
header
=
0
pt
,
31
backspace
=
2
0
pt
,
32
topspace
=
2
0
pt
,
33
width
=
middle
,
34
height
=
fit
]
35 36
% \def\MainTitle#1{\setupfootertexts[\hfill#1]}
37
% \def\SubTitle #1{\setupbottomtexts[\hfill#1]}
38
%
39
% \MainTitle{a dull talk held at \currentdate}
40
% \SubTitle {welcome to whatever}
41
%
42
% \setupbottom
43
% [style=\ssbf,
44
% color=white]
45
%
46
% \setupfooter
47
% [style=\ssbfb,
48
% color=white]
49 50
\setupfooter
51
[
strut
=
no
,
52
style
=
\bfb
,
53
color
=
white
]
54 55
\setupinteraction
56
[
state
=
start
]
57 58
\setupinteractionscreen
59
[
option
=
max
]
60 61
\definecolor
[
white
]
[
s
=
.
8
]
62
\definecolor
[
red
]
[
r
=
.
7
]
63
\definecolor
[
green
]
[
g
=
.
7
]
64
\definecolor
[
blue
]
[
b
=
.
7
]
65
\definecolor
[
yellow
][
r
=
.
7
,
g
=
.
7
]
66 67
\setupcolors
68
[
state
=
start
]
69 70
\defineoverlay
[
page
]
[
\reuseMPgraphic
{
page
}
]
71
\defineoverlay
[
text
]
[
\useMPgraphic
{
text
}
]
72
\defineoverlay
[
continue
]
[
\overlaybutton
{
forward
}
]
73 74
\setupbackgrounds
75
[
page
]
76
[
background
=
{
page
,
continue
}
]
77 78
\definecolor
[
PageColor
]
[
red
]
79
\definecolor
[
TextColor
]
[
yellow
]
80 81
\defineframedtext
82
[
TopicPage
]
83 84
\defineframedtext
85
[
TopicText
]
86 87
\setupframedtexts
88
[
TopicPage
]
89
[
width
=
\textwidth
,
90
height
=
\textheight
,
91
offset
=
overlay
]
92 93
\setupframedtexts
94
[
TopicText
]
95
[
offset
=
1
0
pt
,
96
style
=
bold
,
% hm
97
width
=
\TopicWidth
,
98
background
=
text
,
99
align
=
normal
]
100 101
\setupframedtexts
102
[
TopicPage
,
TopicText
]
103
[
frame
=
off
,
104
depthcorrection
=
off
,
105
before
=
,
106
after
=]
107 108
\newbox
\TopicBox
109
\newcounter
\KindOfTopic
110
\newdimen
\TopicWidth
111 112
\def
\KindOfTopic
{
1
}
113 114
\def
\StartTopic
115
{
\getrandomdimen
\TopicWidth
{
.
5
\textwidth
}{
.
7
\textwidth
}
116
\ifcase
\KindOfTopic
\or
117
\setupframedtexts
[
TopicPage
]
[
align
=
{
right
,
high
}
]
\or
118
\setupframedtexts
[
TopicPage
]
[
align
=
{
left
,
high
}
]
\or
119
\setupframedtexts
[
TopicPage
]
[
align
=
{
left
,
low
}
]
\or
120
\setupframedtexts
[
TopicPage
]
[
align
=
{
right
,
low
}
]
\fi
121
\setbox
\scratchbox
=
\vbox
\bgroup
\dontcomplain
122
\noindent
\startTopicPage
[
none
]
123
\noindent
\startTopicText
[
none
]
124
\setuptolerance
[
verytolerant
,
stretch
]
}
125 126
\def
\StopTopic
%
127
{
\stopTopicText
128
\stopTopicPage
129
\egroup
130
\global\setbox
\TopicBox
=
\vbox
131
{
\startoverlay
132
{
\box
\TopicBox
}
{
\box
\scratchbox
}
133
\stopoverlay
}
134
\copy
\TopicBox
135
\ifnum
\KindOfTopic
=
4
136
\def
\KindOfTopic
{
1
}
137
\else
138
\increment
\KindOfTopic
139
\fi
140
\page
}
141 142
\startuseMPgraphic
{
text
}
143
path
p
;
p
:
=
unitsquare
xyscaled
(
OverlayWidth
,
OverlayHeight
)
;
144
color
c
;
c
:
=
(
.7
+
uniformdeviate
.3
)
*
\MPcolor
{
TextColor
}
;
145
p
:
=
p
enlarged
-1.25
pt
;
146
fill
p
withcolor
c
;
147
draw
p
withpen
pencircle
scaled
2.5
pt
withcolor
.75
c
;
148
\stopuseMPgraphic
149 150
\startreusableMPgraphic
{
page
}
151
path
p
;
p
:
=
unitsquare
xyscaled
(
OverlayWidth
,
OverlayHeight
)
;
152
color
c
;
c
:
=
\MPcolor
{
PageColor
}
;
153
fill
p
withcolor
c
;
154
draw
p
withpen
pencircle
scaled
2.5
pt
withcolor
c
;
155
\stopreusableMPgraphic
156 157
\def
\StartNopic
#
1
\StopNopic
158
{
\setupfootertexts
159
[
\vbox
to
\footerheight
160
{
\vfill
161
\raggedleft
162
\def
\\
{
\endgraf
\tx\setstrut\strut
}
163
\setstrut\strut
\ignorespaces
#
1
\unskip
\endgraf
\removedepth
}
]
164
\null
\page
}
165 166
\def
\TitlePage
#
1
%
167
{
\StartNopic
#
1
\StopNopic
}
168 169
\setuphead
[
title
]
[
style
=
\bfc
,
after
=
\blank
]
170
\setuphead
[
subject
][
style
=
\bfa
,
before
=
\blank
]
171 172
\doifnotmode
{
demo
}{
\endinput
}
173 174
\starttext
175 176
\TitlePage
177
{
a
dull
talk
held
at
\currentdate
\\
welcome
to
whatever
}
178 179
\dorecurse
{
1
0
}{
\StartTopic
\input
tufte
\StopTopic
}
180 181
\stoptext
182