({{, (RefLink[FractionBox, paclet:ref/FractionBox])[x,y]
is a low-level formatting construct that represents (x/y) in notebook expressions. }})

OpenersNotesSection(Spacer1)Details and Options

Inside ∖(…∖)FractionBox[x,y] can be input as x∖/y.

In a notebook a (RefLink[FractionBox, paclet:ref/FractionBox]) can be created using (Key1[ctrl, /]). (Key1[ctrl, space]) moves out of the fraction.

In (RefLink[StandardForm, paclet:ref/StandardForm]) and (RefLink[InputForm, paclet:ref/InputForm]), (RefLink[FractionBox, paclet:ref/FractionBox])[x,y] is interpreted on input as x/y.

The axis of (RefLink[FractionBox, paclet:ref/FractionBox])[x,y] is taken to go through the fraction line. The baseline lies below the axis by the distance between the axis and the bottom of characters such as ( in the current font.

The width of the fraction line can be given in x heights as the setting for the (RefLink[SpanLineThickness, paclet:ref/SpanLineThickness]) option in (RefLink[StyleBox, paclet:ref/StyleBox]).

If (RefLink[FractionBox, paclet:ref/FractionBox])[x,y] does not fit on a single line, it is output as x/y.

In (RefLink[StandardForm, paclet:ref/StandardForm]), explicit (RefLink[FractionBox, paclet:ref/FractionBox]) objects are output literally. You can use (RefLink[DisplayForm, paclet:ref/DisplayForm]) to see the display form of such objects.

OpenersPrimaryExamplesSection(Spacer1)Examples  (2)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Display a typeset fraction:

FractionBox["x","2"]//DisplayForm

Display a fraction with typeset structures in the numerator and denominator:

FractionBox[SuperscriptBox["x","3"],RowBox[{"1","+","a"," ","b"}]]//DisplayForm

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[OverscriptBox, paclet:ref/OverscriptBox])  ▪  (RefLink[GridBox, paclet:ref/GridBox])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Representing Textual Forms by Boxes, paclet:tutorial/RepresentingTextualFormsByBoxes])}, {▪(RefLinkPlain[String Representation of Boxes, paclet:tutorial/StringRepresentationOfBoxes])}, {▪(RefLinkPlain[Typing Fractions, paclet:tutorial/TypingFractions])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Low-Level Notebook Structure, paclet:guide/LowLevelNotebookStructure])}})}})