Re: NotebookGet/Read/EvaluateSelection Issues
- To: mathgroup at smc.vnet.net
- Subject: [mg106743] Re: [mg106707] NotebookGet/Read/EvaluateSelection Issues
- From: "David Park" <djmpark at comcast.net>
- Date: Fri, 22 Jan 2010 05:39:36 -0500 (EST)
- References: <12750007.1264069870172.JavaMail.root@n11>
Yves is right. You definitely should go with a package. It is difficult to imagine a serious technical thesis that wouldn't generate specialized routines to implement the subject matter. The Presentations package at my web site ($50) has, among many other things, a sample package with annotation and instructions on how to set it up. The main difficulty new users have with packages is where to put them and how to name and call them. So I'll outline it. The package should be put in a Folder in your private Applications folder. You can find this by evaluating $UserBaseDirectory. Then, as an example, you could put a folder Thesis in the Applications directory. Name your package file Routines (say) so you will have a Routines.nb (if you are using the Initialization cell method) and/or a Routines.m file in the Thesis folder. The package should start with BeginPackage["Thesis`Routines`"] and you would load the package with Needs["Thesis`Routines`"]. I have one other very tentative suggestion. This might be too much work at the present time but it could help you organize and preserve work. It all depends on how extensive and long term the thesis project is. The suggestion is to get a copy of Wolfram Workbench/DocuTools (you may have to apply as a beta tester) and organize the project as an application. The application would consist of a documented package, and 'finished' notebooks that might correspond to chapters in your thesis. The chapters might just contain calculations, or they might also include textual discussion, equations and graphics that would form the basis for the final document. They might look a lot like the final document. These would be organized with one or more Guide pages that link everything together and act like a table of contents. This is extra work, but not that much extra once you learn how to do it and set up the basic structure. Also, this is a method of organization that fits with standard Mathematica (and all its advantages such as accessing material) and utilizes facilities that already exist - as opposed to devising your own method of organization. In the deployed application you could add a Workbooks (say) folder and keep your developmental notebooks there. Day to day work would be done there in regular Mathematica. In your developmental notebooks your could have a Routines section (I call it Package Purgatory) where you place new routines that you may find useful. Once you have used and tested them enough to have some confidence in them, or once you finish a notebook to your satisfaction, you can make a trip to Workbench and move these over to the 'finished' portion of the application and add links to the Guide pages. This way, you can build up your work and have everything organized in one place. I know that if I suggested that it should be possible to submit a thesis as a Mathematica application there would be screams of horror from certain quarters. But at least you can get much of the writing, calculations and graphics done, and have it organized so you can just copy most of it to your static document. David Park djmpark at comcast.net http://home.comcast.net/~djmpark/ From: Paul [mailto:pkshreeman at gmail.com] My fellow Mathematica'ians... I am having difficult time figuring out whether it's my programming or the bugs:... I have first notebook called xy.nb that simply has y=x+3 and then I have another notebook that has the following: test=NotebookOpen[xy.nb]; NotebookRead[test]; x=7; SelectionMove[test,All,Notebook]; (*Seems I have to force selection, even though there's only one cell in the entire notebook xy.nb?*) SelectionEvaluate[test]; Print["y equals to ",y] Naturally, I'd expect the output to read, "y equals to 10" but the output is "y equals to y"...the variable "y" remains unevaluated or unassigned. If I re-evaluate the y (either redoing the whole thing with kernel still running, or manually calling variable "y" by typing in frontend, "y" and hitting shift-enter. This is simple example of my project, I wanted to develop a modular- style programming instead of really long single notebook to do my Dissertation work..and be able to call certain functions in separate notebooks (optional mathematical calculations, for instance)..and keep all global variables intact to be used in all calculations (AND be immediately usable once evaluated!). Right now, I can't call xy.nb to do calculations, and take the value of "y" to do another type of calcuation since the value of "y" remains unassigned. Thank you!