如何删除公式周围的空行

如何删除公式周围的空行

当我使用下面的代码时,我发现方程式前后都有空行。如何删除这些空行?

\documentclass[12pt]{report}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{bm}

\begin{document}
\begin{enumerate}
\item Draw $\theta_n$ from the full conditional
\begin{align*}
\pi(\theta_n|\bm{\omega}_i,\bm{\xi},\textbf{Y}) &\propto  \prod_{i=1}^I
\left[\text{Pr}(Y_{ni}=1|\theta_n,\bm{\omega}_i,\bm{\xi})\right]^{y_{ni}}
\left[1-\text{Pr}(Y_{ni}=1|\theta_n,\bm{\omega}_i,\bm{\xi})\right]^{1-      y_{ni}}\\
&\times
\text{n}(\theta_n|0,1),\quad\text{independently for $n=1,\dots,N$.}
\end{align*}
\item Draw $\bm{\omega}_i$ from the full conditional
\begin{align*}
\pi(\bm{\omega}_i|\theta_n,\bm{\omega}_i\bm{\xi},\textbf{Y}) &\propto
\prod_{i=1}^I
\left[\text{Pr}(Y_{ni}=1|\theta_n,\bm{\omega}_i,\bm{\xi})\right]^{y_{ni}}
\left[1-\text{Pr}(Y_{ni}=1|\theta_n,\bm{\omega}_i,\bm{\xi})\right]^{1-    y_{ni}}\\
&\times
\text{dir}    (\bm{\omega}_i|\alpha_{i1},\dots,\alpha_{im}),\quad\text{independently for     $i=1,\dots,I$.}
\end{align*}
\item Draw $\bm{\xi}$ from the full conditional
\begin{align*}
\pi(\bm{\xi}|\theta_n,\bm{\omega}_i,\textbf{Y}) &\propto \prod_{n=1}^N     \prod_{n=1}^N
\left[\text{Pr}(Y_{ni}=1|\theta_n,\bm{\omega}_i,\bm{\xi})\right]^{y_{ni}}
\left[1-\text{Pr}(Y_{ni}=1|\theta_n,\bm{\omega}_i,\bm{\xi})\right]^{1-y_{ni}}\\
&\times
\text{U}(\xi_1|0.1,m)\text{U}(\xi_2|0.1,m),\quad\text{independently for     $n=1,\dots,N$ and $i=1,\dots,I$.}
\end{align*}
\end{enumerate}
\end{document}

提前致谢。

答案1

\begin{enumerate}\abovedisplayskip=0pt
    \item Draw $\theta_n$ from the full conditional
    \begin{align*}
     ...

在此处输入图片描述

相关内容