Text FormattingAtomic States

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

Atomic States

Post by niles »

Hi

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

Code: Select all

\documentclass{article}
\usepackage{amsmath} 

\begin{document}
$5\text{P}_{1/2}$
\end{document}
Best wishes,
Niles.

Recommended reading 2024:

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

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

Stefan Kottwitz
Site Admin
Posts: 10344
Joined: Mon Mar 10, 2008 9:44 pm

Atomic States

Post by Stefan Kottwitz »

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:

Code: Select all

$5\mathrm{P}_{1/2}$
Stefan
LaTeX.org admin
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Atomic States

Post by localghost »

I think that's a job for mhchem.

Code: Select all

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

\begin{document}
  \ce{5P_{1/2}}
\end{document}

Thorsten
niles
Posts: 92
Joined: Mon Dec 01, 2008 9:35 pm

Atomic States

Post by niles »

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:

Code: Select all

$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.

Code: Select all

\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.
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Atomic States

Post by cgnieder »

Just to mention another possibility:

Code: Select all

\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

Atomic States

Post by niles »

cgnieder wrote:Just to mention another possibility:

Code: Select all

\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.
Post Reply