10

When using algorithmx you get "Algorithm 1 algorithm name". How can you change the label "Algorithm"? I do not mean individually for each algorithm, but instead changing it globally the whole latex project. The reason for this is because I rather want it to say "algoritme", which is algorithm in Norwegian.

enter image description here

\documentclass{article}
\usepackage[norsk]{babel} 
\usepackage{tabularx}
\usepackage{apacite}
\usepackage{hyperref}
\usepackage{enumerate}
\usepackage[normalem]{ulem}
\usepackage{color}
\usepackage[noend]{algpseudocode}
\usepackage{algorithm}
\begin{document}

\begin{algorithm}
\begin{algorithmic}[1]
\State a
\label{a}
\caption{name}
\end{algorithmic}
\end{algorithm}

\end{document}

1 Answers1

14

To some extent this is discussed in the post Change name of algorithm. This answer addresses the same content, but also some other issues:

  • To change the algorithm naming, add

      \makeatletter
      \renewcommand{\ALG@name}{Algoritme}
      \makeatother
    

in your preamble after \usepackage{algorithm}.

  • The algorithmic environment should not have a \caption; that should be used in the algorithm (float) environment;

  • You should always place the \label after \caption.

enter image description here

\documentclass{article}
\usepackage[noend]{algpseudocode}
\usepackage{algorithm}
\makeatletter
\renewcommand{\ALG@name}{Algoritme} %Change the name Algorithm to Algoritme
\makeatother
\begin{document}

\begin{algorithm} \caption{name}\label{a} \begin{algorithmic}[1] \State a \end{algorithmic} \end{algorithm}

\end{document}

Ka Wa Yip
  • 823
Werner
  • 603,163