Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8760
| From | Szabolcs <szhorvat@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Multiple Notebook Execution |
| Date | 2012-02-27 11:43 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jifq89$snj$1@smc.vnet.net> (permalink) |
| References | <jictpv$eog$1@smc.vnet.net> |
On Sunday, 26 February 2012 11:25:19 UTC+2, Harker, Anthony wrote: > Suppose I have a directory full of Mathematica notebooks, each a student's answer to a classwork assignment. What I'd like to do is to load each notebook in turn, execute it in the front end, and print the result to a PDF for grading. Of course, for each assignment I want a fresh kernel, to ensure that one student's assignments of variables or definitions of functions do not come back to bite another student. Is it possible to do all of this from the front end, by cunning use of environments for example, or can it only be done by scripting outside Mathematica? > > Tony Harker You can do this from within Mathematica. An almost complete solution is here: http://stackoverflow.com/a/8659069/695132 What you need to change: UsingFrontEnd[] is not necessary because you probably won't be working from the command line. NotebookSave can be changed to Export[..., "PDF"] to save as PDF. You'll need to write code to loop through all notebooks and do this for all of them (see FileNames[])
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread
Multiple Notebook Execution "Harker, Anthony" <a.harker@ucl.ac.uk> - 2012-02-26 09:25 +0000 Re: Multiple Notebook Execution Szabolcs <szhorvat@gmail.com> - 2012-02-27 11:43 +0000
csiph-web