Text Formattingalgorithm2e | Incompatibility with 'scrartcl' class?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
GuArD1An
Posts: 2
Joined: Thu Jul 07, 2011 5:11 pm

algorithm2e | Incompatibility with 'scrartcl' class?

Post by GuArD1An »

Hi,

I have a problem with the algorithm2e package. It prevents me from creating a TOC when using scrartcl.
A minimalized code is:

Code: Select all

\documentclass[]{scrartcl}
\usepackage[english]{babel}
\usepackage{algorithm2e}
\begin{document}
\tableofcontents
\end{document}
I then get:

Code: Select all

! Undefined control sequence.
\chapter ...ace {10\p@ }}\algocf@original@chapter 
                                                  
l.5 \tableofcontents
I'm using MikTex 2.9 (64bit) in Windows 7 and have updated my algorithm2e package through the Package Manager to the newest version.
Thanks in advance for any ideas to solve this.

Michael
Last edited by GuArD1An on Thu Jul 07, 2011 6:37 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

algorithm2e | Incompatibility with 'scrartcl' class?

Post by Stefan Kottwitz »

Hi Michael,

welcome to the board!
Yes, that package relies on an existing \chapter definition. A quick fix is

Code: Select all

\let\chapter\section
Stefan
LaTeX.org admin
GuArD1An
Posts: 2
Joined: Thu Jul 07, 2011 5:11 pm

Re: algorithm2e | Incompatibility with 'scrartcl' class?

Post by GuArD1An »

Thx for the quick reply Stefan. It works fine now.
Post Reply