Math & Sciencesiunitx | Unit as a Fraction

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
ghostanime2001
Posts: 402
Joined: Fri May 20, 2011 9:41 am

siunitx | Unit as a Fraction

Post by ghostanime2001 »

I am using siunitx package and I want to have J/atom as a fraction. How can I do that?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

torbjorn t.
Posts: 162
Joined: Wed Jun 17, 2009 10:18 pm

siunitx | Unit as a Fraction

Post by torbjorn t. »

Code: Select all

\SI[per-mode=fraction]{2}{\metre\per\second}
You can set this globally, by adding \sisetup{per-mode=fraction} to the preamble. You can also specify which function to use, \frac, \dfrac, \tfrac or \sfrac (the latter requires the xfrac package), with fraction-function=\dfrac.
Post Reply