Recent Changes · Search:

Support the Project

Wikipublisher

PmWiki

edit SideBar

 

The Wikipublisher library processes all the markup present in PmWiki version 2.1.x. It replaces all structural markup — such as lists, links and headings — with print equivalents. It also replaces most, but not all, style markup — such as colours and backgrounds — with print equivalents. See Wiki Styles for more information.

No PmWiki changes were needed to support Wikipublisher.

Cookbook recipes

Sites using recipes from the PmWiki Cookbook will need to test these on a case-by-case basis.

Where the recipe produces PmWiki markup as its output, Wikipublisher should continue to work.

Where the recipe produces HTML tags, the administrator will need to provide Wikibook DTD equivalents. Some recipe authors follow the PmWiki practice of defining output tags in variables; this makes it relatively easy to specify Wikibook replacements. Other recipes hard-code HTML tags into their output. Wikipublisher will remove such tags, which may produce unexpected and undesirable print results. In these cases, the administrator will need to write a separate markup rule for the pdf format channel to produce suitable Wikibook output.

Some recipes introduce markup designed to improve the online visitor’s experience, such as generate thumbnails to uploaded images or provide a form for posting a comment. In these cases, the recipe can often be Wikipublisher-enabled with a rule that translates the new markup into standard PmWiki markup.

An administrator may wish to raise any issues with the recipe’s original author or maintainer. As a general rule, recipes that follow the PmWiki markup-agnostic coding style can be readily Wikipublisher-enabled.

Techniques

When troubleshooting markup issues, the following techniques may help.

  1. Run Wikipublisher in debug mode. Press the debug button to see exactly what is happening and what output is being produced.
  2. Add new pdf markup rules. When a reader issues a typesetting request, the first thing the Wikipublisher library does is set $format = ‘pdf’. This means an administrator can add local Wikibook output rules by using config.php statements like

    if ($format==‘pdf’) Markup( … );

  3. Omit screen-specific output. Where output is designed for screen interaction, such as a form, an administrator may prefer to omit this from all printed output, whether in html or pdf. An administrator can add local print output rules by using config.php statements like

    if ($action==‘print’ || $action==‘publish’) Markup( … );

  4. Redefine output tags. If the recipe author has used a markup-agnostic design approach, the code will contain global variables for the tags inserted into the output. This allows an administrator to redefine these to their Wikibook equivalents. For example, a recipe might contain

    SDV($MyHTMLTags, array(‘preTag’ => ‘pre’, ‘boldTag’ => ‘b’));

« Skins | User Guide | PDF Errors »

Creative Commons License
Edit · History · Print · Recent Changes · Search · Links
Page last modified on 22 September 2006 at 02:59 PM