$ 0 0 beamer中可以使用algorithm2e宏包来写算法吗?可以。但是注意:algorithm是浮动的,不能这么放盒子里面。如果需要这种样子,改用begin{algorithm}[H]否则出现LaTeX Error: Not in outer par mode.