In Mathematica, stylesheets define the look and behavior of elements in a notebook. One can create a custom stylesheet to define the default style for new notebooks.
Note: the fonts of the input and output styles must be edited in a way that is different from all other styles.
The recommended steps for editing all other styles are to:
- Define desired custom styles in a new stylesheet
- Save this stylesheet to the appropriate location
- Configure Mathematica to use it for all new notebooks
Creating and Saving a Custom Stylesheet
- Open a new notebook.
- Select the menu item Format ► Edit Stylesheet. An empty Style Definitions notebook will open.
- Alter the style for each cell type you wish to modify. Note that any styles you do not change will retain their default behavior defined in Default.nb.
In this example, we are changing the color of the text in section cells to blue.
- Use File ► Save As to save this new stylesheet to your
$UserBaseDirectory\SystemFiles\FrontEnd\Stylesheetsdirectory. For example, on Windows, the default location is:
Setting a Custom Stylesheet as the New Default
To set a custom stylesheet as the default, the DefaultStyleDefinitions option needs to contain the stylesheet’s file location.
- Go to the menu item Format ► Option Inspector. This opens the Option Inspector dialog.
- Change the scope from Selection to Global Preferences. This ensures that all new notebooks will be affected.
- Look up the option DefaultStyleDefinitions or browse to it via Global Options ► File Locations.
- Select the small gray button to the right of the option value to open up a file browser. Select the stylesheet saved earlier.
- Open a new notebook and use some of the styles you modified to verify that the changes are being applied.
Whether you have a question about billing, activation or something more technical, we are ready to help you.
1-800-WOLFRAM (+1-217-398-0700 for international callers)
8am–5pm US Central Time
- Product registration or activation
- Pre-sales information and ordering
- Help with installation and first launch
Advanced Technical Support (for eligible customers)
8am–7pm US Central Time
8:30–10am & 11am–5pm US Central Time
- Priority technical support
- Product assistance from Wolfram experts
- Help with Wolfram Language programming
- Advanced installation support