Take the 2-minute tour ×
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 am trying to write some heuristics for a problem using the algorithm2e package.

However as you may know, when you write :

\begin{algorithm}
\caption{Heuristic 1: Name of Heuristic}
 ...
\end{algorithm}

The output says


Algorithm 1: Heuristic 1: Name of Heuristic


Do someone know how do I get it to write:


Heuristic 1: Name of Heuristic


instead ?

PS. I don't know if this command does the trick: \SetAlgoRefName{} I could not get it to work, anyone has an example where they used it?

Related topics are:

In different packages:

share|improve this question
add comment

1 Answer

up vote 10 down vote accepted

\SetAlgorithmName requires three arguments:

\SetAlgorithmName{algorithmname}{algorithmautorefname}{list of algorithms name}

such as

\SetAlgorithmName{Heuristic}{heuristic}{List of Heuristics}

You could also directly redefine the macros of the algorithm2e package:

\renewcommand*{\listalgorithmcfname}{List of Heuristics}
\renewcommand*{\algorithmcfname}{Heuristic}
\renewcommand*{\algorithmautorefname}{heuristic}
share|improve this answer
    
Hurray! Actually I did not have the right version of algorithm2e at the office. That was why it did not work. Please accept my apologies for making you waste your time. Thanks anyway! –  Gopi Jul 6 '11 at 19:23
add comment

Your Answer

 
discard

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.