Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I know that one can modify the StandardForm style so that all input and output codes (and maybe other things too) follow that style. This makes it tricky to make input code different from output code (though this problem has been solved here) because the StandardForm is the overriding style for both inputs and outputs.

Here I have an opposite problem with formatting texts. I want all text fields in my notebook to have the same font, and that includes the style of Title, Subtitle, Sections, Text, Item, Subitem, and so on. Of course I could set all of them to be the same font in my stylesheet, but I'm wondering if there's a style that I could change and that would apply that change to all texts. That way if I want to change the font of my texts in the future, I could just change that one style instead of changing all text styles one by one.

In other words, is there any equivalence to StandardForm for text fields?

share|improve this question

1 Answer 1

up vote 11 down vote accepted

I believe what you are asking for is solved by use of the All style. Adding this to the private style sheet:

Cell[StyleData[All],
 FontFamily->"Trajan Pro"
]

Results in:

enter image description here

(Trajan Pro is a distinctive small caps font I had available.)

As you can see the Input and Code styles are not affected, but those are affected by the "StandardForm" style, as you already know.

share|improve this answer
    
This works wonderfully! One problem: I set all my titles and section headings as the extra bold versions of a font (think Arial Black) and all the normal text as the regular font (regular Arial), and unfortunately they belong to two different font families. This means that if I set "All" to be a certain font family, all texts in the notebook will either be in extra bold or regular font. I'd love to have an option to have an "All" for all heading/title texts & another "All" for regular texts. That's probably too much to ask, so I'll have to stick with modifying styles one by one. –  seismatica May 31 at 11:34
    
BTW Mr. Wizard how did you know about all that "magic"? heheh. I've been trying to find well laid-out documentation about stylesheets but can't seem to find anything good. –  seismatica May 31 at 11:36
    
@seismatica I don't have time to test this now but you could experiment with using the "Notebook" style to see if it happens to handle your formatting in a way you prefer. Regarding the second, a combination of trial and error and learning from people here. :-) –  Mr.Wizard May 31 at 11:44
1  
A marginally quicker way to solve my problems, and by that I mean to modify the font family of multiple styles in the stylesheet without changing them one by one, is to multiple-select the styles you'd like to change (by pressing the 'Ctrl' key' when selecting) and then change the font style--also things like weight if you want them to be the same across those styles--and leave other options intact. This way those styles will have something in common (such as font style and weight) and something different (such as color). Just something I figured out a second ago that I thought I'd share. –  seismatica May 31 at 12:00
1  
worth mentioning that StyleData[All, "Working"] limits this to the screen for cases where you want something different for printing (and you can also do StyleData[All, "Printout"]). –  Mike Honeychurch Jun 1 at 4:50

Your Answer

 
discard

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.