LaTeX forum ⇒ Text FormattingAtomic 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

Postby niles » Wed Apr 25, 2012 7:05 pm

Hi

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

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


Best wishes,
Niles.

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 9444
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Wed Apr 25, 2012 7:18 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:

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


Stefan
Site admin

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Wed Apr 25, 2012 7:37 pm

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



Thorsten
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ 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

Postby niles » Wed Apr 25, 2012 8:19 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:

  1. $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.
  1. \documentclass[11pt]{article}
  2. \usepackage[T1]{fontenc}
  3. \usepackage[version=3]{mhchem}
  4.  
  5. \begin{document}
  6. \ce{5P_{1/2}}
  7. \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: 1988
Joined: Sat Apr 16, 2011 7:27 pm

Postby cgnieder » Thu Apr 26, 2012 2:25 pm

Just to mention another possibility:

  1. \documentclass[11pt]{article}
  2. \usepackage[T1]{fontenc}
  3. \usepackage[version=3]{mhchem}
  4. \usepackage{chemmacros}
  5.  
  6. \begin{document}
  7. % mhchem:
  8. \ce{5\!P_{1/2}}
  9.  
  10. % chemmacros 1:
  11. \ch[stoich-space=0pt]{5 P_{1/2}}
  12.  
  13. % chemmacros 2:
  14. \ch{"5P" _{1/2}}
  15.  
  16. % regular math:
  17. $5\mathrm{P}_{1/2}$
  18. \end{document}


Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

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

Postby niles » Sun Apr 29, 2012 8:58 pm

cgnieder wrote:Just to mention another possibility:

  1. \documentclass[11pt]{article}
  2. \usepackage[T1]{fontenc}
  3. \usepackage[version=3]{mhchem}
  4. \usepackage{chemmacros}
  5.  
  6. \begin{document}
  7. % mhchem:
  8. \ce{5\!P_{1/2}}
  9.  
  10. % chemmacros 1:
  11. \ch[stoich-space=0pt]{5 P_{1/2}}
  12.  
  13. % chemmacros 2:
  14. \ch{"5P" _{1/2}}
  15.  
  16. % regular math:
  17. $5\mathrm{P}_{1/2}$
  18. \end{document}


Regards


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

Best,
Niles.


Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 6 guests