Is there any option Mathematica's preferences to change the font for the whole notebook? I know how to change the font of individual cells.
Stylesheets (as "bill s" said) seem the best idea to me. Just modify the font of the type of cells(Title, section, subsection...) you want on the stylesheet (using the writing assistant palette, for instance) and the changes will be applied to the same cell types on the notebook.
Here are more detailed steps (tested in mathematica 9 front-end):
- Go to "Format"-> "Edit Stylesheet"
- This opens the "Private style definitions" stylesheet, whose definitions override the base stylesheet all notebooks have by default.
- From the "Choose style" drop-down menu select the style you want to modify.
- A new cell will be created with the contents: "Local definition for style "stylename"" and below: "stylename" formatted according to that particular style.
- With the "Writing Assistant" palette change the desired feature (text size, color, font...)
- Note that only the features you set will be overriden, all the other will be inherited from the base stylesheet.
- You can also modify the cell expression directly if you know how (Ctrl+Shift+e to toggle it on the current cell)
Also, note that the cells in the stylesheet are not regular cells, thus you can't just insert a regular cell in it, use the dropdown "Choose style" instead.
This is what the expression of a stylesheet cell for "Title" looks like (you can toggle between displaying a cell in normal mode and expression mode with Ctrl+Shift+e ):
Cell[StyleData["Title"]]. If we changed the color to blue, it would look like this:
FontColor->RGBColor[0, 0, 1]]
And this is what a regular (blank) title cell expression looks like:
Cell["", "Title"] (The empty string is the content of the cell)
(1) Open a notebook, in the menu choose "Format" -> "Edit Stylesheet".
(2) Choose a style to change. For example, "Text", in the menu at the top left.
(3) Modify fonts, etc.
(4) Save this stylesheet to a .nb file. Optionally one can also click Install StyleSheet so that the stylesheet can be found at "Format" -> "Stylesheet..." menu.
(5) Open menu "Format" -> "Option Inspector", make sure "Global Preference" is selected (where the default is "Selection") in the popup menu.
(6) Search for DefaultStyleDefinitions, change it to the saved stylesheet file. Click apply.
Close Mathematica and launch it again. The default font is changed.
4$\begingroup$ This makes global changes, not restricted to given notebook. I'm not sure if this if what OP needs but if so then this topic would be a duplicate of another one you've answered: mathematica.stackexchange.com/a/140010/5478 $\endgroup$– Kuba ♦Mar 14, 2017 at 9:59
$\begingroup$ At least on Wolfram Desktop 13.2 for macOS, on step (6), you can search for "Font" instead, and change the StyleHints option values under "Formatting Options > Font Options". In my case, I wanted the Notebook cells to be changed from "Source Sans Pro" to "Courier", and that was the only setting change that made the difference (without having to create a stylesheet). Within the option value, there is a key called
CodeFontthat pointed to the font name (i.e.,
<|"CodeFont" -> "Source Sans Pro",). As noted in the other comment, this change applies globally. $\endgroup$ May 21 at 23:49
You can refer to this post, which has the method of customizing various fonts by modifying the
3$\begingroup$ (-1) Another careless answer of yours. 1. The linked post is also about editing stylesheet, which is already elaborated by other answers. 2.The screenshot is not related at all. $\endgroup$– xzczdOct 2, 2020 at 4:58
SetOptions[InputNotebook, FontFamily -> "Calibri", StyleDefinitions -> False]does this, but no ... $\endgroup$
CTRl-Zand so on. But I like this software! $\endgroup$
core.nbbeing the top level parent so therefore you would need to set the font on a cell type by cell type basis because font type would be defined "locally" for each cell type in the
core.nbtherefore setting a type at the notebook level won't override unless you switch off