[Tex/LaTex] How to get just the table of contents to take the full page width

marginstable of contentstemplates

I am using the template provided from http://hci.rwth-aachen.de/karrer_thesistemplate for my master thesis. The template is built so that there are margin notes at each page and is using the book class, so the text in any page is only taking around 60%.

This is good for me but the problem is with the table of contents. Since there are no margin notes I would like to have the contents taking the whole width of the page. How do I do this for just the table of contents?

Best Answer

In your main file, load the geometry package before including the file i10preamble:

\usepackage{geometry}
\include{i10preamble}

and then add the following lines:

\makeatletter
\renewcommand\tableofcontents{%
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
   \newgeometry{textwidth=14cm}
    \chapter*{\contentsname
        \@mkboth{%
           \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
    \@starttoc{toc}%
    \if@restonecol\twocolumn\fi
    \restoregeometry
    }
\makeatother

The idea is to define a new geometry for the ToC and then to restore the default values.

Related Question