[tex4ht] [bug #468] texh4t produces bad table of content when some math is used with mathjax mode

Nasser M. Abbasi puszcza-hackers at gnu.org.ua
Sun May 31 02:15:03 CEST 2020


URL:
  <http://puszcza.gnu.org.ua/bugs/?468>

                 Summary: texh4t produces bad table of content when some math
is used with mathjax mode
                 Project: tex4ht
            Submitted by: nma123
            Submitted on: Sun 31 May 2020 03:11:31 AM EEST
                Category: None
                Priority: 5 - Normal
                Severity: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Reference

https://tex.stackexchange.com/questions/547131/texh4t-produces-bad-table-of-content-when-some-math-is-used-with-mathjax-mode

I noticed when I have some math in section names, sometimes the table of
content is corrupted, even though the same math displayed OK in the body of
the section.

Here is a MWE
==========================
\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\tableofcontents
\section{bad section $\sum\limits_{i=1}^n \frac{1}{(x (n-i)+i)^2}$} 
This is my section

$\sum\limits_{i=1}^n \frac{1}{(x (n-i)+i)^2}$

\section{good section $\sin(x)$} 
This is my section

$\sin(x)$
\end{document}
======================

Compiled using 

   make4ht -ulm default  foo3.tex "htm,mathjax" 

gives screen shot shown in link above.

When compiled not using mathjax mode, the table of content is correct.

The \DOTSB seems to be generated by tex4ht and not mathjax, since the raw HTML
shows this

=====================
<span class="sectionToc" >1 <a 
href="#x1-20001" id="QQ2-1-2">bad section \(\DOTSB \sum@ \slimits@ \limits
_{i=1}^n \frac{1}{(x (n-i)+i)^2}\)</a></span>
<br /> 
=======================

Why does tex4ht generate this extra \(\DOTSB and how to remove it?

Using TL 2020.

(base) >make4ht --version
make4ht version v0.3e







    _______________________________________________________

Reply to this item at:

  <http://puszcza.gnu.org.ua/bugs/?468>

_______________________________________________
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/


More information about the tex4ht mailing list.