Math & ScienceWhat is the nicest fraction package ?

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

What is the nicest fraction package ?

Post by Cham »

I'm looking for the nicest way (I know it's subjective!) to display small fractions inside a larger fraction. I know about the nicefrac and xfrac packages :

Code: Select all

\documentclass{article}
\usepackage[nice]{nicefrac}
\usepackage{amsmath}
\usepackage{xfrac}

\begin{document}
Blablabla
	\begin{equation}
		(4 / 9)(5 / v) = (\nicefrac{4}{9})(\nicefrac{5}{v}) = \frac{2/3}{1/5} = \frac{\nicefrac{2}{3}}{\nicefrac{1}{5}}.
	\end{equation}
Ou encore
	\begin{equation}
		(4 / 9)(5 / v) = (\sfrac{4}{9})(\sfrac{5}{v}) = \frac{2/3}{1/5} = \frac{\sfrac{2}{3}}{\sfrac{1}{5}}.
	\end{equation}
\end{document}
Preview :
fractions.jpg
fractions.jpg (8.35 KiB) Viewed 25474 times
I think that the first term is acceptable (could it be better looking?). The second term is too small. The third term is clumsy. The fourth term appears okay, but could it be better looking?

What would you do in this case ? And which package is best : xfrac or nicefrac ?

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

What is the nicest fraction package ?

Post by Stefan Kottwitz »

Hi Cham,

it depends on taste and your point of view. Just choose the look you like more.

The xfrac package is newer than nicefrac and better maintained, I think. From CTAN: "The pack­age pro­vides a high qual­ity al­ter­na­tive to the fa­cil­i­ties of the nicefrac­ package."

Stefan
LaTeX.org admin
Post Reply