# [tex4ht] How to increase spacings/indentation in table of content for generated HTML?

Nasser M. Abbasi nma at 12000.org
Wed Jul 24 11:52:30 CEST 2013

The toc generated by tex4ht, in HTML, has too small horizontal
indentation between different levels.

I'd like the next level to be a little more indented away. i.e.
same way as it appears in the toc generated by pdflatex.

Looking around, I found this

http://compgroups.net/comp.text.tex/table-of-contents-format-with-tex4ht/1909545

with a nice solution by Eitan which I used and it works, except it has
bullets added to each entry. (please see screen shot below)

I tried to understand the code and remove these bullets while keeping
the better indentation now, but I do not understand how the code works.

To make it clear, here is a screen shot

http://12000.org/tmp/072413/tex4ht_toc.png

The top pic shows the default toc. As you can see, the indentation
is too small (between say section and subsection, etc....)

12. section
--12.1 subsection

I'd like to see something like

12. section
----12.1 subsection

The second pic, is the pdf toc.

The 3rd is the result of using Eitan code. And again, I'd like
to ask if there is a way to modify his code, or use different way
or option, to make the indentation larger.

Here is the code btw, just to be clear, it is in the above link also.

----- my .cfg -----
.....
\begin{document}
\ConfigureToc{section}
{\tocNesting{1}\HCode{<li>}}{ }{}{ }
\ConfigureToc{subsection}
{\tocNesting{2}\HCode{<li>}}{ }{}{ }
\ConfigureToc{subsubsection}
{\tocNesting{3}\HCode{<li>}}{ }{}{ }
\Configure{tableofcontents}
{} {\tocNesting{0}} {} {} {}

\newcount\c
\def\tocNesting#1{%
\expandafter\ifx \csname level#1\endcsname\relax
\ifnum #1>0 \HCode{<ul>}\fi
\expandafter\def \csname level#1\endcsname{\HCode{</ul>}}
\fi
\c=#1 \advance\c by 1
\loop
\csname level\the\c\endcsname
\expandafter\let \csname level\the\c\endcsname\relax