Math & Sciencemhchem | Problems with tricky Formulas

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
jakethepeguk1
Posts: 5
Joined: Thu Jan 14, 2010 7:09 pm

mhchem | Problems with tricky Formulas

Post by jakethepeguk1 »

Hello,

I have been using the mhchem package for doing chemistry notation and have found it really useful until i get to something which is slightly awkward to write.

Using the usual math mode way of doing subscripts and superscripts i want to write

$Sn_{1-x}^{4+}Sb_{x}^{5+}O_{2}^{2-}e_{x}$

however it doesnt look 'right'. The names of the atoms are italicised which i dont want.

Is it possible to write something similar to this with the mhchem package, which usually makes things so much easier and nicer to look at. Also when i try and write a simple equation with a subscript and superscript directly over each other as in

$Sn_{1-x}^{4+}$

with the mhchem package, the subscript and superscript are slightly staggered and not directly over each other.

I hope someone can help.

Thanks

PS. Im using version 3 of the mhchem package, with texlive 2011.

Recommended reading 2024:

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

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

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

mhchem | Problems with tricky Formulas

Post by cgnieder »

jakethepeguk1 wrote: with the mhchem package, the subscript and superscript are slightly staggered and not directly over each other.
As far as I know, this is on purpose.

However, I couldn't verify this behaviour (see attached picture):

Code: Select all

\documentclass{article}
\usepackage[version=3]{mhchem}
\begin{document}

$Sn_{1-x}^{4+}Sb_{x}^{5+}O_{2}^{2-}e_{x}$

\ce{Sn_{1-x}^4+Sb_x^5+O2^{2-}e_x}

\end{document}
mhchem.jpg
mhchem.jpg (3.86 KiB) Viewed 2430 times
Regards
site moderator & package author
Post Reply