This question already has an answer here:

I am using LyX to prepare an article. The document class is 'IOP article' and I am using the mhchem package to typeset chemical formulae in the paper. I include \usepackage[version=3]{mhchem} in the LaTeX preamble.

I am thrown 11 errors when I try to preview the document:

  • LaTeX Error: Command \leftroot already defined.
  • LaTeX Error: Command \uproot already defined.
  • etc..

Suggestion/solutions much appreciated.

marked as duplicate by Joseph Wright Jul 15 '15 at 15:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from stackoverflow.com Jan 16 '13 at 21:06

This question came from our site for professional and enthusiast programmers.

  • Welcome to TeX.sx! Your post was migrated here from another Stack Exchange site. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. – Martin Schröder Jan 16 '13 at 21:11
  • The real problem is not mhchem but amsmath which is loaded implicitly by mhchem and seems to be incompatible with the iopart class. Do you need many chemical formulae and even reactions? – clemens Jan 16 '13 at 21:31
  • 1
    You might be able to overcome the problem by adding the following magic just before loading mhchem: \makeatletter\@namedef{ver@amsmath.sty}{}\makeatother – egreg Jan 16 '13 at 21:46
  • @egreg's suggestion should work if you also load amstext before loading mhchem as the latter relies on the macro \text (which is why it loads amsmath in the first place, I guess) – clemens Jan 16 '13 at 22:31
  • I've reverse-duped here as the newer question is clearer (and has a better answer) than this one. – Joseph Wright Jul 15 '15 at 15:22

The issue can be solved with the following loading order/definitions: