Comma in chemical formula
I am using the usepackage[version=3]{mhchem} package, and would like to write the formula for Dolomite in my report: (Ca,Mg)CO3
So far I haven't found a way to get that comma right in my formula using the mhchem package, and haven't found anyone having had troubles doing that so far. Anyone could help me doing so?
Cheers!
chemistry mhchem
add a comment |
I am using the usepackage[version=3]{mhchem} package, and would like to write the formula for Dolomite in my report: (Ca,Mg)CO3
So far I haven't found a way to get that comma right in my formula using the mhchem package, and haven't found anyone having had troubles doing that so far. Anyone could help me doing so?
Cheers!
chemistry mhchem
3
I am no chemist but are you sure that the comma is correct there? I knowCaMg[CO3]2
– Christian Hupfer
Jan 29 at 17:50
Welcome to TeX.Stackexchange!
– samcarter
Jan 29 at 17:50
1
@TheEpok: I totally agree with ChristianHupfer. However, if you definitely insist on using a comma to separate Ca and Mg, you could usece{Ca{,}Mg(CO3)2}.
– leandriis
Jan 29 at 18:26
add a comment |
I am using the usepackage[version=3]{mhchem} package, and would like to write the formula for Dolomite in my report: (Ca,Mg)CO3
So far I haven't found a way to get that comma right in my formula using the mhchem package, and haven't found anyone having had troubles doing that so far. Anyone could help me doing so?
Cheers!
chemistry mhchem
I am using the usepackage[version=3]{mhchem} package, and would like to write the formula for Dolomite in my report: (Ca,Mg)CO3
So far I haven't found a way to get that comma right in my formula using the mhchem package, and haven't found anyone having had troubles doing that so far. Anyone could help me doing so?
Cheers!
chemistry mhchem
chemistry mhchem
edited Jan 29 at 17:51
samcarter
1
1
asked Jan 29 at 17:40
TheEpokTheEpok
132
132
3
I am no chemist but are you sure that the comma is correct there? I knowCaMg[CO3]2
– Christian Hupfer
Jan 29 at 17:50
Welcome to TeX.Stackexchange!
– samcarter
Jan 29 at 17:50
1
@TheEpok: I totally agree with ChristianHupfer. However, if you definitely insist on using a comma to separate Ca and Mg, you could usece{Ca{,}Mg(CO3)2}.
– leandriis
Jan 29 at 18:26
add a comment |
3
I am no chemist but are you sure that the comma is correct there? I knowCaMg[CO3]2
– Christian Hupfer
Jan 29 at 17:50
Welcome to TeX.Stackexchange!
– samcarter
Jan 29 at 17:50
1
@TheEpok: I totally agree with ChristianHupfer. However, if you definitely insist on using a comma to separate Ca and Mg, you could usece{Ca{,}Mg(CO3)2}.
– leandriis
Jan 29 at 18:26
3
3
I am no chemist but are you sure that the comma is correct there? I know
CaMg[CO3]2– Christian Hupfer
Jan 29 at 17:50
I am no chemist but are you sure that the comma is correct there? I know
CaMg[CO3]2– Christian Hupfer
Jan 29 at 17:50
Welcome to TeX.Stackexchange!
– samcarter
Jan 29 at 17:50
Welcome to TeX.Stackexchange!
– samcarter
Jan 29 at 17:50
1
1
@TheEpok: I totally agree with ChristianHupfer. However, if you definitely insist on using a comma to separate Ca and Mg, you could use
ce{Ca{,}Mg(CO3)2}.– leandriis
Jan 29 at 18:26
@TheEpok: I totally agree with ChristianHupfer. However, if you definitely insist on using a comma to separate Ca and Mg, you could use
ce{Ca{,}Mg(CO3)2}.– leandriis
Jan 29 at 18:26
add a comment |
1 Answer
1
active
oldest
votes
First off, the OP's formula (Ca,Mg)CO3 is completely fine and meets IUPAC recommendations [1, p. 21], section IR-2.2.3.1:
(d) In solid-state chemistry, to enclose symbols of atoms occupying the same type of site in a random fashion. The symbols themselves are separated by a comma, with no space.
Example:
- K(Br,Cl)
To achieve this with mhchem, the sane way would be to use braces around the comma (as mentioned in the comments): {,}. Note that chemformula doesn't require the comma to be escaped and renders the formula correctly "as is":

documentclass{article}
usepackage[version=3]{mhchem}
usepackage{chemmacros}
chemsetup{
modules = all
}
begin{document}
ce{(Ca{,}Mg)CO3} (texttt{mhchem})
ch{(Ca,Mg)CO3} (texttt{chemformula})
end{document}
References
- IUPAC “Red Book” Nomenclature of Inorganic Chemistry, 1st ed.; Connelly, N. G., Damhus, T., Hartshorn, R. M., Hutton, A. T., Eds.; IUPAC Recommendations; Royal Society of Chemistry: Cambridge, UK, 2005. ISBN 978-0-85404-438-2.
1
Thank you very much ! so easy, and yet haven't found any answer anywhere. Thanks again :)
– TheEpok
Jan 30 at 16:28
add a comment |
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%2f472423%2fcomma-in-chemical-formula%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
First off, the OP's formula (Ca,Mg)CO3 is completely fine and meets IUPAC recommendations [1, p. 21], section IR-2.2.3.1:
(d) In solid-state chemistry, to enclose symbols of atoms occupying the same type of site in a random fashion. The symbols themselves are separated by a comma, with no space.
Example:
- K(Br,Cl)
To achieve this with mhchem, the sane way would be to use braces around the comma (as mentioned in the comments): {,}. Note that chemformula doesn't require the comma to be escaped and renders the formula correctly "as is":

