Neal Becker wrote:
What do you like for documenting an algorithm?

I'm thinking of something like an itemize environment (displaying structure
via indentation), but without bullets.



I'm writing from limited experience, but for expressing an algorithm (rather than actual computer code) I prefer the algorithmicx package (in an algorithm float, or floats). It comes with 2 1/2 styles: pseudocode (my preference); Pascal; and C (although the manual says the C implementation is incomplete -- don't know, haven't used it). There also seems to be a MATLAB variant on CTAN, which I don't recall my copy of the manual mentioning. I think there's provision for TeXperts to add their own dialects, but pseudocode is flexible enough for me.

Docs (including examples) are at http://www.ctan.org/tex-archive/macros/latex/contrib/algorithmicx/ if you're curious. Bo's suggestions resonate with me for code listings, but for mathematical statements of algorithms, I prefer algorithmicx.

/Paul

Reply via email to