7

It used to be quite straightforward to change the default settings of a notebook in terms of inputs, outputs, text styles and font sizes in previous versions of Mathematica using initialization cells with commands such as $TextStyle and $FormatType.

However, as of Mathematica version 6, functions have been superseded by BaseStyle. May I know how to use this new function to accomplish the same?

balpha
  • 101
  • 5
Ruben Garcia
  • 637
  • 3
  • 9

1 Answers1

7

Just use SetOptions[Graphics, BaseStyle -> {...}]. For example

SetOptions[Graphics, BaseStyle -> {Large, Red, FontFamily -> "Times", Italic}];
Graphics[{Circle[], Text["test"]}]

example1

Note that the Text inherits its BaseStyle from the surrounding Graphics. The Text function also takes a BaseStyle option, but for some reason it doesn't seem to do anything (in Mma v8.0.4) - this might be a bug. For example:

SetOptions[Text, BaseStyle -> {Large, "Color" -> Green}]
{Text["test"], Text["test"]//Graphics}

example2

However explicit BaseStyle options passed to Text do work:

Graphics[{Circle[], Text["test", BaseStyle -> {Large, "Color" -> Green}]}]

example3

Simon
  • 10,167
  • 5
  • 57
  • 72