2

I would need to change the font of all footnotes in a document; the brute force way would be to change the font in each and everyone of them, except that they are a few dozen.

I thought I could use \renewcommand in the preamble, but I do not seem to have it work. How can I have that each time I have a footnote it is in italics, without having to write

\footnote{\textit{blahblah}}

I know the question is trivial for most of you, but I seem to get something wrong Thanks! francesco

Here is my MWE

\documentclass[12pt,a4paper]{book}
\usepackage[utf8]{inputenc}
 \usepackage[english]{babel}
 \usepackage{amsmath}
  \usepackage{amsfonts}
   \usepackage{amssymb}
  \usepackage{graphicx}
 \usepackage{lipsum}
 \renewcommand{\footnote}{\footnote{\italics}}
moewe
  • 175,683
  • 3
    It can be done, but we would need to know what packages you are loading to know what changes they do to the internals of the \footnote command. Please post a minimal working example (MWE) of your document for us to check. – Phelype Oleinik Jul 04 '18 at 15:25
  • 2
    Related https://tex.stackexchange.com/q/4779/35864 – moewe Jul 04 '18 at 15:30
  • Note that amssymb already loads amsfonts, so it is enough to load amssymb. Furthermore this is not an MWE, it might be enough to understand you question in this instance, but in general it might not be enough and it is good practice to post fully working examples. – moewe Jul 04 '18 at 15:43
  • Edited with the MWE (which does not work :) I also tried as @moewe suggests \addtokomafont{footnote}{\textit}, but it gives an error. Do I need to load a package? – Francesco Saraceno Jul 04 '18 at 15:43
  • 1
    Does \usepackage{footmisc} \renewcommand*{\footnotelayout}{\itshape} as suggested in the linked answer work for you? \addtokomafont is a command of the KOMA script bundle, so it is not available in the standard classes. – moewe Jul 04 '18 at 15:45
  • You can use the KOMA command if you load scrextend and let it take over the footnotes: \usepackage{scrextend} \deffootnote[1em]{1.5em}{1em}{\textsuperscript{\thefootnotemark}} \addtokomafont{footnote}{\itshape}. – moewe Jul 04 '18 at 15:50
  • \footmisc indeed worked! for some reason, the complicated preamble to the book I am writing prevented footnotes to be typeset in \librebaskerville. So I added \usepackage{footmisc} \usepackage{librebaskerville} \renewcommand*{\footnotelayout}{\librebaskerville} and now it works! thanks! – Francesco Saraceno Jul 04 '18 at 15:52

1 Answers1

3

You probably don't want the footnote mark in italics as well, so it's just a matter of finding the best way where to set \itshape and the start of the call of \@makefntext seems the place.

\documentclass[12pt,a4paper]{book}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{etoolbox}

\makeatletter
\patchcmd{\@footnotetext}{\rule}{\itshape\rule}{}{}
\makeatother

\usepackage{lipsum}

\textheight=2cm % just to make a smaller picture

\begin{document}

Some text.\footnote{This footnote is in italics}
Some other text

\end{document}

enter image description here

egreg
  • 1,121,712