# How does one stop automatic line spacing increases when typesetting tall math symbols?

Often when typesetting mathematics, one wants to use math symbols in line. When these are certain symbols, or more often, decorated symbols, whose height is sufficiently large, the line spacing (that is, the space between the current line and the previous one) is increased in order to compensate for the height of the symbol. A usual example is $\widetilde{f}$, for instance. I would like to stop this from happening, even if it leads to possible overlap of symbols between the two lines. Is this possible?

Another one that will certainly induce a lineskip increase is \overset{\alpha}{\to}. I would also like this not to induce a lineskip increase.

If it is relevant, I am using XeLaTeX with unicode-math and the Lucida fonts, but I would very much prefer a general solution, as I encounter this problem with computer modern (and the $\widetilde{f}$) as well.

-
is $\smash{\widetilde{f}}$ an option? – jfbu Dec 12 '12 at 17:33
This is exactly what I was looking for! I was not aware of this command. If you make your comment and answer, I'll accept it. – Curtis Dec 13 '12 at 2:34

You should set the parameter \lineskiplimit to a negative value to avoid the lines from spreading. This behavior is explained in the TeXbook pg.78.

The TeX engine adds more space between the lines if their separation is smaller than \lineskiplimit; therefore setting it to a large negative value has the effect that a correction (which goes under the name \lineskip) is never applied.

Therefore simply add \lineskiplimit=-100pt\relax to the preamble of your document. All the lines will be equally spaced no matter their content. This is what you want.

Taking the MWE from @jfbu that's how the output looks like after setting the lineskiplimit:

-
Which shows several typographically dubious points. Look at the alpha above "unsuppressed depth": that's not only dubious, it's simply wrong. – egreg Dec 13 '12 at 15:50
@egreg: I'm not advocating this style, but that's what the OP seems to want (he wrote: "I would like to stop this from happening, even if it leads to possible overlap of symbols between the two lines"). Since I always prefer "minimal" solutions, I wrote my answer in case he wants to try it. I think it's fair :-) – Mafra Dec 13 '12 at 16:00
It was not a criticism on you, but on the final result. :) – egreg Dec 13 '12 at 16:03
@egreg: Ok, no problem. Thanks! – Mafra Dec 13 '12 at 16:09
indeed, this is simple and efficient. One may then wish to enlarge the \baselineskip, if the document has many such tall symbols. But then it is surely better to do as in egreg answer which uses only one command instead of (now) two... ;-) – jfbu Dec 13 '12 at 16:52

Lucida Bright has unusually large x-height; it is 5.3pt, compared to 4.31pt of Latin Modern. The height of uppercase glyphs is 7.23pt, while Latin Modern has 6.83pt.

Thus a 10/12 setting is surely not suitable for unscaled Lucida Bright; in general I prefer to load them scaled at 85%, which gives a x-height of 4.5pt and height of uppercase letters 6.15pt (yes, in Lucida Bright the lowercase letters are pretty high, compared to uppercase ones).

However, if letters with ornaments appear, the problem of uniform baselines still comes out.

In the AMS classes, a setting of 10/13 is used, and one of the reasons is quite certainly the fact that accented symbols are frequent in mathematical documents. Here's a comparison:

\documentclass{article}
\usepackage{unicode-math}
\setmainfont[Scale=.85]{Lucida Bright OT}
\setmathfont[Scale=.85]{Lucida Bright Math OT}
\newfontface\luc{Lucida Bright OT}

\begin{document}

Setting is 10/12

\medskip

Some text just to show the effect when some large symbol
is inline and some text just to show the effect when
some large symbol is inline; here it is $\widetilde{\beta}$
and some text follows and some text follows and some text follows
and some text follows and some text follows.

\bigskip

Setting is 10/13

\medskip

Some text just to show the effect when some large symbol
is inline and some text just to show the effect when
some large symbol is inline; here it is $\widetilde{\beta}$
and some text follows and some text follows and some text follows
and some text follows and some text follows.

