On Fri, Oct 30, 2026 at 07:18:31PM +0100, Sebastian Meyer wrote: > texi2any --html currently supports three HTML_MATH variants (l2h, t4h, > mathjax) for rendering math. I think KaTeX (<https://katex.org/>) would be a > great addition. > > GNU R uses KaTeX by default when rendering its help pages in HTML, see > <https://search.R-project.org/R/refmans/base/html/Special.html> for an > online version of a help page containing some equations. R already bundles > katex.js et al. for its dynamic help system, and it would currently need to > post-process the texi2any-generated HTML to use the same KaTeX sources also > for its Texinfo manuals. Currently these use simple plain-text equations in > case @ifnottex (e.g., > <https://CRAN.R-project.org/doc/manuals/R-intro.html#Generalized-linear-models>). > People nowadays read the HTML manuals much more often than the PDF versions, > so it would be nice to enable HTML_MATH, ideally using KaTeX. > > Are there plans to add HTML_MATH=katex as an alternative to mathjax?
That seems to be interesting to add. Compared to MathJax, the documentation is quite terse, but I managed to have something working using examples on the internet, so I should be able to come up with something that works in texi2any. Customization will probably be somewhat different as KaTeX needs both a script and a CSS file. -- Pat
