6

Is there a way to disable all input cells in a cell group / section, in a way that is easily reversed later?

My aim is to keep a section of a notebook intact, but prevent it from being evaluated when "Evaluate Notebook" is selected in the front end.

There's Cell -> Cell properties -> Evaluatable, but using this would require me to select every input cell manually and change/restore this property. This is too much work. I have text/subsection/output cells interlaced.

Is there a better way using the UI? If not, is there a simple programmatic way?

EDIT: I found Alt-click, which selects all input cells in the notebook. Can this be restricted to a section / cell-group only?

Szabolcs
  • 24,728
  • 9
  • 85
  • 174
  • 1
    This is an interesting question. I would take it one step further, and ask: is there a way to create an `Evaluatable` toggle for each section? – Mr.Wizard Nov 04 '11 at 06:19
  • 1
    @Mr.Wizard For the toggle UI part this may be useful: http://stackoverflow.com/q/7932172/695132 – Szabolcs Nov 04 '11 at 08:51

1 Answers1

7
  • Option-click to select all Input cells.
  • Command-click twice (once to select, once to deselect) each cell group you don't want to include.

Also, you could just set Evaluatable->False on the entire cell group you want to disable. The Text, Subsection, & Output cells in that group won't cause any problems.

ragfield
  • 2,486
  • 13
  • 15
  • If I set Evaluatable on a Text cell, it will indeed become evaluatable (which is undesirable), the other method works though. I do wish there were a method which requires operation on the relevant cells only, and not everything else (i.e. here it's necessary to deselect everything else). **Do you know where these mouse shortcuts are documented?** I couldn't find them. – Szabolcs Nov 03 '11 at 08:44
  • Shift-click and command-click behave the same in Mathematica as in nearly every other piece of desktop software in existence. I wouldn't be surprised if they're not documented anywhere. Option-click does have a unique behavior in Mathematica. I don't know whether or not it's documented. – ragfield Nov 03 '11 at 13:55