MathGroup Archive 2006

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

Search the Archive

Re: How to hide a cell?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg63563] Re: How to hide a cell?
  • From: sarahf at wolfram.com
  • Date: Thu, 5 Jan 2006 03:12:36 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

From Narasimham: Let's say comments, plot/print commands have to be selectively visible but  other inputs are  (in a part-sharing mode) at times 1) retrievably and at other times 2) irretrievably made invisible even to the code originator.  E.g., in simulation one finds run-time commands like plot/print, variable names output,  list of real,complex, vectors,matrices  etc., re-setting constants to different values to execute program after  .exe file is made. How to selectively show cells and run program in that manner ?


If I understand your question correctly, I think what you need to do is use Mathematica's concept of a package. 
Process: Select all cells in your notebook that define functions, usage messages, constants and so on and click the menu item Cell > Cell Properties > Initalization Cell. When you next save you will be prompted to "Create Auto Save Package". Agree to this and a .m file will be created in the same directory as your notebook. Call this .m using Get to run all those cells. You can use the notebook to develop/test your work with input cells that return intermediary values, give example uses of your functions, etc.


A clean if advanced way to 'hide' cells is to delve into the world of style sheets and screen style environments. Look at a sample notebook with different settings from the Format > Screen Style Environment menu. It will likely look very different in Printout and Working. You could add your own styles that look as you wish in the Working environment but use the aforementioned CellElementSpacings, CellOpen and ShowCellBracket settings in the Printout style environment definition so that the cell is essentially hidden when the notebook is viewed with Format > Screen Style Environment > Printout. One can also add new screen style environments. Use the Format > Edit Style Sheet menu to create an embedded style sheet or edit an existing one. 



See the HelpBrowser for more information on both these subjects. 

Link to the forum page for this post:
http://www.mathematica-users.org/webMathematica/wiki/wiki.jsp?pageName=Special:Forum_ViewTopic&pid=7423#p7423
Posted through http://www.mathematica-users.org [[postId=7423]]



  • Prev by Date: Re: PowerExpand
  • Next by Date: Re: A beginer's simple question about Mathematica...
  • Previous by thread: Re: Performance improvement needed - Help.
  • Next by thread: Evaluating x^0