I want to add the word "Algorithm" in the LOA.
Using this approach: Algorithm in LOA
adds the term to the LOA.
However, because I want to further structure my LOA (acc. to "Parts") I aim at also adding the Part- number as headlines in the TOC/LOF/LOA.
However, using this code also writes "Algorithm" in front of the "Part-number"
The following MWE illustrates the issue:
\documentclass{scrreprt}
\usepackage{algorithm}
\usepackage{algorithmic}
% Adding "Algorithm" in LOA
\let\oldlistofalgorithms\listofalgorithms
\renewcommand{\listofalgorithms}{%
\begingroup%
\let\oldnumberline\numberline%
\renewcommand{\numberline}{Algorithm~\oldnumberline}%
\oldlistofalgorithms%
\endgroup}
\begin{document}
% Adding headlines in LOA
\newcommand{\addtocentrylistof}[3]{%
\ifstr{#2}{}{%
\addcontentsline{lof}{#1}{#3}%
\addcontentsline{lot}{#1}{#3}%
\addcontentsline{loa}{#1}{#3}%
}{%
\addcontentsline{lof}{#1}{\protect\numberline{#2}#3}%
\addcontentsline{lot}{#1}{\protect\numberline{#2}#3}%
\addcontentsline{loa}{#1}{\protect\numberline{#2}#3}%
}%
}
\renewcommand*{\addparttocentry}[2]{%
\addtocentrydefault{part}{#1}{#2}%
\addtocentrylistof{part}{#1}{#2}%
}
\listofalgorithms
\part{A}
% Outline
\begin{algorithm}[!hbt]
\centering
\caption{Optimization}\label{alg:pso}
\begin{algorithmic}[1]
\STATE \textit{GenerateInitialPopulation}(pop)
\FOR {particle $ \leftarrow $ 1 \textit{to} numParticles}
\STATE \textit{Evaluate}(particle)
\ENDFOR
\end{algorithmic}
\end{algorithm}
\end{document}
What I want: Just the Part-number (here: "I) and then the part-Title (here: "A") as headline above all algorithms that are also called "Algorithm 1..."

\documentclass{...}and ending with\end{document}. – Jun 23 '15 at 09:42\documentclass– Jun 25 '15 at 08:03