Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

Instead it appears as:

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}
share|improve this question
    
Welcome to TeX.sx! A tip: You can use backticks ` to mark your inline code –  Corentin Nov 12 '12 at 10:27
    
    
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
show 2 more comments

1 Answer

up vote 3 down vote accepted

You can try with

\listofalgorithms
\addtocontents{loa}{\def\string\figurename{Algorithm}}

How classicthesis manages added lists is not completely without problems.

share|improve this answer
    
Thanks egreg, works perfectly. Also thanks for prompting me to look at the newer version of classicthesis, it has sorted out a spacing problem I had with the list of algorithms beforehand. –  BruceJones Nov 12 '12 at 16:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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