0

I added \usepackage[ruled]{algorithm2e} to show pseudocode algorithms in my document.

I also got an appendix, some figures and tables. In the end these should be listed. This works fine and its is numerated like

- A Appendix
- B Figures
- C Tables
- D References

Problem is, that I also want to list my Algorithms. They are listed but without the correct Prefix Character. Also the Title of my listed algorithms is in english, but all the rest is in german.

Here is a minimal working example which explains my problem much better:

\documentclass[numbers=noenddot]{UVKABoA4}

\usepackage{graphicx} % Standardpaket zur Grafikeinbindung
\usepackage{amsmath,amssymb} % Erweiterung des Mathematik-Modus
\usepackage[absolute,overlay]{textpos}
\usepackage{vmargin}          % Adjust margins in a simple way
\usepackage{tikz}
\usepackage{float}
\usepackage{caption}
\usepackage{subcaption}
\usepackage[ruled]{algorithm2e}
\usepackage{minted}
\usepackage[ngerman]{babel}

\usepackage[raiselinks=true,
            bookmarks=true,
            bookmarksopenlevel=1,
            bookmarksopen=true,
            bookmarksnumbered=true,
            hyperindex=true,
            plainpages=false,
            pdfpagelabels=true,
            pdfborder={0 0 0.5}]{hyperref}

\makeindex

\begin{document}

\pagenumbering{roman}
\begingroup
\changefont{phv}{m}{n}
\tableofcontents
\endgroup

\mainmatter
\renewcommand{\chapterpagestyle}{plain}
\pagestyle{scrheadings}
\pagenumbering{arabic}

%content
\chapter{testChapter}
\section{testSection}

\pagestyle{scrplain}
\appendix
\chapter{TestAppendixChapter }
\section{TesstAppendixSection}

\listoffigures
\listoftables
\listofalgorithms
\bibliography{content/bibliography}

\printindex

\end{document}

enter image description here

Does anyone know what I am doing wrong here? Thank you so much!

2
  • At the moment it is unfortunately not possible to reproduce the output you show since UVKABoA4 is not a standard class. Where did you get it from?
    – leandriis
    Mar 11, 2020 at 18:44
  • 1
    UVKABoA4.clsfrom here internally uses scrbook, so adding \addtotoclist[float]{loa}% \renewcommand\listofalgorithms{\listoftoc[{\listalgorithmcfname}]{loa}}% to your preamble, as suggested in the answer to Add algorithm2e to ToC with KOMA-Script should also work for your case.
    – leandriis
    Mar 11, 2020 at 18:52

1 Answer 1

1

You have to declare those "by hand", by:

\SetAlgorithmName{algorithmname}{algorithmautorefname}{list of algorithms name}

Here algorithmnameis the name given in the caption, the second (optional) argument is to use by \autoref (from the hyperref package), list of algorithms name is the title in the index.

3
  • Thank you! This helps a lot. But one problem ist still there. The page listing my algorithms doesn't appear in the tableOfContent and is not fitting in this A-C kind of numbering the other listing pages have.
    – texNewbie
    Mar 11, 2020 at 14:43
  • Did you use \listofalgorithms? All algorithms with captions should show up.
    – vonbrand
    Mar 12, 2020 at 12:08
  • yes. But not with the right labeling and not in the tableofcontents. But the comment above fromr @leandriis fixed it. Maybe you could extend your answer with his solution?
    – texNewbie
    Mar 12, 2020 at 14:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .