Using mhchem version 4 (ubuntu 15.10), the simple \ce{CH2O} inserted in a report document results in CH[t]2O with "[t]2" being in subscript. Am I missing something obvious (cant' see nothing related in mhchem manual)?

\makeatletter \makeatletter
\makeatother \usepackage{amstext}
\usepackage[load-configurations = abbreviations]{siunitx}
\sisetup{locale = FR,detect-all}
\makeatother \usepackage{babel}
  • Hard to say, please provide a full minimal example that we can copy and test on our own systems (without having to add anything) – daleif Dec 1 '15 at 13:42
  • @NiFe a minimal example would be \documentclass{article} \usepackage[version=4]{mhchem} \begin{document} \ce{CH2O} \end{document} (which works just fine for me) – cgnieder Dec 1 '15 at 13:53
  • Thanks, hope the following example is minimal enough: \documentclass[french]{report} \makeatletter \makeatletter \@namedef{ver@amsmath.sty}{} \makeatother \usepackage{amstext} \usepackage[version=4]{mhchem} \usepackage[load-configurations = abbreviations]{siunitx} \sisetup{locale = FR,detect-all} \sisetup{inter-unit-product=\ensuremath{\cdot}} \makeatother \usepackage{babel} \begin{document} \title{\textsc{Bla}} \author{NiFe} \maketitle \chapter{Blabla} Blabla \section{1} \ce{CH2O} \end{document} – NiFe Dec 1 '15 at 13:55
  • 1
    What is that \@namedef{ver@amsmath.sty}{} doing? Remove it and the example works just fine. – daleif Dec 1 '15 at 14:01
  • 1
    @NiFe \@namedef{ver@amsmath.sty}{} prevents mhchem from loading amsmath but it needs amsmath in order to work properly! – cgnieder Dec 1 '15 at 14:04

\@namedef{ver@amsmath.sty}{} fools \RequirePackage{amsmath} or \usepackage{amsmath} into thinking that amsmath is already loaded.

This prevents mhchem (or any other package) from loading amsmath but mhchem needs amsmath in order to work properly!

Remove the line and your example compiles file.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.