Recent Changes · Search:

Support the Project

Wikipublisher

PmWiki

edit SideBar

 

By default, the Wikibook PDF server translates underscores into a numeric character reference. This is because the underscore has a special meaning in LATEX and odd things happen if we pass an underscore in its raw form. Usually, this works as expected, but there is a side-effect when a heading includes an underscore — the PDF bookmark text is shown as “95” instead of “_”.

We can fix_this

In local/config.php, ad the following text after loading the Wikipublisher extensions:

    Markup("`_", 'inline', '/`_/', 
          (($format=='pdf') ? '<tbook:discy kind="_"/>' : '_'));

Then “escape” the underscore with the backtick character in any headings. This will “hide” the underscore by turning it into a discretionary hyphenation character.

This is discussed in more detail in Issue 00135. The recipe is enabled for this page only, so generating a PDF will produce the correct bookmark text. The HTML is unaffected.

Alternatively, download underscore.php Δ and install it in the cookbook directory.

Contributor: John Rankin with thanks to Nigel Thomas for identifying the requirement.

Creative Commons License
Edit · History · Print · Recent Changes · Search · Links
Page last modified on 07 July 2009 at 07:36 PM