({{, (RefLink[StyleBox, paclet:ref/StyleBox])[boxes,options]
is a low-level representation of boxes to be shown with the specified option settings. }, {, (RefLink[StyleBox, paclet:ref/StyleBox])[boxes,"style"]
uses the option setting for the specified style in the current notebook. }})

OpenersNotesSection(Spacer1)Details

(RefLink[StyleBox, paclet:ref/StyleBox]) is the low-level representation of (RefLink[Style, paclet:ref/Style]). Except for low-level notebook expression manipulation, (RefLink[StyleBox, paclet:ref/StyleBox]) should not need to be used directly.

You can use any option that is documented to apply at the style level. This includes font options such as (RefLink[FontSize, paclet:ref/FontSize]), (RefLink[FontWeight, paclet:ref/FontWeight]), (RefLink[FontSlant, paclet:ref/FontSlant]), (RefLink[FontFamily, paclet:ref/FontFamily]), (RefLink[FontColor, paclet:ref/FontColor]), and (RefLink[Background, paclet:ref/Background]) in (RefLink[StyleBox, paclet:ref/StyleBox]).

The following additional options can be given:

In (RefLink[StandardForm, paclet:ref/StandardForm]) and (RefLink[InputForm, paclet:ref/InputForm]) input, (RefLink[StyleBox, paclet:ref/StyleBox]) is by default ignored, so that (RefLink[StyleBox, paclet:ref/StyleBox])[box,spec] is interpreted just as box would be.

When (RefLink[StyleBox, paclet:ref/StyleBox]) objects are nested, the options of the innermost one control the display of particular boxes.

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

OpenersPrimaryExamplesSection(Spacer1)Examples  (4)

OpenersExampleSection0(Spacer1)Basic Examples  (4)

Style boxes or text according to a style option:

StyleBox["red",FontColor->Red]//DisplayForm

StyleBox[FractionBox["x","y"],FontSlant->Italic]//DisplayForm

Use a named style:

StyleBox["text","Section"]//DisplayForm

StyleBox[RadicalBox["x","y"],"Section"]//DisplayForm

Display some text that cannot be selected except as a whole:

StyleBox["words not selectable",Selectable->False]//DisplayForm

StyleBox[RowBox[{"x","y"}],Selectable->False]//DisplayForm

By default, spanning characters such as braces do not grow arbitrarily large:

RowBox[{"{",FractionBox["x",SuperscriptBox["y","2"]],"+","1","}"}]//DisplayForm

Use (RefLink[SpanMaxSize, paclet:ref/SpanMaxSize]) to allow braces to grow to the full size:

StyleBox[RowBox[{"{",FractionBox["x",SuperscriptBox["y","2"]],"+","1","}"}],SpanMaxSize->Infinity]//DisplayForm

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Style, paclet:ref/Style])  ▪  (RefLink[AdjustmentBox, paclet:ref/AdjustmentBox])  ▪  (RefLink[FrameBox, paclet:ref/FrameBox])  ▪  (RefLink[Cell, paclet:ref/Cell])  ▪  (RefLink[ShowAutoStyles, paclet:ref/ShowAutoStyles])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Representing Textual Forms by Boxes, paclet:tutorial/RepresentingTextualFormsByBoxes])}, {▪(RefLinkPlain[Formatted Output, paclet:tutorial/FormattedOutput])}})}})

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