-1

I saw this post and went to chemmacros. I'm unable to use the chemmacros package to write oxidation numbers.

![enter image description here

I wrote the following, but I can't render oxidation numbers in mathjax in chemistry stack exchange.

$$\require{chemmacros} \ce{\ox{+1,Na}}$$

enter image description here

Why is my code not working?

  • 3
    Welcome to TeX.SE! How is your problem related to LaTeX? If it is. please provide complete small document, which reproduce your problem. – Zarko Jun 22 '22 at 06:07
  • 2
    Note that mathjax questions are generally off topic here as they have nothing to do with latex and friends. It is just a javascript library that knows how to render a subset of LaTeX syntax. Unless explicitly stated on the mathjax website, don't expect that X thing is supported by mathjax. – daleif Jun 22 '22 at 07:39

1 Answers1

3

chemmacros and mhchem are two distinct packages. LaTeX and MathJax are two distinct products (with MathJax trying to be very compatible to LaTeX syntax). A chemmacros version for MathJax does not exist, as far as I know. But you could use mhchem like this

$\ce{Na^I, Ca^{II}, S^{-II}, F^{-I}}$

For the full syntax options, please refer to the mhchem for MathJax manual. You can search for "oxidation" or try the example with the "test drive" at the very bottom. You can ask questions at http://meta.chemistry.stackexchange.com/ using the mhchem tag.

mhchem
  • 3,485
  • 12
  • 37