时间:2021/6/22
伪代码流程图
这个伪代码流程图可以跨页!
第一部分要放\begin{document}外面,没有这个你的伪代码流程图无法跨页。
\usepackage{
algorithm,algpseudocode,float}
\usepackage{
lipsum}
\makeatletter
\newenvironment{
breakablealgorithm}
{
% \begin{
breakablealgorithm}
\begin{
center}
\refstepcounter{
algorithm}% New algorithm
\hrule height.8pt depth0pt \kern2pt% \@fs@pre for \@fs@ruled
\renewcommand{
\caption}[2][\relax]{
% Make a new \caption
{
\raggedright\textbf{
\ALG@name~\thealgorithm} ##2\par}%
\ifx\relax##1\relax % #1 is \relax
\addcontentsline{
loa}{
algorithm}{
\protect\numberline{
\thealgorithm}##2}%
\else % #1 is not \relax
\addcontentsline{
loa}{
algorithm}{
\protect\numberline{
\thealgorithm}##1}%
\fi
\kern2pt\hrule\kern2pt
}
}{
% \end{
breakablealgorithm}
\kern2pt\hrule\relax% \@fs@post for \@fs@