3
$\begingroup$

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?

$\endgroup$

1 Answer 1

3
$\begingroup$

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.

$\endgroup$
8
  • $\begingroup$ 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. $\endgroup$
    – orome
    Commented Nov 12, 2012 at 2:38
  • $\begingroup$ 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. $\endgroup$ Commented Nov 12, 2012 at 2:49
  • $\begingroup$ 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? $\endgroup$
    – orome
    Commented Nov 12, 2012 at 3:03
  • $\begingroup$ 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.) $\endgroup$
    – orome
    Commented Nov 12, 2012 at 3:14
  • $\begingroup$ 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. $\endgroup$ Commented Nov 12, 2012 at 3:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.