Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

If we open DocumentationCenter and then run code, we will find that the Cells are independent from each other.

For example:

enter image description here

  • a or b in third Cell is independent from the one in the first or second Cell.

I think maybe it is local cell?

If I want to achieve this behaviour in my notebook, how to do this?

Thanks.

share|improve this question

1 Answer 1

Not each Cell but each CellGroup has separate context. If you create new cell you will get In[2]:

enter image description here

You can confirm this thesis with:

nb = Select[Notebooks[], "Help" === ("DocumentType" /. NotebookInformation[#]) &][[1]]

Options[#, CellContext] & /@ Cells[nb, GeneratedCell -> False, CellStyle -> "Input"]
{{CellContext -> CellGroup}, <<18>>, {CellContext -> CellGroup}}

So it is an Option that you can fix, e.g. via menu:

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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