Let us say that I want to make all the cells within a section not evaluable. In principle, I would simply highlight the relevant section, then go to Cell -> Cell properties
and untick the Evaluable
.
However, the problem is that if for some reason, I wish to make the section evaluable again, I would go back and tick the Evaluable
box again. This, however, causes the section title and all the Texts within the section to also be evaluated, which of course is not what I want. When I toggle back the Evaluable, I would like it to do so only for the Input
Cells of course. Is there to achieve this?
$\begingroup$
$\endgroup$
1
1 Answer
$\begingroup$
$\endgroup$
2
The key is to re-enable it with CurrentValue[_CellObject, Evaluatable] = Inherited
. You can create a custom palette:
CreatePalette @ Column[
Button[
StringForm["Evaluatable -> ``", #],
CurrentValue[SelectedCells@InputNotebook[], Evaluatable] = #
] & /@ {False, Inherited}
]
Or you can use notebook actions analogously to https://mathematica.stackexchange.com/a/184568/5478
-
1$\begingroup$ CurrentValue can be used to set all cells at once, so:
CurrentValue[SelectedCells @ InputNotebook[], Evaluatable] = False
is simpler. $\endgroup$ Mar 17, 2019 at 23:05 -
$\begingroup$ @CarlWoll right, thanks, I forgot about that feature. $\endgroup$– Kuba ♦Mar 18, 2019 at 9:59
Edit -> Un/Comment section
or just put comments over something you don't want? $\endgroup$