NOTE: This question is specifically about adding vertical space that increases to compensate for tall symbols. Thus, it is not a duplicate of How can I change the whitespace above and below math displays?.
I'm trying to revise my university's thesis class to produce spacing with displayed math that works a little bit better with double spacing (which is required). What I have in mind is this:
- The distance above and below a displayed math environment should be the same as the distance between the top of a typical line of text and the bottom of the preceeding line. In particular, symbols that go even slightly above the "usual" height should lower the baseline.
- Within a multiline displayed math environment such as
alignoreqnarray, the distance between baselines should be the same as\baselineskipunless this would cause the distance between symbols to go below (say)6pt, in which case the baseline should be lowered so that the distance between symbols is exactly8pt.
For instance, in the document below, the space between the two Z= lines needs to be increased, and the space below the bottom math line needs to be increased even more.

How can this be accomplished? (By changing settings in the preamble; I'm writing a document class, not playing with specific pieces of math.)
Here's what I've got so far:
\documentclass[10pt]{article}
%Code that belongs in the class file:
\makeatletter
\RequirePackage[doublespacing]{setspace}
\AtBeginDocument{%
% \lineskiplimit=0pt%
% \lineskip=\dimexpr\baselineskip-\f@size pt\relax%
\abovedisplayshortskip=0pt%
\belowdisplayshortskip=0pt%
\abovedisplayskip=0pt%
\belowdisplayskip=0pt%
\jot=0pt%
}
\makeatother
%Code that belongs in the preamble:
\usepackage{amsmath}
\usepackage{lipsum}
\begin{document}
\lipsum*[2]
\begin{align*}
f \colon X &\to Y \\
x &\mapsto y \\
Z &= \left\lfloor\frac{\mathcal E \hat{} \otimes \mathcal E}{g\mathcal E \hat{} \otimes \mathcal E} \right\rfloor \\
Z &= \left\lfloor\frac{\mathcal E \hat{} \otimes \mathcal E}{g\mathcal E \hat{} \otimes \mathcal E} \right\rfloor
\end{align*}
\lipsum*[2]
\end{document}