documentclass{article}
usepackage[version=3]{mhchem}
usepackage{chemmacros}
chemsetup{
modules = all
}
begin{document}
ce{(Ca{,}Mg)CO3} (texttt{mhchem})
ch{(Ca,Mg)CO3} (texttt{chemformula})
end{document}
References
- IUPAC “Red Book” Nomenclature of Inorganic Chemistry, 1st ed.; Connelly, N. G., Damhus, T., Hartshorn, R. M., Hutton, A. T., Eds.; IUPAC Recommendations; Royal Society of Chemistry: Cambridge, UK, 2005. ISBN 978-0-85404-438-2.
1
Thank you very much ! so easy, and yet haven't found any answer anywhere. Thanks again :)
– TheEpok
Jan 30 at 16:28
add a comment |
First off, the OP's formula (Ca,Mg)CO3 is completely fine and meets IUPAC recommendations [1, p. 21], section IR-2.2.3.1:
(d) In solid-state chemistry, to enclose symbols of atoms occupying the same type of site in a random fashion. The symbols themselves are separated by a comma, with no space.
Example:
- K(Br,Cl)
To achieve this with mhchem, the sane way would be to use braces around the comma (as mentioned in the comments): {,}. Note that chemformula doesn't require the comma to be escaped and renders the formula correctly "as is":

documentclass{article}
usepackage[version=3]{mhchem}
usepackage{chemmacros}
chemsetup{
modules = all
}
begin{document}
ce{(Ca{,}Mg)CO3} (texttt{mhchem})
ch{(Ca,Mg)CO3} (texttt{chemformula})
end{document}
References
- IUPAC “Red Book” Nomenclature of Inorganic Chemistry, 1st ed.; Connelly, N. G., Damhus, T., Hartshorn, R. M., Hutton, A. T., Eds.; IUPAC Recommendations; Royal Society of Chemistry: Cambridge, UK, 2005. ISBN 978-0-85404-438-2.
1
Thank you very much ! so easy, and yet haven't found any answer anywhere. Thanks again :)
– TheEpok
Jan 30 at 16:28
add a comment |
First off, the OP's formula (Ca,Mg)CO3 is completely fine and meets IUPAC recommendations [1, p. 21], section IR-2.2.3.1:
(d) In solid-state chemistry, to enclose symbols of atoms occupying the same type of site in a random fashion. The symbols themselves are separated by a comma, with no space.
Example:
- K(Br,Cl)
To achieve this with mhchem, the sane way would be to use braces around the comma (as mentioned in the comments): {,}. Note that chemformula doesn't require the comma to be escaped and renders the formula correctly "as is":

documentclass{article}
usepackage[version=3]{mhchem}
usepackage{chemmacros}
chemsetup{
modules = all
}
begin{document}
ce{(Ca{,}Mg)CO3} (texttt{mhchem})
ch{(Ca,Mg)CO3} (texttt{chemformula})
end{document}
References
- IUPAC “Red Book” Nomenclature of Inorganic Chemistry, 1st ed.; Connelly, N. G., Damhus, T., Hartshorn, R. M., Hutton, A. T., Eds.; IUPAC Recommendations; Royal Society of Chemistry: Cambridge, UK, 2005. ISBN 978-0-85404-438-2.
First off, the OP's formula (Ca,Mg)CO3 is completely fine and meets IUPAC recommendations [1, p. 21], section IR-2.2.3.1:
(d) In solid-state chemistry, to enclose symbols of atoms occupying the same type of site in a random fashion. The symbols themselves are separated by a comma, with no space.
Example:
- K(Br,Cl)
To achieve this with mhchem, the sane way would be to use braces around the comma (as mentioned in the comments): {,}. Note that chemformula doesn't require the comma to be escaped and renders the formula correctly "as is":

documentclass{article}
usepackage[version=3]{mhchem}
usepackage{chemmacros}
chemsetup{
modules = all
}
begin{document}
ce{(Ca{,}Mg)CO3} (texttt{mhchem})
ch{(Ca,Mg)CO3} (texttt{chemformula})
end{document}
References
- IUPAC “Red Book” Nomenclature of Inorganic Chemistry, 1st ed.; Connelly, N. G., Damhus, T., Hartshorn, R. M., Hutton, A. T., Eds.; IUPAC Recommendations; Royal Society of Chemistry: Cambridge, UK, 2005. ISBN 978-0-85404-438-2.
answered Jan 30 at 6:50
andseliskandselisk
9452725
9452725
1
Thank you very much ! so easy, and yet haven't found any answer anywhere. Thanks again :)
– TheEpok
Jan 30 at 16:28
add a comment |
1
Thank you very much ! so easy, and yet haven't found any answer anywhere. Thanks again :)
– TheEpok
Jan 30 at 16:28
1
1
Thank you very much ! so easy, and yet haven't found any answer anywhere. Thanks again :)
– TheEpok
Jan 30 at 16:28
Thank you very much ! so easy, and yet haven't found any answer anywhere. Thanks again :)
– TheEpok
Jan 30 at 16:28
add a comment |
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%2f472423%2fcomma-in-chemical-formula%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
3
I am no chemist but are you sure that the comma is correct there? I know
CaMg[CO3]2– Christian Hupfer
Jan 29 at 17:50
Welcome to TeX.Stackexchange!
– samcarter
Jan 29 at 17:50
1
@TheEpok: I totally agree with ChristianHupfer. However, if you definitely insist on using a comma to separate Ca and Mg, you could use
ce{Ca{,}Mg(CO3)2}.– leandriis
Jan 29 at 18:26