Is there any LaTeX package for typesetting algorithms in the style Donald Knuth uses in The Art of Computer Programming?
I know about the algorithm2e
package, but I am looking for something that produces output like this:
1. [Check for lower bound.] If X < lower_bound
, go to 3.
2. [Check for upper bound.] If X > upper_bound
, go to 4.
...
I suppose I can use \newcommand
and define my own macro, but I was hoping for something with more intelligence.