TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I run the following file through htlatex main html,4, the first (main) page has a table of contents that is too deeply nested. I only need part,chapter and section in my toc. The section page should have the subsection in it. How to get rid of the subsection in the first page?

\part {First part}
\chapter{A chapter}
\section{A section}
\subsection{A subsection}
\section{A section}
\subsection{A subsection}
share|improve this question
Did you try with htlatex main html,3? – egreg Feb 14 '12 at 15:07
@egreg when I read your comment, I realized that my question was wrong. I only want to get rid of the subsection, when the level is the part level. – topskip Feb 14 '12 at 16:02

Appereance of toc entries can be controlled with \ConfigureToc. When its parameters are empty, this toc level will be not print. Try this private config file


Save as pg.cfg and run htlatex file "pg,4"

share|improve this answer
That is the appearance only. I need to limit the entries in the part,chapter and section pages. – topskip Feb 15 '12 at 10:59
up vote 2 down vote accepted

What worked for me (although it doesn't answer the question directly) is the following in the config file:


This limits the listed items of a "part" page to chapter and section and on a "chapter" page to section.

The first page is not affected however, but I got rid of it anyway.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.