[pmwiki-users] line spacing patch

Russ Fink russfink at hotmail.com
Fri Apr 1 09:16:10 CST 2005


Hello,

I really needed a way to add extra line spacing in bullet lists, so I hacked 
my copy of wiki to put it in.  I'm attaching a patch file in case anyone 
wants to try it or critique it.  I'd make a cookbook recipie, but fear there 
exists a better way.

I'm using pmwiki-2.0.beta26.  The issue is I want to add extra spacing to my 
blocks, including bullet lists so that they space out a little bit (e.g., 
double space).  There's a great example in WikiStyleExamples about using 
%block ... % to set styles on block lists, but unfortunately, I can't find 
an existing hook for the CSS property "line-height" which is what I need.  
[Maybe there are other ways to do this?]

I wrote a line-height mod into scripts/wikistyles.php, and am attaching the 
patch file.  It lets you do this:
* %block line-height=2% here is a spaced bullet
* another bullet

* whitespace does not separate the block, so this gets included.
** Subbullet 1
** Subbullet 2 (don't you mean, torpedo?)

In this case, the target ot "line-height" can be a single number, indicating 
an increment of lines (in the above example, double spacing), or it can be 
"24px" representing pixels.  This is standard css, apparently.

The patch is trivial.  Maybe this is why no cookbook mods, to save myself 
the embarrassment of proposing such a simple change.  To apply it, "cd wiki 
; patch -p0 < thepatchfile" if you're using unix.  Otherwise, hand-edit 
wikistyles.php.

If there is no better way to do it, can this be added to the PmWiki distro?

Thanks,
Russ

-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1
Type: application/octet-stream
Size: 607 bytes
Desc: not available
Url : /pipermail/pmwiki-users/attachments/20050401/c336f88d/attachment.obj 


More information about the pmwiki-users mailing list