# how to change the algorithm environment?

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:

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?)

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

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:

Substituting plain with boxed:

And finally the default style (ruled):