Sign up ×
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 have to write an algorithm in Hungarian, where the caption must look like:

1.3. Algoritmus: caption of alg

instead of the usual style

Algorithm 1.3: caption of alg.

Until now I had no problem as the package babel was doing all the work, but changing from algorithm-algorithmic to the algorithm2e package, it fails.

Anyone know the way to do so?

share|improve this question
Welcome to TeX.SX. – Claudio Fiandrino Jan 23 '13 at 15:35

1 Answer 1

up vote 2 down vote accepted

You can redefine an internal macro of algorithm2e, namely \fnum@algocf. Put


into your preamble. Complete example:




  \KwData{this text}
  \KwResult{how to write algorithm with \LaTeX2e }
  \While{not at end of this document}{
    read current\;
      go to next section\;
      current section becomes this one\;
      go back to the beginning of current section\;
  \caption{How to write algorithms}

share|improve this answer
Thanks a lot, it does the job. To be perfect I corrected it by adding the dot after the numbering: \renewcommand{\fnum@algocf}{\AlCapSty{\AlCapFnt\thealgocf.\nobreakspace\algorit‌​hmcfname}} – Boglárka G.-Tóth Jan 23 '13 at 16:04

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.