[pmwiki-users] Re: Div Markup + Wiki Styles for Image Placement

H. Fox haganfox at gmail.com
Sat Jul 9 04:57:57 CDT 2005


On 7/9/05, Algis Kabaila <akabaila at pcug.org.au> wrote:
> > combined with %align=right% and %align=right% seems to work nicely in
> > PmWiki 2.  Those margin values were arrived at through experimentation
> > in the version 1 wiki.
[snip]
> "combined with %align=right% and %align=left%"  -- no?  Would %align=center%
> work, too?

It seems not to work for %align=center%, but I only need left and
right for what I want to accomplish, which is the ability to sprinkle
images around the site and have the text wrap around the images with
adequate white space (margin) between the text and the images.

Often I stagger the images within pages (zig-zag style) to get some
visual balance.
Example: http://qdig.sourceforge.net/Qdig/AboutQdig

> BTW, in my very limited experience with clients on our pcug-pmwiki
> (http://www.pcug.org.au/oss/2/pmwiki.php),
> I had some users asking about the margin around pictures and claiming that
> this was the most important feature that was missing from pmwiki.

I'm glad it wasn't just me.  :-)

>  So IMHO it
> would be a worth-while feature in the "out of the box" pmwiki.
> 
> My home pmwiki (on localhost) is beta40 (and will probably be updated
> tonight) , but the pcug-pmwiki is still beta36. I have grown scared of
> updating, but will do so to get the "margin around pictures" for our users.

I think you should upgrade, if only to get the new (:div:) markup
feature.  Here's my "script" (command history) for upgrading PmWiki on
one of my servers.

   cd /tmp
   wget http://www.pmichaud.com/pub/pmwiki/pmwiki-latest.tgz
   tar -zxvf pmwiki-latest.tgz
   cp -a pmwiki-2.0.beta43/. /var/www/wiki/
   rm -rf /tmp/pmwiki-*

It's pretty easy.

That said, you probably don't need to upgrade to get margins around
your images.  Try putting this

$HTMLStylesFmt[] = " #wikitext img {
  margin-left:5px; margin-right:8px;
  margin-bottom:1px; margin-top:4px;}\n";

in your local/config.php file.  Adjust the pixel values to taste.

Hagan

ps:  Does anyone have a good reason *not* to make the following line
(possibly with pixel values adjusted) part of the distributed
pmwiki.css stylesheet?  IMHO doing so would put reasonable default
margins around images in PmWiki pages.

#wikitext img {margin-left:5px; margin-right:8px;  margin-bottom:1px;
margin-top:4px;}




More information about the pmwiki-users mailing list