0
$\begingroup$

I added the following code to my private stylesheet for a notebook. Now when I create a new cell in that notebook with the style "Theorem", all of the options below are pre-populated for that cell.

Is it possible to include things other than options in the code below? Can I include predefined text in a style? For example, can I create a style that populates the first line in the cell to always read "Hello World"? It would save me a lot of time If I could this in the stylesheet, rather than outside of it.

Cell[StyleData["Theorem"],
CellFrame->0.5`,
CellMargins->{{30,10},{7,7}},
CellFrameColor->RGBColor[0, 0.67, 0],
LineSpacing->{1,3},
ParagraphSpacing->{0,6},
TabSpacings->3,
CounterIncrements->{"Theorem"},
FontSize->14,
Background->RGBColor[0.88, 1., 0.88]]
$\endgroup$
3
  • $\begingroup$ Already asked, unfortunately no answers yet: Styles that prepend text to cell contents $\endgroup$
    – Kuba
    Oct 18 '16 at 13:14
  • 1
    $\begingroup$ Ok, now there is an answer, does it fit your needs? $\endgroup$
    – Kuba
    Oct 18 '16 at 13:56
  • $\begingroup$ Yes! This works great! $\endgroup$
    – B flat
    Oct 18 '16 at 22:22

Browse other questions tagged or ask your own question.