I want to show some units in a fraction in math mode. It includes the following units: gram, squared meter, second, and molar mass. After searching the web, I understood that I should use load \usepackage{siunitx} with appropriate option in \siset{...}. The framework of the desired code should be something like this:


But, to add these units, I don't know what I should put in {...} for \siset. Thanks in advance.

  • Just want to notice that siunitx is just an option ... You don't really "should" use it. Yuo can just use the symbols instead with some distance between the numbers and the units...
    – koleygr
    Jan 26 '18 at 7:28
  • I don't really understand your question. You don't need anything in the sisetup, but you should read the siunitx manual as to how to write the units, it has special syntax for sugared etc. Plus it is not a good idea to write a formula like this in text style math, do it using displayed math, otherwise it becomes hard to read.
    – daleif
    Jan 26 '18 at 7:35

it is not clear, what is your problem. to show your math expression with units you not need any presetting of siunitx. however, your expression i would rather write on the following way:


\usepackage[textmath, active, tightpage]{preview}% for see only equation
                                                 % (don't use in real document)


enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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