I'm facing a problem with KOMA-Script and algorithm2e: algorithm captions in the list of algorithms collide with the numbers preceding them. See the image for an impression. How would I go about fixing this?

enter image description here


To typeset the entries in the list of algorithms, algorithm2e uses


To add some extra spacing between the number and the title, you can redefine \l@algocg and use a greater value for the third argument:

\usepackage{chngcntr}% for the example

\counterwithin{algocf}{section}% for the example I assumed you subordinate algorithm counter to that of the sections
\renewcommand*\l@algocf{\@dottedtocline{1}{1em}{3.2em}}% Original {1}{1em}{2.3em}


\setcounter{chapter}{5}% just for the example
\chapter{Test chapter}
\setcounter{section}{1}% just for the example
\section{Test section}
\setcounter{algocf}{13}% just for the example
\caption{Test algorithm}


enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.