[tex4ht] big problem with table of content when section titles contain math using mathjax

Nasser M. Abbasi nma at 12000.org
Tue Oct 30 13:50:17 CET 2018


On 10/30/2018 4:45 AM, Michal Hoftich wrote:
> Hi Nasser,
> 
>> Does one need to modify something in the mathjax-latex-4ht.sty to
>> make the TOC show OK? Do I need to modify something in my Latex to
>> make it work with mathjax?
> 
> This is the same issue as you had with \left and \right in TOC some
> time ago. The \int and \, commands must be redefined to not expand in
> TOC. I've updated mathjax-latex-4ht and created new command:
> \fixmathjaxtoc. It takes command name as an argument and redefines it
> so it doesn't expand.  You can use it in your .cfg file in this way:
> \fixmathjaxtoc\int. But you should let me know about unsupported
> commands anyway, as I should fix the sources as well.
> 
> Best regards,
> Michal
> 

Thanks Michal;

Your new style file fixed some of the problems in the TOC,
but I see few other entries in the TOC still have problems
when I run it on my main file (not the MWE I gave)

I guess these needs to be added to \fixmathjaxtoc.

btw, I did not have to do anything to my .cfg? I just needed to
download your new style file which has this command in it.

I now running the full build and will make list of all
these commands that needs to be added.

There is over 70,000 entries in the TOC spreads of hundreds of
web pages anbd it takes days to compile, so it will take me
sometime to make a list of all of them and give it to you.

For example on one file, I get now this TOC in HTML (using
your new updated style file). You can see some still needs
to be fixed

https://www.12000.org/tmp/102918/screen_shot_mathjax_2.jpg

While the same file using svg looks like this

https://www.12000.org/tmp/102918/screen_shot_svg.jpg

Thanks again for your help.
--Nasser


More information about the tex4ht mailing list