Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have looked over other questions related to style definitions, and looked through the Mathematica 8 documentation, but I do not know why I am having so much difficulty setting the default font in my free .CDF files.

I have tried changing the cell appearance to the desired font style many times for Default.nb, but the changes never take effect, and whenever I go back to "Edit Stylesheet" for Default.nb, all my changes are gone!


Never before have I had so much difficulty setting the default font settings in an an IDE, but for Mathematica, it's worth the trouble. Here is a screenshot of the private style definitions which finally worked. Standard Form is left uncollapsed, but they all have the same font settings.

enter image description here

share|improve this question
up vote 14 down vote accepted

You cannot save to Default.nb by default, because it has Savable set to False and it is a good idea to not forcibly modify this file. Instead, create a private stylesheet as you have done here and put it in $UserBaseDirectory/SystemFiles/FrontEnd/StyleSheets/. You can now use this with any notebook.

See this answer of mine for an idea of which tokens to set/modify in the stylesheet to change different items. Specifically, to change the font for input cells, you'll need to set a custom style for StandardForm. A very basic one that does what you want will be:

Cell[StyleData["StandardForm"], FontFamily -> "Consolas", FontSize -> 11]
share|improve this answer
Although I didn't see a StyleSheets folder @ $UserBaseDirectory/SystemFiles/FrontEnd/StyleSheets/, after adding the "StandardForm" to the private style definitions, and also setting the "Input", "Output styles, saving and reopening, I was able to finally get the style changes to save. – T. Webster Aug 28 '12 at 5:25
@T.Webster Right, you'll have to create that folder (with that directory tree structure) – R. M. Aug 28 '12 at 6:00

With a little help from this post, I came up with this command to change the style of new input cells. (The modifications persist in the saved notebook only.)

 DefaultNewCellStyle -> {"Input",
   FontFamily -> "Consolas", FontSize -> 11}]

This reverses the change:

 DefaultNewCellStyle -> Inherited]

But I was unable to come up with a similar command to modify the output. For instance I tried this ...

 GeneratedCellStyles -> {
   "Graphics" -> "Graphics", "Message" -> {"Message", "MSG"}, 
   "Output" -> {"Output", "FontFamily" -> "Consolas", "FontSize" -> 11},
   "Print" -> "Print", "PrintTemporary" -> "PrintTemporary"}]

which didn't work. Also, AbsoluteOptions[SelectedNotebook[], GeneratedCellStyles] showed the option values had not been changed.

Any suggestions how to modify output with SetOptions?

share|improve this answer
Is there a way to see the default styles used for graphs etc ? I want to see and then set the default font for the graph labels and headings as well as Grid items so that all y work uses the same font. At the moment the graphs use one type of font and the grids use another by default. – Lara Jordan Jul 26 '13 at 9:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.