Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CellPrint@TextCell[
- Row[{"This is an inline cell with automatic syntax highlighting: ",
- ExpressionCell[Defer@Plot[x, {x, 0, 1}, PlotLabel -> "string"], "Notebook", "Input",
- CellFrame -> True]}], "Text"]
- styles = {
- Cell[StyleData["InlineCell"],
- ShowAutoStyles->True,
- LanguageCategory->"Input",
- FontWeight->"DemiBold",
- FontFamily->"Source Sans Pro"
- ],
- Cell[StyleData["Text"],
- DefaultInlineFormatType->"StandardForm"
- ]
- };
- SetOptions[
- EvaluationNotebook[],
- StyleDefinitions -> Replace[CurrentValue[EvaluationNotebook[], StyleDefinitions],
- {
- Notebook[oldcells_, r__] :> Notebook[Join[oldcells, styles], r],
- other_ :> Notebook[Prepend[styles, Cell[StyleData[StyleDefinitions->other]]], StyleDefinitions -> "PrivateStylesheetFormatting.nb"]
- }
- ]
- ]
Add Comment
Please, Sign In to add comment