## tex4ht - Bugs: bug #518, serious bug with \PauseCutAt

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

## bug #518: serious bug with \PauseCutAt

 Submitted by: Nasser M. Abbasi Submitted on: Fri Aug 27 13:55:05 2021 Category: None Priority: 5 - Normal Severity: 7 - Important Status: None Privacy: Public Assigned to: None Open/Closed: Closed

Tue Sep 14 20:16:07 2021, comment #1:

Hi Nasser,

thanks for the reminder. I've fixed this issue in the TeX4ht sources.

Best regards,
Michal

Michal Hoftich <michal_h21>
Fri Aug 27 13:55:05 2021, original submission:

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

%---------------
\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.
\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

Nasser M. Abbasi <nma123>

No files currently attached

Depends on the following items: None found

Items that depend on this one: None found

Carbon-Copy List
• -unavailable- added by michal_h21 (Posted a comment)
• -unavailable- added by nma123 (Submitted the item)
•

Do you think this task is very important?
This task has 0 encouragements so far.

Only logged-in users can vote.

Please enter the title of George Orwell's famous dystopian book (it's a date):