TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

Hy, I would like to use the packages vaucanson and algorithm.



   \State $a \gets g$



The problem is that \State is already defined in vaucanson and I get

ERROR: LaTeX Error: Command \State already defined

Is it possible to simply rename one of the \State commands to avoid the conflict?

share|improve this question
up vote 6 down vote accepted

After loading algorithm, and before loading vaucanson-g, put a


Then you can use \MyState as the \State from algorithm, and vaucanson-g can define \State afresh, avoiding the error. (Thanks, @egreg !)

share|improve this answer
Also \let\State\relax is necessary after that, to avoid the error. – egreg Dec 3 '12 at 15:32
Also don't be tempted to swap the definition back after loading vaucanson-g, as that package uses its \State command internally in other commands. – Andrew Swann Dec 3 '12 at 15:42
@dziadgba I edited the answer to make it complete. – mafp Dec 3 '12 at 15:53

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.