The algorithm2e package (first released 1995, latest updated December 2009 according to the v4.01 manual) allows typesetting algorithms with a lot of customization. The package is loaded like
\usepackage[options]{algorithm2e}
and a simple example, taken from the v4.01 manual, is
\begin{algorithm}[H]
\SetAlgoLined
\KwData{this text}
\KwResult{how to write algorithm with \LaTeX2e }
initialization\;
\While{not at end of this document}{
read current\;
\eIf{understand}{
go to next section\;
current section becomes this one\;
}{
go back to the beginning of current section\;
}
}
\caption{How to write algorithms}
\end{algorithm}
which produces
posted on 2012-10-31 21:30
luis 阅读(2011)
评论(0) 编辑 收藏 引用 所属分类:
Latex