[tex4ht] Does secnumdepth work in TeX4ht?
Radhakrishnan CV
cvr at river-valley.org
Sun Oct 31 11:48:00 CET 2010
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex4ht/attachments/20101031/0bd1343b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: thomas1.tex
Type: application/octet-stream
Size: 816 bytes
Desc: not available
URL: <http://tug.org/pipermail/tex4ht/attachments/20101031/0bd1343b/attachment.obj>
More information about the tex4ht
mailing list