[pmwiki-users] line spacing patch

Russ Fink russfink at hotmail.com
Fri Apr 1 10:05:55 CST 2005


>From: "Patrick R. Michaud" <pmichaud at pobox.com>
>
>On Fri, Apr 01, 2005 at 10:35:22AM -0500, Russ Fink wrote:
> > >>Hello,
> > >>
> > >>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
> >
> > Er, this doesn't quite get what I need.  When I use this, all the
> > text in the bullets have the same spacing.  What I want is to have
> > each bullet separated from the next bullet by a certain spacing, but
> > text within the bullets to be single spaced.  Maybe I just need to
> > [[<<]] everywhere, but this seems like a stylesheet-ish sort of
> > thing.  Any suggestions that don't involve creating my own skin?
>
>Aha, so you really *do* want margin-top then!  :-)
>Okay, try the following:
>
>     $HTMLStylesFmt[] = ' ul.spaced li { margin-top: 1em; } ';
>
>And then use
>
>     * %block spaced% here is a spaced bullet
>     * another bullet
>     * ..etc..

Works.

>
>There's not a pure-wikistyles way to get what you want (i.e., without
>defining the CSS class), because it's not easy to get a wiki style
>to be added to each item in the list.  However, you can sort of do
>it this way:
>
>     %define=s2 item margin-top:1em%
>
>     * %s2% here is a spaced bullet
>     * %s2% another spaced bullet
>     * %s2% ..etc..
>
>where the %s2% says to add spacing before the current item.
>
>And I'm guessing there's some reason you don't want to just do:
>
>     * here is a spaced bullet
>
>     * another spaced bullet
>
>     * ..etc..

Well, you called me out and now I'm feeling all stupid :-)  It comes of 
using an older version of [another wiki] that treats spaces between items as 
block separators.  This doesn't much matter for bullets specifically, but 
for numbered lists it will restart the numbering each time.  PmWiki doesn't 
do this, btw.  So once I got used to never space-separating a # list, it 
naturally flowed to not think to space * lists either.  Sheesh, too little 
sleep.





More information about the pmwiki-users mailing list