Math & Sciencemhchem | Atomic Level

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
niles
Posts: 92
Joined: Mon Dec 01, 2008 9:35 pm

mhchem | Atomic Level

Post by niles »

Hi

I wish to write the following atomic level: 5s^2 1S_0. Usually I use mhchem for these things (MWE):

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[version=3]{mhchem}

\begin{document}
\ce{5s^2 ^1S0}
\end{document}
However it doesn't work very well, as the superscripts are not at the same height due to one 's' being uppercase and the other lowercase. Do You suggest another package for me to use?


Best,
Niles.

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 | Atomic Level

Post by cgnieder »

You could use the chemmacros package which has the very similar command \ch:

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{chemmacros}

\begin{document}
\ch{5 s^2\,^1S0}
\end{document}
Regards
site moderator & package author
niles
Posts: 92
Joined: Mon Dec 01, 2008 9:35 pm

mhchem | Atomic Level

Post by niles »

Thanks for that, that is very helpful. I have another question in the same subject: I want to write a state 3^P_J, but when I use

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{chemmacros}

\begin{document}
  \ch{5 s^2\,^3PJ}
\end{document}
it does subscript the "J". Is there a way to remedy this?

Thanks for Your help in advance.


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

mhchem | Atomic Level

Post by cgnieder »

I do not understand what you mean exactly. This looks exactly as I would expect it to:

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{chemmacros}

\begin{document}

\noindent
\ch{5 s^2\,^3PJ} \\
\ch{5 s^2\,^3P_J} \\
\ch{5 s^2\,^3P "\_" J}

\end{document}
Regards
site moderator & package author
niles
Posts: 92
Joined: Mon Dec 01, 2008 9:35 pm

mhchem | Atomic Level

Post by niles »

Thanks, I forgot the underscore (_) in my example. It works!


Best,
Niles.
Post Reply