RE: loading a mathematica file along with opening a Notebook
- To: mathgroup@smc.vnet.net
- Subject: [mg10595] RE: [mg10509] loading a mathematica file along with opening a Notebook
- From: Jean-Marie THOMAS <jmthomas@cybercable.tm.fr>
- Date: Mon, 26 Jan 1998 04:42:27 -0500
- Return-Receipt-To: Jean-Marie THOMAS <jmthomas@cybercable.tm.fr>
In your notebook, define a cell at the beginning with the Initialization tag on (Cell/Cell Properties/Initialization Cell) Define your notebook options such that inialization cells are read on the opening. This cell should contain: SetDirectory@ DirectoryName@ "your notebook path" You can enter the notebook path with (Input/Get File Path) Hope this helps, ----------------------------------------------- Jean-Marie THOMAS Conseil et Audit en Ingenierie de Calcul jmthomas@cybercable.tm.fr +33 (0)3 88 32 93 64 www.cybercable.tm.fr/~jmthomas ======================= -----Message d'origine----- De: Bob Young [SMTP:ryoung@SciComp.com] Date: mardi 20 janvier 1998 08:23 A: mathgroup@smc.vnet.net Objet: [mg10509] loading a mathematica file along with opening a Notebook Linux / X environment Mathematica 3.0.1.1 How can you automatically load a Mathematica file from the same directory as a notebook when the notebook is opened and evaluated? The directory that the notebook is in is not necessarily your current working directory or in $Path. I want some Initialization Cells to do this loading, without the person opening the notebook having to do anything special. But I can't seem to find a way to ask Mathematica what directory a notebook was found in? It seems like this should be easy? Thanks for any pointers, Bob Young SciComp Inc 5806 Mesa, Suite 250 Austin, TX 78731 512-451-1434 512-451-1622 (FAX) e-mail: ryoung@SciComp.com http://www.sig.net/~scicomp