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.

Maybe related to a package database update to last versions, I have a collision between the mchem package and other font-related packages such as mathdesign. Whenever I try to use the command \ce{} to insert chemical equations, the following error appears:

! Missing control sequence inserted.
<inserted text>
\inaccessible
l.10 \begin{equation} \ce{2Al+3/2O2->Al2O3}
\end{equation}
Please don't say `\def cs{...}', say `\def\cs{...}'.
I've inserted an inaccessible control sequence so that your
definition will be completed without mixing me up too badly.
You can recover graciously from this error, if you're
careful; see exercise 27.2 in The TeXbook.

The minimun not-working example is the following:

\documentclass[a4paper,11pt]{article}
\usepackage[utopia]{mathdesign}
\usepackage[version=3]{mhchem}

\begin{document}

The following line causes pdfLaTeX to fail:
\begin{equation} \ce{2Al+3/2O2->Al2O3}  \end{equation}

\end{document}

I have tried the following:

  • Searching mhchem.sty to find \def cs{: it's not there.
  • Reading exercise 27.2 of The Texbook: it just says to not omit the backlash and ends telling that you "Explain how to recover from this error..." (it's one of those marked with a curvy road sign, for wizards only").
  • Changing the order of package loading.
  • Uninstalling and reinstalling mhchem.

To no avail. Does anyone know about this problem? Is a bug of the mhchem package? and last but not least, can any of you advanced wizards point me in the direction to solve this problem?

Many thanks for reading so far =)

EDIT: I got in touch with Martin Hensel and looks like the problem is indeed in mhchem, he told me that some people reported similar problems and sent me an updated version of the package that did work. I suppose that he will update the repositories soon. =)

PS: Should a mod close this question?

share|improve this question
    
This 'works for me' as you have written it. Is the code exactly what you used to test? If so, could you post your log somewhere we can look at? –  Joseph Wright May 27 '11 at 13:24
1  
Ah, this shows up after update TeX Live - I'll investigate :-) –  Joseph Wright May 27 '11 at 14:13
    
Could you post your edited-in information as an answer: I see that CTAN has an update which mentions fixing this issue. –  Joseph Wright Jun 18 '11 at 15:05
add comment

1 Answer 1

up vote 4 down vote accepted

I see that Martin has updated his package in CTAN, fixing the incompatibility.

Joseph Wright (who now I recognize as a very active member in LaTeX Community and the creator of siunitx, and happens to have a little rhombus by his name) has suggested that I post the updated info as an answer; as I don't know well the mechanics of stackexchage, I suppose this closes the question?

Thank you =)

Edit: should I accept this answer?

share|improve this answer
    
@JoreGT: You have to wait a couple of days, but then 'accepting' the answer would be great. –  Joseph Wright Jun 19 '11 at 9:21
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.