I have long chapter and section titles in my document, so titles in the table of contents do not fit into one line. I have two problems regarding with this:

  1. When the second line starts, i need to indent it to the right a bit, but i do not know how.
  2. When a chapter title is too long to fit in one line, the line continues till the margin of the page numbers. I need this line to cut before the page number box, leaving this space empty and continue with the second line.

Here is an example:

    Some text here 
  \section{Table of Contents, List of Figures, List of Tables and List of Symbols/Abbreviations} 
  Some more text 

The style package is provided to me and here is the part relevant to the toc.

% Table of Contents
\renewcommand\contentsname{TABLE OF CONTENTS}
\renewcommand\tableofcontents{% \ev is used for temporary storage of \parskip
% A line as 'TABLE OF CONTENTS' must not appear in the
% Table of Contents. Hence we reproduce the \chapter* here except that
% no entry is put into the toc file.
     \clearpage  \global\@topnum\z@
      { \normalfont
       \large \bfseries  \contentsname\par\nobreak
       \vskip21pt \vskip0.8\baselineskip
% FBE style TOC does not have bold lines.
  \ifnum \c@tocdepth >\m@ne
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \hskip -\leftskip
      #1\nobreak\leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern \@dotsep
       mu$}\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
% The spacing of the TOC lines has been redefined.
  • Maybe your question is answered here. (Possible duplicate?) Nov 8, 2010 at 9:06
  • It looks similar but i do not have any problem with my page numbers, they are all placed right. However, for the 2nd example given there my second line is shifted to left, and when the title is broken into two lines, the first line continues till where the page number should have been.
    – Basak
    Nov 8, 2010 at 11:56
  • I get this output. Except for the slightly overfull hbox, can you please specify what you don't like about it? Nov 10, 2010 at 15:11
  • Actually this is the result i have intended to get. So, I think there is a conflict in my sty file which can be found here: dl.dropbox.com/u/9471314/fbe_tez.sty
    – Basak
    Nov 11, 2010 at 12:40

2 Answers 2


You could use the tocloft package to customize the table of contents. It provides commands to modify indentation and page number width. Have a look at the documentation (texdoc tocloft or follow the link to CTAN), search for the macros \cftXindent and \cftXnumwidth for instance.

Without tocloft it may be a bit harder, for instance by adjusting \@pnumwidth like mentioned in The format of the Table of Contents in the TeX FAQ.


Without a complete example which (beside other informations) would at least show the class you are using you first question can't be answered in a senseful way. Regarding your second question my cristal ball tells me that you should use hyperref with the option linktocpage. See also https://texfaq.org/FAQ-breaklinks

  • I tried to improve the question, added an example and a part of the style file. Hope this would be more clear.
    – Basak
    Nov 10, 2010 at 6:58
  • There is no sensible breakpoint, so you get an overful hbox. You could try to add some stretchable space to \rightskip in \l@chapter e.g. \rightskip \@pnumwidth plus 2em Nov 10, 2010 at 10:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .