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 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.

share|improve this question
    
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? –  cgnieder 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) –  cgnieder Jan 16 '13 at 22:31
add comment

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

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

1 Answer

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

\makeatletter
\@namedef{ver@amsmath.sty}{}
\makeatother
\usepackage{amstext}
\usepackage[version=3]{mhchem}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.