I am using Pressbooks for the first time, and I am trying to make an accessible version of a course packet for a trigonometry course based on a collection of LaTeX source files.
I have the QuickLaTeX plugin installed, and was told that would produce accessible math. However, for longer expressions and computations, I’m getting accessibility-checker messages saying the alt text is too long. The alt text displayed seems to be the raw LaTeX syntax, and there is no mechanism I can find to change the alt text.
Is the accessibility checker correct that this is an accessibility issue? (I sometimes get the same sort of error message in Canvas with the equation editor there, but I have been assured Canvas’s rendering of math is accessible.)
If it’s an accessibility error, how do I fix it? Do I need to switch to using MathJax for that particular bit of LaTeX?
Also, on a related note, how do I switch from QuickLaTeX to MathJax? I have unchecked the setting for using QuickLaTeX by default. But even if I take out the [latexpage] flag and re-save, I still get the accessibility error.
Thank you all!
Hi @Merc_Chasman, MathJax is used by default in Pressbooks unless the QuickLaTeX plugin has been optionally activated in the Plugins page in the book dashboard. In other words, the way to switch back to MathJax would be to deactivate the QuickLaTeX plugin at the book level (I don’t think there’s a more granular way to toggle between the two within a book). After deactivating QuickLaTeX, Settings > MathJax would appear again in the left sidebar of the book dashboard.
I’d suggest trying out MathJax with your book – it supports a wider range of LaTeX packages than before and it should be able to produce accessible math. More info on it can be found at Add Mathematical Notation – Pressbooks User Guide
I’m not 100% sure without seeing the specific case, but I think what you describe with alt text being flagged as overlong wouldn’t occur if MathJax were to be used at the book level.
@Merc_Chasman I want to echo what Thomas said about switching to the default MathJax approach. The only other thing I’d note is that we strongly recommend that you only use LaTeX to typeset mathematical notation, instead of all the text in a given chapter. For folks coming from math-heavy disciplines, they’re often used to using LaTeX as a full typesetting system that styles regular text, headings, etc. Pressbooks is already a typesetting system, so you’ll have much better results using the standard HTML tools provided by Pressbooks for the majority of your content and then using LaTeX delimiters only for math expressions and other notation that should be rendered by MathJax. It’s possible that the alt text is very long in QuickLaTeX because the expressions themselves are very long (if they include more than just the necessary math expression), since QuickLaTeX renders everything as an image. If you switch over to MathJax and still get the notices about too long alt text (we think this is pretty unlikely), please provide a sample chapter or two and we can look into the specifics and let you know whether you could safely ignore as a false positive or if there are other things we’d recommend to make your text more inclusive to all.
1 Like
The alt text displayed seems to be the raw LaTeX syntax, and there is no mechanism I can find to change the alt text.
I think this point went unanswered. Why is raw LaTeX syntax added to the rendered math image alt-text and not something more usable like Mathspeak or Clearspeak? (asking from the perspective of a default/native MathJax user and commenting on the EPUB/PDF behavior of MathJax math expressions)
This seems to be a capability of MathJax—as exhibited in their MathJax Speech Converter—so why can’t this be the default behavior? Raw LaTeX is not an accessible form of alt-text. Is the related GitHub Issue—Improve accessibility of [math] images generated for EPUB and Digital PDF exports #128—in scope for 2026 development?
Also, when rendering MathML to images both the MathML and the LaTeX annotation fallback are added as alt-text, creating a sort of double-speak. For example, mathml contentLaTeX fallback would result in an image rendered with the alt-text “mathml content LaTeX content“.
Hi @ScottMcC– great questions. WP QuickLaTeX is a third party plugin, and we have no control over decisions made by the developer there. I don’t know why it uses raw LaTeX as the math image alt text – I suspect because that was the best option available to him many years ago when he created the solution. We have our own native MathJax based solution that renders LaTeX in the browser using the MathJax library with a range of display options that can be controlled by the user. It’s a more accessible approach because it avoids rendering math as an image with alt text. Here’s a sample chapter with a wide range of LaTeX expressions rendered in the browser using our native solution (rather than WP Quick LaTeX): New packages examples and footnotes – Os Math should be updated soon You’ll notice that the content is displayed with the MathJax engine and all of its accessibility features, rather than as an image with raw LaTeX alt text.
The only situation in which our native solution does render images with alt text is when producing and sharing EPUB and PDF exports, where we can’t rely on loading javascript like MathJax in the user’s viewing client. The issue you linked to is from our native PB-Mathjax solution and refers to our desire to improve the alt text we generate and use for these images (which are ONLY displayed in EPUB/PDF exports). We would very much like to get to this in 2026. However, simply switching from WP QuickLaTeX to our native MathJax solution should entirely remove the alt text image problem for readers of your webbook as Thomas suggested in the initial response. The only reason I’d recommend someone use WP QuickLaTeX instead of our native solution is if they wanted to render something with TikZ or an unusual TeX package that WP QuickLaTeX supports but our native solution does not (pretty unlikely for most users). Apologies if this is confusing and happy to clarify anything that still remains obscure.
The TL;DR – I think you may have received outdated advice. We think our native method for handling math (which uses MathJax whenever possible) is better and more accessible than WP QuickLaTeX. We’d recommend deactivating that plugin in your book. I expect you will see much better results immediately.
I failed to specify, my comment was from the perspective of a native MathJax user for EPUB/PDF exports.
The MathJax EPUB/PDF rendered math images use raw LaTeX for the alt-text rather than plain math speech. I know EPUB3 supports mathml—so I would love to see that enhancement in EPUB—but the most accessible math in PDFs is really math images with alt-text. It would be nice to have the math alt-text in PDFs to be plain math speech rather than the current raw LaTeX. LaTeX is not well interpreted by assistive technology and plain speech would be clearer.
1 Like
Ok, great. Yes – we 100% agree. The issue you found is the relevant one then. I don’t know when it will be accepted into a sprint, but it’s our highest priority MathJax related improvement for 2026.
1 Like
As for why we don’t already do this, the most honest answer was because we didn’t know how to when we first built the image conversion service we use for EPUB/PDF exports several years ago. It’s several years on now, and I think it’s safe to say that we’re doing better but still learning in this space (as you can see by the fairly robust discussion in the comments on the ticket you found).
Thank you all, for your very detailed answers! It’s very helpful. I suspect the person who helped me set up my PressBook didn’t know about MathJax and only knew “there’s a QuickLaTeX plugin for math”.
MathJax is only available in the “visual” editor, correct? I must admit that’s a bit of a bummer – the nice thing about QuickLaTeX was that I could run some regex find-replace to convert all my LaTeX \section and \emph and so on to the appropriate HTML equivalents, and just copy-paste my documents directly into the “code” editor. Doing everything in the “visual” editor requires a lot more manual reformatting…
@Merc_Chasman MathJax renders from both the visual editor or the code editor. There is a button to insert math in the visual editor, but that just wraps the LaTeX expression in the [latex] [/latex] coding. The chapter of our guide, that Thomas references above, explains the different ways you can use LaTeX syntax using Mathjax in either editor.
Thank you so much for the quick reply! I’ve now actually checked and can use MathJaX in the code editor, which is great!
Just FYI, the guide does not actually seem to specify which editor to use for MathJax or that both are an option, beyond mentioning a button in the Visual Editor. Because of some behavior when using QuickLaTeX and my experience with Canvas’s RCE, in absence of other information i drew the wrong conclusion.
I’m very excited to be able to regex find-replace my way to quick conversions from LaTeX files to Pressbooks!
2 Likes