0

How to set default footnote linespacing? Now for each footnote I have to write

\footnote{\onehalfspacing ...}

But I would like to set the line spacing once.

I guess its possible to use \renewcommand{\footnote}{...}. But I don't know how to redefine the command.

niekas
  • 499
  • All packages that make line spacing changes easy take care, that this does not happen in footnotes. There is good reason for that. Are you sure, you want to alter this? – Johannes_B Feb 07 '15 at 18:45
  • @Johannes_B Yes, I am sure, because this is a strange requirement for documents in my university. – niekas Feb 07 '15 at 18:46
  • So, the simplest solution would be to not use package setspace and change it by hand for the whole and complete document. Depending on the pointsize, you can set in the preamble \setstretch{1.25} (10pt), 1,213 for 11pt or 1.241 for 12pt basesize. – Johannes_B Feb 07 '15 at 18:46
  • @Johannes_B But \setstretch command is imported from setspace package. I am defining document class, so it would be best to set default footnote line spacing in it, not in the main document. – niekas Feb 07 '15 at 19:02
  • 1
    I thought this might be a declaration for the whole document. University specs are very strange, just as if they never noticed that typewritters have gone. Try Can I redefine a command to contain itself? – Johannes_B Feb 07 '15 at 19:06
  • @Johannes_B Thank you! I used this solution: \let\oldfootnote\footnote \renewcommand{\footnote}[1]{\oldfootnote{\onehalfspacing #1}}. Works like a charm (: – niekas Feb 07 '15 at 19:12
  • I provided an answer and marked it as duplicate. This makes it easier for others to find similar solutions with better explanations. – Johannes_B Feb 07 '15 at 19:15

1 Answers1

1

You can do something very similar to Can I redefine a command to contain itself?

\documentclass{article}
\usepackage{blindtext}
\usepackage{letltxmacro}
\begin{document}
\blindtext
\footnote{\blindtext}
\LetLtxMacro{\niekasFootnote}{\footnote}
\makeatletter
\renewcommand{\footnote}[1]{\niekasFootnote{\def\baselinestretch{1.25}\@currsize#1}}
\makeatother
\footnote{\blindtext}
\end{document}

niekasFootnote

As you will place that in a class file, the \makeatletter \makeatother combo can be omitted. The definition comes form the source of package setspace. If this package is loaded anyways, you can use onehalfspacing (or any other of the spacing comands defined by setspace). Advantage: Those commands are aware of the current font size, since different sizes need different spacing to look right.

Johannes_B
  • 24,235
  • 10
  • 93
  • 248
  • Why do you need \@currsize? Omitting it does not require \makeatletter and \makeatother commands anymore. – niekas Feb 07 '15 at 19:23
  • 1
    @niekas That is the originaldefinition in setspace. If you load setspace anyway, you can savely use onehalfspacing which is aware of the type size – Johannes_B Feb 07 '15 at 19:24