MathGroup Archive 2000

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

Search the Archive

Re: Cell background color?

  • To: mathgroup at
  • Subject: [mg22844] Re: Cell background color?
  • From: paulh at (P.J. Hinton)
  • Date: Sat, 1 Apr 2000 02:51:06 -0500 (EST)
  • Organization: "Wolfram Research, Inc."
  • References: <8c1h0b$>
  • Sender: owner-wri-mathgroup at

In article <8c1h0b$q1o at>,
 "Jordan Rosenthal" <jr at> writes:

> Let say I evaluate something
>    In[18]:=
>       x + 2
>    Out[18]=
>       2 + x
> If I then select the output cell and use the menu "Format...Background
> Color...Cell Gray Box", the cell accordingly displays in a gray box.  When I
> evaluate the input again, the output no longer has the same background
> color.
> How can I write an input expression such that its output will always be
> formatted with its background color set to"Cell Gray Box"?

Each cell in a Mathematica notebook has a style associated with it.
This style defines how the cell should look provided that the user
has specified no other modifications.  When you reevaluate the input,
the front end obliterates your prior output and replaces it with
a new cell, which uses the Output style.

To make Output cells have a different appearance by default, you
need to actually change the style's definition.  Styles are specified
through special notebooks -- called style sheets -- that contain a
collection of prototype cells that contain the settings needed to
attain the desired appearance.

You can find information about how to edit style sheets at this URL:

It is also available under the Other Information branch of the Mathematica
Help Browser.

P.J. Hinton
Mathematica Programming Group           paulh at
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.

  • Prev by Date: Re: NotebookPath Probe.
  • Next by Date: Re: Publishing in Scientific Journals with Mathematica
  • Previous by thread: Re: NotebookPath Probe.
  • Next by thread: Selecting a subsection cell