5

I am using the algorithm package and I need my algorithm to be labeled as "Algorithmus: XYZ" instead of "Algorithm 1: XYZ" where XYZ is my caption for the algorithm.

3
  • 1
    possible duplicate of How to localize label using algorithm and algorithmic packages Commented Mar 3, 2014 at 16:10
  • thank you! Now it displays "Algorithmus 1: XYZ". Now I only need the number to be removed, if it is possible. Commented Mar 3, 2014 at 16:17
  • Sorry for missing the part about numbering. Commented Mar 3, 2014 at 16:22

1 Answer 1

6

I think loading the package caption is the appropriate way.

\usepackage{caption}
\DeclareCaptionLabelFormat{alglabel}{\bfseries\csname ALG@name\endcsname:}
\captionsetup[algorithm]{labelformat=alglabel}

\documentclass{article}

\usepackage[english]{babel}

\usepackage{algorithmic}
\usepackage{algorithm}
\makeatletter
\addto\captionsenglish{\renewcommand{\ALG@name}{Algorithmus}}
\makeatother
\usepackage{caption}
\DeclareCaptionLabelFormat{alglabel}{\bfseries\csname ALG@name\endcsname:}
\captionsetup[algorithm]{labelformat=alglabel}
\begin{document}

\begin{algorithm}
\caption{An algorithm}
\begin{algorithmic}
\STATE Some text.
\end{algorithmic}
\end{algorithm}

\end{document}

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.