TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am relatively new to LaTeX. If I use standard algorithm and algorithmic environment for my algorithm listings I'm getting the borders displayed around the table with the pseudocode. How to remove them? I also want to have the caption of the algorithm below the pseudocode - it is currently above. I believe the problem is extremely easy but googling didn't give me any hints for that.

share|improve this question
up vote 5 down vote accepted

If you are using the algorithm package, it is enough to use the plain option:



  \STATE $sum\gets 0$
  \STATE $i\gets 1$
  \WHILE{$i\le n$}
  \STATE $sum\gets sum+i$
  \STATE $i\gets i+1$
\caption{Calculate $y = x^n$}


enter image description here

share|improve this answer
Yes, this is it! I knew it must be a fast hack :-) – Jamie Jun 3 '11 at 19:47
@Jamie: It isn't a fast hack. It is reading the documentation. – Marco Daniel Aug 31 '11 at 17:12
Thanks for the plain! – Dennis Mar 26 '12 at 21:56
Can this option plain be set locally for a specific algorithm, leaving other algorithms with borders? – hengxin Oct 30 '14 at 13:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.