35

How to write beveled fractions like ${}^a/_b$?

In contrast to $\frac{a}{b}$ and $a/b$ (see this question).

ybeltukov
  • 43,673
  • 5
  • 108
  • 212

2 Answers2

34

There is the undocumented option Beveled in the FractionBox

FractionBox[a, b, Beveled -> True] // DisplayForm

enter image description here

ybeltukov
  • 43,673
  • 5
  • 108
  • 212
22

One can use Style and FractionBoxOptions to set Beveled:

Plot[Sin[x], {x, -2 Pi, 2 Pi},
  Ticks -> {Pi Range[-2, 2, 1/2], Automatic},
  BaseStyle -> {FractionBoxOptions -> {Beveled -> True}}]

It doesn't look too good here, though:

Mathematica graphics

This looks ok,

Style[3 Pi/2, FractionBoxOptions -> {Beveled -> True}]

Mathematica graphics

but not in the "Label" style,

Style[3 Pi/2, FractionBoxOptions -> {Beveled -> True}, "Label"]

Mathematica graphics

Michael E2
  • 235,386
  • 17
  • 334
  • 747