Recent Changes
Recent Changes · Search:

The Wikipublisher library instructs PmWiki to generate xml output to a print-oriented DTD. This appeared to be a more straightforward route than directly converting the xhtml for several reasons:

  • xhtml doesn’t directly support common print features, such as footnotes and page cross-references
  • xhtml includes a number of constructs which are web-specific, such as forms and tool tips
  • wiki markup is simple and largely (but not totally) media-agnostic — it primarily describes a page’s content

Investigations led to the tbook dtd project on Sourceforge. Mapping the tbook entities to wiki markup showed that most (but not all) wiki markups had tbook xml equivalents. The wikipublisher project extended the tbook dtd to support all core PmWiki markups plus a number of Markup Extensions. To avoid confusion, the new dtd is called “wikibook”.

The wikibook dtd describes the structure of the page’s content, not its presentation. Presentation is left to the typesetting engine and is controlled, to a degree, through <meta> tags and their attributes. This approach generally works well, but it has some limitations, many arising from the physical differences between a scrolling colour screen and a fixed-size sheet of paper.

Style information is partially supported.

There are major differences between the css-based model used in xhtml (and implicit in PmWiki) and the structure-based approach used in the typesetting engine. Currently, there is no print equivalent to the rich style options found in xhtml. The approach taken is to translate those style options with recognisable equivalents (inline styles such as text colour blue), and ignore the rest (block styles such as place a red dotted border around this paragraph with a pale blue background).

Much, but not all, tabular material is supported.

True tables are supported well. Headings, captions, cell alignment and text wrap all map to their print equivalents. Where tables are used as a way to control the presentation of complex material, it currently works less well, especially with very long cells. It treats complex cells as “minipages” and keeps the content together on a page. As a result, if the cell contains more than a page of content, some will fall off the end of the page.

Division styles have limited support.

The wikibook dtd allows multiple block tags to be wrapped in a <group> tag, which is treated as a minipage. This area is under development. At the moment, groups are treated on a case-by-case basis. Significant additional work will be needed to create a mechanism for translating css properties to their typesetting equivalents. This will require a separate project, but only if there is sufficient demand.

The wikibook dtd can be inspected at, or browsed at Wikibook.Home Page.

« PDF Errors | User Guide | FAQ »

Page last modified on 26 March 2009 at 02:39 PM