Building Impress and PowerPoint Slides with LaTeX and Perl
The title_slide subroutine returns raw XML, which is inserted into the document.
Given an input file conforming to the textual content produced by getcontent, the produce_slides script clones the blank.sxi Impress file and populates any number of slides, programmatically producing a presentation. The script is not unlike getcontent in structure, its only warts being the verbatim inclusion of the required XML for each of the three slide types contained within blank.sxi. To create a presentation, invoke produce_slides as follows:
perl produce_slides 3 chapter3.input
This results in a new Impress document called chapter3.sxi appearing on disk.
With the Impress files created, I needed to replace my graphic image placeholders with the actual image. The getcontent script extracted the image filename, however, not the actual image. Importing the images into Impress should have been straightforward, except that the originals I had were of pretty poor quality compared to those that made it into the book. The final images had been improved greatly during the publisher's final typesetting phase. And, of course, I didn't have the final image files.
Then I remembered that the publisher had sent final proof PDFs with all the high-quality graphic images in place. I used xpdf to view the proofs at 200% and then fired up The GIMP to screen-capture the xpdf display window. I then cut out the graphic image and saved it as a JPEG. It took a little while, but when finished I had a beautiful set of book-quality images to import into my Impress presentations. With this task complete, I exported the Impress document to PowerPoint format and the job was done. My initial estimate of 20 days of effort was reduced to about 20 hours of real work.
And now, of course, if I need to produce some slides quickly, I can create my textual content manually in vi, run it through the produce_slides script and I'm done.
What started off as a seemingly impossible task—programmatically producing PowerPoint presentations—turned out to be quite possible, thanks to open source. All the tools I needed shipped out of the box with my stock Red Hat 9 distribution: vi, unzip, Perl, xmllint, xpdf, The GIMP and the OpenOffice.org suite.
Resources for this article: /article/8055.
- Readers' Choice Awards 2013
- Advanced Hard Drive Caching Techniques
- Linux Kernel News - November 2013
- December 2013 Issue of Linux Journal: Readers' Choice
- Mars Needs Women
- Sublime Text: One Editor to Rule Them All?
- Raspberry Pi: the Perfect Home Server
- RSS Feeds
- Web Administration Scripts
- Linux Systems Administrator
- animal pajamas
2 hours 52 min ago
- thanks for you post.
2 hours 59 min ago
- thanks for share, great
20 hours 13 min ago
- There are factors which are
1 day 1 hour ago
- Gnome 3 ?
1 day 1 hour ago
- Reply to comment | Linux Journal
1 day 6 hours ago
- "Redis RethinkDB 4.5%" on Best NoSQL Databases
1 day 16 hours ago
- on the ground
1 day 22 hours ago
- I was able to read the whole
2 days 2 min ago
- since i have read the title i
2 days 3 hours ago