MathGroup Archive 2011

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

Search the Archive

Re: Is a conditional evaluation of sections of a notebook possible?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116933] Re: Is a conditional evaluation of sections of a notebook possible?
  • From: Heike Gramberg <heike.gramberg at gmail.com>
  • Date: Sat, 5 Mar 2011 06:04:29 -0500 (EST)

Maybe you can do something with cell tags. You can add tags to cells using the Cell > Cell Tags > Add/Remove cell tags... menu entry. You could then use something like

NotebookLocate["tag name"]; FrontEndTokenExecute["EvaluateCells"];

to select and evaluate all the cells in your current input notebook which have a tag "tag name".

Heike.

On 3 Mar 2011, at 10:55, slawek wrote:

> I have got a .nb file like
>
>  Section 1a  --- algebraic/symbolic/etc (fast execution, seconds)
>  Section 1b  --- numerical/plots (slow, hours)
>  Section 2a  --- symbolic (fast, seconds)
>  Section 2b  --- ...
>
> I would like to arrange the nootebook like
>
> Section1a
>
> IF (evaluateAllSections == True) THEN
>  Section1b
> ENDIF
>
> Section2a
> ...
>
> Is it possible to conditionally restrict evaluation of whole sections of a
> notebook?
>
> I would not like reorganize .nb into
>
>  Section1a
>  Section2a
>  ...
>  Section1b
>  Section2b
>
> because this workaround destroy the flow of ideas in the text (and force to
> jump across whole .nb to eg. check eq. in Section1a with  code in
> Section2b.)
>
> TIA
> slawek
>
>


  • Prev by Date: Re: Template for developing a package application in workbench
  • Next by Date: Re: Alternative to DumpSave
  • Previous by thread: Is a conditional evaluation of sections of a notebook possible?
  • Next by thread: ColorFunction in ListPlot for points