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: Mon, 27 Feb 2023 18:52:49 +0000

Vladimir Alexiev <vladimir.alexiev@ontotext.com> writes:

> I have an image caption like this:
>
> #+label: fig:bsdd-graphql-voyager-refact-detail
> #+caption: Refactored bSDD GraphQL Schema
> [[./img/bsdd-graphql-voyager-refact-Classification-ClassificationProperty.png]]
>
> ox-md exports it like this:
>
> ![img](./img/bsdd-graphql-voyager-refact-Classification-ClassificationProperty.png
> "Refactored bSDD GraphQL Schema")
>
> (see https://git.sr.ht/~bzg/org-mode/tree/main/item/lisp/ox-md.el#L595)
>
> However, pandoc expects image captions to be formatted like this:
>
> ![Refactored bSDD GraphQL
> Schema](./img/bsdd-graphql-voyager-refact-Classification-ClassificationProperty.png)

The current ox-md's behaviour has been introduced in 87b48e5a2824:

    ox-md: Fix image transcoding
    
    * lisp/ox-md.el (org-md-link): Do not confuse caption and alt-text.
      Provide "img" as default alt-text.

     ...
     ... format "![img](%s)" ...

However, looking at
https://www.markdownguide.org/basic-syntax#adding-titles

    You can optionally add a title for a link. This will appear as a
    tooltip when the user hovers over the link. To add a title, enclose
    it in quotation marks after the URL.

So, img is not really alt text, but the opposite.
The commit appears to be inaccurate.

I am inclined to change ![img](url "caption") to
![caption](url) for links without description (links with description do
not obey caption in org export).

Any objections?

-- 
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]