While \offinterlineskip\lineskip1pt
might seem to give the desired result, lines will be irregularly spaced, because the distance between base lines will depend on the presence of ascenders (letters like "d") or descenders (letters like "y"). Moreover not all descenders and ascenders are equal.
Tight typesetting can be obtained by calling, say, \fontsize{10}{10}
for ten point size. One can get cheaply such a setting by modifying the internal function \set@fontsize
:
\documentclass[a4paper]{article}
\usepackage{etoolbox,lipsum}
\makeatletter
\patchcmd\set@fontsize{#3}{#2}{}{}
\makeatother
\begin{document}
\lipsum[1]
\large\lipsum[2]
\end{document}
Only etoolbox is required, of course. The patch will substitute the call of the third argument to \set@fontsize
with the second; the third parameter is indeed the baselineskip and the second is the font size.
Note that this will affect all text at all sizes.
If only some paragraphs are to be "tightly typeset", then the environment tight
defined as follows will do the job. The \addvspace
commands have been used on the assumption that the code is used for examples. Variations on the theme are possible.
\makeatletter
\let\tightset@fontsize\set@fontsize
\patchcmd\tightset@fontsize{#3}{#2}{}{}
\newenvironment{tight}
{\par\addvspace\topsep
\let\set@fontsize\tightset@fontsize
\fontsize{\f@size}{\f@baselineskip}\selectfont}
{\par\addvspace\topsep}
\makeatother
If tight typesetting is needed for captions, it's simpler. With the caption package define the font used by saying something like
\DeclareCaptionFont{tight}{\fontsize{9}{9}\selectfont}
\captionsetup{font=tight,labelfont=bf}
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
\edef\f@linespread{#1}% <-- extracts baseline stretch
\let\baselinestretch\f@linespread% <-- stores baseline stretch
\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.
Best Answer
A popular mistake is to say something like
Due to the fact that the line spacing in (La)TeX is uniform across the paragraph, and that the settings at the end of the paragraph count, you should end the paragraph before resetting the font, either by an empty line, or by a
\par
, e.g.:Edit: as Marc van Dongen noticed in the comment, leading of 32 is also probably too small - you may try to increase it. IMHO, a good rule of thumb is
leading = 1.2*font size
- 36pt in your case.