I use algorithm2e to format my pseudocode. It doesn't give exactly the same look as you get in CLRS, but it's quite flexible, is pretty easy to use and gives a nice output.
Here's an example of it in use:
% In preamble
\usepackage[vlined, ruled, linesnumbered]{algorithm2e}
% ...
\begin{document}
% ...
\begin{algorithm}[H]
\caption{\FuncSty{StoogeSort(}$A$,\ $i$,\ $j$\FuncSty{)}}
\SetKwFunction{StoogeSort}{StoogeSort}
\SetKwFunction{Swap}{Swap}
\SetKwData{OneThird}{OneThird}
\SetKwData{TwoThirds}{TwoThirds}
\SetArgSty{}
\If{$j-i \leq 1$}{ \Return{}\; }
\OneThird $\leftarrow i + \frac{j-i}{3}$\;
\TwoThirds $\leftarrow i + 2\frac{j-i}{3}$\;
\tcc{Sort the first and last elements.}
\If{$A[i] > A[j]$}{ \Swap{$A$, $i$, $j$}\; }
\tcc{Then recursively sort the first 2/3rds, the last 2/3rds and the first 2/3rds again.}
\StoogeSort{$A$, $i$, \TwoThirds}\;
\StoogeSort{$A$, \OneThird, $j$}\;
\StoogeSort{$A$, $i$, \TwoThirds}\;
\end{algorithm}
% ...
\end{document}
Which gives this output (tex source).

More examples and documentation is available in the algorithm2e manual.
answered
01 May '12, 12:52
Sebastian Pa... ♦♦
865●3●11●33
accept rate:
41%