title: Formatting comments in LaTeX's algorithmic environment
body: <p>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?</p>
  
  <p>"Reproducing" the PDF output in HTML's pre, I want:</p>
  
  <pre><code>if condition then
     something         # comment 1
  else
     something else    # comment 2
  </code></pre>
  
  <p>rather than</p>
  
  <pre><code>if condition then
     something  # comment 1
  else
     something else  # comment 2
  </code></pre>