emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [BUG] ox-md image captions


From: Ihor Radchenko
Subject: Re: [BUG] ox-md image captions
Date: Sat, 08 Apr 2023 10:29:28 +0000

Max Nikulin <manikulin@gmail.com> writes:

> On 07/04/2023 22:29, Vladimir Alexiev wrote:
>> It's not about the tooltip in HTML:
>> figure captions are very important in scholarly publishing.
>
> I see and I do not like that Org exports caption as title (tooltip). On 
> the other hand neither original markdown nor GitHub flavored markdown 
> have notion of figure caption. Pandoc extension has the issue with 
> duplicated text in caption and alt. I have seen mention of <figcaption> 
> block in commonmark, but I have never tried it.
>
> MarkDown is rather basic format and the closest approach it a paragraph 
> below an image despite they are not grouped into figure.
>
>      ![](fig.jpg)
>
>      Figure 1. Caption

In theory, we can directly use <figcaption> HTML tags + direct HTML in
the MD export. That will be actually the closest way. But direct HTML is
not well-received when using the MD in practice. For example, sourcehut,
GitHub, and Reddit do not allow arbitrary html fragments when rendering
MD (AFAIK).

> A workaround for Org is export snippet or block for the paragraph with 
> caption
>
> #+md: Figure 1. Caption

A better workaround is a custom filter, or we may provide a
customization, if someone offers a patch.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]