[pmwiki-users] improved markup for floating images...?

Patrick R. Michaud pmichaud at pobox.com
Tue Jul 26 08:30:35 CDT 2005


On Tue, Jul 26, 2005 at 09:37:56AM +0100, Ed W wrote:
> Why don't we just introduce an img:xxx tag and use that?  Have a look at 
> the way media-wiki does it - I quite like their syntax (It's on my todo 
> list to have a bash at this img tag actually)

We can do img:xxx for images, but it ends up looking an awful lot 
like an InterMap link, and seems as though it would end up being
treated a lot differently.

> Also a lot of this formatting can probably be done more easily anyway if 
> the table syntax could be nested and divs wrapped around stuff.  
> ...

I'm not sure I agree with this assessment of it being "easier".  Can
you give an example?

> I have come up against the DIV limitation already - I wanted a table 
> with some text aligned in all cells at the bottom of the cell - I 
> figured using a div around the text to set the vertical-align property 
> would do it, but of course one can't nest them...  grrr.  

How about "(:cell valign='bottom':)" ?

> I'm way off topic now, but my final gripe which is causing me pain is 
> why something simple like %text-align=right% doesn't work (ie do 
> anything)?  The help pages suggest that it should do so...?  Using %p 
> text-align=right% is fine, but if you omit the block specification then 
> it doesn't seem to work... (Actually why do we need a block level spec 
> anyway?)

We need a block-level spec because there's a big difference between 
styling inline text and styling an entire block structure -- e.g.,
the difference between %color=red% and %p color=red%.  Or perhaps
another way of saying this is that HTML imposes a block-level 
structure upon us, so we have to deal with it.

The reason why %text-align=right% doesn't seem to be working for you
is that this CSS property has no effect in inline markup.  I suppose 
we could decide that any wikistyle with a "text-align" property 
automatically has to apply to the block, but that's another "action
at a distance" sort of item that brings in its own set of
confusions and inconsistencies.

Ultimately my recommendation is to use %right% instead of
%text-align=right%.  It's shorter, and already knows to apply to the
block.

> I think your syntax seems to be heading more and more towards early 
> html.  Why not try and head more towards XML where you have a tag 
> starting some syntax and then a definite end to the tag?  Just a thought

At this point I'm not planning to "head anywhere" in terms of the
existing markup syntax -- I don't envision it evolving much further
beyond what it currently has.  For simple markup systems I'm not a 
big fan of nested structures that require open and close tags; if 
I start a new (:div:), (:table:), or (:cell:) then it ought to 
automatically close the previous one.

For those sites that really want or need to support arbitrary nested 
markup structures, I recommend simply enabling selected HTML 
and/or XML tags directly in the markup.  There doesn't seem to be
much point in creating a markup syntax that largely replaces existing
HTML/XML tags with a different character sequence.

Pm




More information about the pmwiki-users mailing list