[Pmwiki-users] Musings about Attach:image.png

Christian Ridderström chr
Sat May 22 05:38:34 CDT 2004

Inspired by Pm's musings on links, I started thinking about the basic
behaviour of links to images. I have occassionally been suprised that


or (I think)


results in an image instead of a link. Leaving aside the issue if this
behaviour is consistent, I wonder if maybe the complexity of the link
syntax is because we are trying to do too much.

So what if we introduced a specific directive to insert an image, rather
than having this done automatically, e.g.:

	[[figure Attach:image.png]]
or	[[figure http://some.url.org/image.png]]

would insert an image. In order to specify the alternate text for the 
image, you'd write something like:

	[[figure Attach:image.png alternate text]]

There's room for simplification of the syntax here. For instance, we could 
make the 'Attach:'-bit optional, so that

	[[figure image.png]]

would in this case automatically assume that the figure is among the
uploaded files.

If we now wish to create a link that is represented by an image, we could 
use the normal PmWiki markup to write:

	[[SomePage [[figure figure.png alternate text]] ]]

Anyway, maybe we should start to think about using an explicit directive
for inserting an image into the page, rather than doing this
automatically. (There is nothing preventing us from using both mechanisms
in parallell of course).

A separate directive could also be useful to let us add a caption to a 
figure. The syntax could be expanded to allow something like:

	[[figure figure.png alternate text | caption text...]]

or maybe we would like to be able to specify width/height etc?


Christian Ridderstr?m                           http://www.md.kth.se/~chr

More information about the pmwiki-users mailing list