Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
1  
    
thank you! Now it displays "Algorithmus 1: XYZ". Now I only need the number to be removed, if it is possible. –  dh87 Mar 3 at 16:17
    
Sorry for missing the part about numbering. –  lockstep Mar 3 at 16:22
add comment

1 Answer 1

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}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.