3
$\begingroup$

I have a notebook with grouped cells, where the input cells are hidden and only output cells open. Is it possible in an easy way to evaluate the whole notebook and preventing opening all groups, preserving the group structure?

$\endgroup$
1
$\begingroup$

Yes there are several ways. Firstly, note that manual grouping is broken in 12.0.0.0, but it sounds like you are using automatic grouping anyway, so that's not the problem.

Having closed input cells is not the problem either. I think the problem is that with automatic grouping, a closed section will be automatically opened when evaluated if the last cell in the closed section does not evaluate to Null. So terminate the last cell with ;, or input Null as the last cell in the section. (IMO this is a bug.)

To initiate evaluation of everything within a selection of closed groups or sections, select them then Shift+Enter. Selection is done most easily by dragging the mouse across the closed groups or sections from top to bottom, or bottom to top, starting at a position between cells where the cursor is a short horizontal bar (it can also be done by clicking cell brackets).

To evaluate the whole notebook, use the menu Evaluation -> Evaluate Notebook (alternatively, Edit -> Select All then Shift+Enter).

$\endgroup$

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.