Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How create new style sheet- Mathematica 8

595 views
Skip to first unread message

Murray Eisenberg

unread,
Sep 11, 2011, 7:32:57 AM9/11/11
to
How does one create (and save!) a new style sheet in Mathematica 8?

One way that used to work in earlier versions was:

1. Open a new notebook, say Untitled-1.nb.

2. From the menu, select Format > Edit StyleSheet, which pops up a
"Private Style Defintions for Untitled-1.nb" style sheet.

3. Edit that popped-up style sheet.

3. Use Save As to save that popped up style sheet under some name.

But this does not work in Mathematica 8: it does not let you Save As for
a style sheet!

Another method was to begin by making a copy of Default.nb, edit that,
etc. However, again Mathematica 8 does not allow a Save As on the copied
file.
--
Murray Eisenberg mur...@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

John Fultz

unread,
Sep 12, 2011, 4:21:39 AM9/12/11
to
On Sun, 11 Sep 2011 07:29:17 -0400 (EDT), Murray Eisenberg wrote:
> How does one create (and save!) a new style sheet in Mathematica 8?
>
> One way that used to work in earlier versions was:
>
> 1. Open a new notebook, say Untitled-1.nb.
>
> 2. From the menu, select Format > Edit StyleSheet, which pops up a
> "Private Style Defintions for Untitled-1.nb" style sheet.
>
> 3. Edit that popped-up style sheet.

At this point, press the Install button on the toolbar. That will save it on
your stylesheet path where it will automatically be found and populated into the
menus.

Sincerely,

John Fultz
jfu...@wolfram.com
User Interface Group
Wolfram Research, Inc.

David Park

unread,
Sep 13, 2011, 7:25:23 AM9/13/11
to
But suppose it's a style sheet from an application that already exists and
has been edited. How do you get it to save back into the same
application/FrontEnd/StyleSheets location?

I know there is a Browse option, but it is broken if there are more than two
style sheets in the location. It only shows two and if the edited style
sheet is not one of them you can't save it.

Version 8 destroyed the SaveAs option and this was a disaster.

Now you have to Install, go looking for the style sheet and move it back to
where you really want it.


David Park
djm...@comcast.net
http://home.comcast.net/~djmpark/

AES

unread,
Sep 13, 2011, 7:27:56 AM9/13/11
to
In article <j4kfej$kc9$1...@smc.vnet.net>,
John Fultz <jfu...@wolfram.com> wrote:

> On Sun, 11 Sep 2011 07:29:17 -0400 (EDT), Murray Eisenberg wrote:
> > How does one create (and save!) a new style sheet in Mathematica 8?
> >
> > One way that used to work in earlier versions was:
> >
> > 1. Open a new notebook, say Untitled-1.nb.
> >
> > 2. From the menu, select Format > Edit StyleSheet, which pops up a
> > "Private Style Defintions for Untitled-1.nb" style sheet.
> >
> > 3. Edit that popped-up style sheet.
>
> At this point, press the Install button on the toolbar. That will save it on
> your stylesheet path where it will automatically be found and populated into
> the
> menus.

Thanks to both posers for terse and useful recipe here. Two brief
extensions:

1) I'm assuming one can give this new stylesheet a new name before
(or while?) installing it? Can one also rename it, using the Mac
Finder, afterwards?

2) Suppose you want to further edit this stylesheet later on. Is the
recommended procedure just to navigate to it (in the FInder, if you're
on a Mac); open it (as a notebook); edit it; then re-install it?

John Fultz

unread,
Sep 13, 2011, 7:28:26 AM9/13/11
to
I don't understand your first point. What do you mean by "Browse" option? I
can't possibly think you mean that the file browsing dialog only shows 2 of n
notebooks in some given directory.

Yes, it is the case that notebooks with Saveable->False should be able to save,
and don't in 8.0.1. But that won't affect stylesheets created using the method
I outlined. And that bug will be fixed in a Mathematica incremental update
which will hopefully be available soon.

Sincerely,

John Fultz
jfu...@wolfram.com
User Interface Group
Wolfram Research, Inc.


