Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- style["Some text","Text"]//shadow[#,#]&
- nb = (*whatever notebook object e.g. EvaluationNotebook[]*)
- Module[{cell, cellObj}
- , cellObj = #
- ; cell = NotebookRead[cellObj]
- ; If[
- StringQ @ First @ cell
- , cell = ReplacePart[cell
- , 1 -> Replace[cell[[1]], s_String :> BoxData@ToBoxes@Overlay[
- { s, Pane[Style[s, GrayLevel@.8], FrameMargins -> {{3, 0}, {0, 0}}
- , ImageMargins -> 0
- ]
- }
- , {2, 1}
- , BaseStyle -> {ShowStringCharacters -> False}
- ]]
- ]
- ; NotebookWrite[cellObj, cell]
- ]
- ] & /@ DeleteCases[
- Cells[nb], Alternatives @@ Cells[nb, CellStyle -> {"Input", "Output"}]
- ]
Add Comment
Please, Sign In to add comment