I want to typeset an algorithm in LaTeX. I m using the algorithmic package and environment to do so. Everything is working great except when I add comments (using COMMENT), they are output immediately after the statements. I would like for all the comments to be aligned (and offset from the statements). Is there an easy way to do so?
"Reproducing" the PDF output in HTML s pre, I want:
if condition then
something # comment 1
else
something else # comment 2
rather than
if condition then
something # comment 1
else
something else # comment 2