MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How do I hide all input in a Mathematica notebook?

  • To: mathgroup at
  • Subject: [mg98007] Re: [mg97940] How do I hide all input in a Mathematica notebook?
  • From: "David Park" <djmpark at>
  • Date: Fri, 27 Mar 2009 05:39:12 -0500 (EST)
  • References: <7226213.1238063721258.JavaMail.root@m02>


The simplest solution would be to permanently close the Input cells when you
prepare the notebook. You do this by selecting the Input cell bracket and
using Menu -> Cell -> Cell Properties -> Open, or the key sequence Alt-CPO.
I don't know if there is a single command that will select all of the Input
cells at once, but having selected a set of them you can open or close them
all at once. This hides the Input cells as a set of thin cells. You could
then evaluate your entire notebook at once to obtain the displays.

One disadvantage I find with this method is that whenever I think a display
is finished and I close up the Input cell, I later find I want to make a
change and have to open it up again. A second disadvantage is that if you
want to evaluate the cells individual you might find they are difficult to
select because the cells are so thin. However, you don't have to click the
bracket itself - you can click anywhere in the cell.

In the Presentations package I have a number of commands for formatting
'page' displays and generating page displays by buttons that can be merged
into text cells, or that can form a structured group for moving through
various displays. The buttons allow either a page display in the notebook,
or will launch it in a separate window. I usually put the code for the page
displays in subsections that remain closed.

You could do a little bit of this yourself by putting your display code in
subsections. Give each display a name:

display1 = code that generates the display;

Then put a button in the main portion of the notebook:

Button["Sales by product line", display1]

Then copy the button to the open part of the notebook.

An advantage of the button method is that you can change the code in
display1, say, without having to change the button in the open part of the

David Park
djmpark at  

From: michael.p.croucher at 


I am using Mathematica to prepare a report for my boss.  It has lots
of tables and pie charts - the sort of things bosses love.  It also
has a lot of Mathematica commands which scares the wossname out of

At the moment I am hiding the input cell by cell but this is a pain.
Is there a one click/one command solution?


  • Prev by Date: Re: What's going on here (Table-generated lists)?
  • Next by Date: Re: Re: Selecting left hand sides from assignments
  • Previous by thread: Re: How do I hide all input in a Mathematica notebook?
  • Next by thread: Re: How do I hide all input in a Mathematica notebook?