Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm new to latex, I'm thankful if someone can give me an example script to customize TOC that looks like

Chapter 1.XXXXXX (1-15)

1.1 Introduction 1.2 xxxxxxxx 1.3 xxxxxxxxxx 1.4 xxxxxxx ...............

Chapter 2.xxxxxxx

2.1 xxxxx ...... (16-30)

because the (default) TOC appears to be very large for my book, since it arranges the section name row-by-row.

share|improve this question

2 Answers 2

An easy way to save space would be typesetting the table of contents in two or more columns. I've seen that some times, but I don't remember any book lining up several section titles in a row.

If you choose to typeset in two or more columns, that can be done easily using the multitoc package. You may use even more columns than the default two. Have a look at the documentation for an example.

Simply adding

\usepackage[toc]{multitoc}

would already show the table of contents in two columns. And, for example, add

\renewcommand*{\multicolumntoc}{3}

if you wish to have three columns.

share|improve this answer
    
A good example of a 'compact' table of contents is the titlesec and titletoc documentation. It can be a good alternative to use this style rather than the multitoc. –  Yiannis Lazarides Dec 3 '10 at 10:33
    
@Yiannis: thank you for the tipp! –  Stefan Kottwitz Dec 3 '10 at 15:21
    
.. and thanks to you for your countless tips! –  Yiannis Lazarides Dec 4 '10 at 14:46

As already mentioned an example derived from the titlesec/titletoc manual.

\documentclass[11pt,a4paper,english]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[includeheadfoot,margin=2cm]{geometry}
\usepackage[raggedright]{titlesec}
\usepackage{titletoc}
\usepackage{blindtext}

\titlecontents*{section}[1.5em]{\small}{\thecontentslabel. }{}{, \thecontentspage}[ --- ]
\setcounter{tocdepth}{1}

\begin{document}
  \tableofcontents

  \Blinddocument
\end{document}

As always, the blindtext package is only for creating dummy text thus not part of the solution.

share|improve this answer
    
This is a good solution. –  Yiannis Lazarides Dec 3 '10 at 10:48
    
Thank you very much for the solution. Now i can use this with some modification. Again is it possible to customize the page no. to specify the range, like (2-12). i.e, first and last page no. of the chapter. –  Geevar C Z Dec 8 '10 at 6:09
    
At the moment I'm not aware of such a solution. –  Thorsten Donig Dec 8 '10 at 17:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.