Skip to main content
edited tags
Link
Mr.Wizard
  • 275.2k
  • 34
  • 606
  • 1.5k
Tweeted twitter.com/#!/StackMma/status/288687672942276608
Reworked code formatting to eliminate scrollbar
Source Link
m_goldberg
  • 108.6k
  • 16
  • 107
  • 263

I build a lot of presentations and custom notebooks with very different stylesheets, and use Button and CreateDocument quite often to accommodate optional/procedurally generated content. For instance,

 Map[Button[Style[ToString[#] <> " random images", "Text"],   CreateDocument[ {Cell["Here are " <> ToString[#] <> " random image(s)", "Title"],   ExpressionCell[Column@Table[RandomImage[2, {200, 200}], {#}],  "Output"]}]] &,  Range[5]] 

What I'd like to do is specify that the notebook generated by CreateDocument inherits the StyleSheet from the parent notebook, without having to save the StyleSheet and provide the StyleSheetPath Option in the CreateDocument function each time I change a style.

I imagine there's an undocumented feature, but haven't found it in my brief searches of StackExchange.

I build a lot of presentations and custom notebooks with very different stylesheets, and use Button and CreateDocument quite often to accommodate optional/procedurally generated content. For instance,

 Map[Button[Style[ToString[#] <> " random images", "Text"], CreateDocument[{Cell["Here are " <> ToString[#] <> " random image(s)", "Title"], ExpressionCell[Column@Table[RandomImage[2, {200, 200}], {#}], "Output"]}]] &, Range[5]] 

What I'd like to do is specify that the notebook generated by CreateDocument inherits the StyleSheet from the parent notebook, without having to save the StyleSheet and provide the StyleSheetPath Option in the CreateDocument function each time I change a style.

I imagine there's an undocumented feature, but haven't found it in my brief searches of StackExchange.

I build a lot of presentations and custom notebooks with very different stylesheets, and use Button and CreateDocument quite often to accommodate optional/procedurally generated content. For instance,

Map[Button[Style[ToString[#] <> " random images", "Text"],   CreateDocument[ {Cell["Here are " <> ToString[#] <> " random image(s)", "Title"],   ExpressionCell[Column@Table[RandomImage[2, {200, 200}], {#}],  "Output"]}]] &,  Range[5]] 

What I'd like to do is specify that the notebook generated by CreateDocument inherits the StyleSheet from the parent notebook, without having to save the StyleSheet and provide the StyleSheetPath Option in the CreateDocument function each time I change a style.

I imagine there's an undocumented feature, but haven't found it in my brief searches of StackExchange.

Source Link

Inheriting Stylesheets when using CreateDocument

I build a lot of presentations and custom notebooks with very different stylesheets, and use Button and CreateDocument quite often to accommodate optional/procedurally generated content. For instance,

 Map[Button[Style[ToString[#] <> " random images", "Text"], CreateDocument[{Cell["Here are " <> ToString[#] <> " random image(s)", "Title"], ExpressionCell[Column@Table[RandomImage[2, {200, 200}], {#}], "Output"]}]] &, Range[5]] 

What I'd like to do is specify that the notebook generated by CreateDocument inherits the StyleSheet from the parent notebook, without having to save the StyleSheet and provide the StyleSheetPath Option in the CreateDocument function each time I change a style.

I imagine there's an undocumented feature, but haven't found it in my brief searches of StackExchange.