Debian Codegraph @

contrib/mom/examples/slide-demo.mom

raw
1 .\" -*- mode: text; coding: utf-8; -*-
2 \#
3 \# Copyright (C) 2004-2020 Free Software Foundation, Inc.
4 \# Revised for version 2.5 2021-08.
5 \#
6 \# Copying and distribution of this file, with or without modification,
7 \# are permitted in any medium without royalty provided the copyright
8 \# notice and this notice are preserved.
9 \#
10 .\" Macro for code blocks
11 .de CODE_BLOCK
12 . ie \\n[.$] \{\
13 . CODE off
14 . QUOTE off
15 . CENTER_BLOCK off
16 . \}
17 . el \{\
18 . CENTER_BLOCK
19 . QUOTE
20 . CODE
21 . \}
22 ..
23 .\"----------------------------------------------------------------
24 .
25 .TITLE "Creating slide presentations with gropdf/mom"
26 .PDF_TITLE "\*[$TITLE]"
27 .
28 .DOCTYPE SLIDES \
29 ASPECT 16:9 \
30 HEADER "Header left" "\*[$TITLE]" "Header right" \
31 FOOTER "" "" "\*S[+2]\*[SLIDE#]\*S[-2]" \
32 TRANSITION "Box 1 . O" \
33 PAUSE "Wipe 1"
34 .
35 .PARA_SPACE .75v
36 .SS +3
37 .HYPHENATION off
38 .
39 .NEWCOLOR darkred #aa0000
40 .NEWCOLOR darkred1 #900000
41 .NEWCOLOR blue1 #00007b
42 .NEWCOLOR blue2 #00006f
43 .NEWCOLOR code-grey GRAY 0.3
44 .XCOLOR cyan4
45 .XCOLOR green4
46 .
47 .HEADER_COLOR darkred1
48 .HEADER_RULE_COLOR blue1
49 .FOOTER_RULE off
50 .
51 .COVER_STYLE \
52 LEAD +8 \
53 COLOR white
54 .HEADING_STYLE 1 \
55 COLOR blue2
56 .CODE_STYLE \
57 FONT B \
58 SIZE 115 \
59 COLOR code-grey
60 .QUOTE_STYLE \
61 QUAD LEFT
62 .CONDENSE 90
63 .
64 .PDF_IMAGE_FRAME "" 1 blue1
65 .
66 .COVERTITLE \
67 "Creating slide presentations" \
68 "with" \
69 "gropdf and mom"
70 .
71 .COVER_START_POS 15P
72 .COVER COVERTITLE
73 .
74 .STRING hand \*[darkred]\[rh]\*[black]
75 .
76 .\" Make first slide black.
77 .\" If printing, remove to save ink.
78 .SLIDE_COLOR black
79 .
80 .START
81 .SLIDE_COLOR off
82 .
83 .ADD_SPACE 9p
84 .IB 8P
85 .
86 .HEADING 1 "PDF slides"
87 .SP .5v
88 .
89 .PP
90 PDF slides are a subset of mom's document processing macros
91 formatted for presentation mode when viewed in a PDF reader. In
92 most respects, they behave identically to the default document type
93 described in mom's html documentation\*[HANG .]
94 .BR
95 Differences in the formatting include\*[HANG :]
96 .
97 .PAUSE
98 .LEFT
99 .LIST
100 .ITEM .2v
101 the choice between two aspect ratios, 4:3 or 16:9
102 .LIST USER \*[hand]
103 .ITEM
104 both fit on A4 or US letter paper sizes when printed
105 .
106 .PAUSE
107 .LIST BACK
108 .ITEM .2v
109 type is set centered by default
110 .LIST USER \*[hand]
111 .ITEM
112 this may be changed to left, right, or justified
113 .
114 .PAUSE
115 .LIST BACK
116 .ITEM .2v
117 headers and/or footers must be explicitly instantiated
118 .LIST USER \*[hand]
119 .ITEM
120 the left, centre, and right parts must be supplied
121 by the user
122 .
123 .PAUSE
124 .LIST BACK
125 .ITEM .2v
126 slide numbering (pagination) is disabled
127 .LIST USER \*[hand]
128 .ITEM
129 if slide numbering is desired, it must be put in the left,
130 centre, or right part of a header or footer definition
131 .QUIT_LISTS
132 .
133 .NEWSLIDE
134 .
135 .ADD_SPACE 9p
136 .IB 2P
137 .
138 .DOC_QUAD CENTER
139 .
140 .HEADING 1 "Pauses and transitions"
141 .SP .5v
142 .
143 .PP
144 Slides made with mom take advantage of the pause and slide
145 transition features provided in presentation mode by most
146 contemporary PDF readers.
147 .PAUSE
148 .PP
149 Pauses and transitions are dynamic and engaging, holding the
150 viewer's attention while increasing the impact of the content.
151 .PAUSE
152 .PP
153 With pauses, material on a slide can be revealed progressively
154 with
155 .BR
156 a mouse click or by hitting
157 .
158 .LIST
159 .ITEM .5v
160 Next
161 .ITEM 2p
162 PgDown
163 .ITEM 2p
164 Spacebar
165 .LIST off
166 .
167 .PAUSE
168 .PP
169 The manner in which new material is revealed and new slides
170 are displayed can be tailored separately for effects like Fade,
171 Dissolve, Wipe and others, and can be changed on the fly.
172 .
173 .NEWSLIDE
174 .
175 .PP
176 Mom slides begin with the macro DOCTYPE SLIDES, where you choose
177 the aspect ratio and transition effects, and set up headers and
178 footers\*[HANG .]
179 .PAUSE
180 .PP
181 You may find it convenient to provide a title for the slide
182 presentation, as the top of the .mom file for these slides
183 demonstrates\*[HANG :]
184 .
185 .SP -1v
186 .CODE_BLOCK
187 \*[COND]\&.TITLE "Creating slide presentations with gropdf/mom"
188 \&.PDF_TITLE "\\*[$TITLE]"
189 \&.\\"
190 \&.DOCTYPE SLIDES \\
191 ASPECT 16:9 \\
192 HEADER "Header left" "\\*[$TITLE]" "Header right" \\
193 FOOTER "" "" "\\*S[+2]\\*[SLIDE#]\\*S[-2]" \\
194 TRANSITION "Box 1 . O" \\
195 PAUSE "Wipe 1"\*[CONDX]
196 .CODE_BLOCK off
197 .SP -.5v
198 .
199 .PAUSE
200 .PP
201 Afterwards, you may make any changes you like to the layout and
202 style, then enter START. Unlike other mom documents, PRINTSTYLE is
203 not required\*[HANG .]
204 .
205 .NEWSLIDE
206 .
207 .ADD_SPACE 9p
208 .IB -1P+6p
209 .
210 .HEADING 1 \
211 "The \s[-2]PAUSE\s[0] and \s[-2]NEWSLIDE\s[0] macros"
212 .SP .5v
213 .
214 .PP
215 Whenever you want a pause before revealing the next material on a
216 slide, enter the macro PAUSE on a line by itself. If you want a
217 reveal effect that's different from the current one, you may pass
218 PAUSE the parameters of the new effect\*[HANG :]
219 .
220 .SP -1v
221 .PAUSE
222 .
223 .CODE_BLOCK
224 \&.PAUSE "Dissolve .4"
225 .CODE_BLOCK off
226 .
227 .PAUSE "Dissolve .4"
228 Notice that this material dissolves in, whereas before, new material
229 appeared from left to right. \*[BU6]The new effect stays in force
230 until you change it again\*[HANG .]
231 .PAUSE "Wipe 1"
232 .PP
233 New slides are introduced with NEWSLIDE. \*[bu6]Transition effects
234 and parameters may be given to NEWSLIDE\*[HANG :]
235 .SP -1v
236 .
237 .CODE_BLOCK
238 \&.NEWSLIDE "Blinds .5"
239 .CODE_BLOCK off
240 .
241 .PAUSE
242 The next slide in this presentation will appear with the Blinds
243 effect\*[HANG .]
244 .BR
245 Consult man gropdf\c
246 \*[FU2]\*[UP 1p](\*[DOWN 1p]\*[BU2]1\*[UP 1p]\*[BU1])\*[DOWN 1p]
247 for all the pause/transition effects and their
248 parameters.\*[BU6]\*[UP 2p]\s[-2]*\s[0]
249 .SP 4p
250 .FT I
251 .PT_SIZE -2
252 *Note that not all PDF \*[BU6]viewers support every effect\*[HANG .]
253 .FT R
254 .PT_SIZE +2
255 .
256 .NEWSLIDE "Blinds .5"
257 .SLIDE_COLOR antiquewhite
258 .
259 .ADD_SPACE 9p
260 .
261 .HEADING 1 "Highlighting items
262 .SP .5v
263 .PP
264 The BOX macro lets you highlight items as they are revealed with
265 frames and shaded backgrounds\*[HANG .]
266 .PAUSE "Fade .5"
267 .BOX SHADED pink INSET 3p
268 .PP
269 This item is highlighted with a shaded background\*[HANG .]
270 .PAUSE
271 .PP
272 The highlight moves to each new item as it's revealed\*[HANG .]
273 .PAUSE
274 .PP
275 Highlighting can continue for as many slides as you want\*[HANG .]
276 .PAUSE
277 .PP
278 If there are no pauses on a slide, BOX can be used
279 .BR
280 to provide a background for all the items\*[HANG .]
281 .PAUSE
282 .PP
283 The SLIDE_COLOR macro lets you colour
284 .BR
285 the whole slide (q.v.)\*[HANG .]
286 .BOX off
287 .
288 .NEWSLIDE "Box 1 . O"
289 .SLIDE_COLOR off
290 .
291 .ADD_SPACE 9p
292 .
293 .HEADING 1 "Macros and preprocessors"
294 .SP .5v
295 .PP
296 Slides can make full use of all mom's document processing and
297 typesetting macros, including preprocessors and image insertion\*[HANG .]
298 .
299 .IBX CLEAR
300 .LS -4
301 .
302 .PAD "\
303 \*[FWD 4P+6p]\*[ST1]#\*[ST1X]\
304 \*[FWD 2P+6p]\*[ST2]\*[FWD 12P]\\*[ST2X]\
305 \*[FWD 3P+9p]\*[ST3]#\*[ST3X]\
306 \*[FWD 3P]\*[ST4]#\*[ST4X]\*[FWD 2P]"
307 .
308 .ST 1 L
309 .ST 2 C
310 .ST 3 C
311 .ST 4 C
312 .
313 .PAUSE "Fade .5"
314 .
315 .TAB 1
316 .PT_SIZE -1.5
317 .CENTER
318 \*[BD]\*[blue2]\*[DOWN 6p]tbl
319 .LEFT
320 .mk
321 .PT_SIZE -1
322 .COLOR blue2
323 .TS H BOXED
324 tab(^) allbox;
325 c c
326 n n.
327 \*[darkred]\s[-.5]\*[DOWN .5p]Year^Mean Temp.\s[0]\*[blue2]
328 _
329 .TH
330 \*[cyan4]\fB2015^28.3\*[blue2]
331 \*[cyan4]1998^28.3\*[blue2]
332 \*[cyan4]1997^28.3\*[blue2]
333 \*[cyan4]2010^28.1\*[blue2]
334 \*[cyan4]2002^28.1\*[blue2]
335 \*[cyan4]2005^28.0\*[blue2]
336 \*[cyan4]2014^27.9\*[blue2]
337 \*[cyan4]2009^27.9\*[blue2]
338 .TE
339 .
340 .rt
341 .PAUSE
342 .
343 .TN
344 .PT_SIZE +1
345 \*[FWD 10p]\*[DOWN 6p]pic
346 .COLOR green4
347 .SP 3p
348 .PS 2 LEFT
349 A: ellipse wid 0.5 ht 0.5
350 arrow color "green4" up 0.2 from A.n
351 arrow color "green4" up 0.2 right 0.2 from A.ne
352 arrow color "green4" right 0.2 from A.e
353 arrow color "green4" down 0.2 right 0.2 from A.se
354 arrow color "green4" down 0.2 from A.s
355 arrow color "green4" down 0.2 left 0.2 from A.sw
356 arrow color "green4" left 0.2 from A.w
357 arrow color "green4" up 0.2 left 0.2 from A.nw
358 .PE
359 .
360 .rt
361 .PAUSE
362 .
363 .TN
364 .COLOR blue2
365 \*[FWD 1p]\*[DOWN 6p]eqn
366 .FAMILY T
367 .PT_SIZE +3
368 .LS
369 .COLOR code-grey
370 .SP 4P
371 .EQ
372 f sub X (x) ^=^ left {
373 rpile { 0 above 2x above 0 }
374 ~~lpile { x < 0 above 0 <= x <= 1 above x > 1 }
375 .EN
376 .
377 .rt
378 .PAUSE
379 .
380 .TN
381 .FAMILY H
382 .PT_SIZE -3
383 .COLOR blue2
384 \*[DOWN 6p]pdf image\*[black]\*[PREV]
385 .SP 2P+6p
386 .PDF_IMAGE -C penguin.pdf 81p 96p FRAME
387 .TQ
388 .
389 .NEWSLIDE "Box 1 . O"
390 .ADD_SPACE 5p
391 .IB 10P
392 .PT_SIZE +1.5
393 .
394 .HEADING 1 "Printing handouts"
395 .SP .5v
396 .
397 .CODE_STYLE \
398 COLOR BLACK \
399 SIZE 120
400 .PP
401 Because slides contain pauses, they need a little help on their
402 way to the printer or they stop printing at the first pause\*[HANG .]
403 .PAUSE "Wipe 1"
404 .PP
405 Setting GROPDF_NOSLIDE=1 before invoking
406 \[oq]\*[FU4]\*[CODE]\*[COND]pdfmom\*[CONDX]\*[CODE off]\*[FU4]\[cq]
407 or
408 \[oq]\*[FU2]\*[CODE]\*[COND]groff\~-Tpdf\*[CONDX]\*[CODE off]\*[FU6]\[cq]
409 disables the pauses\*[HANG :]
410 .
411 .SP -1v
412 .
413 .CODE_STYLE \
414 COLOR code-grey \
415 SIZE 110
416 .CODE_BLOCK
417 \*[COND]GROPDF_NOSLIDE=1 pdfmom <options> slide-file.mom\*[CONDX]
418 .CODE_BLOCK off
419 .
420 .PAUSE
421 The output may be piped directly to a printer or saved to a file\*[HANG .]
422 .PAUSE
423 .PP
424 See mom's html documentation and the gropdf\c
425 \*[FU2]\*[UP 1p](\*[DOWN 1p]\*[BU2]1\*[UP 1p]\*[BU1])\*[DOWN 1p]
426 manpage for complete information concerning slide usage\*[HANG .]
427 .
428 .SP 9p
429 .CENTER_BLOCK
430 .nr dcl-ind -1 1
431 .while \n[dcl-ind]<4 \{\
432 . DCL SOLID \n+[dcl-ind]P 9p 9p blue2
433 .\}
434 .CENTER_BLOCK off
435 .\" Local Variables:
436 .\" mode: nroff
437 .\" End:
438 .\" vim: filetype=groff: