Guest User

Untitled

a guest
Nov 15th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. style["Some text","Text"]//shadow[#,#]&
  2.  
  3. nb = (*whatever notebook object e.g. EvaluationNotebook[]*)
  4.  
  5. Module[{cell, cellObj}
  6. , cellObj = #
  7. ; cell = NotebookRead[cellObj]
  8. ; If[
  9. StringQ @ First @ cell
  10. , cell = ReplacePart[cell
  11. , 1 -> Replace[cell[[1]], s_String :> BoxData@ToBoxes@Overlay[
  12. { s, Pane[Style[s, GrayLevel@.8], FrameMargins -> {{3, 0}, {0, 0}}
  13. , ImageMargins -> 0
  14. ]
  15. }
  16. , {2, 1}
  17. , BaseStyle -> {ShowStringCharacters -> False}
  18. ]]
  19. ]
  20. ; NotebookWrite[cellObj, cell]
  21. ]
  22. ] & /@ DeleteCases[
  23. Cells[nb], Alternatives @@ Cells[nb, CellStyle -> {"Input", "Output"}]
  24. ]
Add Comment
Please, Sign In to add comment