Featured Book

LaTeX Beginners Guide

Who is online

In total there are 22 users online :: 2 registered, 0 hidden and 20 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: Bing [Bot], Google [Bot] and 20 guests

Partner Sites

TeXwelt - Fragen und Antworten goLaTeX
TeXblog
TeXnicCenter
TeXample

Modify Table of Contents: Reduce Spacing Between Lines?

Add tags LaTeX specific issues not fitting into one of the other forums of this category.

Modify Table of Contents: Reduce Spacing Between Lines?

Postby douglastoy on Mon Apr 27th, 2009

My table of contents is rather large and I would like to reduce the space it takes up without sacrificing any of its content.

Is there any way to reduce the spacing between the lines of the TOC i.e. reduce the vertical distance between lines? Are there any packages that can achieve this? For example, I'm looking for something similar to the \begin{enumerate*} command which reduces the vertical spacing in lists.

Thanks in advance
douglastoy
 
Posts: 7
Joined: Mon Apr 6th, 2009

Re: Modify Table of Contents: Reduce Spacing Between Lines?

Postby Stefan_K on Mon Apr 27th, 2009

Hi,

you could use the setspace package. Its documentation is contained in the file setspace.sty.

Stefan
LaTeX Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6330
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Re: Modify Table of Contents: Reduce Spacing Between Lines?

Postby douglastoy on Mon Apr 27th, 2009

Thanks Stefan, spot on. Here's I'm doing things now...
Code: Select all  •  Open in writeLaTeX
\documentclass[11pt,a4paper]{report}
...
\usepackage{setspace}
...
\begin{document
}
%\setcounter{tocdepth}{1}     (Could use this to shorten things further)
\begin{spacing}{0.1}
\tableofcontents
\listoffigures
\listoftables
\end{spacing
}


And Voila! Shorter Table of Content, List of Figures and List of Tables. Found lots of useful information for squeezing more into my document here:

http://www.eng.cam.ac.uk/help/tpl/textprocessing/squeeze.html

Thanks for your help.
douglastoy
 
Posts: 7
Joined: Mon Apr 6th, 2009

Re: Modify Table of Contents: Reduce Spacing Between Lines?

Postby veerle on Fri May 1st, 2009

Hy all,

I'm new here on this forum!
I had also a problem with reducing spacing between lines
I've tried

\begin{spacing}{0.1}
\tableofcontents
\end{spacing}

If you put this just after \begin{document} it works very well! But I have first the title of my thesis and a 'word before' (I don't know the word in English, sorry), and when I than put :

\begin{spacing}{0.1}
\tableofcontents
\end{spacing}

It doesn't work anymore!! Has somebody a solution??

I have another problem too in my table of contents, for my chapters I'm using Roman numbers, so i get for example VIII Appendix; but in my table of contents the A from appendix is on the I van VIII, it overlaps! Can somebody help me with that? It would be very nice!!!!

bye bye!
veerle
 
Posts: 16
Joined: Fri May 1st, 2009

Re: Modify Table of Contents: Reduce Spacing Between Lines?

Postby Stefan_K on Fri May 1st, 2009

Hi veerle,

welcome to the board!
Is there just no effect or do you get an error message?

To fix the other problem you could adjust \@pnumwidth, for example
Code: Select all  •  Open in writeLaTeX
\makeatletter
\renewcommand*\@pnumwidth{3em}
\makeatother

Or use the tocloft package.

Stefan
LaTeX Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6330
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Re: Modify Table of Contents: Reduce Spacing Between Lines?

Postby veerle on Sat May 2nd, 2009

Thanks Stefan!
I don't get an error but nothing changes... It's very weird, when I put it just after \begin{document} it works, but otherwise not...

Also the following doesn't work, I don't get an error but again, nothing changes...
\makeatletter
\renewcommand*\@pnumwidth{3em}
\makeatother

I was planning to use the tocloft-package, but unfortunately when I write:
\usepackage{tocloft} then after the compilation I get two errors:
command c@lotdepth already defined
What's this?

Thank you in advance!!
veerle
 
Posts: 16
Joined: Fri May 1st, 2009

Re: Modify Table of Contents: Reduce Spacing Between Lines?

Postby Stefan_K on Sat May 2nd, 2009

Hi veerle,

veerle wrote:I was planning to use the tocloft-package, but unfortunately when I write: \usepackage{tocloft} then after the compilation I get two errors: command c@lotdepth already defined


there's a conflict between tocloft and subfigure. If you are using the subfigure package then write
Code: Select all  •  Open in writeLaTeX
\usepackage[subfigure]{tocloft}

and tocloft will fix it.

Stefan
LaTeX Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6330
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Re: Modify Table of Contents: Reduce Spacing Between Lines?

Postby veerle on Sat May 2nd, 2009

Thx, but it still doesn't work , no I get again two errors:

\l@subfigure undefined
\l@subtable undefined

Maybe another package which is causing a conflict?
THX!!!
veerle
 
Posts: 16
Joined: Fri May 1st, 2009

Re: Modify Table of Contents: Reduce Spacing Between Lines?

Postby Stefan_K on Sat May 2nd, 2009

veerle wrote:Maybe another package which is causing a conflict?

Possibly, perhaps I will see it if you would post your document preamble showing at least the packages loaded.

Stefan
LaTeX Community Administrator
User avatar
Stefan_K
Site Admin
 
Posts: 6330
Joined: Mon Mar 10th, 2008
Location: Hamburg, Germany

Re: Modify Table of Contents: Reduce Spacing Between Lines?

Postby veerle on Sat May 2nd, 2009

Here you are:

\documentclass[11pt,a4paper]{report}

\usepackage[small,bf,hang]{caption2}
\usepackage{a4wide}
\usepackage[dutch]{babel}


\addto\captionsdutch{%
\renewcommand\chaptername{}}

\usepackage{amsmath}
\usepackage{url}
\usepackage{graphicx}
\usepackage[latin1]{inputenc}
\usepackage{xspace}
\usepackage{fancyhdr}
\setlength{\parindent}{0cm}
\setlength{\parskip}{2.3ex plus 0.3ex minus 0.3ex}
\renewcommand{\baselinestretch}{1.2}
\renewcommand{\arraystretch}{1.2}

\usepackage[version=3]{mhchem}

\usepackage[round]{natbib}
\bibliographystyle{bibliodutch}
\usepackage[nottoc]{tocbibind}

\newcommand{\ch}[1]{\ensuremath{\mathrm{#1}}\xspace}
\newcommand{\chpijlr}{\ensuremath{\hspace{1em}\longrightarrow\hspace{1em}}}
\newcommand{\chpijll}{\ensuremath{\hspace{1em}\longleftarrow\hspace{1em}}}
\newcommand{\chpijllr}{\ensuremath{\hspace{1em}\longleftrightarrow\hspace{1em}}}

\usepackage{relsize}
\usepackage{array,multicol,fancyhdr,times}
\usepackage[subfigure]{tocloft}
\usepackage{flafter}
\usepackage{float}
\usepackage{setspace}
veerle
 
Posts: 16
Joined: Fri May 1st, 2009

Next

Return to General

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 20 guests