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.

How do I write x10 to the power of something within an equation?

At the moment I'm using y \times 10^x, but it gets slightly confusing if I have a long line of numbers that I'm multiplying together.

This the equation I have now:

g = \frac{6.67 \times 10^{-11} \times 6 \times 10^{24}}{6400010^2}

Which produces the output:

share|improve this question
    
Welcome to TeX.sx! May you expand your question showing an example of what you have to do? –  egreg Dec 11 '12 at 21:34
2  
How does it look with parentheses: (a x 10^b) x (c x 10^d)? –  krlmlr Dec 11 '12 at 21:38
    
Yes that does improve the clarity, but it's a workaround not a fix. :( –  Todd Davies Dec 11 '12 at 21:46
add comment

3 Answers 3

up vote 17 down vote accepted

If you need to typeset actual numbers (and not symbols as in your example), you could use the \num macro provided by siunitx. It allows you to type \num{2e3} to output , both in math and in text mode.

When multiplying numbers in exponential form, you could reduce the spacing within the numbers, using tight-spacing=true:

\documentclass{article}
\usepackage{siunitx}

\begin{document}

\sisetup{tight-spacing=true}
\[
g = \frac{\num{6.67e-11} \times \num{6e24}}{6400010^2}
\]
\end{document}
share|improve this answer
1  
@ToddDavies: Ah, okay, I think now I understand your problem. The repeated use of \times is confusing for the reader. Hm... –  Jake Dec 11 '12 at 21:40
1  
This is the cleanest solution, it appeals to the programmer in me! Thanks Jack! –  Todd Davies Dec 11 '12 at 21:51
3  
I think I would write the middle \times as a \cdot. –  Manuel Dec 11 '12 at 21:57
2  
@Manuel: Mathematically, all the operations are just multiplications, so I don't think it's a good idea to use different symbols for the same thing. I think the choice of whether to use a dot or a cross for multiplication of single numbers is largely a cultural one (en.wikipedia.org/wiki/Multiplication#Notation_and_terminology), but one should be consistent. –  Jake Dec 11 '12 at 22:02
2  
@Manuel: I think in cultures where a comma is used as a decimal separator, a dot is frequently used for multiplications, including in scientific notation (e.g. in German, see de.wikipedia.org/wiki/Wissenschaftliche_Notation). In English, this is avoided because of the danger of confusion with the period decimal separator, so a cross is used for everything (except scalar products of matrices, of course, but that's a different matter). –  Jake Dec 11 '12 at 22:25
show 5 more comments

I know many will disagree with the following but nonetheless this what I used to use:

\newcommand{\sn}[2]{\ensuremath{{#1}\times 10^{#2}}}

And I use it like this: \sn{y}{x}. Here is an example:

enter image description here

\documentclass{article}
\usepackage[dvipsnames]{xcolor}
\usepackage{amsmath}

\newcommand{\sn}[2]{\ensuremath{{#1}\times 10^{#2}}}

\begin{document}
\begin{align*}
(\sn{2.25}{\textcolor{Cerulean}{4}})(\sn{7.5}{\textcolor{OrangeRed}{6}})    &= \sn{(2.25)(7.5)}{\textcolor{Cerulean}{4}+\textcolor{OrangeRed}{6}}\\
                               &= \sn{16.875}{10}\\
                               &= \sn{1.6875}{11}\\
                               &= \sn{1.7}{11} \quad(\text{2 s.f.})
\end{align*}
\end{document}
share|improve this answer
add comment

you can use {\times} instead of \times, the former does not add the additional spaces

share|improve this answer
    
Please always provide a complete answer with reference or using (some of) OP's code. –  Christian Hupfer Apr 27 at 12:33
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.