# How to define a new font size by proportionally scaling the document font?

I'd like to define a new font size, e.g. \sidenotesize , just like \tiny and \huge already exist, such that it is proportional to the document font size (or somehow else, I just need to get a proportional/customizable scaling).

How to do that? Would it affect math mode too?

• Do you mean the size would be relative to the main size, or that the font shapes would be scaled up or down from a different optical size? For the first, what's wrong with the normal font-size commands like \small? For the second, see tex.stackexchange.com/questions/225027/… – musarithmia Jan 27 '15 at 11:41
• Well, I meant the second of course. Following your link I found out \DeclareFontShape command, that should do the job - as soon as I learn how it works. Thank you! – Piero Gherbaz Jan 27 '15 at 12:06

You can use relsize package.

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage{relsize}

\begin{document}
Some text      %% not scaled

{\relsize{-3}Some text}  %% this is -3*1.2 times scaled

{\relsize{4}Some text}   %% this is 4*1.2 times scaled

\end{document}

For details read the manual → texdoc relsize from command prompt/terminal.

Every document class has at least five or six font sizes, which should be more than enough, provided that it is not recommended, from a design point of view, to display an array of font sizes, because their very difference will be distracting.

In spite of this advice, if you want to add another size, or you want to be in control of your fonts, it is a good idea to define not one but all of them. Of course, with the following code you can define only one new size or redefine an existing one.

The basic code to redefine an existing font is:

The basic code to define a new fontsize:

An example:

\renewcommand{\tiny}{\fontsize{6}{9}\selectfont}
\renewcommand{\scriptsize}{\fontsize{8}{12}\selectfont}
\newcommand{\notesize}{\fontsize{9}{13.5}\selectfont} %<-- New fontsize
\renewcommand{\footnotesize}{\fontsize{10}{15}\selectfont}
\renewcommand{\small}{\fontsize{11}{16.5}\selectfont}
\renewcommand{\normalsize}{\fontsize{12}{18}\selectfont}
\renewcommand{\large}{\fontsize{14}{21}\selectfont}
\renewcommand{\Large}{\fontsize{16}{24}\selectfont}
\renewcommand{\huge}{\fontsize{18}{27}\selectfont}
\renewcommand{\Huge}{\fontsize{22}{33}\selectfont}

In this case, the leading (space between lines) is kept proportional (150% relative to the fontsize), but change it to your liking.

If you are using OPmac then you can use \typoscale macro. Example

\input opmac

\def\smaller{\typoscale[850/]}
\def\bigger{\typoscale[1200/]}

Hello {\smaller hello {\smaller hello {\smaller hello}}} hi.

\medskip

Hello {\bigger hello {\bigger hello {\bigger hello}}} hi.

\end

Note that optical sizes of the font (if they are available) are chosen, not only geometric scaling.