Probleme d'algorithme en latex

Bonjour,
donc j'ai toujours le même problème.
Je veux ecrire un algorithme dans mon rapport avec la tex, j'ai utilisé les package algorithm et algorithmic. ça donne un résultats mais le problème est que les mots clé tels que if, end, for, while, ... etc sont écrit en anglais alors que mon rapport est en français.
est ce qu'il ya un moyen d'écrire ces mots clé en français ou bien est ce qu'il existe un autre package qui le fait.
Merci.
Configuration: Windows XP
Internet Explorer 6.0

2 réponses

  • Votes
  • Date
  • Date décroissante
  1. Bonjour,
    j'ai trouvé ça :
    %%% francisation des algorithmes
    \renewcommand{\algorithmicrequire} {\textbf{\textsc{Entrées:}}}
    \renewcommand{\algorithmicensure}  {\textbf{\textsc{Sorties:}}}
    \renewcommand{\algorithmicwhile}   {\textbf{tantque}}
    \renewcommand{\algorithmicdo}      {\textbf{faire}}
    \renewcommand{\algorithmicendwhile}{\textbf{fin tantque}}
    \renewcommand{\algorithmicend}     {\textbf{fin}}
    \renewcommand{\algorithmicif}      {\textbf{si}}
    \renewcommand{\algorithmicendif}   {\textbf{finsi}}
    \renewcommand{\algorithmicelse}    {\textbf{sinon}}
    \renewcommand{\algorithmicthen}    {\textbf{alors}}
    \renewcommand{\algorithmicfor}     {\textbf{pour}}
    \renewcommand{\algorithmicforall}  {\textbf{pour tout}}
    \renewcommand{\algorithmicdo}      {\textbf{faire}}
    \renewcommand{\algorithmicendfor}  {\textbf{fin pour}}
    \renewcommand{\algorithmicloop}    {\textbf{boucler}}
    \renewcommand{\algorithmicendloop} {\textbf{fin boucle}}
    \renewcommand{\algorithmicrepeat}  {\textbf{répéter}}
    \renewcommand{\algorithmicuntil}   {\textbf{jusqu'à}}


    (la suite sur http://quickies.seriot.ch/index.php?cat=1#a8 )
    1. merci bcp pour votre aide. je vais essayé ce code.
    2. merci nat25, moi aussi je bloque là
      mais je trouve pas où est ce que je mets tout ce code?
      j'attends vos reponses
  2. Je suppose que tu utilises le package «?algorithm2e?», celui-ci possède une option pour la langue :
    \usepackage[french]{algorithm2e}

    ;)
    1. bonjour moi aussi j'ai le mm pb et j'ai utilisé le package que vous avez recommandé mais il affiche une erreur : ""C:\Program Files\MiKTeX 2.9 Setup\tex\latex\algorithms\algorithm.sty"

      Merci d'avance pour votre aide.