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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use


to create an algorithm, I'd like to change "algorithm, begin, end while ..." to French. Is that possible?

This is my example with the package \usepackage{algorithmic}:

\Begin{ \For{$x\in X$}{ $NbSuccInS(x) 
\longleftarrow 0$\; $NbPredInMin(x) 
\longleftarrow 0$\; $NbPredNotInMin(x) 
\longleftarrow |ImPred(x)|$\; 
} } 
\caption{My Algorithm} \label{alg:test} 

I have these errors: undefined control sequence \Begin \for, \newcommand ....

share|improve this question
please make this a complete document showing all packages used – David Carlisle Sep 30 '12 at 18:01
Those errors are unrelated to the translation to French problem, you wuld get them even without the redefinition from For to Pour (which would need to be \renewcommand not \newcommand . It is much easier to answer questions if they contain a single code section starting \documentclass and ending \end{document} If your question had a working document using english keywords someone could show you how to redefine the commands to make it use French keywords. algorithmic appears to define \FOR not \For and doesn't define \Begin as far as I can see. – David Carlisle Sep 30 '12 at 21:33
thank you for answer but i can't find in the list Algorithm --> Algorithme have you an idea please ? – researcher Sep 30 '12 at 22:01
That's from algorithm.sty not algorithmic \newcommand{\ALG@name}{Algorithm} \newcommand{\listalgorithmname}{List of \ALG@name s} to rename \ALG@name you need \makeatletter \makeatother but please post a _complete_example that works in English then it is easy to post an answer using French.then – David Carlisle Sep 30 '12 at 22:04
i add this \renewcommand{\ALG@name}{Algorithm} \renewcommand{\listalgorithmname}{List of \ALG@name s} \makeatletter \makeatother in \begin{document} ? – researcher Sep 30 '12 at 22:15
up vote 8 down vote accepted

The package defines all the fixed text words using simple macros that you can redefine with \renewcommand so for example

\newcommand{\algorithmicelsif}{\algorithmicelse\ \algorithmicif}
\newcommand{\algorithmicendif}{\algorithmicend\ \algorithmicif}
\newcommand{\algorithmicforall}{\textbf{for all}}
\newcommand{\algorithmicendfor}{\algorithmicend\ \algorithmicfor}

if you change \newcommand to \renewcommand and change the English words to French to redefine these commands after loading the package it should all work I think.

share|improve this answer
have you an idea please ? – researcher Sep 30 '12 at 17:50
Please edit the question to have a complete document that shows the problem. – David Carlisle Sep 30 '12 at 17:52

Your Answer


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.