\end{document}


In the second paragraph I use a 10/13 setting and the lines are equally spaced.

I wouldn't bother too much for the occasional enlargement of one baseline skip; but probably the adjustment is worthy a try. Just put

\linespread{1.08333}


in your preamble. You probably will need also to change slightly the text height to ensure an integer number of lines. The geometry package can do it with the key heightrounded. The baseline skip should be increased something more than 13pt if you prefer unscaled Lucida.

-
Thank you for your response. I should say that I made a mistake; \widetilde\beta does not induce a lineskip increase in my current setup, while \widetilde f is likely what was on my mind. Your solution does fix this for \widetilde f, however, not for a taller expression that I would like to use without a lineskip increase: \overset{\alpha}{\to}. – Curtis Dec 12 '12 at 17:15
With a taller expression you'll clash the symbols into each other. – yo' Dec 12 '12 at 17:17
@Curtis I understand, but can't say more than I said before: if you have several of these situations, then increase the baseline skip. – egreg Dec 12 '12 at 17:25

(migrated from my comment)

You may use the \smash command which tricks TeX into believing that its argument has neigher height nor depth:

\documentclass{article}
\usepackage{amsmath}
\begin{document}\thispagestyle{empty}
You may use the \texttt{\string\smash} command which tricks TeX into
believing that its argument has neigher height nor depth, as in for example
$\smash{\widetilde{f}}$ which now does not upset the line spacings. We can
compare \underline{with} the smash: $A \smash{\overset{\widetilde\alpha}{\to}} B$ and \underline{without} the
smash: $A \overset{\widetilde\alpha}{\to} B$ and lament the fact that the
horizontal spacing in the smashed case was modified, adding a
\texttt{\string\mathrel}: $A \mathrel{\smash{\overset{\widetilde\alpha}{\to}}} B$ gives us a correct
spacing. We could have tried to smash only the widetilded alpha but for some
reason related to \texttt{\string\overset} this does not work $A \overset{\smash{\widetilde\alpha}}{\to} B$. Speaking of \texttt{amsmath}
which provides \texttt{\string\overset}, we also have the additional
commands
\texttt{\string\smash[b]} and \texttt{\string\smash[t]} which smash'' only
the depth'', respectively the height'' of the argument. We can try this
out with $A \mathrel{\smash[t]{\overset{\widetilde\alpha}{\to}}} B \mathrel{\smash[t]{\underset{\widetilde\alpha}{\to}}} C$ where I used only
\texttt{\string\smash[t]} and we can see the effet of the unsuppressed
depth.
On the other hand \texttt{\string\smash[b]} as well as
\texttt{\string\smash} both
give $B \mathrel{\smash[b]{\underset{\widetilde\alpha}{\to}}} C$ and we can
check that it also worked for the depth'' as we keep on saying senseless
things and make a mess of our lives spending too much time with \TeX's
macros.
\end{document}


-

The lineskip increases to avoid clashing of the symbols with the other lines of text. One of the quite reliable methods is to increase the linespacing in general, by saying

\linespread{1.2}


or similar in the document preamble (I hope this works in XeLaTeX). However, from the typographical point of view, this is not really nice (and values over 1.3 make the text ugly).

A general solution might be possible in LuaLaTeX which enables (some) paragraph modifications after they are typeset, and it can calculate the necessity of increased lineskip based on the real paragraph output. Though, I'm not a coder of LuaLaTeX to be able to say more.

-
Thanks, but I want to stop the lineskip increases, not make them occur throughout the document, which it seems that your solution does. (It did work in XeLaTeX, I just tried it.) – Curtis Dec 12 '12 at 16:42
@Curtis Yes, that's whay my solution does. I understand it doesn't solve the issue for you, but I'll keep the answer here for anybody should look for it ;) – yo' Dec 12 '12 at 16:48