Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

By giving a cell the simple option CellOpen -> False, it can be hidden from view.

But for inline cells (cell within a cell) this does not work.

An option Visible -> False only seems to exist for notebooks, not for cells.

What to do?

share|improve this question
One way would be to add a CellSize option to the inline cell and toggle between {0,0} and Inherited but this would be quite messy to implement I think. – Mike Honeychurch Oct 18 '12 at 22:05
May be you can add an White color or Balck color or other color for all your inline cells and set the content unseen. – HyperGroups May 8 '13 at 6:31

One way is to go with stylesheets, you can set DefaultNewInlineCellStyle option for StyleData["Notebook"] and for this given style, a specific CellSize, then you can proceed with toggling it. But it is messy and probably an overreaction.

I'd go with this simple procedure, you can put it as a MenuItem, a new shortcut or whatever you find convenient. For simplicity let's create a quick palette:

So, first of all, from documentation of Cells[obj]:

obj may be a NotebookObject or a CellObject. If obj is a CellObject, then Cells returns the inline cells in the specified cell.

     "Toggle inline cells visibility",
       inlineCells = Cells /@ Cells @ InputNotebook[] // Flatten;
          CurrentValue[#, CellSize] === {1, 1},
          SetOptions[#, CellSize -> Automatic],
          SetOptions[#, CellSize -> {1, 1}]
       ] & /@ inlineCells

Size {0,0} is not supported so we are using {1, 1} which is small enough :)

share|improve this answer

Your Answer


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.