URL: <http://puszcza.gnu.org.ua/bugs/?518>
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 _______________________________________________________ Details: This is an old bug, but thought to submit an official bug report on it. First email on this bug was in April 2020 https://tug.org/pipermail/tex4ht/2020q2/002474.html 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 %--------------- \documentclass[12pt]{book} \begin{document} \ifdefined\HCode \TocAt{chapter,section} %show sections in chapter TOC \TocAt{section,subsection}%show subsections in section TOC \fi %%%%%%%%%%%%%%%% %chapter where we do not want to split the pages. i.e. want %the whole chapter to be on ONE HTML page \ifdefined\HCode \PauseCutAt{section} \fi \chapter{Introduction} \section{my section} \subsection{my subsection} stuff %chapter where we want to split the pages to the level given \ifdefined\HCode \ContCutAt{section} \fi \chapter{second chapter} \section{my another section} \subsection{my another subsection} stuff \end{document} %---------------------- Compiling with make4ht -ulm default -a debug foo2.tex "mathjax,htm,3,notoc*" gives (/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> \TitleCount l.3 ...sname{2}{x2-20001.1}{QQ2-2-2}{my section}}{3} \relax 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 3. 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 Thanks --Nasser _______________________________________________________ Reply to this item at: <http://puszcza.gnu.org.ua/bugs/?518> _______________________________________________ Message sent via/by Puszcza http://puszcza.gnu.org.ua/