daily pastebin goal
4%
SHARE
TWEET

Untitled

a guest Jul 11th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. ]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top