Style
Style [expr,options]
displays with expr formatted using the specified option settings.
Style [expr,"style"]
uses the option settings for the specified style in the current notebook.
Style [expr,color]
displays using the specified color.
Style [expr,Underlined ]
displays with fonts underlined.
Style [expr,n]
displays with font size n.
Details and Options
- Style can be used in both ordinary expressions and graphics.
- Style [expr,spec1,spec2,…] allows the speci to be any list or sequence of the following:
-
opt1->val1,… explicit options"style" a named style from the current stylesheetsgraphics directive (Thickness […], …)Underlined text underlinedLarger text largerSmaller text smaller
- Style can use any option listed in the Option Inspector in the notebook front end.
- Style can use any graphics directive or list of graphics directives.
- In Style [expr,spec1,spec2,…], explicit settings given in the speci always override settings defined by named styles in the speci, regardless of the order in which they occur.
- For explicit settings, the first occurrence of a setting for a given option will be the one used.
- Directives such as Red or Bold are treated as equivalent to their corresponding option settings.
- A few common explicit options include:
-
Background background colorEditable whether the contents are editableFontFamily font familyHyphenation whether to hyphenate in textMagnification magnificationSelectable whether the contents are selectable
- A few common named styles include:
-
"Button" display like text in a system button"Graphics" display like graphics"Input" display like Wolfram Language input"Label" display as a sans serif label"Menu" display like a system menu item"Output" display like Wolfram Language output"Panel" display like text in a system panel"PopupMenu" display like a system popup menu"Section" display as a section heading"SmallText" display like small text"Subsection" display as a subsection heading"Text" display like ordinary text"Title" display like a title
- When Style objects are nested, the specifications of the innermost one control the display of a particular expression.
Examples
open allclose allBasic Examples (3)
Use red font color:
Specify various properties of fonts:
Use a predefined style:
Specify the style of an individual graphic object:
Scope (3)
Specify the font size in printer's points:
Specify the font properties:
Use graphics directives:
Specify the indentation, spacing, and alignment of text:
Options (39)
Antialiasing (2)
Use antialiasing by default:
Turn off antialiasing:
Background (1)
Specify background colors:
ControlsRendering (2)
Compare the default and generic appearances of Slider :
DefaultOptions (2)
Locally set DefaultOptions :
Explicit option settings in an object override default options for that type of object:
Deployed (1)
Disable general editing and selection in a cell while preserving interactive controls:
DigitBlock (1)
Display integer digits in blocks of 3, separated by ",":
Editable (2)
By default, the output cell is editable:
Make the output noneditable:
Enabled (1)
Compare enabled and disabled Slider :
FontColor (2)
Use red font color:
Specify the color without using an option:
FontFamily (1)
Use "Courier" font family:
Use "Times" font family:
Use "Helvetica" font family:
FontSize (2)
Specify the font size in printer's points:
Specify the absolute font size using predefined symbolic values:
Specify the font size without using an option:
FontSlant (2)
Plain fonts:
Italic fonts:
Specify the font slant without using the option:
FontTracking (1)
Different settings for FontTracking :
FontVariations (1)
Underlined text:
Strike-through text:
Combine both:
FontWeight (2)
Plain fonts:
Bold fonts:
Specify the font weight without using the option:
ImageSizeMultipliers (2)
The original graphic size:
Specify that the graphic inside a list is 0.4 times its normal size:
Specify that the graphic inside a function is 0.2 times its normal size:
LineIndent (1)
Specify the size of indentation:
No indentation:
LineSpacing (1)
Double spacing:
Make the height of each line 10 printer's points:
Single spacing with 5 printer's points of extra space added to each line:
Magnification (2)
Specify the level of magnification:
Magnification affects everything including margins:
NumberSeparator (1)
Display integer digits in blocks of 3, separated by ",":
ScriptBaselineShifts (1)
Default placement of subscripts and superscripts:
Shift subscripts down by 2 x-heights:
Shift subscripts down by 0 x-heights; shift superscripts up by 2 x-heights:
ScriptMinSize (1)
Use ScriptMinSize to keep exponents from shrinking below a certain font size:
ScriptSizeMultipliers (2)
Use ScriptSizeMultipliers to set the factor by which font size is reduced for superscripts:
ScriptSizeMultipliers->list uses different factors for different levels:
ShowStringCharacters (2)
By default, quotation marks are shown around strings in input cells, but not in output cells:
Show quotation marks around strings in output cells:
SingleLetterItalics (2)
Make variables with one-letter names appear in an italicized form:
Override single-letter italicization for a particular symbol in a TraditionalForm output:
TextAlignment (1)
Align on the left:
Centered:
Align on the right:
See Also
StandardForm TraditionalForm Pane Panel Inherited Highlighted Magnify BaseStyle LightDark ThemeColor
Function Repository: SetDisplayStyle
Tech Notes
Related Guides
-
▪
- Controls Options ▪
- Colors ▪
- Graph Visualization ▪
- Graphics Annotation & Appearance ▪
- Graph Styling, Labeling, and Layout ▪
- Chart Styling & Layout ▪
- Text Styling ▪
- Font Options ▪
- Notebook Document Generation ▪
- Options & Styling for Interactive Manipulation ▪
- Cell Styling Options ▪
- Math Typesetting Options & Tweaking ▪
- Graphics Directives ▪
- Notebook Formatting & Styling ▪
- Text Generation ▪
- Form Structure & Layout ▪
- Natural Language Processing ▪
- Maps & Cartography ▪
- Molecular Structure & Computation ▪
- Creating Form Interfaces & Apps ▪
- Automated Reports ▪
- Palettes
Related Workflows
- Add Styling to Math ▪
- Add Styling to Text ▪
- Display Notebooks White-on-Black
Related Links
History
Text
Wolfram Research (2007), Style, Wolfram Language function, https://reference.wolfram.com/language/ref/Style.html.
CMS
Wolfram Language. 2007. "Style." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Style.html.
APA
Wolfram Language. (2007). Style. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Style.html
BibTeX
@misc{reference.wolfram_2025_style, author="Wolfram Research", title="{Style}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/Style.html}", note=[Accessed: 10-April-2025 ]}
BibLaTeX
@online{reference.wolfram_2025_style, organization={Wolfram Research}, title={Style}, year={2007}, url={https://reference.wolfram.com/language/ref/Style.html}, note=[Accessed: 10-April-2025 ]}