I know that it is possible to change the size of the font of the section titles in a document using \usepackage{sectsty}
and the command \sectionfont
; for example, to set the section titles' font to 14pt, I would use
\sectionfont{\fontsize{14}{15}\selectfont}
But what does the second number (15) stand for? Nothing seems to change when I modify this value.
Best Answer
The two arguments for
\fontsize{<size>}{<bskip>}
sets respectively the font size and the baseline skip. After setting, you have to\selectfont
for the parameters to become active, making them available in\f@size
and\f@baselineskip
.Some considerations:
Not all font sizes are available, so your choice for
<size>
should be made to avoid font substitution, or choose a package that provides support for your font choice (likelmodern
).The choice of font size and baseline skip is usually paired to avoid descenders/ascenders from sticking into the line below/above it. As such, it is advised to use the predefined or default font switches. Another motivation for using these is that they vary depending on the default document font size selected. That is,
\large
(say) has a different font size under10pt
,11pt
and12pt
document class option.Some examples highlighting the effect of the second argument:
The default font switches provide a good balance between font size and baseline skip to make the font readable:
Too small a baseline skip value makes the text look bunched together:
Related: What font size modifiers are available in LaTeX?