On Mon, 12 Sep 2011 09:29:52 -0400, David Park wrote:
> But suppose it's a style sheet from an application that already exists and
> has been edited. How do you get it to save back into the same
> application/FrontEnd/StyleSheets location?
>
> I know there is a Browse option, but it is broken if there are more than
> two style sheets in the location. It only shows two and if the edited
> style sheet is not one of them you can't save it.
>
> Version 8 destroyed the SaveAs option and this was a disaster.
>
> Now you have to Install, go looking for the style sheet and move it back
> to where you really want it.
>
>
> David Park
> djm...@comcast.net
> http://home.comcast.net/~djmpark/
>
>
> From: John Fultz [mailto:jfu...@wolfram.com]
>
> On Sun, 11 Sep 2011 07:29:17 -0400 (EDT), Murray Eisenberg wrote:
>> How does one create (and save!) a new style sheet in Mathematica 8?
>>
>> One way that used to work in earlier versions was:
>>
>> 1. Open a new notebook, say Untitled-1.nb.
>>
>> 2. From the menu, select Format > Edit StyleSheet, which pops up a
>> "Private Style Defintions for Untitled-1.nb" style sheet.
>>
>> 3. Edit that popped-up style sheet.
>>
> At this point, press the Install button on the toolbar. That will save it
> on
> your stylesheet path where it will automatically be found and populated
> into
> the
> menus.
>

Murray Eisenberg

unread,
Sep 14, 2011, 5:16:21 AM9/14/11
to
Re your 1): you give the stylesheet a name when you use the Install button.

Nothing I know would prohibit renaming any (non-OS system) file in the
Finder, assuming you reset any permissions, etc., that might otherwise
inhibit doing that. But then Mathematica would not still list it on the
Style Sheet menu.

On 9/13/11 7:21 AM, AES wrote:
> In article<j4kfej$kc9$1...@smc.vnet.net>,
> John Fultz<jfu...@wolfram.com> wrote:
>

>> On Sun, 11 Sep 2011 07:29:17 -0400 (EDT), Murray Eisenberg wrote:
>>> How does one create (and save!) a new style sheet in Mathematica 8?
>>>
>>> One way that used to work in earlier versions was:
>>>
>>> 1. Open a new notebook, say Untitled-1.nb.
>>>
>>> 2. From the menu, select Format> Edit StyleSheet, which pops up a
>>> "Private Style Defintions for Untitled-1.nb" style sheet.
>>>
>>> 3. Edit that popped-up style sheet.
>>
>> At this point, press the Install button on the toolbar. That will save it on
>> your stylesheet path where it will automatically be found and populated into
>> the
>> menus.
>

> Thanks to both posers for terse and useful recipe here. Two brief
> extensions:
>
> 1) I'm assuming one can give this new stylesheet a new name before
> (or while?) installing it? Can one also rename it, using the Mac
> Finder, afterwards?
>
> 2) Suppose you want to further edit this stylesheet later on. Is the
> recommended procedure just to navigate to it (in the FInder, if you're
> on a Mac); open it (as a notebook); edit it; then re-install it?
>

--

David Bailey

unread,
Sep 14, 2011, 5:23:29 AM9/14/11
to
On 13/09/2011 12:28, John Fultz wrote:
> I don't understand your first point. What do you mean by "Browse" option? I
> can't possibly think you mean that the file browsing dialog only shows 2 of n
> notebooks in some given directory.
>
> Yes, it is the case that notebooks with Saveable->False should be able to save,
> and don't in 8.0.1. But that won't affect stylesheets created using the method
> I outlined. And that bug will be fixed in a Mathematica incremental update
> which will hopefully be available soon.
>

I have never found creating style sheets easy - and I generally avoid
them, despite their obvious value.

It would be great if the process could be made more transparent. For
example:

1) It would be nice to press a button and see the hierarchy of style
sheets leading to the notebook style sheet - preferably with their full
pathnames.

2) What happens when a style sheet is installed - is it just placed
somewhere in the filestore?

3) Editing a style sheet seems too much like editing a notebook -
which leads to confusion as to what can and cannot be done.

4) If you end up with an edited style sheet when you close the
associated file (or Mathematica), I think it should tell you and ask you
what you want to do - just like you do not lose an edited notebook
without pressing "Don't Save".

This is one area where I sense WRI developers have put enormous effort,
but it never seems easy to use. Maybe a general, open discussion at the
conference would help.

David Bailey
http://www.dbaileyconsultancy.co.uk


Murray Eisenberg

unread,
Sep 15, 2011, 4:39:11 AM9/15/11
to
Part of the troubles about working with style sheets is that they are so
incompletely documented.

