[Date Index]
[Thread Index]
[Author Index]
Re: Re: Hiding Input Cells
*To*: mathgroup at smc.vnet.net
*Subject*: [mg82211] Re: [mg82198] Re: Hiding Input Cells
*From*: Murray Eisenberg <murray at math.umass.edu>
*Date*: Mon, 15 Oct 2007 01:20:58 -0400 (EDT)
*Organization*: Mathematics & Statistics, Univ. of Mass./Amherst
*References*: <fepq5p$dfs$1@smc.vnet.net> <200710141018.GAA25879@smc.vnet.net>
*Reply-to*: murray at math.umass.edu
Nice! But...is it really more efficient to copy and evaluate these
definitions in the notebook and evaluate them than to do the equivalent
thing manually (by selecting all Input cells with a simple key
combination, then use the menu)?
David Reiss wrote:
> Much of the functionality that you are looking for is contained in the
> Tagging palette in A WorkLife FrameWork
> (http://scientificarts.com/worklife/). But here is a pair of quick
> and dirty functions that will do what you are looking for by
> evaluating them in the desired notebook.
>
> This is a function that will do what you want (evaluate it in the
> notebook whose input cells you are wating to evaluate).
>
> ClearAll[EvaluateAndHideInputCells];
>
> EvaluateAndHideInputCells[] :=
> Module[{nb},
>
> nb = EvaluationNotebook[];
> NotebookFind[nb, "Input", All, CellStyle];
> MathLink`CallFrontEnd[FrontEnd`SelectionAddCellTags[nb,
> {"toevaluate"}]];
>
> SelectionMove[nb, All, EvaluationCell];
> MathLink`CallFrontEnd[
> FrontEnd`SelectionRemoveCellTags[nb, {"toevaluate"}]];
>
> NotebookFind[nb, "toevaluate", All, CellTags];
>
> FrontEndExecute[FrontEndToken[nb, "EvaluateCells"]];
>
> NotebookFind[nb, "toevaluate", All, CellTags];
> MathLink`CallFrontEnd[
> FrontEnd`SelectionRemoveCellTags[nb, {"toevaluate"}]];
> SetOptions[NotebookSelection[nb], Editable -> True, CellOpen ->
> False,
> ShowCellBracket -> False]
>
> ];
>
> And this one will re-show the input cells to see them onece again.
> Again evaluate it in the desired notebook.
>
> ClearAll[ReopenInputCells];
>
> ReopenInputCells[] :=
> Module[{nb},
>
> nb = EvaluationNotebook[];
> NotebookFind[nb, "Input", All, CellStyle];
> SetOptions[NotebookSelection[nb], Editable -> True, CellOpen ->
> True,
> ShowCellBracket -> True]
>
> ]
>
>
> I hope this helps...
>
> --David
> http://scientificarts.com/worklife
> A WorkLife FrameWork
> E x t e n d i n g MATHEMATICA's Reach...
>
>
> On Oct 13, 2:55 am, "Harvey P. Dale" <h... at nyu.edu> wrote:
>> Is it possible to hide input cells following notebook
>> evaluation? I would like to have the output cells visible, but hide the
>> input cells, so I can print the output without printing the input cells.
>> I'd like this to happen automatically, so I don't have to delete the
>> input cells one by one each time.
>>
>> Thank you.
>>
>> Sincerely,
>>
>> Harvey P. Dale
>
>
>
--
Murray Eisenberg murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305
Prev by Date:
**Re: Evaluation question**
Next by Date:
**Re: format mixed integers & floats with text styling (see )**
Previous by thread:
**Re: Hiding Input Cells**
Next by thread:
**Re: Hiding Input Cells**
| |