Mermaid images, changes

11 views
Skip to first unread message

Rob Beezer

unread,
Nov 19, 2025, 4:31:07 PM (3 days ago) Nov 19
to prete...@googlegroups.com
Sean F made a nice PR back in June at

https://github.com/PreTeXtBook/pretext/pull/2568

that exposed only a little problem (on my end) with Mermaid images, @xml:id, and
@label. Twenty-four hours and thirteen commits later, I think I have that
little teeny-weeny problem resolved. A couple of bigger changes in the process.

* We are no longer doing special color and B&W versions of Mermaid image files.
Color is the default now, and you can get grayscale images with a Mermaid
"neutral" theme in a publication file. @Oscar - generated files with suffixes
like "-color" and "-bw" are no longer manufactured, nor utilized.

* For EPUB we need SVG versions of Mermaid images. That is a pretty routine
addition, but it means that the Python routine has a new signature (additional
"outformat" argument). @Oscar - the CLI will need to react, I expect. HTML is
native (Javascript renders the image), LaTeX uses PNG, EPUB uses SVG. I guess
I've not thought too hard about support for other formats.

@Oscar - sorry to plop this one in your lap. There's no real great way to do
this with less disruption.

For more technical details, see

https://github.com/PreTeXtBook/pretext/pull/2560

where Andrew S made a valiant attempt to address some of this.

Announcement soon.

Rob

Oscar Levin

unread,
Nov 19, 2025, 11:29:21 PM (3 days ago) Nov 19
to prete...@googlegroups.com
No problem.  Updates were easy.  Releasing a new cli version currently that has this and the other many recent changes.

--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAxNC5iZWV6ZXI.1763587865%40pnsh.
Reply all
Reply to author
Forward
0 new messages