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}


\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 '18 at 01:52alignis intended to be used for multi-line, not single line, displays. – barbara beeton Nov 29 '18 at 02:31\lineskiplimit. – Werner Nov 29 '18 at 05:36\[...\]and$$...$$in my case. The problem is the inconsistent spaces before and after thealignformula. – Z.H. Nov 29 '18 at 05:37alignenvironments? I don't think I am using \lineskiplimint in a wrong way. – Z.H. Nov 29 '18 at 05:41alignformulas. – Z.H. Nov 29 '18 at 05:44alignuses\lineskiplimitand\[...\]doesn't. Check\@display@initinamsmath.dtx. – Werner Nov 29 '18 at 05:45alignuses\lineskiplimitin a buggy way? – Z.H. Nov 29 '18 at 05:49\lineskipis used you get inconsistent spacing, as that is what it is for, a fallback for when consistent\baselineskipcan not be ensured. By increasing\lineskiplimityou make that more likely. – David Carlisle Nov 29 '18 at 07:54alignenvironment needs to use \lineskiplimit. Are there any special reasons for it? – Z.H. Nov 29 '18 at 09:28% \begin{macro}{\strut@} % \begin{macro}{\strutbox@} % Next follows a special internal strut which is supposed to match % the height and the depth of a normal |\strut| minus % |\normallineskiplimit| according to M. Spivak.– David Carlisle Nov 29 '18 at 09:47\normallineskiplimitbut having such a large value for\lineskiplimitseems very odd – David Carlisle Nov 29 '18 at 09:48