Four-up PDF slides from Slidy

[9 December 2009]

For the last few years, I’ve been using Dave Raggett’s tool HTML Slidy to prepare slides for presentations. This has a number of advantages: the slides can live happily on the Web, each slide has a distinct URI so they are easy to point at for purposes of discussion, etc., no proprietary slide format is involved, and I can write the text of the slides in TEI Lite.

From time to time, though, organizers of conferences or other gatherings where I speak ask for a PDF copy of my slides. It’s easy enough to print the slides from Slidy, but the result has generally been disappointing to the organizers, who are sometimes a bit distressed (or am I only projecting?) that my slides are so unlike everyone else’s.

So I generally try to coax my system into producing PDF pages with four slides on a page, preferably in little rectangles, so my slides look a little more like the conventional idea of a PDF dump of a slide set. The need arises seldom enough that I always forget how I did it last time. But sorting through some papers just now, I found that the last time I did this I took notes for the future. If I leave the notes only on paper I’ll never find them again when I want them. So, for the record, this is one way to make four-up slides in PDF from Slidy.

  1. In the HTML file, wrap the table of contents in a <div class='toc'>.
  2. Also make sure the header refers to a print stylesheet. (This ought to be generated by my translation from TEI Lite to HTML Slidy, but it wasn’t the last time I did this.) That is, make sure the header contains something like <link rel="stylesheet" type="text/css" media="print" href="http://www.w3.org/Talks/Tools/Slidy/print.css" />. This forces a new page for each slide. Not all browsers respect the media attribute, so you may need to try multiple browsers; I have had good results from Opera in this regard.
  3. In the browser’s page setup (or print dialog, wherever the browser puts it), disable the printing of headers and footers (except for page numbers, if you want them).
  4. In the print dialog box, when using Opera, I also find it helpful to check the Fix to paper width option. Backgrounds don’t seem to work, so I also tell Opera to print no background. (This too has troubled some organizers, but I can’t help them.)
  5. Still in the print dialog box, on Mac OS X, select the ‘Layout’ options and choose 4 pages per sheet, with the appropriate Z-shape layout of the sequence, with single thin line borders (or hairline — I haven’t noticed any difference in the output between the two choices). I have managed this on Windows as well, in the dim past, but I don’t remember how I got to the menu that let me select 4-up printing.

It’s helpful to preview the thing for bad page breaks, so you can insert forced page breaks or fiddle with the font size until you get better breaks, but I have no algorithm for this, just fiddle and check until you are satisfied or out of time. Sometimes Firefox has given me better page breaks than Opera, sometimes the reverse; dunno why.

XML as a sort-of open format

[3 December 2009]

I just encountered the following statements in technical documentation for a family of products which I’ll leave nameless.

This document does not describe the complete XML schema for either [Application 1] or [Application 2]. The complete XML schema for both applications is not available and will not be made public.

Perhaps there can be good reasons for such a situation. Perhaps the developers really don’t know how to use any existing schema language to describe the set of documents they actually accept; perhaps only a Turing machine can actually identify set of documents accepted, and the developers were unwilling to work with a simpler set whose membership could be more cheaply decided. (Well, wait, those may be reasons, but they don’t actually qualify as “good”.)

I wonder whether this is an insidious attempt to look like the products have an open format (See? it’s XML! How much more open can you get?) while ensuring that the commercial products in question remain the only arbiters of acceptable documents? Or whether the programmers in question were just too lazy to specify a clean vocabulary and ensure that their software handles all documents which meet some standard of validity that does not require Turing completeness?

Having a partially defined XML format is, at least for me, still a great deal more convenient than having the format be binary and completely undocumented. But it certainly seems to fall a long distance short of what XML could make possible.