Specify Font Size in LaTeX
Font size commands and environments
LaTeX provides several commands to specify font size, such as \normalsize
(default), \tiny
, \scriptsize
, \large
, and \huge
etc. One point should be noted is that, the specific font size specified by one command is determined by document class and font size option12. Like for commonly used document class article
(and also report
, book
, and letter
)1, font sizes corresponding to different commands are shown in the following table:
command | 10pt | 11pt | 12pt |
---|---|---|---|
\tiny |
5 pt | 6 pt | 6 pt |
\scriptsize |
7 pt | 8 pt | 8 pt |
\footnotesize |
8 pt | 9 pt | 10 pt |
\small |
9 pt | 10 pt | 11 pt |
\normalsize (default) |
10 pt | 11 pt | 12 pt |
\large |
12 pt | 12 pt | 14 pt |
\Large |
14 pt | 14 pt | 17 pt |
\LARGE |
17 pt | 17 pt | 20 pt |
\huge |
20 pt | 20 pt | 25 pt |
\Huge |
25 pt | 25 pt | 25 pt |
For Chinese font, there is also2:
and for beamer
class:
command | 8pt | 9pt | 10pt | 11pt | 12pt | 14pt | 17pt | 20pt |
---|---|---|---|---|---|---|---|---|
\tiny |
5 pt | 5 pt | 5 pt | 6 pt | 6 pt | 6 pt | 8 pt | 10 pt |
\scriptsize |
5 pt | 6 pt | 7 pt | 8 pt | 8 pt | 8 pt | 10 pt | 12 pt |
\footnotesize |
6 pt | 7 pt | 8 pt | 9 pt | 10 pt | 10 pt | 12 pt | 14 pt |
\small |
7 pt | 8 pt | 9 pt | 10 pt | 11 pt | 12 pt | 14 pt | 17 pt |
\normalsize (default) |
8 pt | 9 pt | 10 pt | 11 pt | 12 pt | 14 pt | 17 pt | 20 pt |
\large |
10 pt | 10 pt | 12 pt | 12 pt | 14 pt | 17 pt | 20 pt | 25 pt |
\Large |
11 pt | 11 pt | 14 pt | 14 pt | 17 pt | 20 pt | 25 pt | 29.86 pt |
\LARGE |
12 pt | 12 pt | 17 pt | 17 pt | 20 pt | 25 pt | 29.86 pt | 35.83 pt |
\huge |
14 pt | 14 pt | 20 pt | 20 pt | 25 pt | 29.86 pt | 35.83 pt | 42.99 pt |
\Huge |
17 pt | 17 pt | 25 pt | 25 pt | 25 pt | 35.83 pt | 42.99 pt | 51.59 pt |
In addition, it should be noted that, font size affects line spacing. So, take article
class, following examples reproduce Table I and meanwhile show the additional information of line spacing for each case.
(1) font size option: 10 pt (default)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
\documentclass[a4paper]{article}
\usepackage[margin=1in]{geometry}
\usepackage{fontspec}
\makeatletter
\newcommand{\fsize}{\f@size pt}
\makeatother
\begin{document}
\thispagestyle{empty}
\begin{table}
\centering
\begin{tabular}{llll}
\hline
\textbf{Font size command} & \textbf{Text} & \textbf{Font size} & \textbf{Line spacing} \\ \hline
\verb|\tiny| & {\tiny Lorem ipsum} & {\tiny\fsize} & {\tiny\the\baselineskip}\\ \hline
\verb|\scriptsize| & {\scriptsize Lorem ipsum} & {\scriptsize\fsize} & {\scriptsize\the\baselineskip}\\ \hline
\verb|\small| & {\small Lorem ipsum} & {\small\fsize} & {\small\the\baselineskip}\\ \hline
\verb|\normalsize| & {\normalsize Lorem ipsum} & {\normalsize\fsize} & {\normalsize\the\baselineskip}\\ \hline
\verb|\large| & {\large Lorem ipsum} & {\large\fsize} & {\large\the\baselineskip}\\ \hline
\verb|\Large| & {\Large Lorem ipsum} & {\Large\fsize} & {\Large\the\baselineskip}\\ \hline
\verb|\LARGE| & {\LARGE Lorem ipsum} & {\LARGE\fsize} & {\LARGE\the\baselineskip}\\ \hline
\verb|\huge| & {\huge Lorem ipsum} & {\huge\fsize} & {\huge\the\baselineskip}\\ \hline
\verb|\Huge| & {\Huge Lorem ipsum} & {\Huge\fsize} & {\Huge\the\baselineskip}\\ \hline
\end{tabular}
\end{table}
\end{document}
(2) font size option: 11 pt
1
2
\documentclass[a4paper,11pt]{article}
% ...
(3) font size option: 12 pt
1
2
\documentclass[a4paper,12pt]{article}
% ...
According to above results, for \normalize
font (default) of each document, we have:
Font size option of document | Font size | Line spacing | Line spacing/Font size |
---|---|---|---|
1o pt | 10 pt | 12 pt | 1.2 |
11 pt | 10.95 pt3 | 13.6 pt | 1.24 |
12 pt | 12 pt | 14.5 pt | 1.21 |
As can be seen, the ratio of line spacing and font size approximates 1.2.4
And we can use corresponding environment of above commands5, such as LARGE
environment in 10 pt document:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
\documentclass[a4paper]{article}
\usepackage[margin=1in]{geometry}
\usepackage{fontspec}
\makeatletter
\newcommand{\fsize}{\f@size pt}
\makeatother
\begin{document}
\thispagestyle{empty}
\begin{LARGE}
Lorem ipsum.\\
Font size: \fsize \\
Line spacing: \the\baselineskip \\
\end{LARGE}
\end{document}
and 12 pt document:
1
2
\documentclass[a4paper,12pt]{article}
% ...
The \fontsize
and \selectfont
commands
We can use commands \fontsize
and \selectfont
to make a more precise and flexible specification for font size and line spacing, such as5:
\fontsize{6}{8}\selectfont
: use 6pt text with baselines spaced at 8pt\fontsize{8}{9}\selectfont
: use 8pt text with baselines spaced at 9pt\fontsize{12}{13.5}\selectfont
: use 12pt text with baselines spaced at 13.5pt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
\documentclass[a4paper]{article}
\usepackage[margin=1in]{geometry}
\usepackage{fontspec}
\makeatletter
\newcommand{\fsize}{\f@size pt}
\makeatother
\begin{document}
\thispagestyle{empty}
\begin{table}
\centering
\begin{tabular}{llll}
\hline
\textbf{Font size command} & \textbf{Text} & \textbf{Font size} & \textbf{Line spacing} \\ \hline
\verb|\fontsize{6}{8}\selectfont| & {\fontsize{6}{8}\selectfont Lorem ipsum} & {\fontsize{6}{8}\selectfont\fsize} & {\fontsize{6}{8}\selectfont\the\baselineskip}\\ \hline
\verb|\fontsize{8}{9}\selectfont| & {\fontsize{8}{9}\selectfont Lorem ipsum} & {\fontsize{8}{9}\selectfont\fsize} & {\fontsize{8}{9}\selectfont\the\baselineskip}\\ \hline
\verb|\fontsize{12}{13.5}\selectfont| & {\fontsize{12}{13.5}\selectfont Lorem ipsum} & {\fontsize{12}{13.5}\selectfont\fsize} & {\fontsize{12}{13.5}\selectfont\the\baselineskip}\\ \hline
\end{tabular}
\end{table}
\end{document}
and this method isn’t affected by font size option of the document.
Besides, the text lines wouldn’t overlap even if the specified line spacing is extremely smaller than the font size, for example:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
\documentclass[a4paper]{article}
\usepackage[margin=1in]{geometry}
\usepackage{fontspec}
\makeatletter
\newcommand{\fsize}{\f@size pt}
\makeatother
\usepackage{lipsum}
\begin{document}
\thispagestyle{empty}
\fontsize{12}{2}\selectfont \lipsum[1-3]
\vspace{2em}
Font size: \fsize; Line spacing: \the\baselineskip\\
\end{document}
References