TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 9 down vote accepted

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}
share|improve this answer
    
Wow, that's exactly what I needed. Didn't know about that command. – Taunch Jan 27 at 21:01
    
Thank you very much! – Taunch Jan 27 at 21:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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