# Using 2 different fontsizes in scrpage2 header

I am trying to use two different fontsizes in the headers of my document. The pagestyle is set via \newpagestyle. By using \addtokomafont I was able to change the fontsize of the entire header. However I just want to change the size of a part of the header like so

\newpagestyle{pagestyle1}
{%
(\textwidth, 1pt)
{\pagemark\hfill}
{\leftmark\hfill}
{%
\parbox{0.5\textwidth}{\fontsize{5pt}{8pt}This is a large text\\This is the small text}\leftmark\hfill\pagemark}
(\textwidth,0.4pt)
}{%
(\textwidth,0.4pt)
{\pagemark\hfill}
{\hfill\pagemark}
{\hfill\pagemark}
}


By using \addtokomafont{pageheadfoot}{\tiny} the entire header is set to a small fontsize, however i just want the This is a small text section to be small. Happy for any help or link to a usefull documentation.

• ok, I found a solution but can't post it because I lack of reputation (why would it be bad to say that u have solved your own problem??) Anyways. if you got a solution too feel free to sare your ideas :-) Jun 15 '13 at 9:30
• You can of course answer your own question. However, users with less than 100 reputation need to wait 8 hours after posting the question before they're able to, see the FAQ entry. Jun 15 '13 at 15:39

## 1 Answer

1. You used a low level command, but missed the necessary command \selectfont at the end, read again the font guide, section “Selection commands”. This was the cause, why no font size change happened.

2. Because you only wanted to change the second part, you should have put the font selection just before this second text part.

To put it all together the relevant parbox should have looked this way:

\parbox{0.5\textwidth}{This is a large text\\
\fontsize{5pt}{8pt}\selectfont This is the small text}


But you also could have made your life easier when you’d simply used \tiny, what is only a bit larger:

\parbox{0.5\textwidth}{This is a large text\\
\tiny This is the small text}


I hope you noticed, that the way you defined the page head your \leftmark is not really centred.

Note, that meanwhile a successor for scrpage2 was published with version 3.12 of KOMA-Script: Its name is scrlayer-scrpage. It is downwards compatible to scrpage2, but fixes some pecularities and offers more opportunities.