I want to write an algorithm in LaTeX. It's not any programming language, it is pseudocode with a very mathematical style. Furthermore it is divided in a main function and some subfunctions. I also would like to be able to comment (almost) every line to describe what it is used for.
As an example, you may want to take a look at this link: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.83.3496&rep=rep1&type=pdf
See page 10 for the code. I would like to write it in the very same style if this is somehow possible.
Any help is appreciated :)
listings,fancyvrbandminted. There are plenty of questions about them on tex.sx that you can check out. – doncherry Aug 22 '11 at 15:22