Is \baselineskip automatically defined?
\baselineskip
is a tex primitive, so it is always defined to be something (well unless someone goes \let\baselineskip\@undefined
but even then the underlying register still has a value even if it is not accessible.
It is set in various places in LaTeX, most notably all font size commands end up executing
\fontsize{aaa}{bbb}\selectfont
in which case \baselineskip
gets set to bbb times the current value of \baselinestretch
.
Let's make the example with a standard class, article
or report
. An option such as 10pt
(which is the default), 11pt
or 12pt
instructs LaTeX to read size10.clo
, size11.clo
or size12.clo
(they would be bkXY.clo
for the book
class, memoir
has a similar method).
In size10.clo
we find
\renewcommand\normalsize{%
\@setfontsize\normalsize\@xpt\@xiipt
\abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
\abovedisplayshortskip \z@ \@plus3\p@
\belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
\belowdisplayskip \abovedisplayskip
\let\@listi\@listI}
\normalsize
The first instruction of \normalsize
tells LaTeX that the main font size is 10pt (\@xpt
) with a baseline skip of 12pt (\@xiipt
). The value given to \baselineskip
, though, will be multiplied by the current value of \baselinestretch
.
In size11.clo
and size12.clo
the corresponding lines are
\renewcommand\normalsize{%
\@setfontsize\normalsize\@xipt{13.6}%
...}
and
\renewcommand\normalsize{%
\@setfontsize\normalsize\@xiipt{14.5}%
...}
respectively.
Subsequently the files define also \large
, \small
and similar commands, again with a \@setfontsize
command that establishes the font size and the baseline skip.
This has a consequence: if you try changing the default baseline skip with a command such as
\setlength{\baselineskip}{13pt}
in the preamble, it will have no effect because \begin{document}
issues \normalsize
. Placing the command after \begin{document}
will have effect, but a font size change command at the outer level will revert to the value established in the .clo
file.
For changing the baseline skip it's better to act with \linespread
in the preamble, which sets a value for \baselinestretch
, used by the font size changing commands, as seen.
So if you want 10/13 typesetting instead of 10/12, issue
\linespread{1.08333}
since 12*1.08333=12.99996 which is sufficiently close to 13.
Alternatively, redefine all those commands taking inspiration from the .clo
files.