Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This question already has an answer here:

I am writing a bash script to run a bunch of Mathematica .nb files serially. So I thought I'd convert my Mathematica cells into initialization cells. However, I notice that the initialization cell isn't run on start up unless I evaluate it using Shift + Enter or Command + Enter.

Is it not an initialization cell that I am looking for?

Steps I took to make my cell an initialization cell:

  1. Selected the cell with mouse click
  2. Cell > Cell properties > Initialization cell

Edit

I just added InitializationCellEvaluation -> True as the first line of my file. However, how should I make this evaluatable?

share|improve this question

marked as duplicate by Mr.Wizard Aug 6 '13 at 6:56

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Move your edits into an answer, so that others can use it, too. –  rcollyer Aug 15 '12 at 21:59
    
@rcollyer I felt a little odd about answering my own question! –  drN Aug 15 '12 at 22:03
    
Its expressly encouraged. You might as well get the points for it. –  rcollyer Aug 15 '12 at 22:35
    
@rcollyer Thanks mate! :) –  drN Aug 15 '12 at 22:37

1 Answer 1

up vote 10 down vote accepted

I think I found it but I'd be more than happy to look at other alternatives if any provided:

  1. Shift + Ctrl + O to open Options > Notebook options > Evaluation options > Global preferences from the drop down menu at the top

  2. Change InitializationCellEvaluation to True and InitializationCellWarning to False

The next time the .nb file is launched, the initialization cell is run.

share|improve this answer
1  
Does it work to set it only for a specific notebook and leave preferences untouched? –  Vitaliy Kaurov Aug 15 '12 at 23:03
1  
@VitaliyKaurov It does but I changed it at the global level. –  drN Aug 15 '12 at 23:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.