Figure (Image) Captions


#1

In my recent reply to the post regarding table syntax in the CommonMark spec, I thought it wise to contribute my thoughts regarding figure (image) captions <figcaption>.

AFAIK, none of the Markdown specs, save for Fletcher Penney’s MultiMarkdown, have incorporated syntax parsing of image captions.

The current trend for most blogs (and for news in general) is to be as media-centric as possible. While Gruber’s original “spec” for image syntax in Markdown was not very robust, we must remember that was from a time when the focus of most blogs was not images/videos, as is the case today. Therefore, we should relegate image syntax to the back burner, as Gruber appears to have done over 10 years ago.

Images should be in the Spec, not an Extension.

Here’s Penney’s syntax for image captions, and what I suggest CommonMark incorporate:

![This is the figure caption][fig_id]

[fig_id]: mmd.png "This is where the title goes" height=45px width=120px

Gets parsed to

<figure>
    <img src="mmd.png" alt="This is the figure caption" id="fig_id" title="This is where the title goes" style="height:45px;width:120px;">
    <figcaption>This is the figure caption</figcaption>
</figure>

Not too difficult, and since the image attributes are placed in the reference section, readability of the source Markdown is not too fugly.


#2

This is basically a duplicate of Image tag should expand to figure when used with title.


#3

Essentially, yes. (Though slightly more robust.)


#4

Though still limited to images only.


#5

Regrettably, I posted this only after realizing that there was a request for a more general syntax. Should I just delete this?


closed #6