How can I change font family (and size) for footnotes? Would be great to see a small example.
4 Answers
Footnotes are typeset using (surprise) \footnotesize
and the current font family. With the standard document classes, you may change this to, say, \small\sffamily
by partially redefining the \@footnotetext
command (Note: I'm using the etoolbox package for convenience):
\documentclass{article}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@footnotetext}{\footnotesize}{\small\sffamily}{}{}
\makeatother
\usepackage{blindtext}
\begin{document}
\blindtext\footnote{\blindtext}
\end{document}
A small drawback of this solution is that the footnote label is not affected by these changes.
The KOMA-Script-classes allow for a more elegant solution without the drawback mentioned above:
\documentclass{scrartcl}
\addtokomafont{footnote}{\small\sffamily}
\usepackage{blindtext}
\begin{document}
\blindtext\footnote{\blindtext}
\end{document}
EDIT: As Vincenzo pointed out, using the footmisc
package is also possible:
\usepackage{footmisc}
\renewcommand*{\footnotelayout}{\small\sffamily}
This works with standard and KOMA-Script-classes, but also has the drawback that it won't affect the footnote label.
-
1
-
According to your comment, I'll answer not the question you asked, but what I think is the "right question" in this case, namely: "how to I change the default font for a (portion of a) document?"
The answer is: change the definitions of the various \stuffdefault
macros---for a complete list of the possible values of stuff
, see section 41.2 in source2e.pdf (try texdoc source2e
to access this document). As an example, in this case I guess you want to do
\renewcommand\familydefault{\sfdefault}
\renewcommand\sfdefault{phv}
\normalfont
Beware, the value for \familydefault
is a command, while the value for all other macros are only letters (without backslash) that will be used to form the complete logical name of the font. (Actually, it could be only letters too, but the use of a command provides an additional level of indirection that is usually welcome.) The final \normalfont
command ensures that the modifications take effect immediately.
-
Many thanks, this is exactly what I need! I up-voted your answer, but can't select it as the best since my question was wrongly stated, as you mentioned. Thanks again.– yegor256Nov 1, 2010 at 15:53
You can redefine your footnotes and the footnote mark thus:
\let\oldfootnote\footnote
\renewcommand{\footnote}[1]{\oldfootnote{\sffamily#1}}
%footnotemark to sans serif
\long\def\@makefnmark{%
\hbox {\@textsuperscript {\sffamily\@thefnmark}}
}
I'm not sure whether this is a good idea, but to change the size of the footnote to (for example) Large
put this in your preamble:
\let\footnotesize\Large
Changing the font family is, I think, a little trickier.
\fontfamily{phv}\selectfont
, but it doesn't affect footnotes