Message Boards Message Boards

0
|
5601 Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

[?] Why Input style does not respond to stylesheet directives?

Posted 7 years ago

Hi All,

After upgrading to ver 11, I thought I would like to keep the bold courier input style. Turns out, I can't. After playing around with stylesheets for awhile I found out the following: Text style will respond to the stylesheet style regarding family, face, size and color. However, Input and Output styles will respond to the last three attributes when specified by stylesheet, but not to family.

Selected text in a notebook, in any of the three styles mentioned, will respond to any formatting. My system is Mac Yosemite.

I modified and tested stylesheets from ver 10 and 11. Can someone see the answer to this problem?

2 Replies

Thanks Michael, it's nice not to have to worry about that one from now on.

The key style setting is

StyleHints->{"CodeFont" -> "Courier"}

You can add it to the "Input" style, or the front end (e.g., SetOptions[$FrontEnd, StyleHints -> {"CodeFont" -> "Courier"}]), or the notebook (e.g., SetOptions[EvaluationNotebook[], StyleHints -> {"CodeFont" -> "Courier"}]), depending on how localized you want the effect. If added to the front end or notebook, it should change both the input and output fonts (and the "Code" font, too).

POSTED BY: Michael Rogers
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract