I am trying to get write an algorithm in LaTeX for minimal document class. Unfortunately, the indentation is completely missing.
Following is my sample code:
\documentclass{minimal}
\usepackage{algorithm2e}
\usepackage{algorithmic}
\usepackage{pslatex}
\special{papersize=36in,24in}
\setlength{\paperwidth}{36in}
\setlength{\paperheight}{24in}
\topskip0pt
\begin{document}
\begin{algorithm}
\SetAlgoLined
\KwData{this text}
\KwResult{how to write algorithm with \LaTeX2e }
initialization\;
\While{not at end of this document}{
read current\;
\eIf{understand}{
go to next section\;
current section becomes this one\;
}{
go back to the beginning of current section\;
}
}
\end{algorithm}
\end{document}
This is how it currently appears using document class - minimal:

This is how want it to appear:

How do I fix this?

minimalclass misses a lot of definitions that you would take for granted. Do you really have to use that class? If so, why? There may be a workaround using a more complete class, such asarticle. – jub0bs Jul 31 '13 at 22:53minimalclass is not really meant for real documents; see this answer. – jon Aug 01 '13 at 18:31