Thanks very much, David, for all the mucking around with the MathJax internals.
Very interesting, and perhaps promising, but it doesn't sound like a slam dunk.
Relieving the RevealJS slideshows from an online MathJax dependency is not the
most pressing issue. Andrew has a PR getting the CSS ship-shape and that should
be a big improvment.
Let's put MathJax on hold for the moment. They say MJ v4 drops July 31. We
will need to adjust on various fronts, not least PreFigure tactile, and Braille
generally. Maybe some of this will become clearer as we do that work, and
almost-certainly we will need to make some configuration changes anyway.
Rob
On 7/14/25 16:07, David Austin wrote:
> Follow up to a conversation in today's drop in:
>
> I did some experimentation embedding MathJax output directly into an HTML page
> in the minimal article. Remember that PreTeXt configures MathJax for CHTML
> rather than SVG (line 12929 in pretext-html.xsl <
https://github.com/PreTeXtBook/
> pretext/blob/c750a05a2c35cad67dd269682e1618e3c1eb63dc/xsl/pretext-
> html.xsl#L12919>). If I open the inspector on a MathJax expression, grab the
> resulting HTML code, and paste it directly into the HTML, the output isn't
> right. We should see x^2 + 2y^2 = z^2, but all we see are the 2's and the equal
> sign, that is, x, y, and z are missing. The screen reader doesn't reproduce the
> expression properly either (we just hear "superscript" a bunch of times). I
> fiddled around with a couple of things without any improvement.
>
> I then used the context menu to request that the math be rendered as SVG and
> pasted that into the HTML page. The math expression renders properly, and all
> the speech data is contained in an #mjx-assistive-mml. When the focus goes to
> the math expression using the screen reader, the expression is boxed as we'd
> expect, but there is no speech available.
>
> I then tried creating math expressions with the mj-sre-page script and pasting
> them into the HTML in the same way. In particular, setting the "svgenhanced"
> option produces an SVG with all the speech data contained inside an #svg/g
> element. The expression looks good, but the screen reader just completely
> ignores it.
>
> So I wasn't successful in reproducing the screen reading capabilities, but all
> the data is there so it seems like it should be possible. I just don't know
> how! Also, I'm just using the not-so-great linux screen reader.
>
> David
>
> On Wed, Jul 9, 2025 at 12:57 PM Andrew Scholer <
andrew....@chemeketa.edu
> <mailto:
andrew....@chemeketa.edu>> wrote:
>
> PR:
https://github.com/PreTeXtBook/pretext/pull/2598 <
https://github.com/
> PreTeXtBook/pretext/pull/2598>
>
> Andrew Scholer (he/him/his)
> Computer Science Instructor
> Chemeketa Community College
>
503.589.7649
>
computerscience.chemeketa.edu/people/andrew-scholer/ <http://
>
computerscience.chemeketa.edu/people/andrew-scholer/>
>
>
> On Wed, Jul 9, 2025 at 7:56 AM Andrew Scholer <
andrew....@chemeketa.edu
> <mailto:
andrew....@chemeketa.edu>> wrote:
>
> Most of the css/js libraries available/used in the slideshows (mathjax,
> prism) are available as node packages. So one way to package them for
> offline use would be to make a node package, add the commonly used
> libraries to the package, and then make a wrapper .js file that imported
> and exposed the libraries. Then esbuild (the tool used for the CSS
> building) could be used to automatically build that into a single file
> with "npm run build".
>
https://esbuild.github.io/getting-started/#your-first-bundle <https://
>
esbuild.github.io/getting-started/#your-first-bundle>
>
> Andrew Scholer (he/him/his)
> Computer Science Instructor
> Chemeketa Community College
>
503.589.7649
>
computerscience.chemeketa.edu/people/andrew-scholer/ <http://
>
https://github.com/PreTeXtBook/pretext/issues/2235 <https://
>
github.com/PreTeXtBook/pretext/issues/2235>
> yesterday.
>
> Over there, Rob asked me to try something like this about a year
> ago, bit it never made it near the top of my to-do list.
>
> Rob's suggestion at the time was to grab the CSS from the
> revealjs CDN and bundle it up somehow.
>
> This was just far enough out of my Python comfort zone to make
> it something I'd need to devote a day or two to.
>
> On Tue, Jul 8, 2025, 2:25 p.m. Andrew Scholer
> <
andrew....@chemeketa.edu
> * Update the revealjs build to place the generated CSS in
> the output folder next to the HTML and link to that
> (dropping the embedded CSS).
> * Add a pub var to allow for an authored CSS file that
> gets linked in after the standard CSS. It sounds like
> slides get a fair amount of personalization/local fixes.
> A sidecar CSS file should reduce the need to do a
> localized install of reveal.js files just to override
> some of their CSS.
>
>
>
> Andrew Scholer (he/him/his)
> Computer Science Instructor
> Chemeketa Community College
>
503.589.7649
>
computerscience.chemeketa.edu/people/andrew-scholer/
> <
http://computerscience.chemeketa.edu/people/andrew-scholer/>
>
>
> On Tue, Jul 8, 2025 at 12:56 PM David Austin
> <
david.a...@gmail.com <mailto:
david.a...@gmail.com>>
> wrote:
>
> PROJECT: build math bits offline as PNG or SVG and
> incorporate into the final
> HTML. We do this already for EPUB. And we make
> math as braille for braille,
> and for PreFigure. So there are mature tools for
> most of this already.
>
>
> I could take care of this since, as noted, PreFigure
> does something very similar. I could probably do the
> reveal extras management too, but I've got a couple of
> other things going on (I know, who doesn't).
> Maybe @Sean would be interested in that?
>
> Lots to do - CSS is one important piece. Thanks,
> Andrew, for your interest in
> attacking this part. I hope others are simiulary
> interested in some of the
> other parts.
>
> Rob
>
> --
> 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+uns...@googlegroups.com <mailto:
pretext-
>
dev%2Bunsu...@googlegroups.com>.
> MTAwMDAzOS5iZWV6ZXI.1751994288%40pnsh <https://
>
groups.google.com/d/msgid/pretext-dev/
> MTAwMDAzOS5iZWV6ZXI.1751994288%40pnsh>.
>
> --
> 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+uns...@googlegroups.com <mailto:
pretext-
>
dev+uns...@googlegroups.com>.
> CANXmVMAKA%3DsVm1W53ZwXV91hKid37ZH1tYfwDo1zVpR5F4hC6g%
40mail.gmail.com <
https://groups.google.com/d/msgid/pretext-dev/CANXmVMAKA%3DsVm1W53ZwXV91hKid37ZH1tYfwDo1zVpR5F4hC6g%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> 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+uns...@googlegroups.com <mailto:
pretext-
>
dev+uns...@googlegroups.com>.
> msgid/pretext-dev/CACm44N-
> Y-2OTnXGeciHud%2BXGq6H7hwQzSajmVvQE1NZ%3DymLzXg%
40mail.gmail.com <
https://groups.google.com/d/msgid/pretext-dev/CACm44N-Y-2OTnXGeciHud%2BXGq6H7hwQzSajmVvQE1NZ%3DymLzXg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> 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
> <mailto:
pretext-dev...@googlegroups.com>.
> CAH%2BNcPYwX5iWsouffe%3DseRJgVz%3DfZkNccOU%2BhsV1KrXrwnHbPg%
40mail.gmail.com <
https://groups.google.com/d/msgid/pretext-dev/CAH%2BNcPYwX5iWsouffe%3DseRJgVz%3DfZkNccOU%2BhsV1KrXrwnHbPg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> 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
> <mailto:
pretext-dev...@googlegroups.com>.
> CANXmVMC9msE843Zw_eTN5HGUJiFMEGtavh%2BLUs1RSOm_HLr6fw%
40mail.gmail.com <
https://groups.google.com/d/msgid/pretext-dev/CANXmVMC9msE843Zw_eTN5HGUJiFMEGtavh%2BLUs1RSOm_HLr6fw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> 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 <mailto:
pretext-
>
dev+uns...@googlegroups.com>.
> CACm44N-xRf_4ECDAzifN1nirxRT--rN%2BfHd4cF_ODzKv_%2BDcuQ%
40mail.gmail.com
> <
https://groups.google.com/d/msgid/pretext-dev/CACm44N-
> xRf_4ECDAzifN1nirxRT--rN%2BfHd4cF_ODzKv_%2BDcuQ%
40mail.gmail.com?
> utm_medium=email&utm_source=footer>.
>
> --
> 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 <mailto:
pretext-
>
dev+uns...@googlegroups.com>.
> CANXmVMB_0yXQsmeLr4XtvY_ZfsKOJFKQh1Ad6675wr-6HW9VGA%
40mail.gmail.com <https://
>
groups.google.com/d/msgid/pretext-dev/
> CANXmVMB_0yXQsmeLr4XtvY_ZfsKOJFKQh1Ad6675wr-6HW9VGA%
40mail.gmail.com?
> utm_medium=email&utm_source=footer>.