summaryrefslogtreecommitdiffstats
path: root/contrib/mom/examples/slide-demo.mom
blob: 989ce5a9fa137c9bb72e76d10057867f871ffb22 (plain)
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
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
.\" -*- mode: text; coding: utf-8; -*-
\#
\# Copyright (C) 2004-2020 Free Software Foundation, Inc.
\# Revised for version 2.5 2021-08.
\#
\# Copying and distribution of this file, with or without modification,
\# are permitted in any medium without royalty provided the copyright
\# notice and this notice are preserved.
\#
.\" Macro for code blocks
.de CODE_BLOCK
. ie \\n[.$] \{\
.   CODE off
.   QUOTE off
.   CENTER_BLOCK off
. \}
. el \{\
.   CENTER_BLOCK
.   QUOTE
.   CODE
. \}
..
.\"----------------------------------------------------------------
.
.TITLE "Creating slide presentations with gropdf/mom"
.PDF_TITLE "\*[$TITLE]"
.
.DOCTYPE SLIDES \
  ASPECT 16:9 \
  HEADER "Header left" "\*[$TITLE]" "Header right" \
  FOOTER "" "" "\*S[+2]\*[SLIDE#]\*S[-2]" \
  TRANSITION "Box 1 . O" \
  PAUSE "Wipe 1"
.
.PARA_SPACE .75v
.SS +3
.HYPHENATION off
.
.NEWCOLOR darkred #aa0000
.NEWCOLOR darkred1 #900000
.NEWCOLOR blue1 #00007b
.NEWCOLOR blue2 #00006f
.NEWCOLOR code-grey GRAY 0.3
.XCOLOR cyan4
.XCOLOR green4
.
.HEADER_COLOR      darkred1
.HEADER_RULE_COLOR blue1
.FOOTER_RULE       off
.
.COVER_STYLE \
  LEAD +8 \
  COLOR white
.HEADING_STYLE 1 \
  COLOR blue2
.CODE_STYLE \
  FONT B \
  SIZE 115 \
  COLOR code-grey
.QUOTE_STYLE \
  QUAD LEFT
.CONDENSE 90
.
.PDF_IMAGE_FRAME "" 1 blue1
.
.COVERTITLE \
  "Creating slide presentations" \
  "with" \
  "gropdf and mom"
.
.COVER_START_POS 15P
.COVER COVERTITLE
.
.STRING hand \*[darkred]\[rh]\*[black]
.
.\" Make first slide black.
.\" If printing, remove to save ink.
.SLIDE_COLOR black
.
.START
.SLIDE_COLOR off
.
.ADD_SPACE 9p
.IB 8P
.
.HEADING 1 "PDF slides"
.SP .5v
.
.PP
PDF slides are a subset of mom's document processing macros
formatted for presentation mode when viewed in a PDF reader.  In
most respects, they behave identically to the default document type
described in mom's html documentation\*[HANG .]
.BR
Differences in the formatting include\*[HANG :]
.
.PAUSE
.LEFT
.LIST
.ITEM .2v
the choice between two aspect ratios, 4:3 or 16:9
.LIST USER \*[hand]
.ITEM
both fit on A4 or US letter paper sizes when printed
.
.PAUSE
.LIST BACK
.ITEM .2v
type is set centered by default
.LIST USER \*[hand]
.ITEM
this may be changed to left, right, or justified
.
.PAUSE
.LIST BACK
.ITEM .2v
headers and/or footers must be explicitly instantiated
.LIST USER \*[hand]
.ITEM
the left, centre, and right parts must be supplied
by the user
.
.PAUSE
.LIST BACK
.ITEM .2v
slide numbering (pagination) is disabled
.LIST  USER \*[hand]
.ITEM
if slide numbering is desired, it must be put in the left,
centre, or right part of a header or footer definition
.QUIT_LISTS
.
.NEWSLIDE
.
.ADD_SPACE 9p
.IB 2P
.
.DOC_QUAD CENTER
.
.HEADING 1 "Pauses and transitions"
.SP .5v
.
.PP
Slides made with mom take advantage of the pause and slide
transition features provided in presentation mode by most
contemporary PDF readers.
.PAUSE
.PP
Pauses and transitions are dynamic and engaging, holding the
viewer's attention while increasing the impact of the content.
.PAUSE
.PP
With pauses, material on a slide can be revealed progressively
with
.BR
a mouse click or by hitting
.
.LIST
.ITEM .5v
Next
.ITEM 2p
PgDown
.ITEM 2p
Spacebar
.LIST off
.
.PAUSE
.PP
The manner in which new material is revealed and new slides
are displayed can be tailored separately for effects like Fade,
Dissolve, Wipe and others, and can be changed on the fly.
.
.NEWSLIDE
.
.PP
Mom slides begin with the macro DOCTYPE SLIDES, where you choose
the aspect ratio and transition effects, and set up headers and
footers\*[HANG .]
.PAUSE
.PP
You may find it convenient to provide a title for the slide
presentation, as the top of the .mom file for these slides
demonstrates\*[HANG :]
.
.SP -1v
.CODE_BLOCK
\*[COND]\&.TITLE "Creating slide presentations with gropdf/mom"
\&.PDF_TITLE "\\*[$TITLE]"
\&.\\"
\&.DOCTYPE SLIDES \\
 ASPECT 16:9 \\
 HEADER "Header left" "\\*[$TITLE]" "Header right" \\
 FOOTER "" "" "\\*S[+2]\\*[SLIDE#]\\*S[-2]" \\
 TRANSITION "Box 1 . O" \\
 PAUSE "Wipe 1"\*[CONDX]
