Undefined control sequence with mhchem package












1















I am using chemical reactions and formula in my document. However, I am getting a compiler error " undefined control sequence when using usepackage{mhchem}. If remove usepackage{mhchem}, my document compiles with errors due to using commands related to the mhchem package. For example, writing ce{H2O}. This is the heading of the document.



documentclass[10pt]{iopart}
usepackage{graphicx}
usepackage{mhchem}
newcommand{gguide}{{it Preparing graphics for IOP journals}}
begin{document}
Water vapor(ce{H2O}


Any suggestions for me?










share|improve this question




















  • 2





    Welcome to TeX.SE! When trying to run your code, the log message reveals that mhchem loads amsmath, but iopart does not seem to like amsmath. It is really irritating that iopart has this "feature" and a bit surprising that mhchem loads amsmath. (And you might want to add an end{document} to your code and replace it by itshape.) My conclusion is that you cannot have iopart and mchem at the same time.

    – marmot
    Feb 3 at 2:41











  • I did not know that mhchem loads amsmath. There is an incompatibility between amsmath and iopart.cls. iopart is the class on the journal template. I will consult the journal service team about using a different class. Thank you! that was helpful.

    – Smily
    Feb 3 at 6:11











  • Better yet, newcommand{gguide}{textit{Preparing graphics for IOP journals}}

    – egreg
    Feb 3 at 9:20











  • you are right. I commented this line and the codes compile well. Thanks for your help and the fast response!!

    – Smily
    Feb 5 at 17:42
















1















I am using chemical reactions and formula in my document. However, I am getting a compiler error " undefined control sequence when using usepackage{mhchem}. If remove usepackage{mhchem}, my document compiles with errors due to using commands related to the mhchem package. For example, writing ce{H2O}. This is the heading of the document.



documentclass[10pt]{iopart}
usepackage{graphicx}
usepackage{mhchem}
newcommand{gguide}{{it Preparing graphics for IOP journals}}
begin{document}
Water vapor(ce{H2O}


Any suggestions for me?










share|improve this question




















  • 2





    Welcome to TeX.SE! When trying to run your code, the log message reveals that mhchem loads amsmath, but iopart does not seem to like amsmath. It is really irritating that iopart has this "feature" and a bit surprising that mhchem loads amsmath. (And you might want to add an end{document} to your code and replace it by itshape.) My conclusion is that you cannot have iopart and mchem at the same time.

    – marmot
    Feb 3 at 2:41











  • I did not know that mhchem loads amsmath. There is an incompatibility between amsmath and iopart.cls. iopart is the class on the journal template. I will consult the journal service team about using a different class. Thank you! that was helpful.

    – Smily
    Feb 3 at 6:11











  • Better yet, newcommand{gguide}{textit{Preparing graphics for IOP journals}}

    – egreg
    Feb 3 at 9:20











  • you are right. I commented this line and the codes compile well. Thanks for your help and the fast response!!

    – Smily
    Feb 5 at 17:42














1












1








1








I am using chemical reactions and formula in my document. However, I am getting a compiler error " undefined control sequence when using usepackage{mhchem}. If remove usepackage{mhchem}, my document compiles with errors due to using commands related to the mhchem package. For example, writing ce{H2O}. This is the heading of the document.



documentclass[10pt]{iopart}
usepackage{graphicx}
usepackage{mhchem}
newcommand{gguide}{{it Preparing graphics for IOP journals}}
begin{document}
Water vapor(ce{H2O}


Any suggestions for me?










share|improve this question
















I am using chemical reactions and formula in my document. However, I am getting a compiler error " undefined control sequence when using usepackage{mhchem}. If remove usepackage{mhchem}, my document compiles with errors due to using commands related to the mhchem package. For example, writing ce{H2O}. This is the heading of the document.



documentclass[10pt]{iopart}
usepackage{graphicx}
usepackage{mhchem}
newcommand{gguide}{{it Preparing graphics for IOP journals}}
begin{document}
Water vapor(ce{H2O}


Any suggestions for me?







mhchem






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 3 at 1:46









Werner

443k689791676




443k689791676










asked Feb 3 at 1:10









SmilySmily

61




61








  • 2





    Welcome to TeX.SE! When trying to run your code, the log message reveals that mhchem loads amsmath, but iopart does not seem to like amsmath. It is really irritating that iopart has this "feature" and a bit surprising that mhchem loads amsmath. (And you might want to add an end{document} to your code and replace it by itshape.) My conclusion is that you cannot have iopart and mchem at the same time.

    – marmot
    Feb 3 at 2:41











  • I did not know that mhchem loads amsmath. There is an incompatibility between amsmath and iopart.cls. iopart is the class on the journal template. I will consult the journal service team about using a different class. Thank you! that was helpful.

    – Smily
    Feb 3 at 6:11











  • Better yet, newcommand{gguide}{textit{Preparing graphics for IOP journals}}

    – egreg
    Feb 3 at 9:20











  • you are right. I commented this line and the codes compile well. Thanks for your help and the fast response!!

    – Smily
    Feb 5 at 17:42














  • 2





    Welcome to TeX.SE! When trying to run your code, the log message reveals that mhchem loads amsmath, but iopart does not seem to like amsmath. It is really irritating that iopart has this "feature" and a bit surprising that mhchem loads amsmath. (And you might want to add an end{document} to your code and replace it by itshape.) My conclusion is that you cannot have iopart and mchem at the same time.

    – marmot
    Feb 3 at 2:41











  • I did not know that mhchem loads amsmath. There is an incompatibility between amsmath and iopart.cls. iopart is the class on the journal template. I will consult the journal service team about using a different class. Thank you! that was helpful.

    – Smily
    Feb 3 at 6:11











  • Better yet, newcommand{gguide}{textit{Preparing graphics for IOP journals}}

    – egreg
    Feb 3 at 9:20











  • you are right. I commented this line and the codes compile well. Thanks for your help and the fast response!!

    – Smily
    Feb 5 at 17:42








2




2





Welcome to TeX.SE! When trying to run your code, the log message reveals that mhchem loads amsmath, but iopart does not seem to like amsmath. It is really irritating that iopart has this "feature" and a bit surprising that mhchem loads amsmath. (And you might want to add an end{document} to your code and replace it by itshape.) My conclusion is that you cannot have iopart and mchem at the same time.

– marmot
Feb 3 at 2:41





Welcome to TeX.SE! When trying to run your code, the log message reveals that mhchem loads amsmath, but iopart does not seem to like amsmath. It is really irritating that iopart has this "feature" and a bit surprising that mhchem loads amsmath. (And you might want to add an end{document} to your code and replace it by itshape.) My conclusion is that you cannot have iopart and mchem at the same time.

– marmot
Feb 3 at 2:41













I did not know that mhchem loads amsmath. There is an incompatibility between amsmath and iopart.cls. iopart is the class on the journal template. I will consult the journal service team about using a different class. Thank you! that was helpful.

– Smily
Feb 3 at 6:11





I did not know that mhchem loads amsmath. There is an incompatibility between amsmath and iopart.cls. iopart is the class on the journal template. I will consult the journal service team about using a different class. Thank you! that was helpful.

– Smily
Feb 3 at 6:11













Better yet, newcommand{gguide}{textit{Preparing graphics for IOP journals}}

– egreg
Feb 3 at 9:20





Better yet, newcommand{gguide}{textit{Preparing graphics for IOP journals}}

– egreg
Feb 3 at 9:20













you are right. I commented this line and the codes compile well. Thanks for your help and the fast response!!

– Smily
Feb 5 at 17:42





you are right. I commented this line and the codes compile well. Thanks for your help and the fast response!!

– Smily
Feb 5 at 17:42










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f473118%2fundefined-control-sequence-with-mhchem-package%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f473118%2fundefined-control-sequence-with-mhchem-package%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to send String Array data to Server using php in android

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Is anime1.com a legal site for watching anime?