## LaTeX forum ⇒ Text Formatting ⇒ Atomic States Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
niles
Posts: 92
Joined: Mon Dec 01, 2008 9:35 pm

### Atomic States

Hi

What is the most proper way to write an atomic state as I have tried in the MWE below?

\documentclass{article}\usepackage{amsmath}  \begin{document}$5\text{P}_{1/2}$\end{document}

Best wishes,
Niles.

Tags:

Stefan Kottwitz
Posts: 9567
Joined: Mon Mar 10, 2008 9:44 pm
Hi Niles,

is it a style question, or a LaTeX question? It depends on your writing style.

Depending on your math and text fonts, you could use \mathrm instead:

$5\mathrm{P}_{1/2}$

Stefan

localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm
I think that's a job for mhchem.
\documentclass[11pt]{article}\usepackage[T1]{fontenc}\usepackage[version=3]{mhchem} \begin{document}   \ce{5P_{1/2}}\end{document}

Thorsten
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

niles
Posts: 92
Joined: Mon Dec 01, 2008 9:35 pm
Stefan_K wrote:Hi Niles,

is it a style question, or a LaTeX question? It depends on your writing style.

Depending on your math and text fonts, you could use \mathrm instead:

$5\mathrm{P}_{1/2}$

Stefan

I guess it is a LaTeX question. I was just wondering what a professional LaTeX-programmer would do. Your suggestion sure gives me the desired result.

localghost wrote:I think that's a job for mhchem.
\documentclass[11pt]{article}\usepackage[T1]{fontenc}\usepackage[version=3]{mhchem} \begin{document}   \ce{5P_{1/2}}\end{document}

Thorsten

Thanks. I tried it out, but there appears to be a small space between "5" and "P", which generally is missing. Thanks for the suggestion though.

Best wishes,
Niles.

cgnieder
Site Moderator
Posts: 1993
Joined: Sat Apr 16, 2011 7:27 pm
Just to mention another possibility:

\documentclass[11pt]{article}\usepackage[T1]{fontenc}\usepackage[version=3]{mhchem}\usepackage{chemmacros} \begin{document}% mhchem:\ce{5\!P_{1/2}} % chemmacros 1:\ch[stoich-space=0pt]{5 P_{1/2}} % chemmacros 2:\ch{"5P" _{1/2}} % regular math:$5\mathrm{P}_{1/2}$\end{document}

Regards
site moderator & package author

niles
Posts: 92
Joined: Mon Dec 01, 2008 9:35 pm
cgnieder wrote:Just to mention another possibility:

\documentclass[11pt]{article}\usepackage[T1]{fontenc}\usepackage[version=3]{mhchem}\usepackage{chemmacros} \begin{document}% mhchem:\ce{5\!P_{1/2}} % chemmacros 1:\ch[stoich-space=0pt]{5 P_{1/2}} % chemmacros 2:\ch{"5P" _{1/2}} % regular math:$5\mathrm{P}_{1/2}$\end{document}

Regards

Thanks, that is also a good suggestion. I'll try them out.

Best,
Niles.