Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. With[{styles = {"Section", "Subsection", "Subsubsection"}},
  2. SetOptions[EvaluationNotebook[],
  3. DockedCells -> Cell @ BoxData @ ToBoxes @ Button[
  4. "align",
  5. Map[
  6. Set[
  7. CurrentValue[#, {CellMargins,1,1}],
  8. CurrentValue[PreviousCell[#, CellStyle->styles], {CellMargins,1,1}]
  9. ]&,
  10. Cells[CellStyle->"Text"]
  11. ]
  12. ]
  13. ]
  14. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement