Re: Transparent evalaution of a notebook

*To*: mathgroup at smc.vnet.net*Subject*: [mg30562] Re: Transparent evalaution of a notebook*From*: "Allan Hayes" <hay at haystack.demon.co.uk>*Date*: Wed, 29 Aug 2001 01:40:07 -0400 (EDT)*References*: <9mfmrc$25g$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Helge, Unless you particularly need to have your definitins in a notebook a convenient way would be to create a new text file in, for example Wolfram Research\Mathematica\4.1\AddOns\ExtraPackages and simply type your definitions in, like f[x_,y_]:=x+y; x=a; y=b; Call this file MyDefinitions.m Then <<MyDefinitions` will load all your definitions. The extras that are needed for a full package are to do with getting contexts right and providing standard information and usage messages. Allan --------------------- Allan Hayes Mathematica Training and Consulting Leicester UK www.haystack.demon.co.uk hay at haystack.demon.co.uk Voice: +44 (0)116 271 4198 Fax: +44 (0)870 164 0565 "Helge Andersson" <helgea at inoc.chalmers.se> wrote in message news:9mfmrc$25g$1 at smc.vnet.net... > Dear Mathematica users > > Can someone give me an example of a command sequence or functions which > Opens another notebook and perform the evaluation of one or more cells > in that notebook. > > To be more specific: > > I have the notebook abc.nb where I do some calculations using > predefined variables, lists and functions which I dont want to define > in abc.nb. I have a Notebook called definitions.nb where I keep my > definitions of variables, list and functions. When I start to work with > my calculations in abc.nb, I want to evaluate one cell in abc.nb (the > first cell for example) which > > 1. Opens definitions.nb , > 2. Evaluate the cells in definitions.nb > 3. Close definitions.nb after the evaluation in step 2 > > > I should say that the functions in definitions.nb are not so general > that I want to implement them as packages. I also know that I can use > one or two evenings reading the help menu but I try this way first as a > possible time-saver. I work on Window 2000 machine with Mathematica > 4.1. > > > Helge Andersson > > > Chalmers University of Technology > SE-412 96 Sweden > > >