Comma in chemical formula












2















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!










share|improve this question




















  • 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
















2















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!










share|improve this question




















  • 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














2












2








2








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!










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 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














  • 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








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










1 Answer
1






active

oldest

votes


















1














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:




  1. 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":



(Ca,Mg)CO3



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




  1. 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.






share|improve this answer



















  • 1





    Thank you very much ! so easy, and yet haven't found any answer anywhere. Thanks again :)

    – TheEpok
    Jan 30 at 16:28











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%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









1














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:




  1. 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":



(Ca,Mg)CO3



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




  1. 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.






share|improve this answer



















  • 1





    Thank you very much ! so easy, and yet haven't found any answer anywhere. Thanks again :)

    – TheEpok
    Jan 30 at 16:28
















1














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:




  1. 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":



(Ca,Mg)CO3



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




  1. 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.






share|improve this answer



















  • 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








1







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:




  1. 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":



(Ca,Mg)CO3



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




  1. 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.






share|improve this answer













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:




  1. 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":



(Ca,Mg)CO3



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




  1. 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.







share|improve this answer












share|improve this answer



share|improve this answer










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














  • 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


















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%2f472423%2fcomma-in-chemical-formula%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?