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?align
is intended to be used for multi-line, not single line, displays.\lineskiplimit
.\normallineskiplimit
but having such a large value for\lineskiplimit
seems very odd