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}
Niles.
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
$5\text{P}_{1/2}$
\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.
\mathrm
instead:Code: Select all
$5\mathrm{P}_{1/2}$
Code: Select all
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage[version=3]{mhchem}
\begin{document}
\ce{5P_{1/2}}
\end{document}
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.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:
StefanCode: Select all
$5\mathrm{P}_{1/2}$
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.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
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}
Thanks, that is also a good suggestion. I'll try them out.cgnieder wrote:Just to mention another possibility:
RegardsCode: 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}
NEW: TikZ book now 40% off at Amazon.com for a short time.