# How to set the header font size using fancyhdr package?

Basically, I want the header fonts to use a different (smaller) font size than the size I set using \documentclass. What should be the option I'd be using ?

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\pagestyle{fancy}

\fancyhead[L]{Personal Statement} % What other option should I use to get a custom font size ?

-
Have you simply tried \fancyhead[L]{\small Personal Statement}? Most likely you have already seen this, but see also: en.wikibooks.org/wiki/LaTeX/Formatting#Sizing_text – user2473 Dec 11 '11 at 7:04
But I wanted a bit more "direct" control, so that I could explicitly set it to 10pt - is that not possible ? – TCSGrad Dec 11 '11 at 7:12
@shan23: with \footnotesize it is 10pt when you have 12pt as class option – Herbert Dec 11 '11 at 9:25

Like Werner writes :

\fontsize{<size>}{<baselineskip}\selectfont typesets whatever follows at size with a baseline skip of but I think \small is a better way because a lot of things are adjusted correctly, the definition of \small starts with :

\newcommand*\small{%
\@setfontsize\small\@xpt\@xiipt


example :

\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr,lipsum}

\pagestyle{fancy}

\begin{document}
\lipsum
\end{document}

-
Could you tell me which font size the header will be (10 or 12) ? It would be even better if you could give a short clarification as to why 2 arguments are needed for fontsize, and why \selectfont is used at all.... – TCSGrad Dec 11 '11 at 7:27
@shan23: \fontsize{<size>}{<baselineskip}\selectfont typesets whatever follows at size <size> with a baseline skip of <baselineskip>. Are you familiar with the dimension \baselineskip? – Werner Dec 11 '11 at 7:29
A bit of searching revealed \baselineskip : \baselineskip is a length command which specifies the minimum space between the botton of two successive lines in a paragraph. Its value may be automatically reset by LaTeX, for example, by font changes in the text - but I couldn't really figure out how to calculate the changed value (is it set to 12 as the documentclass sets font size to 12) ? – TCSGrad Dec 11 '11 at 7:36
@shan23 If you are not familiar with the dimension \baselineskip, I think it's preferable to use \small and I think it's always preferable to use \small. – Alain Matthes Dec 11 '11 at 7:45
@shan23: The font size and \baselineskip selection is interrelated since it leads to good typography. That's why both are required/selected using \fontsize. When using \documentclass[12pt]{article}, LaTeX executes \fontsize{12}{14.5}\selectfont, setting the font size to 12pt and \baselineskip to 14.5pt so that text lines don't overlay. To see the effect of different \baselineskip dimensions with different font sizes, use \usepackage{lmodern} and typeset some paragraphs using lipsum. – Werner Dec 11 '11 at 8:36

I ran across this the other day:

\usepackage{fix-cm}
\fontsize{100}{120}\selectfont Huge text


and have used it fairly extensively in my résumé. I like it because it gave me much finer-grained control than the standard \small etc. commands.

You just place the package in the preamble as normal, then use the command wherever you want the font to be a non-standard size. Here's a working example:

\documentclass[10pt,letterpaper]{article}\usepackage{fix-cm,soul}\frenchspacing
\pagestyle{empty}
\begin{document}
\begin{center}{\fontsize{20}{22}\selectfont Alfred E. Neuman}\\\end{center}
{\fontsize{12}{12}\selectfont\textbf{\so{(111)222-3456}} \hfill {\fontsize{12}
{12}\selectfont 1313 Mockingbird Lane \\ {\fontsize{11}{11}\selectfont \textbf
{email@email.com}} \hfill Boca Raton, Florida}
\end{document}


Sorry that my code is a bit messy.

-