I want the caption of my algorithm to be on top and flushed left:
\documentclass{article}
\usepackage[plain]{algorithm}
\usepackage{algpseudocode}
\begin{document}
\begin{algorithm}
\caption{Sketch of our Compression Algorithm}
\label{fig:GENIDEA}
\begin{algorithmic}[1]
\While{Input contains characters}
\State Find matching reference block $B$ for current input position
\State Perform referential compression with respect to $B$ until we cannot find ``long'' matches anymore
\EndWhile
\end{algorithmic}
\end{algorithm}
\end{document}
Best Answer
"on top" can be realized using
\restylefloat
offered by thefloat
package which is used by thealgorithm
package. (Unfortunately thealgorithm
package does not offer an package optionplaintop
for that.)"flushed left" can be realized using
\captionsetup[algorithm]{...}
offered by thecaption
package.