It should hardly be necessary to have to turn to this user group to
learn how, e.g., to modify a style sheet and make it into a new style
sheet (and where it then is located). Or to learn that you cannot do
this merely by Save As-ing it. This should all be documented.

On 9/14/11 5:15 AM, David Bailey wrote:
> On 13/09/2011 12:28, John Fultz wrote:
>> I don't understand your first point. What do you mean by "Browse" option? I
>> can't possibly think you mean that the file browsing dialog only shows 2 of n
>> notebooks in some given directory.
>>
>> Yes, it is the case that notebooks with Saveable->False should be able to save,
>> and don't in 8.0.1. But that won't affect stylesheets created using the method
>> I outlined. And that bug will be fixed in a Mathematica incremental update
>> which will hopefully be available soon.
>>
>
> I have never found creating style sheets easy - and I generally avoid
> them, despite their obvious value.
>
> It would be great if the process could be made more transparent. For
> example:
>
> 1) It would be nice to press a button and see the hierarchy of style
> sheets leading to the notebook style sheet - preferably with their full
> pathnames.
>
> 2) What happens when a style sheet is installed - is it just placed
> somewhere in the filestore?
>
> 3) Editing a style sheet seems too much like editing a notebook -
> which leads to confusion as to what can and cannot be done.
>
> 4) If you end up with an edited style sheet when you close the
> associated file (or Mathematica), I think it should tell you and ask you
> what you want to do - just like you do not lose an edited notebook
> without pressing "Don't Save".
>
> This is one area where I sense WRI developers have put enormous effort,
> but it never seems easy to use. Maybe a general, open discussion at the
> conference would help.
>
> David Bailey
> http://www.dbaileyconsultancy.co.uk
>
>

John Fultz

unread,
Sep 15, 2011, 4:46:35 AM9/15/11
to
Mathematica *will* list it in the menu. But Mathematica's menus have to be
refreshed. Restarting Mathematica is the easiest way to do that. Also, you can
evaluate the following:

MathLink`CallFrontEnd[FrontEnd`ResetMenusPacket[{Automatic, Automatic}]]

The Install dialog invokes that command behind the scenes when installing
stylesheets. And, to answer another question which was raised...installing is
basically just saving a copy of the style notebook in the right directory and
refreshing the menus. Nothing more exotic than that.

FWIW, I absolutely agree that the user experience of working with stylesheets
could be much improved, and have pushed hard to make that happen. But there's
always some give and take in the software development process...many other fine
features and bug fixes have been implemented while this one has waited a bit.

Sincerely,

John Fultz
jfu...@wolfram.com
User Interface Group
Wolfram Research, Inc.


AES

unread,
Sep 15, 2011, 4:41:48 AM9/15/11
to
In article <j4prqh$foj$1...@smc.vnet.net>,
David Bailey <da...@removedbailey.co.uk> wrote:

> 1) It would be nice to press a button and see the hierarchy of style
> sheets leading to the notebook style sheet - preferably with their full
> pathnames.

Amen!! It's always helpful to understand the structure, the
hierarchy, the functional organization of some large and complex
mechanism you're using or are involved with -- even if you have no
intention of messing with individual components, or should actively
avoid attempting to mess with them.

> 2) What happens when a style sheet is installed - is it just placed
> somewhere in the filestore?

Amen, again -- where I take this particular (and rather minor point)
as just one illustration of the generalization in Item 1

> 3) Editing a style sheet seems too much like editing a notebook -
> which leads to confusion as to what can and cannot be done.

Actually, this may be a useful technique -- if you're specifically
told, "To modify what a stylesheet will do to all the cells having a
certain cell style, in notebooks that use this stylesheet, **find the
cell in the stylesheet itself that has that style and hand-edit its
style**". (Is that, more or less, how it works? Seems to be . . .)

Armand Tamzarian

unread,
Sep 15, 2011, 4:51:18 AM9/15/11
to
It would be nice if some sort of wysiwyg stylesheet creator
accompanied Mathematica that allowed easy stylesheet creation analogous to
many of web stylesheet creators.

Mike

Murray Eisenberg

unread,
Sep 16, 2011, 5:51:11 AM9/16/11
to
But editing a style sheet is (mostly) already WYSIWIG. For example, from
the Format menu select Edit Style Sheet. You'll see a style sheet that
merely shows inheriting the style sheet Default.nb.

