[tex4ht] problems using mathjax mode with siunitx package

Michal Hoftich michal.h21 at gmail.com
Sat Jan 5 20:32:38 CET 2019

Hi Nasser,

> I am trying the new mathjax mode with some old latex files
> that make heavy use of \usepackage{siunitx}
> None of the siunitx code works in mathjax but works OK
> in lualatex and in png or svg for math with make4ht.

there is a package that tries to emulate Siutnitx for MathJax:


I was able to require it using the following configuration:

 <script type="text/x-mathjax-config">
   tex2jax: {inlineMath: [["$","$"],["\\(","\\)"]]},
   TeX: {extensions: ["[siunitx]/siunitx.js"]}
 MathJax.Ajax.config.path['siunitx']  =
\Configure{@HEAD}{\HCode{<script type="text/javascript"

The issue is that it doesn't seem to support custom units and what is
even worse, the \SI command doesn't seem to work. So the sample you
provided doesn't work, but some simpler stuff do. Look at their

You can make feature requests on their Github, there is nothing much
else what can be done.

Best regards,

More information about the tex4ht mailing list