[tex4ht] How to make table of contents use correct settings of \setcounter{tocdepth} for \tableofcontents ?

Radhakrishnan CV cvr at river-valley.org
Sun Aug 11 15:42:11 CEST 2013


On Sun, Aug 11, 2013 at 6:04 PM, Radhakrishnan CV <cvr at river-valley.org>wrote:

> On Sun, Aug 11, 2013 at 1:45 PM, Nasser M. Abbasi <nma at 12000.org> wrote:
>
>> On 8/11/2013 1:36 AM, Radhakrishnan CV wrote:
>>
>>
>>> I think, the following might help you:
>>>
>>
>> Thanks you very much. Yes, that worked very well.
>>
>> For completion, I  have a MWE below which generates a local TOC
>> for one chapter which is larger than the second local TOC for
>> the second chapter, both for pdflatex and htlatex.  The main
>> page TOC only shows the chapters in its TOC.
>>
>> ps. If you would have any hints or insight for the splitting problem
>> http://tug.org/pipermail/**tex4ht/2013q3/000860.html<http://tug.org/pipermail/tex4ht/2013q3/000860.html>
>>
>
>
Here is a more comprehensive example which helps to understand
\PauseCutAt{...} and \ContCutAt{...} to pause splitting and again continue
splitting once it is paused.

\documentclass{report}
\setcounter{tocdepth}{0}
\setcounter{secnumdepth}{4}
\usepackage{lipsum}

\begin{document}

\title{test cutat}
\author{me}
\date{\small\today}
\maketitle
\Configure{tableofcontents*}{chapter}

\tableofcontents

%---------------------
\ifx\HCode\undefined \else
\TocAt{chapter,section,subsection,subsubsection}
\fi
\chapter{chapter 1}
\lipsum[10]

\section{section 1 in chapter 1}
\lipsum[2]
\subsection{subsection 1 in section 1 in chapter 1}
\lipsum[3]
\subsection{subsection 2 in section 1 in chapter 1}
\lipsum[4]
\subsubsection{subsubsection 1 subsection 2 in section 1 in chapter 1}
\lipsum[5]

\section{section 2 in chapter 1}
\lipsum[3]
\subsection{subsection 1 in section 2 in chapter 1}
\lipsum[7]
\subsection{subsection 2 in section 2 in chapter 1}
\lipsum[8]
\subsubsection{subsubsection 1 subsection 2 in section 1 in chapter 1}
%----------------

\ifx\HCode\undefined \else
\TocAt{chapter,section}
\PauseCutAt{section}
\fi

\chapter{chapter 2}
\lipsum[12]
\section{section 1 in chapter 2}
\lipsum[1]
\subsection{subsection 1 in section 1 in chapter 2}
\lipsum[2]
\subsection{subsection 2 in section 1 in chapter 2}

\ContCutAt{section}
\chapter{chapter 3}
\lipsum[12]
\section{section 1 in chapter 3}
\lipsum[1]
\subsection{subsection 1 in section 1 in chapter 3}
\lipsum[2]
\subsection{subsection 2 in section 1 in chapter 3}

\section{section 2 in chapter 3}
\lipsum[1]
\subsection{subsection 1 in section 2 in chapter 3}
\lipsum[2]
\subsection{subsection 2 in section 2 in chapter 3}

\end{document}

-- 
Radhakrishnan
River Valley<https://maps.google.com/maps?q=River%20Valley,%20Thiruvananthapuram%20Neyyardam%20Road,%20Kerala,%20India&vector=1>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex4ht/attachments/20130811/d7aac894/attachment.html>


More information about the tex4ht mailing list