2
$\begingroup$

I'm trying to remove the CellGroupingRules options in every cell in a notebook.

Eventually I opened the Notebook in a text editor and did a find replace, but there has to be a better solution.

And this doesn't work:

Scan[(#=DeleteCases[#, CellGroupingRules, \[Infinity]])&,Cells[]]
$\endgroup$
4
$\begingroup$

Does this fit your needs?

Scan[
    SetOptions[#, CellGroupingRules -> None] &, 
    Cells[]
]
$\endgroup$
  • $\begingroup$ I tried -> Automatic, but I never tried None, will this break the stylesheet? $\endgroup$ – M.R. Aug 29 '15 at 21:22
  • $\begingroup$ @M.R. I don't know, what do you mean? It should be ok, stylesheet settings are going to be overwritten by this explicit statement so it should be ok. Abount None, yes, it was a blind shot :P $\endgroup$ – Kuba Aug 31 '15 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.