208 lines
3.9 KiB
Plaintext
208 lines
3.9 KiB
Plaintext
.pl 9c
|
|
.nr PO 1c
|
|
.nr LL 14c
|
|
.nr LT 14c
|
|
.nr HM 1c
|
|
.nr FM .5c
|
|
.RP no
|
|
.P1
|
|
.nr bm 0 1
|
|
.nop \!x X papersize=16c,9c
|
|
.ds PDFHREF.COLOUR 0.0 0.3 0.9
|
|
.defcolor pdf:href.colour rgb \\*[PDFHREF.COLOUR]
|
|
.ds PDFHREF.TEXT.COLOUR pdf:href.colour
|
|
.OH "'\m[grey]Slides Demo''Deri James\m[]'"
|
|
.EH "'\m[grey]Slides Demo''Deri James\m[]'"
|
|
.pdftransition PAGE Wipe .5 V O
|
|
.pdftransition BLOCK Fade 1
|
|
.de HD
|
|
.ev dj
|
|
.po 0
|
|
.vs 0
|
|
.sp |0
|
|
\#\X'pdf: pdfpic Backdrop.pdf -L 16c 4c'
|
|
\X'pdf: import BackdropQ.pdf 0 0 453.543 255.118 453.543 100'
|
|
.fl
|
|
.vs
|
|
.po
|
|
.ev
|
|
.sp |\\n[HM]u-6p
|
|
\Z!\D't 1p'!\D'l \\n[LL]u 0p'
|
|
.fl
|
|
..
|
|
.de HEAD
|
|
. NH \\$1
|
|
. shift
|
|
\\m[pdf:href.colour]\\$*\\m[]
|
|
. fl
|
|
. pdfbookmark -T bm\\n+[bm] \\n[nh*hl] \\*[SN-STYLE] \\$*
|
|
. XS \\n[%]
|
|
. pdfhref L -D bm\\n[bm] -- \\*[SN-STYLE] \\$*
|
|
. XE
|
|
. pdfpause
|
|
..
|
|
.pdfpagename TITLE
|
|
.TL
|
|
\m[pdf:href.colour]Demonstrating using
|
|
.br
|
|
ms macros
|
|
.br
|
|
for a slideshow\m[]
|
|
.AU
|
|
Deri James
|
|
.LP
|
|
.sp -2.4v
|
|
.HEAD 1 The Basics
|
|
.LP
|
|
Using
|
|
.I ms
|
|
to write a presentation slideshow is easy.
|
|
.LP
|
|
.pdfpause
|
|
.HEAD 2 Configure the "paper" size
|
|
.RS
|
|
.LD
|
|
.ft CR
|
|
\&.pl 9c
|
|
\&.nr PO 1c
|
|
\&.nr LL 14c
|
|
\&.nr LT 14c
|
|
\&.nr HM 1c
|
|
\&.nr FM .5c
|
|
\&.RP no
|
|
\&.P1
|
|
\&.nop \\!x X papersize=16c,9c
|
|
.ft
|
|
.DE
|
|
.RE
|
|
The final command sets the pdf page size, suitable for a 16:9 ratio screen.
|
|
.HEAD 2 Specify the presentation transitions
|
|
.RS
|
|
.LD
|
|
.ft CR
|
|
\&.pdftransition PAGE Box .5 . O
|
|
\&.pdftransition BLOCK Wipe 1
|
|
.ft
|
|
.DE
|
|
.RE
|
|
A description of the allowed parameters is in the
|
|
.pdfhref W -D http://chuzzlewit.co.uk/WebManPDF.pl/man:/1/gropdf -- gropdf(1)
|
|
man page.
|
|
The parameters applied to
|
|
.B PAGE
|
|
are used when the transition is to a new slide, and
|
|
.B BLOCK
|
|
sets the transition for any separate blocks in the slide.
|
|
.LP
|
|
.B Note:
|
|
Not all possible transitions are supported by every PDF reader.
|
|
.pdfpause
|
|
.HEAD 2 Use Blocks
|
|
.LP
|
|
A Block is a portion of the slide which you want to appear separately on the screen
|
|
when you click the mouse or press the space bar. After the text which you want to
|
|
appear simply insert a pause:-
|
|
.RS
|
|
.LD
|
|
.ft CR
|
|
\&.pdfpause
|
|
.ft
|
|
.DE
|
|
.RE
|
|
.HEAD 2 Printing the slides
|
|
.LP
|
|
If the presentation contains blocks it may be difficult to print the slides in a format
|
|
so they may be given as a handout. The solution is to define GROPDF_NOSLIDE as true before
|
|
invoking groff:-
|
|
.RS
|
|
.LD
|
|
.ft CR
|
|
GROPDF_NOSLIDE=1 groff -Tpdf -ms filename.ms > filename.pdf
|
|
.ft
|
|
.DE
|
|
.RE
|
|
The pdf file produced will not be in presentation mode so can be printed normally but
|
|
you may need to select \[oq]scale to fit\[cq] and \[oq]landscape\[cq] to fit the actual
|
|
paper size.
|
|
.HEAD 1 Other PDF considerations
|
|
.LP
|
|
This demo has other features which take advantage of calls to the gropdf device which
|
|
may be useful.
|
|
.bp
|
|
.HEAD 2 Integrating busgrap with slides
|
|
Slides often integrate various graphs:-
|
|
.sp .5v
|
|
.pdftransition BLOCK Split 2 V I
|
|
.pdfpause
|
|
.BGS
|
|
Frame:7.1c 5c
|
|
Just:centre
|
|
PS:7.8
|
|
Origin:3c 2.5c
|
|
Xrad:1.5c
|
|
YRad:1.5c
|
|
Caption:\v'.3c'Top 3 UK Newspaper Circulation (+Origin)
|
|
BGCOL:grey90
|
|
PDFBOOKMARK:2
|
|
Series:The Sun 1,978,702
|
|
Series:Daily Mail 1,688,727
|
|
Series:Daily Mirror 992,235
|
|
.BGE
|
|
.bp
|
|
.pdftransition BLOCK Fade 1
|
|
.HEAD 2 PDF overview and clickable TOC
|
|
.LP
|
|
I included a custom .HEAD macro which creates a heading, adds it to the overview panel
|
|
in the pdf reader, adds a clickable link in the TOC and pauses:-
|
|
.RS
|
|
.LD
|
|
.ft CR
|
|
.ec Z
|
|
Z&.de HEAD
|
|
Z&. NH \\$1
|
|
Z&. shift
|
|
\\m[pdf:hrefZ&.colour]\\$*\\m[]
|
|
Z&. fl
|
|
Z&. pdfbookmark -T bm\\n+[bm] \\n[nh*hl] \\*[SN-STYLE] \\$*
|
|
Z&. XS \\n[%]
|
|
Z&. pdfhref L -D bm\\n[bm] -- \\*[SN-STYLE] \\$*
|
|
Z&. XE
|
|
Z&. pdfpause
|
|
Z&..
|
|
.ec
|
|
.ft
|
|
.DE
|
|
.RE
|
|
.bp
|
|
It should be called as:
|
|
.RS
|
|
.LD
|
|
.ft CR
|
|
\&.HEAD 2 PDF overview and clickable TOC
|
|
.ft
|
|
.DE
|
|
.RE
|
|
.HEAD 2 Move TOC to page after TITLE
|
|
.LP
|
|
First insert the following just before the
|
|
.CW .TL
|
|
section at the top of the file.
|
|
.RS
|
|
.LD
|
|
.ft CR
|
|
\&.pdfpagename TITLE
|
|
.ft
|
|
.DE
|
|
.RE
|
|
Then insert these lines at the end of your ms file:-
|
|
.RS
|
|
.LD
|
|
.ft CR
|
|
\&.pdfswitchtopage after TITLE
|
|
\&.TC
|
|
.ft
|
|
.DE
|
|
.RE
|
|
.pdfswitchtopage after TITLE
|
|
.TC
|