LaTeX forum ⇒ Math & Sciencechemmacros | Ion Charges

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
mhle
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
test.png (5 KiB) Viewed 1953 times


Here is a minimal example:

  1. \documentclass[12pt,a4paper,oneside]{article}
  2. \usepackage{chemmacros}
  3.  
  4. \title{Test}
  5.  
  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).

Tags:

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

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

Hi,

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}
  3.  
  4. \title{Test}
  5.  
  6. \begin{document}
  7.   \begin{reaction}
  8.     2 H+ + S2O3^2- -> S + SO2 + H2O
  9.   \end{reaction}
  10. \end{document}


cm_charges.png
cm_charges.png (4.03 KiB) Viewed 1922 times


Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 2 guests