# What is the difference between \fontsize{…}{some length} and \linespread{some length}?

I notice that the second argument to \fontsize and the first argument to \linespread both seem to change the spacing between lines of text. What is the difference between these? Is there one I should favor using?

-
Just as a general remark: The setspace package is usually considered the best way to influence line spacing. Iirc, some of the reasons are that it doesn't mess up lists (which are in more places than you would expect!) and it leaves the footnotes untouched, which is usually desired. –  doncherry Oct 12 '12 at 4:01
There is also the leading package –  cgnieder Dec 18 '12 at 14:03

The argument to \linespread is a real number (not a length), while both arguments to \fontsize are lengths.

\fontsize{<size>}{<baselineskip>} sets the font <size> and <baselineskip>, while \linespread{<factor>} is used as a multiple for the \baselineskip. In fact, the latter is virtually equivalent to

\renewcommand{\baselinestretch}{<factor>}


It's your choice which to use. However, both require a font selection on order to be activated. Read more on this peculiarity in the UK TeX FAQ entry Why doesn’t \linespread work?

In the LaTeX kernel, \fontsize and \linespread is defined as

\DeclareRobustCommand\linespread[1]
{\set@fontsize{#1}\f@size\f@baselineskip}
\DeclareRobustCommand\fontsize[2]
{\set@fontsize\baselinestretch{#1}{#2}}


Note that both utilize \set@fontsize{<factor>}{<size>}{<baselineskip>}. The reason for separating the two allows you to use a fix the one while manipulating the other. Once \set@fontsize is called, it creates \size@update that sets \baselineskip as a \baselinestretch multiple of itself and stores this result in \normalbaselineskip for other uses (amongst other things). A call to \selectfont "uses" these settings. For the wild at heart, here's the nitty gritty (with some comments):

\def\set@fontsize#1#2#3{%
\@defaultunits\@tempdimb#2pt\relax\@nnil
\edef\f@size{\strip@pt\@tempdimb}% <-- extracts font size
\@defaultunits\@tempskipa#3pt\relax\@nnil
\edef\f@baselineskip{\the\@tempskipa}% <-- extracts baseline skip
\def\size@update{%
\baselineskip\f@baselineskip\relax% <-- stores baseline skip in \baselineskip
\baselineskip\f@linespread\baselineskip% <-- multiplies \baselineskip by \baselinestretch
\normalbaselineskip\baselineskip% <-- stores \normalbaselineskip
\setbox\strutbox\hbox{%
\vrule\@height.7\baselineskip
\@depth.3\baselineskip
\@width\z@}%
\let\size@update\relax}%
}


All these intricacies are meant to be simplified through setspace for consistency.

-
It seems that using both of them has a compounding effect; is one used in calculation of the other or something? –  jtbandes Oct 12 '12 at 3:27