# Make footnotesep same as line spacing using custom thesis class

I'm starting to write my thesis using a custom (and incredibly old) thesis style that has been doing the rounds in my university (UCL). It seems as if it was originally written by a professor of the Computer Science department, but since it is the only one around, it has since been adapted by various people in different departments generating what I imagine is a rather daunting variety of versions in different places.

Anyway, my problem is with the spacing of footnotes.

In brief, the problem is that the spacing of the lines within a footnote is not the same as the spacing between different footnotes, with the result that two footnotes on the same page, at least one of which has more than one line, has an irregular line spread.

Here's a MWE:

\documentclass{ucl_thesis}

\begin{document}

Some text.
\footnote{A short footnote on one line.}

Some more text.
\footnote{A longer footnote so that it spans multiple lines.
A longer footnote so that it spans multiple lines.
A longer footnote so that it spans multiple lines.}

\end{document}


In order to compile it you'll need two files: ucl_thesis.cls and ucl_a4.sty.

## What I've done

The part in ucl_thesis.cls that modifies the line spacing is on line 106:

\renewcommand \baselinestretch{1.5}


and according to this answer by @jon, "this is usually not recommended" since "LaTeX provides \linespread, which is probably better to use". However, changing the line quoted above into

\setlength{\footnotesep}{1.5\baselineskip}%


as per his answer did not solve the problem: the spacing between footnotes was now too big.

Before I start manually adjusting this until the error was too small for me to see, I thought I'd ask here.

• Try \setlength{\footnotesep}{\baselineskip}. Otherwise, the .cls requires looking at. – jon Sep 12 '13 at 17:09
• I forgot about that, but yes: I had tried that before as well. The result is definitely better (close enough for me to have got excited at first), but that still leaves footnotesep a little too big. If nothing better comes along this will have to do, but it would be nice to find a proper solution. For the record, I have close to zero confidence on that .cls file: it's from 1996! – jja Sep 12 '13 at 17:15
• \setlength{\footnotesep}{0.845\baselineskip} seems to give the best results... – jja Sep 12 '13 at 17:21
• I think that's too much. But you can add a background grid to make the examination easier: \usepackage{xcolor}\usepackage[grid, gridunit=bp, gridcolor=red!20, subgridcolor=blue!20]{eso-pic} – jon Sep 12 '13 at 17:45

(This answer assumes you want more than single spacing in your footnotes, which is not usually considered to look very nice, but is often required by university 'style'-setters.)

The thing is this: your class sets (on line 106)

\renewcommand \baselinestretch{1.5}


Now, if you are using the default 10pt, that means the footnote font size is 8pt with a baselineskip of 9.5pt. We're stretching that by 1.5. 9.5 x 1.5 = 14.25pt.

Test this by adding

\the\baselineskip


in a footnote. You should get 14.25pt.

Now setting (as I had suggested)

\setlength{\footnotesep}{\baselineskip}


makes the footnotesep the equivalent of the baselineskip for regular text (i.e., 12pt), but I think you want it to be 10pt. So you can set that directly:

\setlength{\footnotesep}{10pt}


EDIT:

One solution that mimics the settings of LaTeX2e would be to add this to your preamble (given the ratios suggested in my comment below):

\makeatletter
\ifcase \@ptsize
\setlength{\footnotesep}{0.83125\baselineskip}
\or
\setlength{\footnotesep}{0.85555\baselineskip}
\or
\setlength{\footnotesep}{0.84\baselineskip}
\fi
\makeatother


Or, if you prefer a more explicit setting (not quite identical):

\makeatletter
\ifcase \@ptsize
\setlength{\footnotesep}{10pt}
\or
\setlength{\footnotesep}{11pt}
\or
\setlength{\footnotesep}{12pt}
\fi
\makeatother


This will allow for automatic recalculation based on whether you are using the standard fontsize choices of 10, 11, or 12pt.

Here is an example based on the one you gave above:

\documentclass[10pt]{ucl_thesis}

\makeatletter
\ifcase \@ptsize
\setlength{\footnotesep}{0.83125\baselineskip}
\or
\setlength{\footnotesep}{0.85555\baselineskip}
\or
\setlength{\footnotesep}{0.84\baselineskip}
\fi
\makeatother

\makeatletter
\ifcase \@ptsize
\setlength{\footnotesep}{10pt}
\or
\setlength{\footnotesep}{11pt}
\or
\setlength{\footnotesep}{12pt}
\fi
\makeatother

\usepackage{xcolor}
\usepackage[grid, gridunit=pt,
gridcolor=red!20,
subgridcolor=blue!20]{eso-pic}

\usepackage{lipsum}

\begin{document}

\the\baselineskip

Some text.
\footnote{\the\baselineskip. The baselinestretch factor is: \baselinestretch. A short footnote on one line.}

Some more text.
\footnote{%
\the\footnotesep.
A longer footnote so that it spans multiple lines.
A longer footnote so that it spans multiple lines.
A longer footnote so that it spans multiple lines.
A longer footnote so that it spans multiple lines.
A longer footnote so that it spans multiple lines.
A longer footnote so that it spans multiple lines.
A longer footnote so that it spans multiple lines.}
\footnote{A short footnote on one line.}
\footnote{A short footnote on one line.}

\lipsum

\end{document}

• The assumption was right: the style uses a 1.5 line spacing in the footnotes, and I was trying to get all lines spaced equally, and this did it for me. But do you know if there's a way to access the internal length of the baselineskip for different font sizes, without having to look it up externally (ie. on the table on this answer)? That way the same code would work regardless of whether I use 10pt, 11pt or 12pt as package options... The alternative, of course, would be to add those to the way the class processes those options... – jja Sep 13 '13 at 15:29
• Unfortunately, \footnotesep is set by fiat in the standard classes (and your thesis class follows this). Try texdoc latex2e and see § 12.5: "\footnotesep: The height of the strut placed at the beginning of the footnote. By default, this is set to the normal strut for \footnotesize fonts (see Section 5.2 [Font sizes], page 8), therefore there is no extra space between footnotes. This is ‘6.65pt’ for ‘10pt’, ‘7.7pt’ for ‘11pt’, and ‘8.4pt’ for ‘12pt’." Footnote size at these three fonts are 8pt, 9pt, and 10pt. 6.65/8 = .83125; 7.7/9 = .8555; 8.4/10 = .84. I have an idea, though.... – jon Sep 13 '13 at 18:25
• Took me a while to realise that the two \makeat(letter|other) blocks were illustrative, but this works great. :) – jja Sep 16 '13 at 13:10

\let\oldfootnote\footnote
\renewcommand{\footnote}[1]{%
\begingroup%
\oldfootnote{#1}%
\endgroup%
}


Thus your modified MWE

\documentclass{ucl_thesis}

\let\oldfootnote\footnote
\renewcommand{\footnote}[1]{%
\begingroup%
\oldfootnote{#1}%
\endgroup%
}

\begin{document}

Some text.
\footnote{A short footnote on one line.}

Some more text.
\footnote{A longer footnote so that it spans multiple lines.
A longer footnote so that it spans multiple lines.
A longer footnote so that it spans multiple lines.}

\end{document}


produces the correct line spacing in footnotes without changing it in the normal text