I want to define some named styles with
StyleDefinitions that are either entirely new or inherit from default stylesheets and use these named styles across my package. These include styles for displaying objects introduced by the package, styles for package documentation, etc. Needless to say, I want these styles to work seamlessly in other environments when I distribute the package.
- Where should I put style definitions within my package? How should I organize styles?
- What is the scope of these styles? Are they only available when the package is loadad?
- What are some guidelines to define distributed styles as general as possible, considering for example that users might use different stylesheets or environments.
For example I cannot specify a text color explicitly in my style, like
FontColor -> Black, as it won't be visible in case a user relies on the
ReverseColor stylesheet. Leaving the color undefined causes most styles to switch color in case background (and stylesheet) is switched. How can I define styles with colors that are aware of the background/stylesheet, without programmatically modifying global stylesheets at the user's machine?