2
$\begingroup$

I am running Mathematica 10.2. I am having trouble automatically initializing a notebook. I realize that there have been several other questions/answers on this topic, but the advice given there doesn't work for me.

I have several cells in the notebook. The first one contains PrependTo and Needs statements for several packages. I have set the cell's property to Initialization Cell. I have used the Options Inspector to set the InitializationCellEvaluation option for the notebook to True and the InitializationCellWarning option for the notebook to False. {Note, these values are already set in the Options Inspector, and the Apply button is disabled.}

When I open the notebook, the initialization cell is not executed. In particular, the packages have not been evaluated. When I do the initialization by hand, everything works fine.

Is there something extra about package evaluation that I have to take care of when doing automatic initialization? Is there any other magic I have to perform?

Thanks.

Spencer

$\endgroup$
  • $\begingroup$ Just to be clear: when you try to evaluate some other cell that is not the initialization cell it stills asks you whether you want to evaluate the initialization cells first, right? $\endgroup$ – C. E. Mar 29 '16 at 21:03
  • $\begingroup$ No, it doesn't. It just executes with a complaint that the functions (defined in the (unevaluated) packages) are not graphical primitives. $\endgroup$ – Spencer Rugaber Mar 30 '16 at 1:23
  • $\begingroup$ I have stripped down the failing notebook and uploaded it to cc.gatech.edu/~spencer/dl/bar.nb $\endgroup$ – Spencer Rugaber Mar 30 '16 at 2:05
3
$\begingroup$

I believe that I now know the answer. In addition to setting InitializationCellEvaluation option to True InitializationCellWarning option to False with the notebook selected, you also need to set these same values at the Global Preference level.

$\endgroup$
  • $\begingroup$ How do you set the same values at the Global Preference Level? $\endgroup$ – Tugrul Temel Oct 25 '18 at 12:49
  • 1
    $\begingroup$ In the Options Inspector, in the Selection dropdown, choose Global Preferences. $\endgroup$ – Spencer Rugaber Oct 26 '18 at 15:03
  • $\begingroup$ Sorry but where is the Options inspector? Is it under Cell or other places? $\endgroup$ – Tugrul Temel Oct 26 '18 at 15:10
  • $\begingroup$ Format menu -> Options Inspector ... $\endgroup$ – Spencer Rugaber Oct 28 '18 at 23:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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