Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Stylesheet questions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119893] Re: Stylesheet questions
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Tue, 28 Jun 2011 07:56:31 -0400 (EDT)
  • References: <201106271130.HAA07764@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

If you want to change the comment color for all notebooks, the simplest 
way is to use the Mathematica Preferences dialog. On Mac, it's menu item 
Mathematica > Preferences. Under Windows, if I recall, it's Edit > 
Preferences.

On the Preferences window, select the Appearance item and its Syntax 
Coloring sub-item.

There select the Other subsubitem. The first thing in the list of 
several you can change is the coloring for comments.

Click the gray box next to that to bring up a color chooser.

The same thing can be done using the Option Inspector. Select whether 
you want the change for Global Preferences (which is what the method 
described above does), Selected Notebook, or even Selection (if you just 
want the change for some cells in a notebook).

There search for Comment. You'll see in the displayed tree:

   Formatting Options
      Private Editing Options
         AutoStyleOptions
            "HighlightComments"
            "CommentStyle"

The two items at the lowest level there are set to True and to a style 
that includes, among other things, FontColor -> GrayLevel[0.6].

Just change the latter. If you want an actual color rather than some 
gray level, you'll need to use the form RGBColor[r,g,b] rather than any 
name color. E.g., RGBColor[1,0,0] rather than Red.



On 6/27/11 7:30 AM, AES wrote:
> 1)  As of version 8 (maybe earlier), comments using the  (*---*)
> notation in Input cells seem to be displayed in a light gray color, at
> least in the Default notebook style and maybe others.
>
> What's the recipe for converting these comments to some other color (and
> maybe also some other font), either in a customized stylesheet or even
> in all stylesheets globally?
>
> [The more step-by-step this recipe is, the better for me!]
>
> 2)  At a more general level, I'm happy to have the syntax color-coding
> that's used in recent versions of Mathematica, provided the colors are
> "bright" enough or have high enough contrast.  My age-deteriorating
> vision does not do well, however, with text presented at reduced levels
> of contrast or in "washed out" colors.
>
> Any global stylesheet setting(s) that will address this issue globally?
>
> 3)  Stylesheets are one of the more arcane areas of Mathematica coding.
> I have Heikki Ruskeepaa's Navigator and some other manuals; but is there
> some really good all-in-one vade mecum for stylesheet editing to be
> found anywhere in the Mathematica documentation?
>
> Thanks for any advice.
>

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: How to write a "proper" math document
  • Next by Date: Re: C code generation
  • Previous by thread: Stylesheet questions
  • Next by thread: error FrontEndObject