Volume 9, Issue 4
Tricks of the Trade
In and Out
Download This Issue
Staff and Contributors
In and Out
Q: How do you add a new option to a Notebook[ ]?
A: John Fultz (firstname.lastname@example.org) answers: Use SetOptions. It is a good idea to store information using the TaggingRules option, which is specifically designated for this kind of use. For example,
If you tried the SetOptions syntax directly on the option, it would work, but in a slightly unexpected way.
You will hear a beep. No result is returned for the usual syntax.
However, the option is being saved.
So, what is going on here? This is using a mechanism for forward compatibility. For example, what if a notebook from a future version with unknown options were to be read by an earlier version? It should just preserve options it does not understand. So, that is exactly what it is doing. Options on that specific option will not work because, internally, the option has been saved as a hidden option, but that hidden option always writes its contents out to files and the general Options requests.
About Mathematica | Download Mathematica Player
© Wolfram Media, Inc. All rights reserved.