Mathematica 9 is now available
Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

RE: Style Sheets for Notebooks

  • To: mathgroup at
  • Subject: [mg24778] RE: [mg24737] Style Sheets for Notebooks
  • From: "David Park" <djmp at>
  • Date: Thu, 10 Aug 2000 00:32:08 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Dear Gregorio,

Rip Pelletier and I just created our own style sheet to exchange notebooks
and so I thought I would outline for you how we did it and what we learned.

We wanted a notebook style that we could use for studying textbooks and we
found that we really needed one extra heading level. While we were at it we
also added new text style cells where each of us could add our comments in
distinctive colors.

We started with a test notebook in Default style. This is the best starting
point. Then:
1) Choose Format -> Edit Style Sheet from the menu
2) Choose Import Private Copy (later we will make a shared style sheet)
3) You will now have two notebooks on the screen, the test notebook and the
private style sheet.
4) Edit the style sheet. Open up the various cell groupings. Select the cell
you want to change and use the Format menu. But a better method is to select
the cell style you want to edit and show the cell expression for the cell
(Shift-Ctrl-E). You can then directly edit the options for the cell. Much
more can be done that way than with the Format menu. Then when you convert
the style cell back to display form (Shift-Ctrl-E again) the changes will be
automatically reflected in both the style sheet and in the test notebook. It
may help to enter things into the test notebook so you can see its overall
5) After you have the style you want, select the style sheet notebook and
save it in Configurations/FrontEnd/StyleSheets under the name you want for
the style. For example, we saved our style sheet under the name
TextStudy.nb. Remember, a style sheet is just a notebook. When you restart
Mathematica, that style sheet will automatically be available under the
Format->Style listings. You can throw away the test notebook or convert it
to the new shared style sheet.
6) If later you decide to modify the shared style sheet, just bring up a
notebook in that style, choose Format -> Edit Style Sheet and this time
choose Edit Share Style.

You probably do not want to edit any of the Wolfram supplied shared style
sheets. For one thing, they are safe for exchanging notebooks with anyone.
If you edit them they may no longer work for other people, depending upon
what you do.

One thing that we learned is that you can't create a style sheet, shared or
private, in Version 4 and then use it in Version 3. The Version 3 person
will get a lot of error messages because Version 4 style sheets have many
options that are not recognized in Version 3. The reason a Version 4 user
can send a notebook in some standard style to a Version 3 user is that the
Version 3 user has his own version of the style sheet. So Rip and I had to
each create our own copy of the style sheet.

One nice thing about this is that we each have our own version of TextStudy
style. We can each have our own colors, fonts, backgrounds etc. I don't even
know what his notebook looks like! But we each have to have the same style
definition names, and we have the same level structure, and as a practical
matter use it the same way.

Here is how you create new style definitions. Suppose you want a special
text cell with a different background. Under Styles for Body Text, copy and
paste the Prototyle for style : "Text". Notice that each of the cell styles
has multiple cells for the different formats (Working, Printing. etc.).
Change the style names of the new cells and edit them to what you want. Many
changes made in the Working style cell are inherited by the others.

Here is how you can add an extra level to a notebook. Copy and paste the
Subsubsection style. Give it a new name like Subsubsubsection. Open it up
and change the CellGroupingRules option:

CellGroupingRules->{"SectionGrouping", 60}.

You can change overall notebook options under Notebook style near the top of
the style sheet. I don't thing you can change everything there, but you can
change things like background color, magnification etc. I was not able to
get the style sheet to automatically display the edit toolbar.

Here is one last thing to keep in mind. Mathematica assigns Alt keys to the
cell styles in the  order that it encounters them in the style sheet, from
Alt-1 to Alt-9, until it runs out of numbers. (It would be nicer if
Mathematica allowed one to specify the key.) Therefore if you create new
cell styles, you may want to move them out of their natural section and move
them down to new sections that come after the regular cell styles. That way
they won't usurp Alt keys or throw them out of their usual order.

David Park
djmp at

> -----Original Message-----
> From: Gregorio Ferzio [mailto:moonbloody at]
To: mathgroup at
> Dear Math Grouppisti
> I'm sorry for the worthy newbie question but it's driving me
> crazy : in The Mathematica Book "Shared and Private Style Sheets"
> a procedure is describe whose aim is storing a copy of a style
> sheet within the current notebook.
> What about the opposite direction ? A pleasant notebook is given
> , endowed with its own private style sheet : how can I draw a
> shared style sheet from it ?
> A further question arise, to which I'm unable to answer,
> notwithstanding I read through The Mathematica Book : can I
> enclose in a shared style sheet exlusively cell formatting
> options or can I set up also option regarding the notebook as a
> whole ? I'm making reference to, as an example, to
> NotebookOptions -> DisplayOptions -> Background
> NotebookOptions -> DisplayOptions -> Magnification
> NotebookOptions -> Window Properties -> WindowMovable
> and such.
> I hope similar question have not been already answered.
> Warm regards from Gregorio Ferzio

  • Prev by Date: RE: 2nd arg to BeginPackage
  • Next by Date: postscript!
  • Previous by thread: exporting a private style sheet
  • Next by thread: postscript!