[tex4ht] Why tex4ht produces ", for \, instead of space in mathjax mode only?

Nasser M. Abbasi nma at 12000.org
Sun Apr 21 00:22:22 CEST 2019


I noticed something very strange. In my latex code I have \, in few
places, and these produce   ",  when compiled in Mathjax only instead
of a little extra white space as expected.

I am using \, in text mode, not in math mode.  Here is MWE

=========================
\documentclass{article}
\begin{document}

test

test \,
\end{document}
===========================

Compiled with

make4ht foo.tex "mathjax"

Gives

<!--l. 5--><p class="noindent" >test</p><!--l. 7--><p class="indent" >   test “,</p>

But when compiled with

make4ht foo.tex

Gives correct output, without the extra ", stuff

<!--l. 5--><p class="noindent" >test</p><!--l. 7--><p class="indent" >   test</p>

I can change \, with something else to get that little extra white space
I needed, but why does mathjax mode do this? Is this an issue with
mathjax itself or with tex4ht translation?

Here is the FULL HTML for the mathjax output if needed

=============================
<!DOCTYPE html>
<html lang="en-US" xml:lang="en-US" >
<head><title></title>
<meta  charset="iso-8859-1" />
<meta name="generator" content="TeX4ht (http://www.tug.org/tex4ht/)" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" type="text/css" href="foo.css" />
<meta name="src" content="foo.tex" />
  <script type="text/x-mathjax-config"> MathJax.Hub.Config({ 'fast-preview': {disabled: true},
TeX: { extensions: ["color.js","AMSmath.js"], equationNumbers: { autoNumber: "AMS" } },
extensions: ["tex2jax.js"], tex2jax: {  inlineMath: [ ["\\\(","\\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ], processEscapes: true, processEnvironments: true } });
</script>

<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>

</head><body >
<!--l. 5--><p class="noindent" >test
</p><!--l. 7--><p class="indent" >   test “,
</p>
     
</body>
</html>
================================
Using TL 2018 on Linux.
Thanks
--Nasser


More information about the tex4ht mailing list