I am modifying several StyleSheets to adapt them to convenient use at school. Now I am working on the StyleSheet for Mathematics classes. I would like to make several types of default headings on the level of Subsections and Subsubsections. I would like to make them in such a way that upon opening such a Cell it opens already with a certain title. For example "Homework". In addition it would be nice, if it is possible to evaluate DateString[] there.
Any idea?
DateString[]to be evaluated when the cell is created? Dynamically updated? Neither seems convenient to the way I imagine using the stylesheet to create documents, but what do you have in mind? – Michael E2 Oct 23 '19 at 17:15CellDingbat->"Section", CellMargins->{{120, Inherited}, {8, 18}}? – Michael E2 Oct 23 '19 at 17:21DateString[]I would like to be evaluated once as soon as the cell is first time created. Further, another cell appears with the text: "Exercise Nr." so that the student only needs to enter the number of the exercise. – Alexei Boulbitch Oct 23 '19 at 19:39DateString[]as soon as such a style is addressed from Menu. I tried thisCell[StyleData["DateString"], "Input", CellDingbat->BoxData[ToBoxes[DateString[]]], FontSize->16, MenuSortingValue->10000]and several other variations, but no of them worked. Could you think of something like that? – Alexei Boulbitch Oct 25 '19 at 14:22CellDynamicExpression :> Refresh[SetOptions[EvaluationCell[], CellDingbat -> ...]; (*and drop CellDynamicExpression*),None]– Kuba Oct 25 '19 at 14:35Cell[StyleData["Klassenarbeit"], CellDynamicExpression:>SetOptions[ EvaluationCell[], CellDingbat ->TextData[{StyleBox[" Klassenarbeit ", FontColor -> RGBColor[0.7, 0, 0], FontSize -> 40], StyleBox[DateString[{"Day", ".", "Month", ".", "Year"}], FontSize -> 24, FontSlant->"Italic", FontColor -> RGBColor[0., 0, 0]]}]], ShowGroupOpener->True, TextAlignment->Left, MenuSortingValue->1480, FontFamily->"Helvetica", FontSize->30, FontWeight->"Plain", FontSlant->"Plain", Magnification->1.5]– Alexei Boulbitch Oct 25 '19 at 16:28