Mathematica Stack Exchange is a question and answer site for users of Mathematica. 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

When I try to format a number that has a big exponent with TeXForm the following happens:

In[1]:= TeXForm[1.543*10^-10 ]

    \text{1.543$\grave{ }$*${}^{\wedge}$-10}

But I would like to get something like 1.543 \cdot 10^{-10}. Is there any workaround for this?

share|improve this question
Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2)Read the FAQs! 3) When you see good Q&A, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. ALSO, remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign – ssch Nov 14 '12 at 14:58

You could use ScientificForm[] for starters:

   1.543\times 10^{-10}
share|improve this answer

Here is another approach that addresses some issues you may (or may not) encounter: With the built-in formats like ScientificForm, there is an aesthetic problem:


1.\times 10^{-10}

Notice that trailing decimal points are printed after machine-precision numbers even when there's no digits to the right.

Also, you wanted a centered dot to represent the multiplication. Both of these issues can be addressed with the following wrapper function:

tF[x_?MachineNumberQ] := 
   NumberFormat -> (DisplayForm@
       RowBox[Join[{StringTrim[#1, RegularExpression["\\.$"]]}, 
         If[#3 =!= "", {"\[CenterDot]", 
           SuperscriptBox[#2, #3]}, {}]]] &)]

An example is:

tF[1.34 10^-10]

1.34\cdot 10^{-10}

A slightly different way to implement this would be to declare this as a Format that only kicks in during TeXForm output:

Format[tN[x_?MachineNumberQ], TeXForm] := 
  NumberFormat -> (DisplayForm@
      RowBox[Join[{StringTrim[#1, RegularExpression["\\.$"]]}, 
        If[#3 =!= "", {"\[CenterDot]", 
          SuperscriptBox[#2, #3]}, {}]]] &)]

Format[tN[x_]] := x

With this, you could wrap any expression you want with the tN function, and it will display as if tN weren't there. But if you apply TeXForm, the output is changed:

tN[1. 10^-10]

$1. \times 10^{-10}$


1\cdot 10^{-10}

The centered dot and the removed decimal point can be seen only in the last line where TeXForm was applied.

It depends on the application whether you would want to use a wrapper with a Format like tN, or a simple conversion function like tF.

The formatting in these wrapper functions relies on NumberForm, and I basically borrowed the function trimPoint from my answer here.

share|improve this answer
One might also consider using MantissaExponent[] for such manipulations... – J. M. Nov 15 '12 at 0:23
That's the same thing that NumberFormat does. Here the main point is that you want the flexibility provided by NumberForm to introduce, e.g., the \cdot multiplication symbol. – Jens Nov 15 '12 at 3:49

Your Answer


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.