[pmwiki-users] How do I control $HTMLVSpace?

John Rankin john.rankin at affinity.co.nz
Wed Aug 24 17:00:54 CDT 2005


On Thursday, 25 August 2005 3:55 AM, Jonathan Scott Duff <duff at pobox.com> wrote:
>On Wed, Aug 24, 2005 at 01:07:43PM +1200, John Rankin wrote:
>> Is there a way to ask pmwiki to insert something other 
>> than $HTMLVSpace to space out a list?
>> 
>> * item 1
>> 
>> * item 2
>> 
>> * item 3
>> 
>> The reason I ask is that when typesetting a page for printing, 
>> we don't normally require $HTMLVSpace, so all the resulting 
>> <p class='vspace'> tags get removed. This means we lose the 
>> normal way to space out a list. What I'd like to do is ask 
>> pmwiki to insert a different spacing variable when processing 
>> list markup.
>
>Not a pmwiki solution, but can your modify whatever processes the HTML
>in preparation for printing to not remove those tags if they are inside
><li> tags?

If only...

This is what we currently do:
- we forget about trying to process HTML into print -- that way lies
  madness

- we define a replacement stdmarkup.php that asks pmwiki to translate
  the wiki markup into a print-oriented dtd

- all such translations include an xml namespace qualifier, so
  output contains things like

    <tbook:item>some text</tbook:item>

- then we do a pmwiki magic $MarkupFrameBase['posteval']['detag']
  to remove any tags without the namespace qualifier, such as
  <p class='vspace'></p>

- then we remove all the namespace qualifiers, so pmwiki puts
  out xml that complies with the print dtd -- and all the vspace
  stuff is gone

So the only answer I have been able to think of is an 'after
block' rule that looks for

  <p class='vspace'></p>(<\/tbook:.*?>)?<tbook:(.*?)>

and turns it into (for example; actual output depends on $2)

  $1<tbook:$2 skip='big'>

This relies on pmwiki not changing the rules, so is not
great, but will probably work.

But it seems to me that a better way would be to create
correct xml markup in the first place.

Basically, I'm stuck!
-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list