2

I have a problem. I included the following:

\documentclass[a4paper,11pt,reqno]{book} 
\usepackage{algorithm}
\usepackage{algorithmicx}
\usepackage[noend]{algpseudocode}

and wanted to create a \listofalgorithms but not as chapter; I want it as section. I tried the following:

\renewcommand{\listalgorithmname}{}
\section*{Algorithmenverzeichnis}
\addcontentsline{toc}{section}{Algorithmenverzeichnis}
\listofalgorithms

But then the title and the list are not on the same page even with the command \begin{samepage}\end{samepage} around or \nopagebreak in between. Can you please help me?

0

1 Answer 1

2

Temporarily change \chapter into \section:

enter image description here

\documentclass{book} 
\usepackage{algorithm}

\begin{document}

\chapter{A chapter}

\begingroup
\renewcommand{\listalgorithmname}{Algorithmenverzeichnis}
\let\chapter\section
\listofalgorithms
\endgroup

\begin{algorithm}
  \caption{An algorithm}
\end{algorithm}
\end{document}

The grouping above limits the scope of the redefinition(s). As such \chapter becomes \section only until \endgroup.

You must log in to answer this question.

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