[Tex/LaTex] How to set different line spread for table of contents than the rest of document

line-spacingtable of contents

I am writing my final paper on university, and we have to use double line spread and Times New Roman.
If I set \linespread{1.6} in the preamble everything is fine, except that in the table of contents \sections get huge spacings. If I set the line spread after the \tableofcontents tag noting happens, line spread remains normal.

Is there any possibility to keep normal line spread in the TOC only?

Best Answer

You can use the featrures provided by the setspace package:

\documentclass{article}
\usepackage{setspace}

\doublespacing

\begin{document}

\begingroup
\singlespacing
\tableofcontents
\endgroup

\section{Section One}
\section{Section Two}
\section{Section Three}
\section{Section Four}
\section{Section Five}

\end{document}

or

\documentclass{article}
\usepackage{setspace}

\begin{document}

\tableofcontents

\doublespacing

\section{Section One}
\section{Section Two}
\section{Section Three}
\section{Section Four}
\section{Section Five}

\end{document}
Related Question