On 10/30/26 12:14 PM, Gavin Smith wrote:

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?

Thanks and best regards,

        Sebastian Meyer
There are no plans for it although I have no objection in principle.

I don't actually remember much about what triggered the implementation of
MathJax support in texi2any although it had been mooted for several years
previously.  I don't remember how much we considered using KaTeX instead of
MathJax (if at all).  I am not familiar with the differences between KaTeX
and MathJax and why you would choose one over the other.

One manual that uses the MathJax output of Texinfo heavily is GNU Astro, e.g.
seehttps://www.gnu.org/software/gnuastro/manual/html_node/Convolution-theorem.html.
Maxima also uses MathJax a lot for its online user manual. One example is section on Bessel Functions <https://maxima.sourceforge.io/docs/manual/Special-Functions.html#Bessel-Functions>.

At the time this was done, I probably didn’t know KaTeX existed.

&#8203;

Reply via email to