Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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[margin=1in, headsep=10pt]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}

\fancyhead[L]{Personal Statement} % What other option should I use to get a custom font size ?
share|improve this question
3  
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

2 Answers 2

up vote 7 down vote accepted

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[margin=1in, headsep=10pt]{geometry}
\usepackage{fancyhdr,lipsum}

\pagestyle{fancy}     
\fancyhead{} % clear all header fields
\fancyhead[L]{\fontsize{10}{12} \selectfont Personal Statement}

\begin{document}
\lipsum
\end{document}  
share|improve this answer
    
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
2  
@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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.