[tex4ht] [bug #518] serious bug with \PauseCutAt

Nasser M. Abbasi puszcza-hackers at gnu.org.ua
Fri Aug 27 15:55:06 CEST 2021


                 Summary: serious bug with \PauseCutAt
                 Project: tex4ht
            Submitted by: nma123
            Submitted on: Fri Aug 27 16:55:05 2021
                Category: None
                Priority: 5 - Normal
                Severity: 7 - Important
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any



This is an old bug, but thought to submit an official bug report on it. 

First email on this bug was in April 2020 


Here is again the bug description. 

I'd like to split an HTML page at level 3. But also have a local toc for each
chapter and each section generated.

The problem comes when pausing the cut for some chapters, and then resuming
the cut at other chapters. i.e. have one chapter and its sections and
subsections be on one HTML page, but for the rest of the chapters, to resume
cutting, i.e. split the HTML page, so that level 3 is now effective again.  

The problem is that local TOC does not work when pausing and resuming the
cutting. tex4ht gives error.  

Here is MWE and the command to produce the problem


\TocAt{chapter,section} %show sections in chapter TOC
\TocAt{section,subsection}%show subsections in section TOC

%chapter where we do not want to split the pages. i.e. want
%the whole chapter to be on ONE HTML page


\section{my section}
\subsection{my subsection}

%chapter where we want to split the pages to the level given


\chapter{second chapter}
\section{my another section}
\subsection{my another subsection}

Compiling with

make4ht -ulm default -a debug foo2.tex "mathjax,htm,3,notoc*"


(/usr/local/texlive/2021/texmf-dist/tex/latex/base/ts1cmr.fd) [1] [2]
Chapter 1.
(./foo2.4ct) (/usr/local/texlive/2021/texmf-dist/tex/latex/lm/ot1lmtt.fd)
(./foo2.4ct) (./foo2.4ct
! Missing number, treated as zero.
<to be read again>
l.3 ...sname{2}{x2-20001.1}{QQ2-2-2}{my section}}{3}

The fix is either to change the command to use level 2, instead of level 3 or
not NOT to use \PauseCutAt in first place. So this works:

make4ht -ulm default -a debug foo2.tex "mathjax,htm,2,notoc*"

But I'd like to use level 3 and not level 2. So the other choice is NOT to use
\PauseCutAt{section} if I want to still have toc printed and also use level

It will be  nice if one can use \PauseCutAt{section} with level 3 and also
have local TOC. 

Again, this problem only shows up when using \TocAt{section,subsection}

if one is not using \TocAt, then there is no problem using \PauseCutAt and
\ContCutAt with any level.  So the bug seems to be in \TocAt handling.

TL 2021



Reply to this item at:


  Message sent via/by Puszcza

More information about the tex4ht mailing list.