aboutsummaryrefslogtreecommitdiffhomepage
path: root/demo.rof
blob: 27edd5d8dbc4c39e577c5b92200fb9ebd7e62792 (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
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
.fam H
.ft H
.de HEADER
.ft H
.sp -0.1i \" PSPIC takes to much space here
.PSPIC -L smile.epsf 0.5i
.sp -0.1i
\l'\\n[.l]u'\h'-\\n[.l]u'
.br
.mk R1
.sp -0.4i
\h'0.6i'\s+8Demonstration of Presentations with Groff\
 and Acroread\s-8
.sp |\\n(R1u
.br
..
.de FOOTER
.ft H
\l'\\n[.l]u'\h'-\\n[.l]u'
.br
.tl '''%'
..
.TITLE "The making of this demo"
.DS CB
.PS
linethick=1.5i
arrowwid=0.08
boxwid=1.2i
IN: box "demo.rof" invis
MA: box "\m[blue]present.tmac\m[]" invis at IN + (1.5i,0)
    arrow down from IN.s
GR: box "groff"
    arrow from MA.sw to GR.ne
    arrow down from GR.s
PP: box "\*[colblue]presentps\*[colP]"
    arrow down
PS: box "ps2pdf"
    arrow down
AR: box "acroread"
    move to (GR.x + 2.0i, GR.y)
    "groff -p -e -t -mm -m\*[colblue]present\*[colP] demo.rof > demo.pps" ljust
    move to (PP.x + 2.0i, PP.y)
    "\*[colblue]presentps\*[colP] -l < demo.pps > demo.ps" ljust
    move to (PS.x + 2.0i, PS.y)
    "ps2pdf demo.ps" ljust
    move to (AR.x + 2.0i, AR.y)
    "acroread demo.pdf" ljust
.PE
.DE
.SK
.TITLE "Headers"
You can make headers by defining a macro HEADER
.VERBON 22 16
\&.de HEADER
\&.sp 0.2i
\&.PSPIC -L smile.eps 0.5i
\&.sp -0.1i
\\l'\\\\n[.l]u'\\h'-\\\\n[.l]u'
\&.br
\&.mk R1
\&.sp -0.4i
\\h'0.6i'\\s+8Demonstration of Presentations with Groff\\
 and Acroread\\s-8
\&.sp |\\\\n(R1u
\&.br
\&..
.VERBOFF
.SK
.TITLE "Footers"
You can make footers by defining a macro FOOTER
.VERBON 22 16
\&.de FOOTER
\\l'\\\\n[.l]u'\\h'-\\\\n[.l]u'
\&.br
\&.tl '''%'
\&..
.VERBOFF
.SK
.TITLE "Titles"
The TITLE macro makes a centered, dark blue title in a big font.
.VERBON 22 16
\&.TITLE "Titles"
.VERBOFF
.SUBTITLE "Subtitles"
The SUBTITLE macro makes a indented, dark blue subtitle in a big font but smaller than a title.
.VERBON 22 16
\&.SUBTITLE "Subtitles"
.VERBOFF
.SUBTITLE "Titlecolor"
You can change the color of the titles and subtitles with the macro
TITLECOLOR.
.VERBON 22 16
\&.TITLECOLOR red
.VERBOFF
.SK
.TITLE "Pausing"
You can show a list and pause after each item with the use of
the PAUSE macro.
.BL
.LI
list item 1
.PAUSE
.LI
list item 2
.PAUSE
.LI
list item 3
.LE 1
.P
The list is created with
.VERBON 22 16
\&.BL
\&.LI
list item 1
\&.PAUSE
\&.LI
list item 2
\&.PAUSE
\&.LI
list item 3
\&.LE 1
.VERBOFF
.SK
.TITLE "Pausing (cont.)"
You can also use the PAUSE macro in a picture.
.PAUSE
.DS CB
.PS
linethick=1.5
arrowwid=0.08
boxwid=1.3i
boxht=0.7i
ellipsewid=1.3i
ellipseht=0.7i
ellipse "document"
.PAUSE
arrow
box "PIC"
.PAUSE
arrow
box "TBL/EQN" "(optional)" \
    dashed
.PAUSE
arrow
box "GROFF"
.PAUSE
arrow
ellipse "typesetter"
.PE
.DE
.P
The picture is created with
.2C
.VERBON 22 16
\&.DS CB
\&.PS
linethick=1.5
arrowwid=0.08
boxwid=1.3i
boxht=0.7i
ellipsewid=1.3i
ellipseht=0.7i
ellipse "document"
\&.PAUSE
arrow
box "PIC"
\&.PAUSE
arrow
box "TBL/EQN" "(optional)" \\
    dashed
\&.PAUSE
arrow
box "GROFF"
\&.PAUSE
arrow
ellipse "typesetter"
\&.PE
\&.DE
.VERBOFF
.1C
.SK
.TITLE "Pausing (cont.)
You can also use the PAUSE macro in a equation.
.PAUSE
.DS I
.EQ
gfont BI
G(z) ~mark =~ e sup{ln ~ G(z)}
~=~ exp left (
sum from k>=1 {S sub k z sup k} over k right )
~=~ prod from k>=1 e sup {S sub k z sup k /k}
.EN
.DE
.DS I
.PAUSE
.EQ
lineup = left ( 1 + S sub 1 z +
{S sub 1 sup 2 z sup 2} over 2! + ... right ) ~
left ( 1 + {S sub 2 z sup 2} over 2
+ {S sub 2 sup 2 z sup 4} over {2 sup 2 cdot 2! }
+ ... right ) ~ ...
.EN
.DE
.DS I
.PAUSE
.EQ
lineup = sum from m>=0 left (
sum from
pile {k sub 1 ,k sub 2 ,..., k sub m >=0
above
k sub 1 +2k sub 2 + ... +mk sub m =m}
{S sub 1 sup {k sub 1}} over {1 sup k sub 1 k sub 1 !} ~
{S sub 2 sup {k sub 2}} over {2 sup k sub 2 k sub 2 !} ~
...
{S sub m sup {k sub m}} over {m sup k sub m k sub m !}
right ) ~ z sup m
.EN
.DE
The equation is created with
.VERBON 22 16
\&.DS I
\&.EQ
gfont BI
G(z) ~mark =~ e sup{ln ~ G(z)}
~=~ exp left (
sum from k>=1 {S sub k z sup k} over k right )
~=~ prod from k>=1 e sup {S sub k z sup k /k}
\&.EN
\&.DE
\&.DS I
\&.PAUSE
\&.EQ
lineup = left ( 1 + S sub 1 z +
{S sub 1 sup 2 z sup 2} over 2! + ... right ) ~
left ( 1 + {S sub 2 z sup 2} over 2
+ {S sub 2 sup 2 z sup 4} over {2 sup 2 cdot 2! }
+ ... right ) ~ ...
\&.EN
\&.DE
\&.DS I
\&.PAUSE
\&.EQ
lineup = sum from m>=0 left (
sum from
pile {k sub 1 ,k sub 2 ,..., k sub m >=0
above
k sub 1 +2k sub 2 + ... +mk sub m =m}
{S sub 1 sup {k sub 1}} over {1 sup k sub 1 k sub 1 !} ~
{S sub 2 sup {k sub 2}} over {2 sup k sub 2 k sub 2 !} ~
\&...
{S sub m sup {k sub m}} over {m sup k sub m k sub m !}
right ) ~ z sup m
\&.EN
\&.DE
.VERBOFF
.SK
.TITLE "Pausing (cont.)"
You can also use the PAUSE macro in a table.
.DS CB
.TS
tab(#);
cfHB s s
c c c
n n n.
AT&T Common Stock
Year#Price#Dividend
_
.PAUSE
1984#15-20#$1.20
.PAUSE
5#19-25#1.20
.PAUSE
6#21-28#1.20
.PAUSE
7#20-36#1.20
.TE
.DE
Box, allbox and vertical lines are not drawn at the right moment, so
it is better not to use them.
.P
The table is created with
.2C
.VERBON 22 16
\&.DS CB
\&.TS
tab(#);
cfHB s s
c c c
n n n.
AT&T Common Stock
Year#Price#Dividen
_
\&.PAUSE
1984#15-20#$1.20
\&.PAUSE
5#19-25#1.20
\&.PAUSE
6#21-28#1.20
\&.PAUSE
7#20-36#1.20
\&.TE
\&.DE
.VERBOFF
.1C
.SK
.TITLE "Colors"
You can change the foreground color with the macro COLOR.
.VERBON 22 16
\&.COLOR red
.VERBOFF
.COLOR red
changes the foreground color to red and
.VERBON 22 16
\&.COLOR P
.VERBOFF
.COLOR P
changes it to the previous color.
.P
If followed by arguments, then only the
.VERBON 22 16
\&.COLOR red "first argument is in red" ,
.VERBOFF
.COLOR red "first argument is in red" ,
and the optional second argument is in the current color.
.P
To set the foreground color at the start of the presentation, you
can use the macro INITCOLOR
.VERBON 22 16
\&.INITCOLOR yellow
.VERBOFF
To set the default foreground color for text, headers, and footers,
you can use the macro DEFAULTCOLOR
.VERBON 22 16
\&.DEFAULTCOLOR yellow
.VERBOFF
.BR Note :
DEFAULTCOLOR and INITCOLOR should only be used after the definition
of the HEADER macro (if you use one).
.SK
.TITLE "Colors (cont.)
You can define a color with the macro DEFCOLOR.
.VERBON 22 16
\&.DEFCOLOR brown 0.64 0.16 0.16
.VERBOFF
defines the color
.DEFCOLOR brown 0.64 0.16 0.16
.COLOR brown BROWN
\&.
.br
The arguments 2, 3, 4 represent the values for the colors red, green, and
blue. The values must be between 0 and 1.
.P
You can also change the foreground color by embedding a
\\\v'0.2m'*\v'-0.2m'[colX] at the desired point to set the color to X.
If X is P, the color is changed to the previous color.
.VERBON 22 16
current \\*[colblue]blue \\*[colred]red \\*[colP]previous
.VERBOFF
.ds savedfgcolor \*[gp-col@cur]
becomes
.br
current \*[colblue]blue \*[colred]red \*[colP]previous
.br
.COLOR \*[savedfgcolor]
Another \\\v'0.2m'*\v'-0.2m'[colP] for setting the foreground color
to the current one does not work, as it did in a previous version of gpresent.
.P
.BR Note :
the usage of \\\v'0.2m'*\v'-0.2m'[colX] is deprecated, use \\m[..] instead.
.DEFCOLOR mybg 0.5 0.5 0.8
.BACKGROUND Solid mybg
.SK
.TITLE "Predefined Colors"
The following colors are defined by their name in lowercase:
.br
.in +1i
.COLOR red RED
.COLOR green GREEN
.COLOR blue BLUE
.COLOR cyan CYAN
.COLOR magenta MAGENTA
.COLOR yellow YELLOW
.COLOR white WHITE
.COLOR black BLACK
.br
.in -1i
.P
The following colors are defined by their name in lowercase followed
by the number in the left column:
.in +1i
9
.COLOR red9 RED
.COLOR green9 GREEN
.COLOR blue9 BLUE
.COLOR cyan9 CYAN
.COLOR magenta9 MAGENTA
.COLOR yellow9 YELLOW
.COLOR gray9 GRAY
.br
8
.COLOR red8 RED
.COLOR green8 GREEN
.COLOR blue8 BLUE
.COLOR cyan8 CYAN
.COLOR magenta8 MAGENTA
.COLOR yellow8 YELLOW
.COLOR gray8 GRAY
.br
7
.COLOR red7 RED
.COLOR green7 GREEN
.COLOR blue7 BLUE
.COLOR cyan7 CYAN
.COLOR magenta7 MAGENTA
.COLOR yellow7 YELLOW
.COLOR gray7 GRAY
.br
6
.COLOR red6 RED
.COLOR green6 GREEN
.COLOR blue6 BLUE
.COLOR cyan6 CYAN
.COLOR magenta6 MAGENTA
.COLOR yellow6 YELLOW
.COLOR gray6 GRAY
.br
5
.COLOR red5 RED
.COLOR green5 GREEN
.COLOR blue5 BLUE
.COLOR cyan5 CYAN
.COLOR magenta5 MAGENTA
.COLOR yellow5 YELLOW
.COLOR gray5 GRAY
.br
4
.COLOR red4 RED
.COLOR green4 GREEN
.COLOR blue4 BLUE
.COLOR cyan4 CYAN
.COLOR magenta4 MAGENTA
.COLOR yellow4 YELLOW
.COLOR gray4 GRAY
.br
3
.COLOR red3 RED
.COLOR green3 GREEN
.COLOR blue3 BLUE
.COLOR cyan3 CYAN
.COLOR magenta3 MAGENTA
.COLOR yellow3 YELLOW
.COLOR gray3 GRAY
.br
2
.COLOR red2 RED
.COLOR green2 GREEN
.COLOR blue2 BLUE
.COLOR cyan2 CYAN
.COLOR magenta2 MAGENTA
.COLOR yellow2 YELLOW
.COLOR gray2 GRAY
.br
1
.COLOR red1 RED
.COLOR green1 GREEN
.COLOR blue1 BLUE
.COLOR cyan1 CYAN
.COLOR magenta1 MAGENTA
.COLOR yellow1 YELLOW
.COLOR gray1 GRAY
.br
.in -1i
.TITLECOLOR white
.ds savedfgcolor \*[gp-col@cur]
.COLOR yellow
.BACKGROUND Solid blue
.SK
.TITLE "Backgrounds"
.SUBTITLE "Solid"
This background is created with
.VERBON 22 16
\&.BACKGROUND Solid blue
.VERBOFF
.BACKGROUND GradX blue blue5
.SK
.TITLE "Backgrounds (cont.)"
.SUBTITLE "Gradient X"
This background is created with
.VERBON 22 16
\&.BACKGROUND GradX blue blue5
.VERBOFF
.BACKGROUND GradY blue blue5
.SK
.TITLE "Backgrounds (cont.)"
.SUBTITLE "Gradient Y"
This background is created with
.VERBON 22 16
\&.BACKGROUND GradY blue blue5
.VERBOFF
.BACKGROUND GradAngle blue blue5 100 45
.SK
.TITLE "Backgrounds (cont.)"
.SUBTITLE "Gradient with Angle"
This background is created with
.VERBON 22 16
\&.BACKGROUND GradAngle blue blue5 100 45
.VERBOFF
.COLOR \*[savedfgcolor]
.TITLECOLOR blue4
.BACKGROUND None
.SK
.TITLE "Backgrounds (cont.)"
.SUBTITLE "None"
You can get rid of backgrounds with
.VERBON 22 16
\&.BACKGROUND None
.VERBOFF
.SK
.TITLE "Filled Rectangles"
Since we have the routines for filling the background, we might as well
use them for filled rectangles.
.P
The rectangles below are created with:
.FILL 4i 4i 5i 5i Solid red
.FILL 4.5i 4.5i 5.5i 5.5i GradX green green6
.FILL 5i 5i 6i 6i GradY blue blue6
.FILL 5.5i 5.5i 6.5i 6.5i GradAngle yellow yellow6 30 45
.VERBON 22 16
\&.FILL 4i 4i 5i 5i Solid red
\&.FILL 4.5i 4.5i 5.5i 5.5i GradX green green6
\&.FILL 5i 5i 6i 6i GradY blue blue6
\&.FILL 5.5i 5.5i 6.5i 6.5i GradAngle yellow yellow6 30 45
.VERBOFF
.SK
.TITLE "Blocks"
You can create blocks anywhere with the macros BLOCKS an BLOCKE.
.br
.BLOCKS 1i 4i
\&.BLOCKS 1i 4i
.br
This is block 1, with x-position 1i and y-position 4i.
.br
\&.BLOCKE
.BLOCKE
.PAUSE
.BLOCKS 4i 3i
\&.BLOCKS 4i 3i
.br
This is block 2, with x-position 4i and y-position 3i.
.br
\&.BLOCKE
.BLOCKE
.PAUSE
.BLOCKS 4i 5i 2i
\&.BLOCKS 4i 5i 2i
.br
This is block 3, with x-position 4i, y-position 5i, and line length 2i.
.br
\&.BLOCKE
.BLOCKE
.PAUSE
After a block, you return to the position before the block.
.SK
.TITLE "Blocks (cont.)"
If the first argument of BLOCKS is \fConce\fP, the block only appears once.
You can use this in combination with the PAUSE macro.
.BL
.LI
list item 1
.BLOCKS once
.DL
.LI
subitem 1.1
.LI
subitem 1.2
.LE 1
.BLOCKE
.PAUSE
.LI
list item 2
.BLOCKS once
.DL
.LI
subitem 2.1
.LI
subitem 2.2
.LE 1
.BLOCKE
.PAUSE
.LI
list item 3
.LE 1
The above is created with
.2C
.VERBON 22 16
\&.BL
\&.LI
list item 1
\&.BLOCKS once
\&.DL
\&.LI
subitem 1.1
\&.LI
subitem 1.2
\&.LE 1
\&.BLOCKE
\&.PAUSE
\&.LI
list item 2
\&.BLOCKS once
\&.DL
\&.LI
subitem 2.1
\&.LI
subitem 2.2
\&.LE 1
\&.BLOCKE
\&.PAUSE
\&.LI
list item 3
\&.LE 1
.VERBOFF
.1C
.SK
.TITLE "Links"
You can make a link with the macro LINK.
.LINKCOLOR blue7 1 blue
.br
The link
.LINK L1 "next page"
is made with
.VERBON 22 16
\&.LINK L1 "next page"
.VERBOFF
.SK
.TITLE "Links (cont.)"
.DESTINATION L1
On this page a destination for the link on the previous page was created
with the macro DESTINATION.
.VERBON 22 16
\&.DESTINATION L1
.VERBOFF
You can change the color for the links with the macro LINKCOLOR.
.VERBON 22 16
\&.LINKCOLOR blue7
.VERBOFF
A second argument specifies the borderwidth of the link.
.VERBON 22 16
\&.LINKCOLOR blue7 1
.VERBOFF
A third argument specifies the bordercolor.
.VERBON 22 16
\&.LINKCOLOR blue7 1 blue
.VERBOFF
.SK
.TITLE "Contents"
You can make a contents page with the macro END.
The contents consist of all the titles.
They are turned into links that go back to the top of the page at
which the titles appear.
.P
You can add something to the contents with the macro ADDCONTENT.
.ADDCONTENT "This is added to the contents"
.VERBON 22 16
\&.ADDCONTENT "This is added to the contents"
.VERBOFF
.SK
.TITLE "Browse"
You can browse through a presentation with the possibilities provided
by acroread.
.br
If \*[colblue]presentps\*[colP] is given the option -l, there are buttons
added in the right lower corner.
These button are:
.VL 8 4
.LI <
top of previous page
.LI >
top of next page
.LI c
contents page
.LE 1
.END