MathGroup Archive 2007

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

Search the Archive

Re: Re: Embedded Style Sheets

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79311] Re: [mg79281] Re: Embedded Style Sheets
  • From: John Browne <john.browne at alum.unimelb.edu.au>
  • Date: Tue, 24 Jul 2007 06:06:12 -0400 (EDT)
  • References: <200707230745.DAA22344@smc.vnet.net> <46A4B995.7010205@math.umass.edu>

Apologies for the lack of clarity. I'll try again. I think it will be  
clearer with a specific example. This is for Version 6 of course.  
However I must emphasize that I am a real novice in this area  
(otherwise I wouldn't have asked the original question!) Caveat  
Emptor! I am really looking forward to John Fultz's promised Help  
Browser tutorial(s) on these matters.

CREATE YOUR OWN STYLESHEET
1  Open a new notebook. Call it New.nb
2  Choose Format : Edit Stylesheet ...
The stylesheet notebook for New.nb appears titled "Private Style  
Definitions for New.nb". There is one cell entitled "Inheriting base  
definitions from stylesheet "Default.nb"".
3  Click on the "Default.nb" link.
The Default.nb stylesheet opens.
4  Make a copy of this stylesheet, saving it as MySS.nb.
5  Open the Option Inspector and set the upper left menu to "MySS.nb".
6  Choose Notebook Options : File Options. Then tick Editable and  
Saveable.
You will now note that the stylesheet title changes to "MySS.nb style  
definitions".
This is your new stylesheet. Note that it inherits its base  
definitions form Core.nb.
7  Edit the cell style definitions as you wish to incorporate your  
own styles. Save.

EMBEDDING YOUR OWN STYLESHEET
1  Open a notebook in which you want to embed MySS.nb, say MyNB.nb
2  Choose Format : Edit Stylesheet ...
A notebook "Style Definitions for MyNB.nb" opens with title "Private  
Style Definitions for MyNB.nb"
3  Delete all the cells in "Style Definitions for MyNB.nb"
4  Open MySS.nb, copy all the cells, and paste them into "Style  
Definitions for MyNB.nb"
5  Save MyNB.nb and you're done.

(A possible point of confusion: Directly after following through this  
process (on a Mac), I found that any new notebook opened by  
Mathematica had MySS.nb as stylesheet. I had to quit Mathematica to  
stop this behaviour).

John


On 24/07/2007, at 12:22 AM, Murray Eisenberg wrote:

> Sorry, I don't understand the solution as you've described it...
>
> After I select my notebook, say MyNB.nb, and choose Format : Edit  
> Stylesheet... I get a new notebook "Style Definitions for MyNB.nb".
>
> 1. You say to "copy the contents of your new style sheet".  Copy  
> what from where to where?
>
> 2. In which notebook do I overwrite the "Inheriting base  
> definitions from stylesheet..." cell?  In the ""Style Definitions  
> for MyNB.nb" that had opened?  In the place to which I had copied  
> that, wherever that is?
>
> 3. With what do I overwrite the "Inheriting base definitions from  
> stylesheet..." cell?
>
> John Browne wrote:
>> SUMMARY
>> PROBLEM
>> How do I embed a new style sheet in a notebook for other people's  
>> use?
>> Thanks to Selwyn Hollis, David Park, David Reiss, and Helen Read  
>> for  the solution.
>> SOLUTION
>> Select your notebook and choose Format : Edit Stylesheet ...
>> Copy the contents of your new style sheet and overwrite the   
>> "Inheriting base definitions from stylesheet ..." cell in the  
>> Style  Definitions notebook. (Other styles definitions should be  
>> preserved).
>> (I have only tested this on a new style sheet which inherits from   
>> Default.nb)
>> __________________________________
>> This is a combination of Selwyn Hollis' and David Park's solution.
>> David Park also draws our attention to the fact that the  
>> "Inheriting  base definitions from stylesheet ..." cell in the  
>> Style Definitions  notebook provides a link to open the actual  
>> stylesheet.
>> David Reiss gives a more comprehensive description.
>> Helen Read proposes a neat shortcut to this process by keeping a   
>> stock of blank notebooks with pre-embedded stylesheets. Or, once  
>> you  have one file with a pre-embedded style sheet, you can always  
>> make a  copy and delete its content.
>> John
>
> -- 
> 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: Mathematica 6 Cell Grouping
  • Next by Date: combined front end and html conversion problems
  • Previous by thread: Re: Re: Embedded Style Sheets
  • Next by thread: Re: Re: Re: Embedded Style Sheets