# Vertical space before align environment is smaller than before displayed math

The result of the following code is strange: vertical space before align environment is smaller than displayed math. What is the problem with align environment?

Edit: I want the same vertical space before and after align environments, just like other displayed formulas.

\documentclass{article}

\usepackage[14pt]{extsizes}
\usepackage{amsmath}

\setlength{\lineskiplimit}{4pt}
\setlength{\lineskip}{4pt plus 1pt minus 1pt}

\AtBeginDocument{%
\setlength{\baselineskip}{19pt plus 1pt minus 1pt}%
}

\begin{document}

\setlength{\fboxsep}{0pt}

\noindent
\fbox{\makebox[\textwidth]{lazy dog}}
\begin{align*}
\boxed{f(x) = \sin x + 1}
\end{align*}
\fbox{\makebox[\textwidth]{lazy dog}}
$$\boxed{f(x) = \sin x + 1}$$
\fbox{\makebox[\textwidth]{lazy dog}}
$\boxed{f(x) = \sin x + 1}$
\fbox{\makebox[\textwidth]{lazy dog}}

\end{document}


• There isn't is a problem here, per se. \begin{align}...\end{align} do some things different than does $...$ (see Why is $ ... $ preferable to $$ ... $$?). What are you after? Should they be the same? If so, which one do you prefer?
– Werner
Nov 29, 2018 at 1:52
• align is intended to be used for multi-line, not single line, displays. Nov 29, 2018 at 2:31
• @Werner I want the same vertical space before and after align environments, just like other displayed formulas.
– Z.H.
Nov 29, 2018 at 5:31
• @Z.H.: Then you should not adjust \lineskiplimit.
– Werner
Nov 29, 2018 at 5:36
• you may want to adjust \normallineskiplimit but having such a large value for \lineskiplimit seems very odd Nov 29, 2018 at 9:48

\normallineskiplimit=\lineskiplimit