MathGroup Archive 2008

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

Search the Archive

Re: Stop cell tags propagating to generated cells

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88537] Re: Stop cell tags propagating to generated cells
  • From: David Reiss <dbreiss at gmail.com>
  • Date: Thu, 8 May 2008 04:11:06 -0400 (EDT)
  • References: <fvs2o6$es5$1@smc.vnet.net>

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:
http://scientificarts.com/worklife/



On May 7, 7:11 am, "J. McKenzie Alexander" <ja... at lse.ac.uk> 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 communica=
tions disclaimer:http://www.lse.ac.uk/collections/secretariat/legal/disclaim=
er.htm



  • Prev by Date: Re: Stop cell tags propagating to generated cells
  • Next by Date: RE: Request for Collective Wisdom...
  • Previous by thread: Re: Stop cell tags propagating to generated cells
  • Next by thread: Re: Re: Stop cell tags propagating to generated cells