I find this behavior annoying:

path = FileNameJoin[{$HomeDirectory, "Desktop", "stylesheet.nb"}];

   Cell[StyleData[StyleDefinitions -> "Default.nb"]],
   Cell[StyleData["Notebook"], Background -> LightBlue]


 nb = CreateDocument[];
 SetOptions[nb, StyleDefinitions -> path];


So, now we have a notebook and its stylesheet opened and can play with edits. Notice that I haven't invoked the stylesheet via Format/EditStylesheet menu item but manually.

So now close the nb.

Stylesheet is automatically closed too. How to prevent this? Should this happen?

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.