algorithm2e格式紧凑 有竖线,若想用algorithm2e一般模版已经定义过algorithm 会报错
Since the algorithm
and algorithm2e
packages both define an algorithm
environment, simply loading both with no extra precaution will cause a name clash like you experienced.
However, you can still use both packages (if you really need both), but you need to pass the option algo2e
to algorithm
:
\usepackage[algo2e]{algorithm2e}