85

I am wondering how to make a fraction in LaTeX small enough to fit on a line, or at least just a little larger. I could have sworn I had seen this before but I just cannot find it.

In particular, I would like to use it in an equation environment, and have it maintain this size.

I am sure there is a simple solution, but I cannot find it.

Lev Bishop
  • 45,462
BBischof
  • 4,149
  • 5
  • 28
  • 23

1 Answers1

108

If you want the numerator on top of the denumerator, and have it appear smaller, the way it typically does in inline math mode as opposed to displayed math style, then use \tfrac{x}{y} (requires amsmath or similar package). If you want a diagonal-style fraction, then check out the xfrac package (with sfrac command).

enter image description here

\documentclass{article}
\usepackage{amsmath}
\usepackage{xfrac}

\begin{document} Equation:

frac: \[\frac{x}{y}\]

tfrac: \[\tfrac{x}{y}\]

sfrac: \[\sfrac{x}{y}\]

Inline math:

frac: $\frac{x}{y}$

tfrac: $\tfrac{x}{y}$

sfrac: $\sfrac{x}{y}$

\end{document}

zetyty
  • 779
frabjous
  • 41,473
  • thank you, this was the solution I have used in the past, I just couldn't seem to find it in my old source code. Thank you so much for saving me the time of searching. – BBischof Oct 07 '10 at 22:27
  • 1
    Note that tfrac seems to be similar to classical frac in "inline" math mode. – zetyty May 15 '23 at 10:16
  • 1
    Note that sfrac is quite "easy" to customize: \sfrac[⟨instance⟩]{⟨num⟩}[⟨sep⟩]{⟨denom⟩} (see documentation on CTAN). – zetyty May 15 '23 at 10:22