Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to use scientific notation with the siunitx package. However, when I try to do it I am getting an error:

The width of a human hair is \SI{1 \times 10^{-4}}{m}.

This has always given me a LaTeX Error" invalid character '10^{-4}' in numerical input

Is there a better way to do this while continuing to use siunitx?

Thanks!

share|improve this question
    
@Caramdir - thanks for adding those tags. –  dtlussier Aug 25 '10 at 19:52
    
Is it is output that's important here or the input? –  Joseph Wright Aug 25 '10 at 20:28
    
I'm not sure what your question means. I pulled the error string directly from the output generated from building the LaTeX document. –  dtlussier Aug 25 '10 at 20:51
    
I wonder if you need \SI{1 \times 10^{-4}}{m} to work in the input or only to get 1 \times 10^{-4} in the output. –  Joseph Wright Aug 25 '10 at 20:52
1  
@user766308 If you want to typeset a number without a unit, siunitx provides the \num command, e.g. \num{e-4} will print 10^{-4}. –  Torbjørn T. Dec 7 '11 at 12:34
show 2 more comments

1 Answer

up vote 13 down vote accepted

Sure: \SI{1e-4}{\metre}.

share|improve this answer
    
Ok - thanks. What about a number like 10^{-4} that isn't scientific notation but has an exponent? –  dtlussier Aug 25 '10 at 20:50
1  
\SI{e4}{\metre} –  Joseph Wright Aug 25 '10 at 20:53
    
@Joseph: That assumes a base of 10. What about other bases, like 3^{5}? –  Kit Jan 18 '11 at 14:33
3  
@Kit. \sisetup{exponent-base = <whatever>} using the current release (v2) of siunitx, or \sisetup{expbase = <whatever>} with v1. –  Joseph Wright Jan 18 '11 at 15:44
add comment

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.