Some ideas while thinking about images, and particularly those we have described
by "source languages", such as #prefigure, #latex-image, #asymptote, #mermaid
and more. Generally, Python will rip these out, run some executable, and
produce images in various file formats. The CLI does a good job of hiding most
of this from an author or publisher, so it is not such an obstacle anymore.
Two exceptions are relevant:
1. For #latex-image we just place the source language carefully into the
LaTeX file we create for making a PDF, and the LaTeX executable does the right
thing.
2. For #mermaid it is the converse. We plop the raw Mermaid into our HTML
output, and some Javascript does the rendering in/on the page.
Would it be better to use the manufactured images in these two cases? A
latex-image PDF inclusion into LaTeX, and a Mermaid SVG inclusion for HTML?
Pros:
For (2) the Mermaid SVG seem pretty small and perhaps they load up faster when
pre-built than running the Mermaid JS?
Andrew S has looked into accessibility for Mermaid, maybe getting our hands on
the SVG would be a plus:
https://github.com/PreTeXtBook/pretext/issues/2724
Cons:
Lots of dissatisfaction with #latex-image in HTML and font sizes not matching up
etc, a whole mess revolving around scaling. To a certain extent we avoid that
in the PDF output, I think, so (1) could be a backward step. (I am *not*
reopening the HTML discussion here.)
Any really good ideas in this, or any really bad ideas? Or is the status quo
just fine?
Rob