4
$\begingroup$

When executing

TeXForm[ElementData[8, "ElectronConfigurationString"]]

the resulting TeX markup appears to include some internal box markup

\text{[He]}2\text{Superscript}[\text{s},2]2\text{Superscript}[\text{p},4]

$\text{[He]}2\text{Superscript}[\text{s},2]2\text{Superscript}[\text{p},4]$

From that piece of code, I would expect something like $\text{[He]} 2s^{2} 2p^{4}$ to be produced.

I realize that something may be going on with Mathematica's internal box-magic system, and I have tried converting it to other forms before passing it into TeXForm. This does not seem to do anything. What am I doing wrong here?

$\endgroup$
3
$\begingroup$

In Version 9 and 10 (Windows 8 - 64 bit), you can use

BoxForm`$UseTemplateSlotSequenceForRow = False; 
ElementData[8, "ElectronConfigurationString"] /.  Superscript -> Power  // TeXForm

to get

\text{[He]}2\text{s}^22\text{p}^4

$\text{[He]}2\text{s}^22\text{p}^4$

Related Q/A: Incompatibility of Row and TeXForm

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.