[tex4ht] bug with latest update to texlive using tex4ht with caption package

Nasser M. Abbasi nma at 12000.org
Tue Mar 17 03:11:54 CET 2020


fyi,

After doing full update of my TL 2019 last night, I found that
table of contents in chapters and sections in the HTML pages
are all corrupted. Either messing or point to wrong pages.

This happened only after I did the update to TL.

After many hrs debugging, I found this happens when using the
caption package with tex4ht.

The set up is an index.tex at top level, which then
imports latex files using \subimport from child folders.

At top level (index.tex) it has

\TocAt{chapter,section}
\TocAt{section,subsection}
\TocAt{subsection,subsubsection}

When using caption package \usepackage{caption} and then in one
of the child latex file do

\begin{figure}[H]
\includegraphics[width=0.62\textwidth]{example-image-a}
\caption{the Problem statement}
\end{figure}

Then compile the parent index.tex, the web pages that come
up have the TOC inside each page messed up or missing from
some pages. I use split 3.

Please find a zip file which include the above tree in this folder

https://www.12000.org/tmp/031620/

After downloading and unzipping the file, please find the
folder created and then cd to it and issue this
command (all on one line)

======================
make4ht -ulm default -a debug index.tex
    "htm,3,mathjax,notoc*,p-width,charset=utf-8" " -cunihtf -utf8"
=======================

And now looking at the generated index.htm file and clicking on say
a page such as last section HW 6 for example, shows empty TOC.

Commenting out the \usepackage{caption} in the index.tex file
and recompiling, now the TOC shows up.

The problem is not in the main TOC at front page, which comes out
OK, but the TOC's in the lower level HTML pages.

Strange that caption package will cause such problem in tex4ht.
I wonder what could cause this.

TL 2019 on Linux

>which make4ht
/usr/local/texlive/2019/bin/x86_64-linux/make4ht
>make4ht --version
make4ht version v0.3d

Thanks
--Nasser



More information about the tex4ht mailing list.