MathGroup Archive 2008

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

Search the Archive

Re: Re: Stop cell tags propagating to generated cells

  • To: mathgroup at
  • Subject: [mg88616] Re: [mg88537] Re: Stop cell tags propagating to generated cells
  • From: "J. McKenzie Alexander" <jalex at>
  • Date: Fri, 9 May 2008 07:18:49 -0400 (EDT)
  • References: <fvs2o6$es5$> <>

Hi David,

Thanks very much for this. In case anyone else is following this  
thread, if you want to automatically remove the cell tags from all  
(and only) the output cells generated by an input cell, you simply  
need to change the second line in the definition of CellEpilog from

	SelectionMove[EvaluationNotebook[], Next, Cell];


	SelectionMove[EvaluationNotebook[], All, GeneratedCell];



On 8 May 2008, at 09:11, David Reiss wrote:

> Thanks for asking this question, it has been in the back of my mind
> for a while...
> So I did a little bit of research and came up with a possible solution
> (though I do wish that WRI would add an option to Cell to take care of
> this directly).
> One way to handle this is to assign a CellEpilog option to the Input
> cells in your notebook, either directly to those cells or at the
> StyleSheet level.  Here is an example of such an option that would
> remove all the CellTags from the output cells that are a direct result
> of executing the given Input cells.  it could, of course, be modified
> to custom tag those cells as well.  Note though that this will change
> the CellTags of any cell that immediately follows the Input cell, even
> if no output is generated (and, for example, if error messages are
> written after the Input cell it would only remove the CellTags from
> the first of those).  So perhaps you would want to customize this to
> behave as you wish it to for your purposes...   but I think it's a
> decent starting point...
> Here is the option setting:
> CellEpilog :> (
>  SelectionMove[EvaluationNotebook[], After,  EvaluationCell];
>  SelectionMove[EvaluationNotebook[], Next, Cell];
>  SetOptions[NotebookSelection[EvaluationNotebook[]], CellTags -> {}])
> I hope that this helps...
> --David
> A WorkLife FrameWork
> E x t e n d i n g MATHEMATICA's Reach...
> Trial Version at:
> On May 7, 7:11 am, "J. McKenzie Alexander" <ja... at> wrote:
>> Is there a way to stop cell tags that have been manually added to an
>> input cell from being automatically assigned to the generated output
>> cell?  I ask because I have been creating interactive panels for
>> controlling Java models (using J/Link) and would like to be able to
>> programmatically toggle the CellOpen status of the lengthy
>> DynamicModule[...] code.
>> Many thanks,
>> Jason
>> --
>> Dr J. McKenzie Alexander
>> Department of Philosophy, Logic and Scientific Method
>> London School of Economics and Political Science
>> Houghton Street, London WC2A 2AE

Please access the attached hyperlink for an important electronic communications disclaimer:

  • Prev by Date: Tracking a dynamic variable
  • Next by Date: Re: A Mathematica implementation of SolvOpt
  • Previous by thread: Re: Stop cell tags propagating to generated cells
  • Next by thread: Intersection of surfaces