2

I am interested in changing the algorithm environment so that the numbered "Algorithm" title appears at the bottom instead of at the top, and also the three rulers (one above the Algorithm caption, second below the Algorithm caption, and third at the bottom of the whole environment) won't be there.

I couldn't find a way of doing it according to here:

http://cs.brown.edu/about/system/software/latex/doc/algodoc.pdf

Any ideas how to do that?

(Maybe I should define a new environment which is very similar to the Figure environment instead, only the heading is Algorithm instead of Figure?)

2
  • What package are you using to produce algorithms? Dec 19, 2013 at 11:25
  • I am using the "algorithm" package with "algorithmic" inside the an algorithm environment for the actual algorithm.
    – kloop
    Dec 19, 2013 at 12:20

1 Answer 1

6

The package algorithm accepts three options at loading time, in regards of the appearance of the algorithm: ruled, boxed and plain. The default is ruled but I think you are looking for the plain style.

Example in plain style:

\documentclass{article}
\usepackage[plain]{algorithm}
\usepackage{algorithmic}

\begin{document}
\begin{algorithm}
\begin{algorithmic}
\FOR{$i=1 \to 10$}
    \STATE X
\ENDFOR
\end{algorithmic}
\caption{My algorithm}
\end{algorithm}
\end{document} 

Output:

enter image description here

Substituting plain with boxed:

enter image description here

And finally the default style (ruled):

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .