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?
[Tex/LaTex] the difference between \fontsize{…}{some length} and \linespread{some length}
fontsizeline-spacing
Related Solutions
A popular mistake is to say something like
{\fontsize{30}{32}\selectfont A long title, spanning two lines}
And now the text.
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.:
{\fontsize{30}{32}\selectfont A long title, spanning two lines\par}
And now the text.
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.
As a general rule increasing the linespacing is bad. (Of course this assumes that the default spacing has been set appropriate to the current font). If the inline math doesn't fit within the specified line spacing consider changing that before changing the global line spacing.
For the examples given
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\Hom}{Hom}
\usepackage{mathpazo}
\showoutput
\showboxdepth5
\begin{document}
\noindent
\parbox{.4\textwidth}{
xx xx xx xx xx xx xx\\
%$\left(\frac{2\pi i}{r}\right)$\\
$(\frac{2\pi i}{r})$\\
xx xx xx xx xx xx xx\\
$\Hom^{(c,d)}$\\
xx xx xx xx xx xx xx
}
\parbox{.4\textwidth}{
xx xx xx xx xx xx xx\\
xx xx xx xx xx xx xx\\
xx xx xx xx xx xx xx\\
xx xx xx xx xx xx xx\\
xx xx xx xx xx xx xx}
\end{document}
using Computer Modern they both fit into the exiting space. Using mathpazo
the \Hom
example fits but the \left \right
construction is too big. Using \left
\right
in inline math is a bit suspect anyway and if you just use normal size brackets it fits within the specified baseline.
In general you should set your settings for the space that you consider acceptable and then if the math doesn't fit in the space, use display math or a variant notation or something (sometimes you can just use \smash
to hide the hight even though it could then overprint a descender on the line above, if you know there is no descender then...) Here for example is your passage unchanged on the original baselineskip set by the font package, but with superscripts made smaller. \lineskip
glue is not used, only \baselineskip
glue as shown in the log, so confirming that baseline spacing has been preserved. There are alternatives such as playing with the font dimen parameters that control script positions. But I ended up not using that, so commented out.
\documentclass[12pt]{article}
\usepackage{amsmath}
\DeclareMathOperator{\Hilb}{Hilb}
\DeclareMathOperator{\Hom}{Hom}
\newcommand{\C}{\mathbb{C}}
\showoutput
\showboxdepth4
\usepackage{mathpazo}
\DeclareMathSizes{12pt}{12}{6.5}{5}
\begin{document}
\sbox0{$aaa$}
\typeout{
13 \the\fontdimen13\textfont2^^J
14 \the\fontdimen14\textfont2^^J
15 \the\fontdimen15\textfont2^^J
16 \the\fontdimen16\textfont2^^J
17 \the\fontdimen17\textfont2^^J
18 \the\fontdimen18\textfont2^^J
19 \the\fontdimen19\textfont2^^J
19 \the\fontdimen8\textfont3^^J
}
%
% \fontdimen13\textfont2=\dimexpr(\fontdimen13\textfont2)/10\relax
% \fontdimen14\textfont2=\dimexpr(\fontdimen14\textfont2)/10\relax
% \fontdimen15\textfont2=\dimexpr(\fontdimen15\textfont2)/10\relax
% \fontdimen16\textfont2=\dimexpr(\fontdimen16\textfont2)/10\relax
% \fontdimen17\textfont2=\dimexpr(\fontdimen17\textfont2)/10\relax
% \fontdimen18\textfont2=\dimexpr(\fontdimen18\textfont2)/10\relax
% \fontdimen19\textfont2=\dimexpr(\fontdimen19\textfont2)/10\relax
% \fontdimen8\textfont3=\dimexpr(\fontdimen8\textfont3)/10\relax
The case $\Hilb^G_G$ where $v=G$ is the regular representation of $G$ has been studied
in particular depth, and is frequently referred to as GHilb. Since the ideal sheaf of
a generic point on $[\C^2/G]$ corresponds to the regular representation of $G$, the
Hilbert-Chow morphism $\Hilb^G_G\to\C^2/G$ is an isomorphism away from $0$. Since
$\Hilb^G_G$ is smooth, this is a resolution of singularities. In fact, it turns out
that it is the minimal resolution of $\C^2/G$, and has been much studied.
The action of $(\C^*)^2$ on $\C^2$ induces an action on $\Hilb_n(\C^2)$, and since if
$G\subset (\C^*)^2$ then in particular $G$ and $(\C^*)$ commute, we also have a
$(\C^*)^2$ action on $\Hilb_G(\C^2)$. The fixed points of this action on
$\Hilb_n(\C^2)$ are precisely the monomial ideas. Since $G\subset (\C^*)^2$, we see
that the monomial ideals are also the fixed points of the action on $\Hilb_n(\C^2)^G$.
The space of $\Hom^{(c,d)}_\C(\mathcal{I},R/\mathcal{I})$ of weight $(c,d)$ vector
space maps corresponds to the cells in $\lambda$ and above $P_\lambda(c,d)$, while the
space $\Hom^{(c,d)}_R (\mathcal{I},R/\mathcal{I})$ of weight $(c,d)$ maps of $R$-
modules corresponds to the bounded regions below $P_\lambda$ and above
$P_\lambda(c,d)$.
\end{document}
Best Answer
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 toIt'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 asNote 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):All these intricacies are meant to be simplified through
setspace
for consistency.