-
-
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
Markdown reader: use title of implicit figure as short caption. #8617
base: main
Are you sure you want to change the base?
Conversation
The title of an implicit figure, if set, is used as the short caption of a figure. The short caption of a figure replaces the full caption in the list of figures. Closes: jgm#7915
I think my main question is still the one raised in #7915 -- what if formatting or math is needed in the short caption? One approach to this would be to parse the title as markdown. |
Another thought: The title could also be used as the image's |
Yes, I agree both that this makes sense and that it's probably too confusing to have implicit figures and normal images behave differently. We can still specify alt text using an attribute, no?
|
I suppose one alternative to overloading the title would be to allow a short caption to be specified via an attribute:
Drawback: English keyword. Drawback: no formatting. |
Am I right in thinking that pandoc currently only has special treatment for English keywords in the writers, but not the Markdown reader? It might be a dangerous precedent. Would it make sense to support the table caption syntax on images? ![Close-up shot of the colorful face of a male mandrill.](mandrill.jpg)
: A male mandrill Then the problem would become the more general issue of how to add short captions with that syntax. I guess the downside is that this is ambiguous syntax that could also be intended to mark a description list with an image term? |
Hm, that does make a lot of sense. I agree that it's ambiguous, and that's a strike against it, but it is still tempting, and how common is it to use a definition list with an image term? I would suggest that if we did this, then when this explicit caption is present, the image description should be the short caption, and the thing after |
If we could find a way to specify the short caption by extending the long caption syntax, then we could use that with tables as well. E.g., something like
or, inspired by org-mode description lists,
Fuller example: ![The colorful face of a male mandrill.](mandrill.jpg)
: "Mandrill" test image :: The "Mandrill" standard test image, sometimes
erroneously called "Baboon", is a popular sample photo used in image
processing research. Maybe this could also open a path towards more general, multi-image figures, but I don't know yet how that might look like. |
That's not bad, actually! |
The title of an implicit figure, if set, is used as the short caption of
a figure. The short caption of a figure replaces the full caption in the
list of figures.
Closes: #7915