# [tex4ht] spaces in math

Tomas Davidek Tomas.Davidek at cern.ch
Wed Feb 10 22:24:43 CET 2021

Dear all,

I noticed a strange feature. Sometimes, the math spacing does not
work well. A typical case

=====

\newcommand{\mev}{\ifmmode \mathrm{MeV}\else MeV\fi}

Svislými čarami jsou označeny dopplerovské meze $E_1 = (53{,}6\pm 2{,}8)~\mev$.

=====

Of course in pdflatex everything works well, but in some cases the
tex4ht results in no space between the number and the unit. I very often
use the form $X = 88~\mev$. In most cases the expression is translated
correctly to HTML, but sometimes it fails.

I picked some cases from my large document and entered affected
sentences in the attached document. If I compile it now with make4ht,
everything displays correctly.

Does anyone have an idea what could be wrong and how to systematically
avoid this kind of problem, please? Of course it may help to
systematically write $X = 88\ \mev$ or $X = 8$~{\mev}, but this would
requite quite a lot of manual work....

Thanks a lot for any hint.

Cheers,

Tomas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tilde.tex
Type: text/x-tex
Size: 1282 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex4ht/attachments/20210210/38d71fc0/attachment.bin>