# Is \baselineskip automatically defined?

Is is automatically defined by LaTeX? What does it depend of?

I was going through the Wikibook section regarding lenghts, and I just realized also that \bigskip and others are not dependent on the font size. Is this the same for baselineskip?

\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.

• But is it defined by the size of a strut or something (maximum height and depth of a character at some point size)? My \showthe\baselineskip yields 13.20007pt., but where is TeX coming up with this value? I guess that this is perhaps a complicated question, because the LaTeX kernel (size11.clo) specifies \baselineskip, but how does TeX do it (since it is always defined to be something)? – Jonathan Komar Apr 20 '17 at 14:56
• @macmadness86 every size command such as \normalsize or \large or \fontsize{1in}{2in}\selectfont sets it (to 2in in the last case) so normally they are set to values specified in the class. – David Carlisle Apr 20 '17 at 14:59

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.