all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Vladimir Alexiev <vladimir.alexiev@ontotext.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] ox-md image captions
Date: Mon, 27 Feb 2023 18:52:49 +0000	[thread overview]
Message-ID: <871qmbym7y.fsf@localhost> (raw)
In-Reply-To: <CAMv+wg5ggYVj9b2-R=MjuR=DwUAccL_4z2YYbTMnvdTaJNJyFw@mail.gmail.com>

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	other threads:[~2023-02-27 18:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-27 10:02 [BUG] ox-md image captions Vladimir Alexiev
2023-02-27 18:52 ` Ihor Radchenko [this message]
2023-04-04  8:48   ` Ihor Radchenko
2023-04-04 19:34     ` Vladimir Alexiev
2023-04-04 19:41       ` Ihor Radchenko
2023-04-07 14:56         ` Max Nikulin
2023-04-07 15:29           ` Vladimir Alexiev
2023-04-07 17:21             ` Max Nikulin
2023-04-08 10:29               ` Ihor Radchenko
2023-04-08 10:25             ` Ihor Radchenko
2023-04-05  9:43     ` Morgan Willcock
2023-04-05 10:04       ` Ihor Radchenko
2023-04-05 10:41         ` Morgan Willcock
2023-04-05 11:07           ` Ihor Radchenko
2023-04-05 15:30             ` Vladimir Alexiev
2023-04-16 15:36             ` Ihor Radchenko
2023-04-05 12:06     ` Max Nikulin
2023-04-05 13:05       ` Ihor Radchenko
2023-04-05 15:15         ` Max Nikulin
2023-04-05 15:22           ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qmbym7y.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=vladimir.alexiev@ontotext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.