Select a style there from the drop-down menu and just edit it. For
example, choose Text style. Click the cell-bracket for the cell "Local
definition for style "Text" that now appears. Then use either the main
menu's Format item, or use the Option Inspector, to change the Face to,
say, Italic. Instantly you'll see the text inside that cell in the style
sheet change to Italic.

On 9/15/11 4:41 AM, Armand Tamzarian wrote:
>
> ...It would be nice if some sort of wysiwyg stylesheet creator
> accompanied Mathematica that allowed easy stylesheet creation analogous to
> many of web stylesheet creators.


Nguyen Van Falk

unread,
Sep 16, 2011, 5:54:14 AM9/16/11
to
> >> In article<j4kfej$kc...@smc.vnet.net>,
> >> John Fultz<jfu...@wolfram.com> wrote:
>
> >>> On Sun, 11 Sep 2011 07:29:17 -0400 (EDT), Murray Eisenberg wrote:
> >>>> How does one create (and save!) a new style sheet in Mathematica 8?
>
> >>>> One way that used to work in earlier versions was:
>
> >>>> 1. Open a new notebook, say Untitled-1.nb.
>
> >>>> 2. From the menu, select Format> Edit StyleSheet, which pops up a
> >>>> "Private Style Defintions for Untitled-1.nb" style sheet.
>
> >>>> 3. Edit that popped-up style sheet.
>
> >>> At this point, press the Install button on the toolbar. That will
> >>> save it on
> >>> your stylesheet path where it will automatically be found and
> >>> populated into
> >>> the
> >>> menus.
>
> >> Thanks to both posers for terse and useful recipe here. Two brief
> >> extensions:
>
> >> 1) I'm assuming one can give this new stylesheet a new name before
> >> (or while?) installing it? Can one also rename it, using the Mac
> >> Finder, afterwards?
>
> >> 2) Suppose you want to further edit this stylesheet later on. Is the
> >> recommended procedure just to navigate to it (in the FInder, if you're
> >> on a Mac); open it (as a notebook); edit it; then re-install it?

John:

I hope this will become a higher priority in the future. I looked at
how I could implement CDF in my work and share interactive documents
with my coworkers, but the style sheet challenge has become a factor.
My employer, a Fortune 100 company, has standards for the format and
sharing of documentation. I have not been able to reformat the style
sheets to conform to our corporate standards so I stopped using CDF.

Thanks,

NVF

Mike H

unread,
Sep 16, 2011, 5:56:17 AM9/16/11
to
Good point. I guess I was thinking more in terms of the general ease of
creating a stylesheet -- which is pretty easy for web pages with some of the
applications I had in mind -- but you're right, the current system is mostly
a wysiwyg.

Mike

David Bailey

unread,
Sep 17, 2011, 6:29:21 AM9/17/11
to
On 15/09/2011 09:39, Murray Eisenberg wrote:
> Part of the troubles about working with style sheets is that they are so
> incompletely documented.
>
> It should hardly be necessary to have to turn to this user group to
> learn how, e.g., to modify a style sheet and make it into a new style
> sheet (and where it then is located). Or to learn that you cannot do
> this merely by Save As-ing it. This should all be documented.
>

Yes - there is just so much powerful functionality in Mathematica that
is really sketchily documented! There would almost be a case for doing a
major release which was solely devoted to documentation catch-up and bug
fixes!

David Bailey
http://www.dbaileyconsultancy.co.uk




Kevin J. McCann

unread,
Sep 18, 2011, 4:14:26 AM9/18/11
to
Nonetheless, I have received promises from you and others at Wolfram for
over two years now that comprehensive Stylesheet documentation would be
forthcoming "soon". Any idea when "soon" might arrive?

Kevin

On 9/15/2011 4:46 AM, John Fultz wrote:
(* snip *)

Adam Griffith

unread,
Sep 18, 2011, 4:18:01 AM9/18/11
to
Besides inherited styles:

Cell[StyleData[StyleDefinitions -> "Default.nb"]]

