# Add algorithm label to list of algorithms

I'm using the classicthesis package along with the algorithmic package.

I'm trying to get the list of algorithms to look the same as the list of figures/tables etc., but cant find a way to make it appear as:

Algorithm 1.1        First Algorithm
Algorithm 1.2        Second Algorithm
Algorithm 1.3        Third Algorithm


Figure 1.1        First Algorithm
Figure 1.2        Second Algorithm
Figure 1.3        Third Algorithm


Any ideas?

edit #1: I've tried the following from this suggested post

\makeatletter
\let{\oldl@algocf}{\l@algocf}
\renewcommand{\l@algocf}[2]{\oldl@algocf{Algorithm #1}{#2}}
\makeatother


But that gives a number of errors beggining with:

! Missing control sequence inserted.
<inserted text>
\inaccessible
l.276 \let{
\oldl@algocf}{\l@algocf}
Please don't say \def cs{...}', say \def\cs{...}'.


I'm using the following algorithm packages:

\usepackage{algorithm}
\usepackage{algpseudocode}


One comment on that post suggested replacing l@algocf with l@algorithmcf but that gives similar errors

edit #2: As requested heres a simplified example that produces the listing without the algorithm label, note you need classicthesis.sty and classicthesis-config.tex in the build directory, they can be found here. A sample pdf produced with this code can be found here

\documentclass[ twoside,openright,titlepage,numbers=noenddot,headinclude,%1headlines,%         letterpaper a4paper
footinclude=true,cleardoublepage=empty,abstractoff, % <--- obsolete, remove (todo)
BCOR=5mm,paper=a4,fontsize=11pt,%11pt,a4paper,%
ngerman,american,%
]{scrreprt}

\input{classicthesis-config}

\usepackage{algorithm}
\usepackage{algpseudocode}

\numberwithin{algorithm}{chapter}

\begin{document}

\frenchspacing
\raggedbottom
\pagenumbering{roman}
\pagestyle{plain}

%********************************************************************
% Frontmatter
%*******************************************************
\listofalgorithms

%********************************************************************
% Mainmatter
%*******************************************************
\pagenumbering{arabic}

\begin{algorithm}
\caption{Test Algorithm}
\label{alg:test}
\begin{algorithmic}[1]
\For{$i \gets i + 1$}
\State $a = 2i$
\EndFor
\end{algorithmic}
\end{algorithm}

\cleardoublepage

\end{document}

-
Welcome to TeX.sx! A tip: You can use backticks  to mark your inline code –  Corentin Nov 12 '12 at 10:27
–  Peter Grill Nov 12 '12 at 11:04
Thanks Peter, I've updated my question accordingly. The solution there didn't solve my problem, as I'm not useing the algorithm2e package. –  BruceJones Nov 12 '12 at 11:31
@BruceJones Could you please add a minimal example of code? –  egreg Nov 12 '12 at 11:57
egreg, I've added an example showing what I'm currently doing. –  BruceJones Nov 12 '12 at 13:54

\listofalgorithms

How classicthesis` manages added lists is not completely without problems.