1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
|
%D \module
%D [ file=simpleslides-s-SideToc,
%D version=2010.02.09,
%D title=\CONTEXT\ Style File,
%D subtitle=Presentation Module --- SideToc style,
%D author=Aditya Mahajan and Thomas A. Schmitz,
%D date=\currentdate,
%D copyright={Aditya Mahajan and Thomas A. Schmitz}]
%C
%C Copyright 2010 Aditya Mahajan and Thomas A. Schmitz
%C This file may be distributed under the GNU General Public License v. 2.0.
%D This file provides the \quotation{SideToc} style for the presentation
%D module. It is loaded at runtime.
\writestatus{simpleslides}{loading Side Toc style}
\startmodule[simpleslides-s-SideToc]
\unprotect
%D We create different layouts for the title page, horizontal, and vertical
%D slides.
\setuplayout [simpleslides:layout:vertical]
[width=fit,
leftmargin=3.5cm,
rightmargin=0cm,
leftmargindistance=1cm,
rightmargindistance=0pt,
height=fit,
header=0cm,
footer=0cm,
topspace=1cm,
backspace=5cm,
% cutspace=4cm,
bottomspace=0cm,
bottom=0pt,
location=middle]
\setuplayout [simpleslides:layout:horizontal]
[width=fit,
leftmargin=3.5cm,
rightmargin=0cm,
leftmargindistance=1cm,
rightmargindistance=0pt,
height=fit,
header=0.1cm,
headerdistance=1.7cm,
footer=0cm,
topspace=1cm,
backspace=5cm,
% cutspace=4cm,
bottomspace=0cm,
bottom=0pt,
location=middle]
\setuplayout [simpleslides:layout:title]
[width=fit,
leftmargin=0cm,
rightmargin=0cm,
height=fit,
header=0cm,
footer=0cm,
topspace=1cm,
backspace=1cm,
bottomspace=0cm,
bottom=0pt,
location=middle]
\setupcombinations[distance=0.75cm]
%D The interesting part of this presentation style is the "Topic" list which is
%D typeset in the left margin. It is inspired by something Hans did in
%D s-pre-19. The Difference is that I wanted the Topic to be independent from
%D SlideTitle macro. This way, several slides can be combined into one Topic.
% \definelayer
% [Topiclayer]
% [width=2.5cm,
% height=\paperheight]
%
% \defineoverlay
% [simpleslides:background:ornament]
% [\setlayer[Topiclayer]{\completelist[MyTopic]}
% \startsetups tlayer
% \setlayer[Topiclayer]{\completelist[MyTopics]}
%\stopsetups
%D These macros are used for placing figures/pictures:
\define\NormalHeight {\textheight}
\define\NormalWidth {.476\textwidth}
\define\PictureFrameHeight {\textheight}
\define\PictureFrameWidth {.476\textwidth}
\setuplayer
[simpleslides:layer:slidetitle]
[x=5cm]
%D We define our color scheme
\enablemode[\moduleparameter{simpleslides}{color}]
\startmode[dark]
\definecolor [simpleslides:backgroundcolor] [s=.9]
\definecolor [simpleslides:altcontrastcolor] [b=.6]
\definecolor [simpleslides:contrastcolor] [s=.3]
\definecolor [simpleslides:itemize:color] [simpleslides:altcontrastcolor]
\define[3]\FancyEntry
{\doifelse{#1}{\MyMark}%
{\framed[width=3.5cm,
height=4ex,
align=middle,
frame=off,
framecolor=red,
background=color,
backgroundcolor=simpleslides:altcontrastcolor,
foregroundcolor=simpleslides:backgroundcolor]
{\switchtobodyfont[13pt]#1}}% fancy layout
{\framed[width=3.5cm,
height=4ex,
align=middle,
frame=off,
framecolor=red,
foregroundcolor=simpleslides:backgroundcolor]
{\switchtobodyfont[13pt]#1}}% normal layout
}
\stopmode
\startmode[light]
\definecolor [simpleslides:altcontrastcolor] [r=1,g=0.5,b=0]
\definecolor [simpleslides:contrastcolor] [s=0.95]
\definecolor [simpleslides:textcolor] [s=0]
\definecolor [simpleslides:itemize:color] [simpleslides:altcontrastcolor]
\define[3]\FancyEntry
{\doifelse{#1}{\MyMark} %
{\framed[width=3.5cm,
height=4ex,
frame=off,
align=middle,
foregroundcolor=simpleslides:altcontrastcolor]
{\switchtobodyfont[13pt]\bf #1}}% fancy layout
{\framed[width=3.5cm,
height=4ex,
align=middle,
frame=off,
framecolor=red,
foregroundcolor=simpleslides:altcontrastcolor]
{\switchtobodyfont[13pt]#1}}% normal layout
}
\stopmode
%D Here are the main macros for defining and typesetting the Topic list:
\definelist[MyTopics][criterium=all]
\def\MyMark{}
\def\Topic%
%{\relax}
{\dosingleargument\doTopic}
\def\doTopic[#1]{%
\def\MyMark{#1}%
\writetolist[MyTopics]{#1}{}%
}
\setuplist[MyTopics]
[pagenumber=no,
alternative=command,
command=\FancyEntry]
\setuptexttexts[margin][\vbox{\placelist[MyTopics]}][]
%D We use \METAPOST to draw the background.
\startuseMPgraphic{simpleslides:MP:title}
StartPage ;
save middle ;
path middle ;
fill Page withcolor \MPcolor{simpleslides:contrastcolor} ;
middle = Page enlarged -1.5cm ;
fill middle withcolor \MPcolor{simpleslides:altcontrastcolor} ;
StopPage ;
\stopuseMPgraphic
\startuseMPgraphic{simpleslides:MP:horizontal}
StartPage ;
save a, b, c ;
numeric a, b, c ;
a = 4.5cm ;
b = 0.5cm ;
c = 2.2cm ;
z[1] = ulcorner Page shifted (a,0) ;
z[2] = llcorner Page shifted (a,0) ;
z[3] = ulcorner Page shifted (0,-c) ;
z[4] = urcorner Page shifted (0,-c) ;
z[5] = llcorner Page shifted (0,b) ;
z[6] = lrcorner Page shifted (0,b) ;
z[7] = ulcorner Page shifted (a,-c) ;
z[8] = llcorner Page shifted (a,b) ;
save p ;
path p[] ;
p[1] = ulcorner Page -- z[1] -- z[2] -- llcorner Page -- cycle ;
p[2] = ulcorner Page -- urcorner Page -- z[4] -- z[3] -- cycle ;
p[3] = llcorner Page -- lrcorner Page -- z[6] -- z[5] -- cycle ;
p[4] = ulcorner Page -- z[1] -- z[7] -- z[3] -- cycle ;
p[5] = llcorner Page -- z[5] -- z[8] -- z[2] -- cycle ;
fill Page withcolor \MPcolor{simpleslides:backgroundcolor} ;
fill p[1] withcolor \MPcolor{simpleslides:contrastcolor} ;
fill p[2] withcolor \MPcolor{simpleslides:contrastcolor} ;
fill p[3] withcolor \MPcolor{simpleslides:contrastcolor} ;
fill p[4] withcolor \MPcolor{simpleslides:altcontrastcolor} ;
fill p[5] withcolor \MPcolor{simpleslides:altcontrastcolor} ;
StopPage ;
\stopuseMPgraphic
\startuseMPgraphic{simpleslides:MP:vertical}
StartPage ;
save a, b ;
numeric a, b ;
a = 4.5cm ;
b = 0.5cm ;
z[1] = ulcorner Page shifted (a,0) ;
z[2] = llcorner Page shifted (a,0) ;
z[3] = ulcorner Page shifted (0,-b) ;
z[4] = urcorner Page shifted (0,-b) ;
z[5] = llcorner Page shifted (0,b) ;
z[6] = lrcorner Page shifted (0,b) ;
z[7] = ulcorner Page shifted (a,-b) ;
z[8] = llcorner Page shifted (a,b) ;
save p ;
path p[] ;
p[1] = ulcorner Page -- z[1] -- z[2] -- llcorner Page -- cycle ;
p[2] = ulcorner Page -- urcorner Page -- z[4] -- z[3] -- cycle ;
p[3] = llcorner Page -- lrcorner Page -- z[6] -- z[5] -- cycle ;
p[4] = ulcorner Page -- z[1] -- z[7] -- z[3] -- cycle ;
p[5] = llcorner Page -- z[5] -- z[8] -- z[2] -- cycle ;
fill Page withcolor \MPcolor{simpleslides:backgroundcolor} ;
fill p[1] withcolor \MPcolor{simpleslides:contrastcolor} ;
fill p[2] withcolor \MPcolor{simpleslides:contrastcolor} ;
fill p[3] withcolor \MPcolor{simpleslides:contrastcolor} ;
fill p[4] withcolor \MPcolor{simpleslides:altcontrastcolor} ;
fill p[5] withcolor \MPcolor{simpleslides:altcontrastcolor} ;
StopPage ;
\stopuseMPgraphic
%D We define these backgrounds as overlays:
\defineoverlay
[simpleslides:background:horizontal]
[\useMPgraphic{simpleslides:MP:horizontal}]
\defineoverlay
[simpleslides:background:vertical]
[\useMPgraphic{simpleslides:MP:vertical}]
\defineoverlay
[simpleslides:background:title]
[\useMPgraphic{simpleslides:MP:title}]
%D We want the title to placed in color.
\setupTitle
[\c!title=,
\c!author=,
\c!date=\currentdate,
\c!headstyle=,
\c!headcolor={simpleslides:backgroundcolor},
\c!align=\v!middle,
\c!before=\vfill,
\c!after=\vfill,
\c!title\c!style={\switchtobodyfont[\TitleSize]},
\c!title\c!color=simpleslides:backgroundcolor,
\c!title\c!align=,%\v!middle,
\c!author\c!style=,
\c!author\c!color=simpleslides:backgroundcolor,
\c!author\c!align=,%\v!middle,
\c!date\c!style=,
\c!date\c!color=simpleslides:backgroundcolor,
\c!date\c!align=,%\v!middle,
\c!before\c!title=,
\c!before\c!author=,
\c!before\c!date=,
\c!after\c!title={\blank[1*line]},
\c!after\c!author={\blank[2*line]},
\c!after\c!date=]
%D We want the slide title on the top
\setupSlideTitle
[\c!after=,
\c!alternative=layer,
\c!width=\textwidth,
\c!height=2.5cm,
\c!color=simpleslides:backgroundcolor]
%D The symbol for the first level of itemizations.
\definesymbol[1][\useMPgraphic{simpleslides:itemize:square}]
%\setupitemize[1][inmargin][color=simpleslides:backgroundcolor]
\protect
\stopmodule
\endinput
% Write Macro "Topic"
% This macro takes a keyword and appends it to a list (a LUA table?), at the same
% time, it puts the keywords into a MPvariable. The complete list is written in
% MP to the left of the slide; the current Topic written white on blue, the
% others black on gray.
|