I’ve noticed that when I make changes to a notebook’s stylesheet, whether it’s manually or programmatically, often the changes are not applied immediately to the notebook.
Usually all it takes is opening or closing a cellgroup within the notebooks to trigger a refresh which is ok, but I’m wondering if there is a way to do this programmatically? I suppose I could program opening and closing a cellgroup but wondering if there a specific trigger I can use that doesn’t I involve manipulating the notebook.
I often apply stylesheets programmatically to notebooks and I would like to see the update applied immediately (in real time) and without having to touch the notebook at all.
Ideas?
Edit: I've narrowed down the issue I think, it appears to be an issue with making a change in an inherited stylesheet. After making the change, there is no immediate trigger that updates the Notebook. To recreate the problem:
- Open a new Notebook. Type some info in a text cell.
- Open the notebook's stylesheet (stylesheet 1)
- At the top of this stylesheet inherit another one (stylesheet 2)
- Open up stylesheet 2 and make a change to text cells(for example, change text color to green).
- Notice the notebook does not update upon making the change in stylesheet 2. However, you can force an update in a number of different ways. One way is to open or close a group of cells in the Notebook. This triggers the update.