2

Compiling the file test.tex:

\documentclass{article}
\usepackage{siunitx}
\begin{document}
    The speed is $v = 3$ \si[per-mode=symbol]{\meter\per\second}.
\end{document}

using make4ht test.tex "xhtml,mathjax" puts a part of the siunitx source code in the output test.html

<body>
<!-- l. 4 --><p class='noindent'>The speed is \(v = 3\) \(\relax \exp_args:NV \__siunitx_print_math_auxiii:n \l__siunitx_print_tmp_tl \).
</p>
</body> 

Any idea how to fix this so that the produced html file renders the units correctly?

7
  • I'm a bit puzzled: Reading it backwards do you ask for a bug fix, of a workaround for a reported bug? Thanks
    – MS-SPO
    Commented Aug 15, 2021 at 3:13
  • In response to the comment by @MS-SPO, to reduce confusion, I am posting the temporary solution as a comment: I submitted a bug report to the siunitx git, but in the meantime, while the developers figure out the best way to rectify the situation, this document complies perfectly with the older version \usepackage{siunitx-v2} instead of \usepackage{siunitx}.
    – Rushi
    Commented Aug 15, 2021 at 20:27
  • Thanks. But what is the question, then? Sounds more like a solution.
    – MS-SPO
    Commented Aug 15, 2021 at 21:04
  • 1
    @Rushi Please don';t force-load the v2 file like that: the intended fallback usage is \usepackage{siunitx}[=v2].
    – Joseph Wright
    Commented Aug 15, 2021 at 21:16
  • 1
    @Rushi, Ok, I see. With the rules of this place in mind then it would be better to use the Q&A-format. It's easy to overlook: when you click on "Ask Question" in the lower left of the form you can select "Answer your own question". This allows e.g. to give some more background on the question first. The test.tex you mention might be useful to display, for example. // However, I'm not sure if and how your current question can be converted into a Q&A-style. I can't see this option when editing your post, but may be you can.
    – MS-SPO
    Commented Aug 15, 2021 at 21:25

1 Answer 1

2

At present you can use

\sisetup{mode = text}

which is what v2 does. I am considering a few better long-term approaches and will update in due course.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .