8

I'm trying to typeset the unit Å^(-1) eV^(-½) with siunitx, using \sisetup{locale=DE} (I don't think this makes any difference here).

Thanks to this question, I have been able to figure out how to typeset roots, but this

\si{\per\angstrom\per\ensuremath{\sqrt{\text{\electronvolt}}}}    

doesn't give me the desired result. (Neither does

\si[per-mode=fraction]{\per\angstrom\per\ensuremath{\sqrt{\text{\electronvolt}}}}

As a matter of fact, both lines yield exactly the same output.)

My theory is that the \ensuremath somehow overwrites the rules for \per.

Is there a more elegant way than

\si{\angstrom^{-1}\electronvolt^{-1/2}

to achieve the exponential expression of this unit?

Any help and/or comments are greatly appreciated.

10

The moment you use anything that's not strictly a unit macro, siunitx uses 'literal' mode so just typesets your input. You seem to want

\documentclass{article}
\usepackage{siunitx}
\begin{document}
\si{\per\angstrom\per\electronvolt\tothe{1/2}}
\end{document}
  • Wow, that's exactly what I needed. Didn't know about that command. – Taunch Jan 27 '16 at 21:01

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.