Math & Sciencechemmacros | Ion Charges

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

chemmacros | Ion Charges

Post by mhle »

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 3503 times
Here is a minimal example:

Code: Select all

\documentclass[12pt,a4paper,oneside]{article}
\usepackage{chemmacros}

\title{Test}

\begin{document}
  \begin{reaction}
    2 \Hpl{} + S2O3 \mch[2] -> S + SO2 + H2O
  \end{reaction}
\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.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

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

chemmacros | Ion Charges

Post by cgnieder »

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

Code: Select all

\documentclass[12pt,a4paper,oneside]{article}
\usepackage{chemmacros}

\title{Test}

\begin{document}
  \begin{reaction}
    2 H+ + S2O3^2- -> S + SO2 + H2O
  \end{reaction}
\end{document}
cm_charges.png
cm_charges.png (4.03 KiB) Viewed 3472 times
Regards
site moderator & package author
Post Reply