Hey Ihor,

Apologies for the delay, I’ve been recovering from an RSI and had to
save my limited keystrokes for other things. (Take care of yourself
folks!).

On 2025-07-13 09:57, Ihor Radchenko wrote:
> I feel that using preview machinery will be quite an abuse.

Agreed, overloading `org-preview-latex-process-alist' for MathML is
certainly a kludge. I only meant to suggest that the structure is
similar in that it could be a multi-step process, i.e. not all MathML
converters can convert directly to `<math>' fragments, and those that
export HTML would need to be processed further.

> IMHO, providing an export backend sounds much cleaner (and more
> flexible).

No argument there. My concern is that a separate export path is a
surprise to the user. IOW, I could adjust `org-html-with-latex' to get
MathJax or images for math, but I’d have to change how I export to use
MathML. It feels a bit inconsistent to me.

The `html' option of `org-html-with-latex' seems closest to what I
want (using `org-latex-to-html-convert-command'). However, it doesn’t
seem to use any caching mechanism, doesn’t act on environments, and
sees only a fragment instead of the minimal document the image methods
see.

> I think that ox-odt can benefit from better mathml export most.

IMHO `ox-html' (and even `ox-md') would benefit most since they can’t
really do MathML at the moment. I don't have a use for ODT, but I’m
happy to improve it along the way. What kind of improvements did you
have in mind here?

One thing I noticed is that `org-odt-with-latex' can’t use image
generation methods from `org-preview-latex-process-alist' like the
HTML counterpart. Markdown could also benefit from images and MathML
(e.g. a README on sourcehut).

Best,

-- 
Jacob S. Gordon
jacob.as.gor...@gmail.com
Please avoid sending me HTML emails and MS Office documents.
https://useplaintext.email/#etiquette

Reply via email to