Undefined control sequence with mhchem package
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
add a comment |
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
2
Welcome to TeX.SE! When trying to run your code, the log message reveals thatmhchemloadsamsmath, butiopartdoes not seem to likeamsmath. It is really irritating thatioparthas this "feature" and a bit surprising thatmhchemloadsamsmath. (And you might want to add anend{document}to your code and replaceitbyitshape.) My conclusion is that you cannot haveiopartandmchemat 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
add a comment |
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
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
mhchem
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 thatmhchemloadsamsmath, butiopartdoes not seem to likeamsmath. It is really irritating thatioparthas this "feature" and a bit surprising thatmhchemloadsamsmath. (And you might want to add anend{document}to your code and replaceitbyitshape.) My conclusion is that you cannot haveiopartandmchemat 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
add a comment |
2
Welcome to TeX.SE! When trying to run your code, the log message reveals thatmhchemloadsamsmath, butiopartdoes not seem to likeamsmath. It is really irritating thatioparthas this "feature" and a bit surprising thatmhchemloadsamsmath. (And you might want to add anend{document}to your code and replaceitbyitshape.) My conclusion is that you cannot haveiopartandmchemat 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
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
2
Welcome to TeX.SE! When trying to run your code, the log message reveals that
mhchemloadsamsmath, butiopartdoes not seem to likeamsmath. It is really irritating thatioparthas this "feature" and a bit surprising thatmhchemloadsamsmath. (And you might want to add anend{document}to your code and replaceitbyitshape.) My conclusion is that you cannot haveiopartandmchemat 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