3

I gather that it should be possible to preserve changes to a stylesheet by simply saving it, but this is not the behavior I'm getting with a stylesheet I've "installed" using the "Install Stylesheet..." button. In order to get any changes I've made to my stylesheet to persist, I need to install the stylesheet again. My saves (I have Saveable enabled for the stylesheet) seem to have no effect (the change indicator, doesn't even go away when I "save" it).

Do "installed" stylesheets behave differently? Is my opened version of the stylesheet being saved somewhere else, perhaps?

orome
  • 12,819
  • 3
  • 52
  • 100

1 Answers1

3

When you edit a stylesheet, the styles are displayed in a notebook using PrivateStylesheetFormatting.nb style. This in turn inherits from StylesheetFormatting.nb which has Saveable->False. It is this setting -- for the stylesheet that is rendering/displaying your editing front end -- that is controlling the behaviour.

Mike Honeychurch
  • 37,541
  • 3
  • 85
  • 158
  • The issue is, I think, not related to the save settings as such, but to the fact that my installed stylesheet keeps getting "disconnected" from my document. It looks like what's going on is this: If you have a test document that you use to assist in designing a custom stylesheet (as must often be the case) that you then install, the installed stylesheet is not the one associated with the document you've been using to design it. Worse, the same thing happens if you later edit the installed stylesheet: editing seems to disconnect it from the document to which it is applied. – orome Nov 12 '12 at 02:38
  • You asked why you have to install the stylesheet (why you cannot save it). Saving private styles embedded with a notebook (the link you provided) is different from saving a stylesheet. In my answer I explained why you cannot save the stylesheet from the Edit Stylesheet notebook. That is pretty much it. It is not a matter of disabling (which I think is probably a confusion between stand alone stylesheets and private styles) it is solely due to the Saveable setting in the Edit Stylesheet notebook. – Mike Honeychurch Nov 12 '12 at 02:49
  • Maybe I'm not using the correct terms. When I edit an installed stylesheet that has been applied to a document, the corresponding entry in the Format>Stylesheet menu unchecks. Is that what's supposed to happen? – orome Nov 12 '12 at 03:03
  • It seems like the necessary step that I'm missing is to reselect the installed stylesheet from Format > Stylesheet after choosing Format > Edit Stylesheet.... Otherwise what I'm editing is private the the document and won't have any effect on the installed stylesheet. Is that the case? (It's a bit odd IMHO, since designing styles in conjunction with a test document to which they are applied would seem like a common scenario, which doesn't work by default for installed styles if this is the case.) – orome Nov 12 '12 at 03:14
  • If it unchecks then that means you are saving private styles. You are not editing the installed stylesheet. What you are doing is editing a private stylesheet and then to save you go back to your notebook and Save. As above, my answer explains why you cannot save your Edit Stylesheet notebook. There really isn't any ambiguity in this. The notebook is Saveable->False -- that is all there is to it. – Mike Honeychurch Nov 12 '12 at 03:19
  • one other thing to note is that your Edit Stylesheet notebook has the title "private Style Definitions for ...". You do not save that edit stylesheet notebook you go back and save your working notebook and the private styles become embedded. And if you want to make a stand alone stylesheet with those styles you install the stylesheet. In light of that it doesn't make sense -- to me at least -- to be able to save the private stylesheet notebook. So with Saveable->False you are unable to. – Mike Honeychurch Nov 12 '12 at 03:43
  • The installed sheet says "private..." too (that is, private to the installed stylesheet), which is part of what threw me initially. – orome Nov 12 '12 at 04:11
  • you are confusing the installed stylesheet with the notebook that is used for editing the stylesheet and has the heading about private styles and its own stylesheet with Saveable->False. We are going around in circles. As above the answer to your question is Saveable->False in the editing notebook stylesheet. That is always going to be the answer to your question. If you don't like the answer then change the question :) – Mike Honeychurch Nov 12 '12 at 06:53