1

I'm writing an mathematical article and find it not aestetically pleasing that writing math symbols inside plain text often produces uneven line spacing. I found a solution to this by writing \lineskiplimit=-\maxdimen in the preamble and in the anser by ClintEastwood here. This has been working great until today when I wrote an equation using the equation and split enviroment from amsmath and it just produces a blank space.

Is there an easy fix to this or should I try solve the linespacing problem by other means?

I'm using Overleaf but also tried the following code in MikTeX version 2.9.

\documentclass{article}

\usepackage{amsmath}
\lineskiplimit=-\maxdimen %this gives us even line spacing, 


\begin {document} 

\textbf{Verify that $A \cap (E+ \beta )^c = (A- \beta  \cap E^c ) + \beta$}

\begin{equation*}
    \begin{split}
    \mu ^*(A \cap (E+ \beta)) + \mu ^*(A \cap (E+ \beta)^c )  &= \\
    &= \mu ^* ((A- \beta \cap E) + \beta) + \mu ^*((A- \beta  \cap E^c ) + \beta) \\
    &= \mu ^* ((A- \beta \cap E)) + \mu ^*((A- \beta  \cap E^c ))  = \mu ^*(A)
    \end{split}
\end{equation*}


\end {document} 

Much grateful for any help provided!

David Carlisle
  • 757,742
  • your example is far from minimal please help people offering to trace this for you by deleting every package not needed to show the problem. You get Overfull \vbox (7683.99998pt too high) has occurred while \output is active on the terminal so it is not surpising the answer is bad (and setting lineskiplimit as you do makes tex highly unstable and over-printing or mis-placed boxes are inevitable) – David Carlisle Jan 01 '20 at 14:27
  • I edited it this time – David Carlisle Jan 01 '20 at 14:28
  • you could simply set lineskiplimit back to something more reasonable before a math display and then set it back again, but perhaps better would be if you showed an example where you think you need this setting at all and then someone could suggest a safer way of getting even spacing. Getting even spacing by specifying that text should over-print by default seems inherently unsafe. – David Carlisle Jan 01 '20 at 14:46
  • the default settings normally ensure that any expression that may be reasonably used in inline math does not increase the line spacing so it would be interesting to see why you "often" get an uneven spacing. – David Carlisle Jan 01 '20 at 16:28
  • @DavidCarlisle I will post an example! Should I put it up here or in a new post? – MrFranzén Jan 01 '20 at 16:50
  • probably a new post – David Carlisle Jan 01 '20 at 16:59

1 Answers1

3

In order to adjust the spacing at the top of the display, amsmath does (amongst other things)

                \vskip-\lineskiplimit

so with your setting that is a vertical skip of the maximum possible dimension in TeX, which not surprisingly pushes the display off the page.


Setting \lineskiplimit this way really can not be recommended as a global default (although it is a useful technique in controlled situations).

But if you really want to do this then (a) set \normallineskiplimit to match and also (b) adjust the mathstrut calculation not to use the negative value.

\documentclass{article}

\usepackage{amsmath}
\lineskiplimit=-\maxdimen %this gives us even line spacing, 
\normallineskiplimit\lineskiplimit

\makeatletter
\def\reset@strutbox@{%
  \global\setbox\strutbox@\hbox{%
\normallineskiplimit=0pt
    \lower.5\normallineskiplimit
       \vbox{\kern-\normallineskiplimit\copy\strutbox}}}
\makeatother

\begin {document} 

\textbf{Verify that $A \cap (E+ \beta )^c = (A- \beta  \cap E^c ) + \beta$}
\begin{equation*}
    \begin{split}
    \mu ^*(A \cap (E+ \beta)) + \mu ^*(A \cap (E+ \beta)^c )  &= \\
    &= \mu ^* ((A- \beta \cap E) + \beta) + \mu ^*((A- \beta  \cap E^c ) + \beta) \\
    &= \mu ^* ((A- \beta \cap E)) + \mu ^*((A- \beta  \cap E^c ))  = \mu ^*(A)
    \end{split}
\end{equation*}


\end {document} 

This makes a visible output (although naturally with poor vertical spacing)

enter image description here

David Carlisle
  • 757,742