MathGroup Archive 2009

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

Search the Archive

Re: "Freezing" an Output cell?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg103718] Re: "Freezing" an Output cell?
  • From: David Reiss <dbreiss at gmail.com>
  • Date: Sat, 3 Oct 2009 09:04:38 -0400 (EDT)
  • References: <ha4rfq$d8e$1@smc.vnet.net>

Here is an example of how to do this:

ClearAll[cleanNB];

cleanNB[nb_NotebookObject] :=
 Quiet@Module[{},

   NotebookFind[nb, "Input", All, CellStyle, AutoScroll -> False];
   NotebookDelete[nb];
   NotebookFind[nb, "Code", All, CellStyle, AutoScroll -> False];
   NotebookDelete[nb];
   NotebookFind[nb, "Output", All, CellStyle, AutoScroll -> False];
   SetOptions[NotebookSelection[nb], GeneratedCell -> False,
    CellAutoOverwrite -> False, CellLabel -> ""]
   ]



Best,
David

On Oct 2, 8:25 am, AES <sieg... at stanford.edu> wrote:
> I'd like to understand the recommended way(s) to "freeze" an Output cell
> created and displayed in a Mathematica notebook, so that one can delete
> the Input cell(s) that created it and the Output cell remains as a
> permanent "Text-like" cell in the notebook, visible to readers, and not
> deleted by subsequent Cell >> Delete All Output menu commands.
>
> Example:  In the opening section of a notebook addressing some physical
> problem I create a Graphic displaying the geometry and coordinate
> systems associated with the problem, and maybe a Table displaying some
> of the variable names I'll be using and some (possibly derived)
> numerical values.  
>
> Hopefully, at some point, once I've gotten off to a good start, I can
> delete the code that creates these displays, and not have to re-execute
> them further, just retain the Output cells, essentially unchanged in
> appearance.  How to do this?
>
> [And is there a better name than "freezing" for this process?]
>
> For myself, I'd prefer a point and click method, e.g., choose a new
> Style for these Output cells using the Format >> Style menu, over having
> to put some special code in the Input cells that create them.  But,
> others may differ.
>
> Thanks for any suggestions.



  • Prev by Date: Re: "Freezing" an Output cell?
  • Next by Date: Re: "Freezing" an Output cell?
  • Previous by thread: Re: "Freezing" an Output cell?
  • Next by thread: Re: "Freezing" an Output cell?