Image Syntax

Christoph Freitag mail at christoph-freitag.de
Fri Nov 4 20:51:40 EST 2005


John Gruber wrote:


> I just think we can do better. I do prefer writing this:

>

> <img

>

> src='http://daringfireball.net/misc/2005/07/vancouver-weather-1.png'

> alt='Screenshot of the Weather widget, after typing

> ‘Vancouver’.'

> />

>

> to the current Markdown syntax, but I'd prefer writing this even more:

>

> <http://daringfireball.net/misc/2005/07/vancouver-weather-1.png>

> (Screenshot of the Weather widget, after typing ‘Vancouver’.)

>


I know I am late to the party, and nevertheless I am going to write a
long post -- please accept my apologies.

Have you considered the following?

1. Pure Text
If you write pure text you should't worry about the syntax for
images. It will never get in your way.

2. Text with references to images
If you write text that is converted to a "publication" (a book, a
website) in a second step (your secretary, a printer/typesetter, or
some computer programme or script) you will need to tell the
"typesetter" to include images, if necessary. You need not necessarily
tell them where the images are or what size they should be -- it is
safe to assume that your typesetter already knows this.

E.g. when I write a report and want my secretary to include a chart
in it I would write someting like this:

> Here is my text that is backed up with the following chart.
>
> /// Chart 1 ///
>
> Here continues my text.

This tells my secretary to look in the charts file for the first chart
and cut-and-paste it from Powerpoint into the text.

What I mean by this is:

a. The insertion of images (or charts or whatever) lies outside the
scope of the formatting of the rest of the text. In our case it would
not be a matter of Markdown altogether. One should use whatever is
appropriate to "manually" insert images: your secretary, a WordPress
plugin, or whatever.

b. Since the image insertion is handled by an "outsider" it doesn't
matter what syntax you use -- from Markdow's perspective, at least. It
could be anything, and it doesn't even have to be consistent. If
someone read your "raw" Markdown text with these "manual image
insertion commands" they would know that they were looking at a draft
which was necessarily incomplete without the images. They would not
expect to be able to figure out what images were meant to be in the
text. In short, they wouldn't expect URLs.

In short, it is perhaps more versatile to leave out any syntax for
images out of Markdown. I would be quite happy with what various
WordPress plugins provide for, actually.

Nevertheless, if you do include an image syntax I think it should be as
simplistic as possible, non-bloated, so to speak. I therefore like the
idea of John:


> <http://daringfireball.net/misc/2005/07/vancouver-weather-1.png>

> (Screenshot of the Weather widget, after typing ‘Vancouver’.)


However, I would perhaps change it sligthly in order to to avoid
inconsistencies with verbatim links, like so:

[Screenshot of the Weather widget, after typing
Vancouver]<http://daringfireball.net/misc/etc.jpg>

This would be similar but not identical to links that use the [link
text](URL) form.

The rule would be:
* if the URL is in round brackets print a link.
* if the URL is in < > include the referenced URL in the output.

That way you could also easily include other articles or external web
pages within your page and many other things.

3. Conventional Markdown Image Syntax
Last but not least I would like to ask you to consider the image
inclusion syntax that is used in a WordPress plugin by [David Seah]
(http://davidseah.com/). The plugin is called LazyImageLayout. For LZIL
documentation, see http://davidseah.com/projects/lzil.

Thanks for reading this far!

-- c.f


--
Christoph Freitag
Mühlenweg 10
57635 Fiersbach

Tel.: (02686) 988222
Fax: (02686) 988555

Web: www.parenthese.de



More information about the Markdown-Discuss mailing list