[tex4ht] [bug #537] tex4ht having trouble with $\frac{\partial u}{\partial x}=0$ in mathjax mode
Nasser M. Abbasi
nma at 12000.org
Thu Dec 2 05:16:43 CET 2021
On 12/1/2021 4:53 PM, Michal Hoftich wrote:
> Follow-up Comment #1, bug #537 (project tex4ht):
>
> Thanks for the report. This issue was caused by previous change to the MathJax
> processing. The problem was that paragraphs in MathMode produced \par command
> instead of blank lines. I've used regex to fix that, but the issue is that it
> replaces \partial with two blank lines and string "tial". I've updated the
> regex, so it requires some white space after \par, which seems to fix the
> issue. Try the attached version of `mathjax-latex-4ht.4ht`.
>
> (file #447)
> _______________________________________________________
>
> Additional Item Attachment:
>
> File name: mathjax-latex-4ht.4ht Size:3 KB
>
Thank you Michal for the quick fix.
I've replaced
/usr/local/texlive/2021/texmf-dist/tex/generic/tex4ht/mathjax-latex-4ht.4ht
with the file you have attached and now the correct math is generated.
Here is the new HTML now
===============
<!DOCTYPE html>
<html lang='en-US' xml:lang='en-US'>
<head><title></title>
<meta charset='utf-8' />
<meta content='TeX4ht (https://tug.org/tex4ht/)' name='generator' />
<meta content='width=device-width,initial-scale=1' name='viewport' />
<link href='foo.css' rel='stylesheet' type='text/css' />
<meta content='foo.tex' name='src' />
<script>window.MathJax = { tex: { tags: "ams", }, }; </script>
<script async='async' id='MathJax-script' src='https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js' type='text/javascript'></script>
</head><body>
<!-- l. 9 --><p class='noindent'>\[ \frac {\partial u}{\partial x}=0 \]
</p>
</body>
</html>
=====================
Which renders correctly. I will soon start a full build on a
large file which takes 9 hrs to finish compiling and check
again also.
Best regards
--Nasser
More information about the tex4ht
mailing list.