[pmwiki-users] White-space=pre (Was Indent multiple paragraphs at once?)

Pico pmwiki at ben-amotz.com
Mon Aug 21 16:28:11 CDT 2006

Hans <hans.bracker <at> googlemail.com> writes:
> Re: white-space=pre
> I want to add that this will preserve any white spaces and line breaks
> in the text, but still uses the standard proportional fonts, and
> preserves links and wiki markup working.

Should PmWiki's whitespace markup be preserved when the CSS white-space=pre
property is invoked as a WikiStyle?

The issue is unexpected font changes that result when the whitespace that is
intended to be preserved by white-space=pre is interpreted by PmWiki's
whitespace rules to trigger a font change.  As fonts change, the width of
individual characters and their padding (kerning?), changes.  Significantly, if
not ironically, these font changes cause the horizontal space represented by the
"preserved" whitespace character to change from one line to the next.  

Of course, one possible work around is to specify a monospaced font in when
using a white-space=pre style.  But hardcoding a single monospaced font into a
WikiStyle  does not eliminate font changes triggered by PmWiki whitespace rules,
because those fonts are specified in arrays that include more than one possible
font (and because different skins may not use the same fonts).

If PmWiki's whitespace rules were not preserved when PmWiki allows the CSS
white-space=pre as a WikiStyle, the problems with font changes would be

On the other hand, if no changes were made to the processing of wiki markup by
white-space=pre, would it be possible to cause that style to default to the same
array of fonts that are used by PmWiki's whitespace rules.


More information about the pmwiki-users mailing list