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.
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).
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.
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.