1

I'm using Mathematica 11.3. In an earlier version, there was, I believe, an option allowing one to change the magnification for new notebooks (created, say, using the menu item File > New or the corresponding keyboard shortcut).

Is there some option to still do this?

I do NOT want to just change the Global Preferences option Notebook Options > Display Options > Magnification, because that applies to all notebooks, including existing palettes.

Kuba
  • 136,707
  • 13
  • 279
  • 740
murray
  • 11,888
  • 2
  • 26
  • 50
  • 1
    You can use this: https://mathematica.stackexchange.com/q/100414/5478 with e.g. CreateNotebook["Default", Magnification -> 3]. This will work for menu and Ctrl+N but not for CreateDocument and related functions, don't know if you want that too. – Kuba Nov 10 '18 at 22:49
  • @Kuba: I added SetOptions[$FrontEnd,NotebookEventActions:>{{"MenuCommand","New"}:>CreateNotebook["Default",Magnification->1.25]}] to my ~/Library/Mathematica/Autoload/init.m, but it has no effect. – murray Nov 10 '18 at 23:02
  • Don't modify init.m, just evaluate it. I rephrased linked answer to make it clearer. – Kuba Nov 10 '18 at 23:11
  • @Kuba: Yes, I understand that - but is there a way to "automate" this, so that I don't have to evaluate that SetOptions command manually each time I start Mathematica? (I did try in init.m wrapping the entire SetOptions expression with a FrontEndExecute, but that seemed to make no difference. – murray Nov 11 '18 at 01:11
  • And it didn't work even if I start Mathematica with clear caches (although it DID add NotebookEventActions:>{{"MenuCommand", "New"} :> CreateNotebook["Default", Magnification -> 1.25]} to my FrontEnd > init.m`. – murray Nov 11 '18 at 01:19
  • You don't have to repeat it nor to touch init.m at all. If you evaluate SetOptions... in the notebook it will be preserved across FrontEnd sessions because we are setting options for a $FrontEnd which automatically saves it in init.m. – Kuba Nov 11 '18 at 08:49
  • This is not working at all for me in Mathematica 11.3 under macOS Mojave. I also tried clearing caches before restarting Mathematica, but that did not do it, either. Which particular init.m should have that option as a result of evaluating the expression (once)? – murray Nov 13 '18 at 22:51
  • I do see that the change has been made to my $UserBaseDirectory/FrontEnd/11.3_init.m, but it has no effect when I open a new notebook! (I'm using the Versioned Preferences option for Mathematica, so y $UserBaseDirectory/FrontEnd/11.3_init.m just contains SetOptions[$FrontEnd, "VersionedPreferences"->True]. – murray Nov 15 '18 at 16:23
  • @Kuba: SetOptions[$FrontEnd,NotebookEventActions:>{{"MenuCommand","New"}:>CreateNotebook["Default",Magnification->1.25]}] is working at the current session but is not remembered, either in 11.3 or 12,0 Prerelease (macOS). This is even though NotebookEventActions:>{{"MenuCommand", "New"} :> CreateNotebook["Default", Magnification -> 1.25]}' now appears in theFrontEnd>12.0_init.m' and after I restart with rebuilt caches. – murray Mar 29 '19 at 15:31
  • I also tried SetOptions[$FrontEnd,NotebookEventActions:>{{"MenuCommand","New","Notebook"}:>CreateNotebook["Default",Magnification->1.25]}], but again it does nothing. – murray Mar 30 '19 at 15:39

0 Answers0