LaTeX forum ⇒ Math & Sciencechemmacros | Ion Charges

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Posts: 10
Joined: Sun Feb 13, 2011 1:46 pm

chemmacros | Ion Charges

Postby mhle » Wed Mar 21, 2012 5:07 pm

When I specify an ion charge with \mch or \pch by chemmacros the number is aligned too low

test.png (5 KiB) Viewed 2112 times

Here is a minimal example:

  1. \documentclass[12pt,a4paper,oneside]{article}
  2. \usepackage{chemmacros}
  4. \title{Test}
  6. \begin{document}
  7. \begin{reaction}
  8. 2 \Hpl{} + S2O3 \mch[2] -> S + SO2 + H2O
  9. \end{reaction}
  10. \end{document}

Is there any way to fix this?

Thanks, Mads.
Last edited by localghost on Wed Mar 21, 2012 7:28 pm, edited 2 times in total.
Reason: Source code has to be tagged as such to keep a post clear and legible (see Board Rules).


User avatar
Site Moderator
Posts: 1993
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Mon Mar 26, 2012 6:39 pm


In the manual section 24.4 "Charges and other Subscripts" (paragraph "Charge Commands") it says (emphasis by me):
You don't need to use \mch and related commands inside \ch. Indeed, you shouldn't use them as they might mess with the subscript and superscript alignment. e chemmacros option circled is obeyed by \ch.

This also holds for the reactions environments (unless you use the option "method=mhchem"). I will make that more clear in the next version of the manual.

This should do (and needs less typing anyway):
  1. \documentclass[12pt,a4paper,oneside]{article}
  2. \usepackage{chemmacros}
  4. \title{Test}
  6. \begin{document}
  7.   \begin{reaction}
  8.     2 H+ + S2O3^2- -> S + SO2 + H2O
  9.   \end{reaction}
  10. \end{document}

cm_charges.png (4.03 KiB) Viewed 2081 times

site moderator & package author

Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 2 guests