-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
: Caption for All: A Unified Syntax for Captions and figCaptions #9261
Comments
Indeed, now that the Figure element has been added to the AST, we might explore a new Markdown syntax for figures to replace or supplement Since the Figure element can now contain arbitrary block-level content, a Figure could contain a code block, a video, or anything else. This would also help with #8752. |
I also wonder now if there's a way to mention figures, tables, and even headings, dynamically like See [#foo-bar-table] and [#foo-bar-figure] in [#foo-bar] section. instead of:
where the foo-bar-figure looks as follows: ![Image alt](path/to/image.png "Image title")
: Image caption {#foo-bar-figure} In HTML: <figure id="foo-bar-figure">
<img src="path/to/image.png" title="Image title" alt="Image alt" />
<figcaption>Image caption</figcaption>
</figure> i.e., the |
Just to add my tuppence to the discussion; I feel it is a mistake to use the alt text as a caption with implicit_figures as alt text and captions serve two entirely different purposes (at least in a HTML context). Having a way to specify a caption and alt text (for accessibility reasons) without breaking everyone else's documents that relied on the alt-text-as-caption behaviour would be very much appreciated. |
Usually, after a table in a markdown file, pandoc converts a line like this:
to
<caption>
.I wonder if it's a good idea to use this syntax as a unified syntax to generate
<caption>
and<figcaption>
too, not only for images, but also forvideo
,audio
, and even<pre>
elements.The HTML result:
In this case, the meaning of the text before the URL will be changed. It will mean an
alt=""
attribute, not a<figcaption>
element.This could be a dramatic development for markdown syntax, but I think it's worth it.
The text was updated successfully, but these errors were encountered: