Monday, October 29, 2012

Algorithm2e package of LaTeX

\usepackage[ruled,vlined]{algorithm2e}

\begin{algorithm}
 \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}
Screen Shot 2012 10 29 at 10 00 07 PM

References

  1. http://www.tex.ac.uk/tex-archive/macros/latex/contrib/algorithm2e/algorithm2e.pdf
  2. Algorithms in Latex

No comments:

Post a Comment