I am writing a paper in Italian and I need to include pseudo code in my latex document so I am currently using the algorithm
and algorithmic
packages. At the top of every algorithm the label Algorithm 1
is shown, but I'd like for it to be in Italian instead. I have previously included:
\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}
with no change whatsoever, is there any way to localize it?
\documentclass[a4paper,12pt]{article}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage[italian]{babel}
\usepackage[utf8]{inputenc}
\title{ASD}
\author{haunted85}
\date{Ottobre 2012}
\begin{document}
\maketitle
\section{}
\begin{algorithm}
\caption{Questo è un algoritmo.}
\begin{algorithmic}[1]
\STATE int Count(int $N$)
\STATE $sum = 0$
\FOR{$i \leq N$}
\FOR{$j = i \leq N$}
\STATE $sum = sum + 1$
\ENDFOR
\ENDFOR
\RETURN $sum$
\end{algorithmic}
\end{algorithm}
\end{document}
Best Answer
Either use
\floatname{algorithm}{Algoritmo}
(see section 4.4 of thealgorithms
manual) or, if you want to be able to switch between Italian and English caption names, redefine\ALG@name
usingbabel
macros.