我在幻灯片中使用了以下 beamer 类。我在幻灯片中放了一些算法,但伪代码看起来不太好
\frame[shrink=25]{\frametitle{Algorithms in Quotient Groups}
\begin{algorithm}[H]
\SetAlgoLined
\textbf{Input} : A group $G$ and a normal subgroup $N$ of $G$\;
\textbf{Find} : Lists $L_i$'s and the elements $m_i$'s as described
above\;
\vspace{0.3cm}
Create an array $\it{flag}$ indexed by the elements of $G$ and set $flag[g] =0, \forall g \in G$\;
$i \leftarrow 0$\;
\For{$g \in G$ }{
\If{$\it{flag}[g] = 0$ }{
% Compute $N_1g$\;
$i \leftarrow i +1$\;
Prepare a list $L_i$ of size $|G/N|$ with the elements of $Ng$\;
$m_i \leftarrow \textit { min }L_i$\; %$\texttt{ linear search on } L_i$\;
\For{$g_1 \in Ng$ }{
$\it{flag}[g_1] = 1$\;
}
}
}
\caption{Computing lists corresponding to the cosets of $N$ in $G$.}
\label{algo1}
\end{algorithm}
}
问题 : 这里有几个问题,第一个幻灯片标题和算法之间的间距。第二个伪代码左侧移位。还有其他更好的方法来放置算法的伪代码吗?