Skip to main content
1 of 4
Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375

Is it possible to substitute one style instead of another via StyleSheet?

When thinking on the question

it crossed my mind that it may be possible to "intercept" one style ("Input") on the level of the Notebook's private stylesheet and replace it with definitions of another style ("Code") from the "Core.nb" stylesheet. Something like the following (it demonstrates the idea, but doesn't work):

Cell[StyleData["Input"], StyleData["Code", StyleDefinitions -> "Core.nb"]]]

The above line of code defines an "intercept" for the style "Input" on the level of the Notebook's private stylesheet. The second argument StyleData["Code", StyleDefinitions -> "Core.nb"] should "import" the complete definition for style "Code" from the "Core.nb" stylesheet, but it doesn't work as written. How should it be changed in order to achieve the desired goal?

Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375