.CODE_BLOCK off
.SP -.5v
.
.PAUSE
.PP
Afterwards, you may make any changes you like to the layout and
style, then enter START.  Unlike other mom documents, PRINTSTYLE is
not required\*[HANG .]
.
.NEWSLIDE
.
.ADD_SPACE 9p
.IB -1P+6p
.
.HEADING 1 \
  "The \s[-2]PAUSE\s[0] and \s[-2]NEWSLIDE\s[0] macros"
.SP .5v
.
.PP
Whenever you want a pause before revealing the next material on a
slide, enter the macro PAUSE on a line by itself.  If you want a
reveal effect that's different from the current one, you may pass
PAUSE the parameters of the new effect\*[HANG :]
.
.SP -1v
.PAUSE
.
.CODE_BLOCK
\&.PAUSE "Dissolve .4"
.CODE_BLOCK off
.
.PAUSE "Dissolve .4"
Notice that this material dissolves in, whereas before, new material
appeared from left to right.  \*[BU6]The new effect stays in force
until you change it again\*[HANG .]
.PAUSE "Wipe 1"
.PP
New slides are introduced with NEWSLIDE. \*[bu6]Transition effects
and parameters may be given to NEWSLIDE\*[HANG :]
.SP -1v
.
.CODE_BLOCK
\&.NEWSLIDE "Blinds .5"
.CODE_BLOCK off
.
.PAUSE
The next slide in this presentation will appear with the Blinds
effect\*[HANG .]
.BR
Consult man gropdf\c
\*[FU2]\*[UP 1p](\*[DOWN 1p]\*[BU2]1\*[UP 1p]\*[BU1])\*[DOWN 1p]
for all the pause/transition effects and their
parameters.\*[BU6]\*[UP 2p]\s[-2]*\s[0]
.SP 4p
.FT I
.PT_SIZE -2
*Note that not all PDF \*[BU6]viewers support every effect\*[HANG .]
.FT R
.PT_SIZE +2
.
.NEWSLIDE "Blinds .5"
.SLIDE_COLOR antiquewhite
.
.ADD_SPACE 9p
.
.HEADING 1 "Highlighting items
.SP .5v
.PP
The BOX macro lets you highlight items as they are revealed with
frames and shaded backgrounds\*[HANG .]
.PAUSE "Fade .5"
.BOX SHADED pink INSET 3p
.PP
This item is highlighted with a shaded background\*[HANG .]
.PAUSE
.PP
The highlight moves to each new item as it's revealed\*[HANG .]
.PAUSE
.PP
Highlighting can continue for as many slides as you want\*[HANG .]
.PAUSE
.PP
If there are no pauses on a slide, BOX can be used
.BR
to provide a background for all the items\*[HANG .]
.PAUSE
.PP
The SLIDE_COLOR macro lets you colour
.BR
the whole slide (q.v.)\*[HANG .]
.BOX off
.
.NEWSLIDE "Box 1 . O"
.SLIDE_COLOR off
.
.ADD_SPACE 9p
.
.HEADING 1 "Macros and preprocessors"
.SP .5v
.PP
Slides can make full use of all mom's document processing and
typesetting macros, including preprocessors and image insertion\*[HANG .]
.
.IBX CLEAR
.LS -4
.
.PAD "\
\*[FWD 4P+6p]\*[ST1]#\*[ST1X]\
\*[FWD 2P+6p]\*[ST2]\*[FWD 12P]\\*[ST2X]\
\*[FWD 3P+9p]\*[ST3]#\*[ST3X]\
\*[FWD 3P]\*[ST4]#\*[ST4X]\*[FWD 2P]"
.
.ST 1 L
.ST 2 C
.ST 3 C
.ST 4 C
.
.PAUSE "Fade .5"
.
.TAB 1
.PT_SIZE -1.5
.CENTER
\*[BD]\*[blue2]\*[DOWN 6p]tbl
.LEFT
.mk
.PT_SIZE -1
.COLOR blue2
.TS H BOXED
tab(^) allbox;
c c
n n.
\*[darkred]\s[-.5]\*[DOWN .5p]Year^Mean Temp.\s[0]\*[blue2]
_
.TH
\*[cyan4]\fB2015^28.3\*[blue2]
\*[cyan4]1998^28.3\*[blue2]
\*[cyan4]1997^28.3\*[blue2]
\*[cyan4]2010^28.1\*[blue2]
\*[cyan4]2002^28.1\*[blue2]
\*[cyan4]2005^28.0\*[blue2]
\*[cyan4]2014^27.9\*[blue2]
\*[cyan4]2009^27.9\*[blue2]
.TE
.
.rt
.PAUSE
.
.TN
.PT_SIZE +1
\*[FWD 10p]\*[DOWN 6p]pic
.COLOR green4
.SP 3p
.PS 2 LEFT
A: ellipse wid 0.5 ht 0.5
  arrow color "green4" up 0.2 from A.n
  arrow color "green4" up 0.2 right 0.2 from A.ne
  arrow color "green4" right 0.2 from A.e
  arrow color "green4" down 0.2 right 0.2 from A.se
  arrow color "green4" down 0.2 from A.s
  arrow color "green4" down 0.2 left 0.2 from A.sw
  arrow color "green4" left 0.2 from A.w
  arrow color "green4" up 0.2 left 0.2 from A.nw
