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

Jagath AR jagathar at gmail.com
Wed Jul 24 14:45:05 CEST 2013

Hi Nasser,
You can try any of the following two methods in my.cfg:

Method 1:

1. Change three "<li>" to "<dd>".
2. Change "<ul>" and "</ul>" to "<dl>" and "</dl>" respectively.

Note: <dl> is used for definition list. <ul> is un-ordered list.

Method 2:

You can also correct this by adding css style. For this you need to change
'<ul>' to '<ul style="list-style-type:none;">'.

Can you try this.

Regards,
Jagath

On 24 July 2013 15:22, Nasser M. Abbasi <nma at 12000.org> wrote:

>
> 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<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
>
> 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<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
>       \loop
>         \csname level\the\c\endcsname
>         \expandafter\let \csname level\the\c\endcsname\relax
>       \ifnum \c<10   \repeat
>    }
> ------------
>
> Is it possible to modify the above to just remove those black dots and
> the white dots that show up in the table of content?
>
> thanks,
> --Nasser
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex4ht/attachments/20130724/8b3b57fc/attachment.html>