[Tugindia] Table of contents

Duvvuri Venu Gopal venugopal_duvvuri at rediffmail.com
Sun Jan 4 06:47:53 CET 2004



On Sun, 04 Jan 2004 Shailesh Ashok Shirali wrote :
>Hello, all
>
>Some time back I posted a query here on a problem I am having with the \tableofcontents macro. The problem is this: I find that in situations where the chapter number and the section number both run into double digits, the entry in the Contents page produced by the \tableofcontents macro is most unsatisfactory; I get something that looks like this:
>
>10.11More on conic sections
>
>(no gap between "10.11" and "More").
>
>I was advised to use the package "tocloft.sty". I have done this, and the results are OK. However I would prefer to have more control over the typesetting. How can the effect be achieved without tocloft?
>
>The "LaTeX Companion" suggests that the desired effect can be achieved by varying the settings of <indent> and <numwidth>. However my attempts to do so have proved unsuccesful. I get error messages like "Missing \begin{document}". If I put the \renewcommand after \begin{document} I get a most absurd result.
>
>I would be grateful for some advice on this matter.
>
>While I am at this, I must mention that I was studying the book "The Font Installation Guide" by Philipp Lehman and found the appearance of the Table of Contents very elegant indeed. Would anyone know what style package or macro was used to produce the effect?
>

Do you have the TeXLive 7 CD with you (the one given during TUG Conference at Trivandrum?). It contains two packages - titlesec.sty and titletoc.sty by Javier Bezos. The documentation is in /texmf/doc/latex/titlesec directory (a dvi file). With these two packages you can beautifully typeset the Section/Chapter Headings with various features (like in a box etc. etc.). The titletoc provides the features you desired in Table of Contents.

I am attaching the DVI file for ready reference.

Venu Gopal



More information about the tugindia mailing list