there seems to exists a clash between revtex4-1 and the algorithm2e package. Whenever I try to insert an algorithm block when using the revtex4-1 document class, the tabulation is not working properly. The following latex code should hopefully be self explanatory.
%\documentclass[10]{article}
\documentclass[10]{revtex4-1}
% these are to avoid another clash between revtex and algorithm2e
\makeatletter
\newif\if@restonecol
\makeatother
\let\algorithm\relax
\let\endalgorithm\relax
% needed includes
\usepackage[ruled]{algorithm2e}
\usepackage{algorithmic}
\begin{document}
The following pseudocode exibits a clash between revtex4-1 and algorithm2e.
\begin{algorithm}
\caption{Calculate something}
\begin{algorithmic}
\FOR{every thing you}
\FOR{every step you}
\STATE{compute something}
\ENDFOR
\ENDFOR
\end{algorithmic}
\end{algorithm}
\end{document}
This is a how the rendered pdf shows on my system (sorry, I'm not allowed to insert images in this post). The tabulation is correct when using the simple article document class. I am using Texmaker (with texLive) under Ubuntu 10.04.
Using the revtex4-1 document class:
for every thing you do
for every step you do
compute something
end for
end for
Using the article document class:
for every thing you do
for every step you do
compute something
end for
end for
Anybody with a solution to make these two work together?