On 31-Oct-2010, at 12:39 PM, Beuthe, Thomas wrote:

> Recently I noticed that my redefinition of secnumdepth
> was not working properly on a project being compiled with TeX4ht,
> so I made up a small example to show what seems to be going wrong.
>  
> If I input the following and compile it using "htlatex test_html_secnum":
>  
> \documentclass{report}
> \setcounter{secnumdepth}{6}
> \setcounter{tocdepth}{6}
> \begin{document}
> \tableofcontents
> \chapter{chapter}
> \section{section}
> \subsection{subsection}
> \subsubsection{subsubsection}
> \paragraph{paragraph}
> \subparagraph{subparagraph}
> \end{document}
>  
> The output is as follows:
>  
> Contents
> 1 chapter
>  1.1 section
>   1.1.1 subsection
>    1.1.1.1 subsubsection
>    1.1.1.1.1 paragraph
>      1.1.1.1.1.1 subparagraph
> Chapter 1
> chapter
> 1.1 section
> 1.1.1 subsection
> 1.1.1.1 subsubsection
> paragraph
> subparagraph 
>  
> 
> In other words, the redefinition of tocdepth seems to work,
> but the secnumdepth does go past 4.  Anyone know why this migth be happening?

You need to configure TitleMark of paragraph and subparagraph command 
since the defaults are configured to be null. The following will work fine:

\ConfigureMark{paragraph}
   {\HCode{<span class="titlemark">}%
     \theparagraph\HCode{</span>}}
\ConfigureMark{subparagraph}
   {\HCode{<span class="titlemark">}%
     \thesubparagraph\HCode{</span>}}

Also the following commands are also needed, since default configuration 
does not have \TitleMark in paragraph conf.

\Configure{paragraph}{}{}
  {\ShowPar\IgnoreIndent\HCode{<span class="paragraphHead">}%
    \begingroup\TitleMark\space}
  {\endgroup\HCode{</span>}\par\IgnorePar}
\Configure{subparagraph}{}{}
  {\ShowPar\IgnoreIndent\HCode{<span class="subparagraphHead">}%
    \begingroup\TitleMark\space}
  {\endgroup\HCode{</span>}\par\IgnorePar}

The test files renamed as thomas1.tex and thomas1.html are attached to this 
mail.

Best regards
-- 
Radhakrishnan

Contents

1 chapter
 1.1 section
  1.1.1 subsection
   1.1.1.1 subsubsection
   1.1.1.1.1 paragraph
     1.1.1.1.1.1 subparagraph

Chapter 1
chapter

1.1 section

1.1.1 subsection

1.1.1.1 subsubsection

1.1.1.1.1 paragraph

1.1.1.1.1.1 subparagraph

Attachment: thomas1.tex
Description: Binary data

Reply via email to