[tex4ht] using verbatim fails on some content when using mathjax mode

Nasser M. Abbasi nma at 12000.org
Thu May 21 12:13:02 CEST 2020


On 5/21/2020 4:58 AM, Michal Hoftich wrote:
> Hi Nasser,
> 
>> catdvi -e 1 -U index.dvi | sed -re "s/\[U\+2022\]/*/g" | sed -re "s/([^^[:space:]])\s+/\1 /g" > index.txt
> 
>> It seems mathjax issue? How to tell mathjax not to look inside verbatim class?
>>
>> When not using mathjax mode, there is no problem at all. Here
>> is the raw HTML in this case
>>
> 
> I think MathJax interprets this string: /\[U\+2022\] as math
> environment.  I hope it can be fixed using some MathJax configuration,
> but I am not MathJax expert :)
> 

No problem Michal. I compiled this one file using svg mode and it works fine.
svg always works. I would use it all the time, except it is slower
than using mathjax and generates much larger size build.

But I wonder, there must be a way to tell mathjax not to look
inside verbatim in HTML. Even HTML itself has verbatim environment:

https://stackoverflow.com/questions/16783708/how-to-display-raw-html-code-in-pre-or-something-like-it-but-without-escaping-it/16785992

================================
<pre><![CDATA[
This is a demo, tags like <p> will
appear literally.
]]></pre>
==========================

If Mathjax tries to look at each byte in the HTML page regardless of where
this byte is and tries to interpret it as mathematics, this for me
is a very strange way to do it.

But I am OK now. This was just one old file I was compiling.

regards,
--Nasser


More information about the tex4ht mailing list.