.PE
.
.rt
.PAUSE
.
.TN
.COLOR blue2
\*[FWD 1p]\*[DOWN 6p]eqn
.FAMILY T
.PT_SIZE +3
.LS
.COLOR code-grey
.SP 4P
.EQ
f sub X (x) ^=^ left {
  rpile { 0 above 2x above 0 }
  ~~lpile { x < 0 above 0 <= x <= 1 above x > 1 }
.EN
.
.rt
.PAUSE
.
.TN
.FAMILY H
.PT_SIZE -3
.COLOR blue2
\*[DOWN 6p]pdf image\*[black]\*[PREV]
.SP 2P+6p
.PDF_IMAGE -C penguin.pdf 81p 96p FRAME
.TQ
.
.NEWSLIDE "Box 1 . O"
.ADD_SPACE 5p
.IB 10P
.PT_SIZE +1.5
.
.HEADING 1 "Printing handouts"
.SP .5v
.
.CODE_STYLE \
  COLOR BLACK \
  SIZE 120
.PP
Because slides contain pauses, they need a little help on their
way to the printer or they stop printing at the first pause\*[HANG .]
.PAUSE "Wipe 1"
.PP
Setting GROPDF_NOSLIDE=1 before invoking 
\[oq]\*[FU4]\*[CODE]\*[COND]pdfmom\*[CONDX]\*[CODE off]\*[FU4]\[cq]
or
\[oq]\*[FU2]\*[CODE]\*[COND]groff\~-Tpdf\*[CONDX]\*[CODE off]\*[FU6]\[cq]
disables the pauses\*[HANG :]
.
.SP -1v
.
.CODE_STYLE \
  COLOR code-grey \
  SIZE 110
.CODE_BLOCK
\*[COND]GROPDF_NOSLIDE=1 pdfmom <options> slide-file.mom\*[CONDX]
.CODE_BLOCK off
.
.PAUSE
The output may be piped directly to a printer or saved to a file\*[HANG .]
.PAUSE
.PP
See mom's html documentation and the gropdf\c
\*[FU2]\*[UP 1p](\*[DOWN 1p]\*[BU2]1\*[UP 1p]\*[BU1])\*[DOWN 1p]
manpage for complete information concerning slide usage\*[HANG .]
.
.SP 9p
.CENTER_BLOCK
.nr dcl-ind -1 1
.while \n[dcl-ind]<4 \{\
. DCL SOLID \n+[dcl-ind]P 9p 9p blue2
.\}
.CENTER_BLOCK off
.\" Local Variables:
.\" mode: nroff
.\" End:
.\" vim: filetype=groff: