When using the algorithm2e package with the beamer class I get a different indentation for the line numberings than when using it with other classes.
With beamer class they look like this:
\documentclass{beamer}
\usepackage[ruled,linesnumbered]{algorithm2e}
\begin{document}
\frame{
\begin{algorithm}[H]
\caption{My algorithm}
\While{something holds}{
calculate something
}
output something
\end{algorithm}
}
\end{document}
But I would like to have them like this:
\documentclass{article}
\usepackage[ruled,linesnumbered]{algorithm2e}
\begin{document}
\begin{algorithm}[H]
\caption{My algorithm}
\While{something holds}{
calculate something
}
output something
\end{algorithm}
\end{document}
Any idea would be appreciated. Thank you very much in advance.
Because the problem is so simple I was surprised that after nearly half an hour searching I could not find this question already asked somewhere else. I apologize if this is the case.