Image syntax

John Gruber gruber at fedora.net
Wed Jul 27 15:55:30 EDT 2005


Aaron Swartz <aaronsw at gmail.com> wrote on 07/27/05 at 2:53 pm:


> ## Possibilities

>

> Here's how Wikipedia does it:

>

> [[Image:Gruber.jpg|300px|right|The Narrator, pictured with his family.]]

>

> It's sort of ugly.


Yeah, it's gibberishy.




> Here's something like what I previously considered:

>

> ![The Narrator, pictured with his family.](Gruber.jpg){300px, right}

>

> It's a little cleaner, but still messy.


Yeah, again, I have to ask: how and when did '!' come to mean
"image"?



> Here's how I'd do it under this syntax.

>

> <Gruber.jpg> 300px right

> (The Narrator, pictured with his family.)

>

> Actually, that's not so bad.


I think you should optionally be able to line-break it liberally:

<img url>
size
alignment
(Alt text.)

Why worry about cramming so much onto one line?

Size and alignment would definitely both be optional.

But how does "300px" qualify as a size? It's just one dimension.

What about:

</url/to/img>
h: 200px
w: 300px
a: right
(Alt text goes here.)

and then since they're more like named parameters, you could put
them in any order:

</url/to/img>
(Alt text goes here.)
a: right
w: 300px
h: 200px

or, optionally, more compressed:

</url/to/img>
(Alt text goes here.)
h: 200px w: 300px a: right

or, optionally, with longer attribute names:

</url/to/img>
height: 200px
width: 300px
align: center
(Alt text goes here.)

-J.G.


More information about the Markdown-Discuss mailing list