I tried to create my own "List of things" with help of this post: Define your own list of
Now my questions:
- I don't want to use the command
\algorithm {Text}. Instead I want to use a container like\begin{algorithm}...\end{algorithm}. How can I do this? (optional) - The List of Algorithms is empty even I use the first command. How can I fill it?
- The headline looks different to the headlines of the "normal" lists.
Here is my example:
\documentclass[a4paper, oneside, 12pt, listof=totoc, bibliography=totoc, titlepage, headinclude = false, footinclude = false, mpinclude = false, BCOR = 0mm, DIV = calc]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{graphicx}
\makeatletter
\def\ScaleIfNeeded{%
\ifdim\Gin@nat@width>\linewidth
\linewidth
\else
\Gin@nat@width
\fi
}\makeatother
\usepackage{setspace}
\onehalfspacing
\usepackage[a4paper, left=3 cm, right=4 cm, top=3 cm, bottom=1.5 cm]{geometry}
\usepackage{fancyhdr}
\usepackage{longtable}
\usepackage{bibgerm}
\usepackage{eurosym}
\usepackage{booktabs}
\usepackage{array}
\usepackage{color}
\usepackage{tabularx}
\usepackage{pdflscape}
\usepackage[justification=RaggedRight, singlelinecheck=false]{caption}
\usepackage[pageanchor=false]{hyperref}
\usepackage{listings}
\usepackage{algorithm}
\usepackage{etoolbox}
\usepackage{pdfpages}
\usepackage[scaled]{uarial}
\usepackage[printonlyused]{acronym}
\usepackage{bigstrut}
\usepackage{multirow}
\usepackage{acronym}
\usepackage{ulem}
\usepackage{tocloft}
\fancypagestyle{plain}{}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[C]{- \thepage \ -}
\addtolength{\headwidth}{\marginparsep}
\addtolength{\headwidth}{0.5\marginparwidth}
\renewcommand{\headrulewidth}{1pt}
\setcounter{secnumdepth}{5}
\setlength{\parindent}{0pt}
\newcommand{\listalgorithm}{Algorithmenverzeichnis}
\newlistof{Algorithmen}{algo}{\listalgorithm}
\newcommand{\Algorithmen}[1]{%
\refstepcounter{Algorithmen}
\par\noindent\textbf{Algorithmen \theAlgorithmen. #1:}
\addcontentsline{algo}{Algorithmen}
{\protect\numberline{\thechapter.\theAlgorithmen}#1}\par}
\begin{document}
listalgorithm
\newpage
\Algorithmen{My Algorithm}
\includegraphics[width=\ScaleIfNeeded]{../Bilder/node_init.png}
The last two lines should look like (this is optional)
\begin{Algorithm}
\caption{My Algorithm}
\includegraphics[width=\ScaleIfNeeded]{../Bilder/node_init.png}
\end{Algorithm}
And the heading of this algorithm list looks like:
List of Algorithm
But it should look like:
List of Algorithm
I hope I could explain my problem well enough ;)
P.S.: I searched for some posts but they did not fit to my problem :/
Edit: Okay I have tried both answers now and both are working.
My code looks nearly the same like the solutions, so I won't post it again. But I explain what my problem was.
cgnieder:
Everything works fine and looks how it should. My first problem was that I used the "algorithm" package and named the new toc algorithms too. So the package overwrote my commands. After I deleted it everything was fine.
Gonzalo:
Your solution nearly works fine too. The list looks like it should (bold headline and entries) but my other lists are not linked (anchored) in the pdf's menu. That seemes to be a problem with the "hyperref" package. After I commented and compiled nothing worked. But when I recommended it the list was created fine (except the anchors).
Because of the remaining problem and that the "tobasic" package is a class implemented package I chose cgnieders answer as my accepted one.
I thank you very much. You both helped me a lot!! Thank you!

