Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ol = ToFileName[{$InstallationDirectory, "SystemFiles", "FrontEnd",
- "StyleSheets", "Utility"}, "Outline.nb"];
- stylnbk = Import[ol];
- insertToToolbar = {" | ", TooltipBox[ButtonBox["7", ButtonFunction :>
- (SelectionMove[ButtonNotebook[], After, Cell];
- NotebookWrite[ButtonNotebook[], Cell["XXXX", "Outline7"], All];
- SelectionMove[ButtonNotebook[], All, CellContents]),
- BaseStyle -> "ToolbarButton",
- Appearance -> None, ButtonFrame -> None,
- Evaluator -> Automatic,
- ImageSize -> Automatic, Method -> "Queued"],
- "Insert outline level 7.", ActionDelay -> 0.35`]};
- level7CellGroup = Cell[CellGroupData[{Cell[StyleData["Outline7"],
- CellMargins -> {{320, 10}, {7, 7}},
- ReturnCreatesNewCell -> True,
- StyleKeyMapping -> {"Backspace" -> "Outline6",
- KeyEvent["Tab", Modifiers -> {Shift}] -> "Outline6"},
- CellGroupingRules -> {"SectionGrouping", 110},
- DefaultNewCellStyle -> "Outline7",
- DefaultReturnCreatedCellStyle -> "Outline7",
- ParagraphIndent -> 0, CounterIncrements -> "Outline7",
- MenuSortingValue -> 1500,
- MenuCommandKey -> "7",
- FontFamily -> "Verdana",
- FontSize -> 10,
- CounterBoxOptions -> {CounterFunction :> (CharacterRange[
- "[GothicA]", "[GothicZ]"][[#1]] &)}],
- Cell[StyleData["Outline7", "Numbered"],
- CellDingbat -> StyleBox[RowBox[{CounterBox["Outline7"], "."}],
- FontFamily -> "Verdana", TextAlignment -> Right]],
- Cell[
- StyleData["Outline7", "PreviewNumbered",
- StyleDefinitions -> StyleData["Outline7", "Numbered"]]],
- Cell[StyleData["Outline7", "Bulleted"],
- CellDingbat -> "[FilledVerySmallSquare]"],
- Cell[
- StyleData["Outline7", "PreviewBulleted",
- StyleDefinitions -> StyleData["Outline7", "Bulleted"]]],
- Cell[StyleData["Outline7", "Presentation"],
- CellMargins -> {{350, 10}, {10, 10}}, FontSize -> 20]},
- Closed]];
- newStylSht = (stylnbk /.
- HoldPattern[DockedCells -> {Cell[BoxData[StyleBox[
- GridBox[{lst : {StyleBox["Outline Level: ", FontWeight -> "Bold"],
- PatternSequence[TooltipBox[__], " | "] ..,
- TooltipBox[__]}}, gbopts__], sbopts__]], cellopts__]}] :>
- DockedCells ->
- {Cell[BoxData[StyleBox[GridBox[{Join[lst, insertToToolbar]}, gbopts],
- sbopts]], cellopts]} /.
- HoldPattern[CounterAssignments -> cas : {{_, 0} ..}] :>
- CounterAssignments -> Insert[cas, {"Outline7", 0}, -1] /.
- HoldPattern[DefaultReturnCreatedCellStyle-> "Outline6"] :>
- Sequence[DefaultNewCellStyle -> "Outline7",
- DefaultReturnCreatedCellStyle-> "Outline6",
- CounterAssignments -> {{"Outline7", 0}}] /.
- HoldPattern[StyleKeyMapping -> skm:{"Backspace" -> "Outline5",
- KeyEvent["Tab", Modifiers -> {Shift}] -> "Outline5"}] :>
- StyleKeyMapping -> Insert[skm, "Tab" -> "Outline7", 1] /.
- HoldPattern[Cell[CellGroupData[
- cgd:{Cell["Styles for Outline Documents", "Section"], ___}, opt___]]] :>
- Cell[CellGroupData[Insert[cgd, level7CellGroup, -1], opt]]);
- flNm = ToFileName[{$InstallationDirectory, "SystemFiles", "FrontEnd",
- "StyleSheets", "Utility"}, "Outline7Levels.nb"];
- NotebookSave[newStylSht, flNm]
Add Comment
Please, Sign In to add comment