Can we define a macro for writing "10^power" using a single command?

like I am using following macros for various units.



so can we do that?

  • 2
    In math mode or in text? You may also want to look at the siunitx package for units (which are traditionally set upright and not in math italics).
    – moewe
    Jun 22, 2018 at 8:01
  • Actually in both, because it is really hectic to write anything like "1.489X10^-15" for 15 to 20 times. Jun 22, 2018 at 8:03
  • 3
    Then as mentioned use siunitx, then \num{123.25e-25} is enough plus you can control from the preamble how the e should work. See the siunitx manual for details
    – daleif
    Jun 22, 2018 at 8:18
  • 1
    I'd also rather suggest the siunitx package, and then you might introduce some shortcut suiting you. Note that your present definitions of the units in math mode $...$ are wrong: units must be upright: $\mathrm{kg}/\mathrm{m}^3$ and so on.
    – campa
    Jun 22, 2018 at 8:18

1 Answer 1


Something like this?

enter image description here

\usepackage{amsmath} % for "\ensuremath" macro
$1.487\tenpow{-15}$  1.23\tenpow{45}

You're obviously free to come up with another name than \tenpow for the LaTeX macro.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .