Guest User

Untitled

a guest
Jul 11th, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. CellPrint@TextCell[
  2. Row[{"This is an inline cell with automatic syntax highlighting: ",
  3. ExpressionCell[Defer@Plot[x, {x, 0, 1}, PlotLabel -> "string"], "Notebook", "Input",
  4. CellFrame -> True]}], "Text"]
  5.  
  6. styles = {
  7. Cell[StyleData["InlineCell"],
  8. ShowAutoStyles->True,
  9. LanguageCategory->"Input",
  10. FontWeight->"DemiBold",
  11. FontFamily->"Source Sans Pro"
  12. ],
  13. Cell[StyleData["Text"],
  14. DefaultInlineFormatType->"StandardForm"
  15. ]
  16. };
  17.  
  18. SetOptions[
  19. EvaluationNotebook[],
  20. StyleDefinitions -> Replace[CurrentValue[EvaluationNotebook[], StyleDefinitions],
  21. {
  22. Notebook[oldcells_, r__] :> Notebook[Join[oldcells, styles], r],
  23. other_ :> Notebook[Prepend[styles, Cell[StyleData[StyleDefinitions->other]]], StyleDefinitions -> "PrivateStylesheetFormatting.nb"]
  24. }
  25. ]
  26. ]
Add Comment
Please, Sign In to add comment