LaTeX forum ⇒ Math & Sciencenicefrac in siunitx Topic is solved

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Singularity
Posts: 155
Joined: Sat Jan 22, 2011 9:55 pm

nicefrac in siunitx

Postby Singularity » Sun Mar 06, 2016 10:17 pm

Is it possible to use standard units as in package siunitx and have the units display as if in a \nicefrac?

Also, how do you get the number portion of sinunitx (e.g., \num{\nicefrac{a}{b}}, or \Si{\nicefrac{a}{b}}{\units}) to work with \nicefrac?


I've looked over all of the options (and the cryptic documentation), but do not see how to make that work.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9524
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun Mar 06, 2016 10:21 pm

You can use the original nicefrac, just turn of the siunitx internal parsing in such a case:

  1. \usepackage{siunitx}
  2. \usepackage{nicefrac}
  3. ...
  4. \SI[parse-numbers = false]{2\nicefrac{1}{4}}{\hour}


Stefan
Site admin


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 2 guests