Details and Options
If the third argument is a Notebook
expression, then it is disconnected from the file system. In this case, any referenced stylesheets must be on the StyleSheetPath
else the function will return a Failure
ResourceFunction["StyleInheritanceSummary"] takes the following options:
|"Strict"||False||if True, only include the specific StyleData input and don't include other scopes in the inheritance|
When resolving StyleData["Style", "Env"]
there are additional StyleData
that contribute to the full set of resolved options. Such contributions include StyleData["Style"]
, and StyleData[All, "Env"]
. If "Strict" → True
then only the specified StyleData
is returned and any additional contributions are ignored.
The created interface does not include options coming from the following:
Private stylesheets are automatically included at the start of the inheritance chain.
A child stylesheet can inherit from a parent stylesheet if the child contains cell expressions of the form Cell[StyleData[StyleDefinitions → parent]]
can be any stylesheet such as "Default.nb"
. When searching for parent
, the FrontEnd
first searches the NotebookDirectory
of the child stylesheet before searching StyleSheetPath
ResourceFunction["StyleInheritanceSummary"] includes additional details explaining how the results are gathered along with the stylesheet inheritance order.
ResourceFunction["StyleInheritanceSummary"] always opens a new window:
The provided information is organized into three separate interfaces:
"Stylesheet Inheritance Graph" shows the connectivity between the stylesheets in the inheritance:
uses the stylesheet names as vertices. The DirectedEdge
points from the child stylesheet to the parent stylesheet that the child stylesheet inherits from.
A stylesheet can inherit from multiple parents. In that case the Graph
displays multiple edges with the top-most parent displayed to the left.
Only the stylesheet names are displayed. A Tooltip
provides the full path to the stylesheet file.
If the starting stylesheet is a private stylesheet then it is labeled as "Private".
If the starting stylesheet's name cannot be determind then it labeled generically as "Stylesheet".
The options are organized in alphabetical order by option name.
The button "Copy table data to clipboard" extracts the resolved options as they are currently displayed.
"Options Inheritance" is the default interface.
The top of the "Options Inheritance" interface provides controls to modify the information displayed in the summary table:
The steps of the inheritance algorithm are hidden by default to reduce the size of the table.
If showing the inheritance steps then the table is read from the bottom to the top:
There may be multiple StyleData
in the inheritance algorithm. The active StyleData
is highlighted in GrayLevel[0.8]
while the individual steps above it are highlighted in GrayLevel[0.94]
Specific options can be suppressed to reduce the size of the summary table:
A specific scope can be suppressed.
To see a single option, first press the "All" button to hide all options, then press the specific option to display.
The "Clear" button returns the summary table to displaying all options.
The summary table area displays the gathered results:
The button "Copy table data to clipboard" extracts the summary table's data as it is currently displayed.
Any suppressed options and scopes are not copied to the clipboard.
The inheritance algorithm steps are never included in the copied data.
The summary table is organized into two columns, "Stylesheet and StyleData" on the left and "Options" on the right.
If including the inheritance algorithm steps then they span the table as a single column.
The options are in alphabetical order by option name.
A legend describes why some options are highlighted in the summary table: