I have an algorithm in my document
It looks like this:
\begin{algorithm}
\caption{Merge Digest: Insert\label{mergeDigestInsert}}
\begin{algorithmic}[1]
[....algorithm is here]
\end{algorithmic}
\end{algorithm}
When I compile the document I get this error:
Package caption Error: \caption outside float.
I tried putting the caption inside of the algorithmic block, and I tried to put it at the end. I also read somewhere that I need to declare algorithm as a caption type like this:
\DeclareCaptionType{algorithm}
but when I do that I get this error:
LaTeX Error: ./doc.tex:21 LaTeX Error: Command \algorithm already defined.
I appreciate any help that can be given on this.
\DeclareCaptionTypesince this defines a new floating environment. So I second what Gonzalo wrote, please give us a MWE so we can examine the problem. – Axel Sommerfeldt Dec 17 '11 at 8:08