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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

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