most of (http://reference.wolfram.com/legacy/v5_2/FrontEnd/StyleSheets/DefaultStyleSheets/index.en.html) is still applicable.

Thanks,
-Adam

DrMajorBob

unread,
Sep 19, 2011, 7:05:37 AM9/19/11
to
I doubt you've received any promises whatsoever, Kevin.

Nor will you.

Bobby

On Sun, 18 Sep 2011 03:10:12 -0500, Kevin J. McCann <k...@kevinmccann.com>
wrote:

> Nonetheless, I have received promises from you and others at Wolfram for
> over two years now that comprehensive Stylesheet documentation would be
> forthcoming "soon". Any idea when "soon" might arrive?
>
> Kevin
>
> On 9/15/2011 4:46 AM, John Fultz wrote:
> (* snip *)
>
>> FWIW, I absolutely agree that the user experience of working with
>> stylesheets
>> could be much improved, and have pushed hard to make that happen. But
>> there's
>> always some give and take in the software development process...many
>> other fine
>> features and bug fixes have been implemented while this one has waited
>> a bit.
>>
>> Sincerely,
>>
>> John Fultz
>> jfu...@wolfram.com
>> User Interface Group
>> Wolfram Research, Inc.
>>
>


--
DrMaj...@yahoo.com

Kevin J. McCann

unread,
Sep 19, 2011, 7:07:09 AM9/19/11
to
Actually, I was told that one was in the works. Now, the response was
not prefaced with "I/we promise", but I was told that the documentation
was in the works and would be released soon. To me that is a promise.

Kevin

On 9/18/2011 1:12 PM, DrMajorBob wrote:
> I doubt you've received any promises whatsoever, Kevin.
>
> Nor will you.
>
> Bobby
>
> On Sun, 18 Sep 2011 03:10:12 -0500, Kevin J. McCann
> <k...@kevinmccann.com> wrote:
>
>> Nonetheless, I have received promises from you and others at Wolfram for
>> over two years now that comprehensive Stylesheet documentation would be
>> forthcoming "soon". Any idea when "soon" might arrive?
>>
>> Kevin
>>
>> On 9/15/2011 4:46 AM, John Fultz wrote:
>> (* snip *)
>>

DrMajorBob

unread,
Sep 19, 2011, 7:08:41 AM9/19/11
to
All things will come "in the fullness of time", I suppose.

Bobby

On Sun, 18 Sep 2011 12:59:49 -0500, Kevin J. McCann <k...@kevinmccann.com>
wrote:

> Actually, I was told that one was in the works. Now, the response was
> not prefaced with "I/we promise", but I was told that the documentation
> was in the works and would be released soon. To me that is a promise.
>
> Kevin
>
> On 9/18/2011 1:12 PM, DrMajorBob wrote:
>> I doubt you've received any promises whatsoever, Kevin.
>>
>> Nor will you.
>>
>> Bobby
>>
>> On Sun, 18 Sep 2011 03:10:12 -0500, Kevin J. McCann
>> <k...@kevinmccann.com> wrote:
>>
>>> Nonetheless, I have received promises from you and others at Wolfram
>>> for
>>> over two years now that comprehensive Stylesheet documentation would be
>>> forthcoming "soon". Any idea when "soon" might arrive?
>>>
>>> Kevin
>>>
>>> On 9/15/2011 4:46 AM, John Fultz wrote:
>>> (* snip *)
>>>
>>>> FWIW, I absolutely agree that the user experience of working with
>>>> stylesheets
>>>> could be much improved, and have pushed hard to make that happen.
>>>> But there's
>>>> always some give and take in the software development process...many
>>>> other fine
>>>> features and bug fixes have been implemented while this one has
>>>> waited a bit.
>>>>
>>>> Sincerely,
>>>>
>>>> John Fultz
>>>> jfu...@wolfram.com
>>>> User Interface Group
>>>> Wolfram Research, Inc.
>>>>
>>>
>>
>>


--
DrMaj...@yahoo.com

mathlawguy

unread,
Sep 20, 2011, 6:13:24 AM9/20/11
to
I agree that editing stylesheets is too difficult and not well
documented. I agree that discussion at the Oct. Conference might be
one of many good ways to provide feedback and ideas. Perhaps we might
consider video documentation since traditional documentation on front
end stuff often does not seem optimal to me.

Amel Hodzic

unread,
Oct 11, 2012, 2:13:34 AM10/11/12
to
Good idea, especially since they're trying to extend their reach to include a larger number of students by offering android apps and web-apps. The type-setting issue (especially as it pertains to stylesheets), IMHO, is a significant obstacle that might otherwise generate more revenue for them from the purchases of Mathematica software, etc. There are already free Wolfram Alpha-based apps, for example, that undermine their android app sales.

0 new messages