s-present-overlap.mkiv /size: 6924 b    last modification: 2020-07-01 14:35
1
%D \module
2
%D [ file=s-present-overlap, % was s-pre-62,
3
%D version=2005.03.04,
4
%D title=\CONTEXT\ Style File,
5
%D subtitle=Presentation Environment Overlap,
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
-
stepwise
]
15 16
\startmodule
[
present
-
overlap
]
17 18
\doifmodeelse
{
atpragma
}
{
19 20
\usetypescriptfile
21
[
type
-
ghz
]
22 23
\definetypeface
[
mainface
][
rm
][
serif
][
melior
]
[
default
][
encoding
=
texnansi
]
24
\definetypeface
[
mainface
][
tt
][
mono
]
[
modern
]
[
default
][
encoding
=
texnansi
,
rscale
=
1
.
0
5
]
25
\definetypeface
[
mainface
][
ss
][
serif
][
melior
]
[
default
][
encoding
=
texnansi
]
26
\definetypeface
[
mainface
][
mm
][
math
]
[
palatino
][
default
][
encoding
=
texnansi
,
rscale
=
0
.
9
5
]
27 28
\setupbodyfont
29
[
mainface
,
1
4
.
4
pt
]
30 31
}
{
32 33
\setupbodyfont
[
dejavu
,
1
4
.
4
pt
]
34 35
}
36 37
\setuppapersize
38
[
S
6
][
S
6
]
39 40
\setvariables
[
layout
][
dx
=
0
,
dy
=
1
,
nx
=
2
,
ny
=
2
,
step
=
6
4
]
41 42
\definemeasure
[
layoutwd
][
\dimexpr
\paperwidth
/
\getvariable
{
layout
}{
step
}
\relax
]
43
\definemeasure
[
layoutht
][
\dimexpr
\paperheight
/
\getvariable
{
layout
}{
step
}
\relax
]
44 45
\setuplayout
46
[
width
=
middle
,
47
height
=
middle
,
48
header
=
0
pt
,
49
footer
=
0
pt
,
50
margin
=
0
pt
,
51
backspace
=
5
\measured
{
layoutwd
}
,
52
topspace
=
5
\measured
{
layoutht
}
]
53 54
\definelayout
55
[
step
]
56
[
backspace
=
\numexpr
2
+
\getvariable
{
layout
}{
dx
}
\relax
\measured
{
layoutwd
}
,
57
cutspace
=
\numexpr
3
+
\getvariable
{
layout
}{
nx
}
-
\getvariable
{
layout
}{
dx
}
\relax
\measured
{
layoutwd
}
,
58
topspace
=
\numexpr
2
+
\getvariable
{
layout
}{
dy
}
\relax
\measured
{
layoutht
}
,
59
bottomspace
=
\numexpr
3
+
\getvariable
{
layout
}{
ny
}
-
\getvariable
{
layout
}{
dy
}
\relax
\measured
{
layoutht
}
]
60 61
\definecolor
[
layout
:
left
]
[
t
=
.
5
,
a
=
1
,
b
=
1
]
62
\definecolor
[
layout
:
right
]
[
t
=
.
5
,
a
=
1
,
r
=
1
]
63
\definecolor
[
layout
:
top
]
[
t
=
.
5
,
a
=
1
,
g
=
1
]
64
\definecolor
[
layout
:
bottom
][
t
=
.
5
,
a
=
1
,
y
=
1
]
65
\definecolor
[
layout
:
page
]
[
s
=
.
7
5
]
66 67
\definehspace
[
menu
][
\measured
{
layoutwd
}
]
68 69
\setupinteraction
70
[
state
=
start
,
71
click
=
off
,
72
style
=
,
73
color
=
interactioncolor
,
74
contrastcolor
=
interactioncolor
]
75 76
\setupinteractionscreen
77
[
option
=
max
]
78 79
\setupbuttons
80
[
color
=
maincolor
,
81
contrastcolor
=
maincolor
,
82
style
=
\tf
,
% acceptable
83
height
=
2
\measure
{
layoutht
}
,
84
width
=
2
\measure
{
layoutwd
}
,
85
offset
=
overlay
,
86
frame
=
off
]
87 88
\definecolor
[
interactioncolor
][
darkgray
]
89
\definecolor
[
maincolor
]
[
lightgray
]
90 91
\setuptexttexts
92
[]
93
[
\vbox
to
\textheight
{
\vfill\hfill
\setups
{
menu
:
content
}}
]
94 95
\startsetups
menu
:
content
96 97
\button
{
\symbol
[
firstpage
]
}
[
firstpage
]
98
\hspace
[
menu
]
99
\button
{
\symbol
[
previouspage
]
}
[
previouspage
]
100
\hspace
[
menu
]
101
\button
{
\StartBusy
\symbol
[
PauseRendering
]
\StopBusy
}
[
InvokeStepper
]
102
\hspace
[
menu
]
103
\button
{
\symbol
[
nextpage
]
}
[
nextpage
]
104
\hspace
[
menu
]
105
\button
{
\symbol
[
lastpage
]
}
[
lastpage
]
106
\hspace
[
menu
]
107
\button
{
\symbol
[
CloseDocument
]
}
[
CloseDocument
]
108 109
\stopsetups
110 111
\startuseMPgraphic
{
page
}
{
step
}
112
StartPage
;
113
numeric
dx
;
dx
:
=
PaperWidth
/
\MPvar
{
step
}
;
114
numeric
dy
;
dy
:
=
PaperHeight
/
\MPvar
{
step
}
;
115
fill
Page
withcolor
.5
white
;
116
fill
117
ulcorner
Page
--
urcorner
Page
--
118
urcorner
Page
shifted
(
0
,
-
TopSpace
+
dy
)
--
ulcorner
Page
shifted
(
0
,
-
TopSpace
+
dy
)
--
cycle
119
withcolor
"
layout:top
"
;
120
fill
121
llcorner
Page
--
lrcorner
Page
--
122
lrcorner
Page
shifted
(
0
,
BottomSpace
-
dy
)
--
llcorner
Page
shifted
(
0
,
BottomSpace
-
dy
)
--
cycle
123
withcolor
"
layout:bottom
"
;
124
fill
125
ulcorner
Page
--
llcorner
Page
--
126
llcorner
Page
shifted
(
BackSpace
-
dx
,
0
)
--
ulcorner
Page
shifted
(
BackSpace
-
dx
,
0
)
--
cycle
127
withcolor
"
layout:left
"
;
128
fill
129
urcorner
Page
--
lrcorner
Page
--
130
lrcorner
Page
shifted
(
-
CutSpace
+
dx
,
0
)
--
urcorner
Page
shifted
(
-
CutSpace
+
dx
,
0
)
--
cycle
131
withcolor
"
layout:right
"
;
132
fill
Field
[
Text
]
[
Text
]
enlarged
(
dx
,
dy
)
withcolor
white
;
133
fill
Field
[
Text
]
[
Text
]
enlarged
(
dx
,
dy
)
withcolor
"
layout:page
"
;
134
StopPage
;
135
\stopuseMPgraphic
136 137
\defineoverlay
[
page
][
\useMPgraphic
{
page
}
{
step=\getvariable{layout
}
{
step
}}
]
138 139
\setupbackgrounds
140
[
page
]
141
[
background
=
page
]
142 143
\setupcolors
144
[
state
=
start
]
145 146
\startsetups
nextstep
147
% pagebreak handlers are grouped, so we need to set global
148
\ifnum
\getvariable
{
layout
}{
dx
}
=
\getvariable
{
layout
}{
nx
}
\relax
149
\ifnum
\getvariable
{
layout
}{
dy
}
=
\getvariable
{
layout
}{
ny
}
\relax
150
\setxvariables
[
layout
][
dy
=
1
]
151
\else
152
\setxvariables
[
layout
][
dy
=
\the\numexpr
\getvariable
{
layout
}{
dy
}
+
1
\relax
]
153
\fi
154
\setxvariables
[
layout
][
dx
=
1
]
155
\else
156
\setxvariables
[
layout
][
dx
=
\the\numexpr
\getvariable
{
layout
}{
dx
}
+
1
\relax
]
157
\fi
158
% global anyway
159
\setuplayout
[
step
]
160
\stopsetups
161 162
\appendtoks
163
\definefont
[
ChapterTitleFont
][
SerifBold
*
default
sa
2
]
164
\NormalizeFontHeight
\SubTitleFont
{
\setstrut\strut\quad
}
{
3
\lineheight
}
{
SerifBold
*
default
}
165
\NormalizeFontHeight
\ChapterNumberFont
{
XVI
}
{
4
\lineheight
}
{
SerifBold
*
default
}
166
\to
\everystarttext
167 168
\setupsection
169
[
section
-
2
]
170
[
bodypartconversion
=
Romannumerals
]
171 172
\installpagebreakhandler
{
step
}
{
\setups
{
nextstep
}}
173 174
\definepagebreak
[
chapter
][
yes
,
step
]
175 176
\setuphead
177
[
chapter
]
178
[
page
=
chapter
,
179
command
=
\MyChapterCommand
,
180
after
=
\nowhitespace
]
181 182
\definehead
[
Topic
][
chapter
]
183
\definehead
[
Nopic
][
title
]
184 185
\setuphead
[
chapter
,
Topic
,
Nopic
]
186
[
numberstyle
=
\ChapterNumberFont
,
187
textstyle
=
\ChapterTitleFont
,
188
numbercolor
=
lightgray
,
189
textcolor
=
darkgray
]
190 191
\unexpanded
\def
\MyChapterCommand
#
1
#
2
%
192
{
\hbox
\bgroup
% we need to nil the strut added by the headplacement
193
\setupframed
[
frame
=
off
,
lines
=
3
,
offset
=
overlay
]
%
194
\rlap
{
\hskip
2
\lineheight
\framed
{
\setnostrut
#
1
}}
%
195
\framed
{
#
2
}
%
196
\egroup
}
197 198
\setupitemize
199
[
each
]
200
[
R
,
broad
]
201
[
stopper
=
,
202
color
=
lightgray
]
203 204
\startsetups
document
:
start
205 206
\startstandardmakeup
[
headerstate
=
high
,
textstate
=
stop
]
207 208
\setupalign
[
middle
]
209 210
\vfil
211
\startcolor
[
darkgray
]
212
\dontleavehmode
\scale
[
width
=
.
9
\textwidth
]
{
\bf
\setstrut\strut
\documentvariable
{
title
}}
213
\vfil
214
\dontleavehmode
\scale
[
width
=
.
7
\textwidth
]
{
\bf
\setstrut\strut
\documentvariable
{
subtitle
}}
215
\vfil
\vfil
\vfil
216
\dontleavehmode
\scale
[
width
=
.
5
\textwidth
]
{
\bf
\setstrut\strut
\documentvariable
{
location
}}
217
\stopcolor
218
\vfil
\vfil
\vfil
219 220
\stopstandardmakeup
221 222
\stopsetups
223 224
\stopmodule
225 226
\continueifinputfile
{
s
-
present
-
overlap
.
mkiv
}
227 228
\usemodule
[
present
-
common
]
229 230
\inputpresentationfile
{
context
/
2
0
1
1
/
context
-
2
0
1
1
-
mathml
-
update
.
tex
}
231
%\inputpresentationfile{context/2011/context-2011-metapost-how-we-adapt.tex}
232
%\inputpresentationfile{context/2011/context-2011-ebook-export.tex}
233
%\inputpresentationfile{context/2011/context-2011-sorting-registers.tex}
234