[texhax] tableofcontents

Tim McKenzie tjm1983 at gmail.com
Sat Jul 12 01:08:05 CEST 2008

2008/7/12 Loeghmon T. Nejad <loeghmon at gmail.com>:
> What is the best way to organize table of contents in the following
> form(example):
> Charles Dickens
>        Tale of Two Cities
>         Oliver Twist
>         etc.
>         etc.
> William Shakespeare
>          Othello
>          Macbeth
>          etc.
>          etc.
> Writer One
>          work 1
>          work2

I'm in the middle of trying to typeset Dostoevsky's The Brothers
Karamazov, which requires something similar: The novel contains four
parts and an epilogue; each part contains three books; and each book
contains a number of chapters (as does the epilogue). (To further
complicate things, the books are numbered 1--12, but the chapter
numbers start at 1 again for each book.)

It's been a while since I organized the table of contents, but it
looks like I've done this:

\providecommand*{\toclevel at mypart}{0}
\providecommand*{\toclevel at book}{1}
\providecommand*{\toclevel at mychapter}{2}





  \sethead[\thepage][][\small\bfseries\sffamily The Brothers
Karamazov: \booktitle]

\thecontentslabel: }{}{}

I seem to remember that the documentation for titilesec and titletoc
helped me a lot, so it's worth a look.


More information about the texhax mailing list