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.

Since every single time I start Mathematica, my first action is aligning the windows properly (Notebook on the left for $2/3$ of the screen, help on the right for the other $1/3$), I was wondering whether this could be done automatically. This is what it looks like:

enter image description here

How could I make Mathematica to use these window positions and sizes by default?

share|improve this question
    
On Windows I use "Tile Windows Tall" from the Window menu. I don't know if it's available on Linux. –  Szabolcs Feb 11 '12 at 23:18
2  
You can do this by setting (SetOptions) the WindowSize option on all Notebooks[] but the documentation one for window size, WindowMargins for window positions. Get the usable screen size (sans Gnome panel) with ScreenRectangle /. Options[$FrontEnd, ScreenRectangle]. Sorry, no time for a proper answer, but you should be able to work out the details going from here. –  Szabolcs Feb 11 '12 at 23:29
    
I cannot seem to position the "Documentation Center" even if I directly edit System/Guides/Mathematica.nb so it seems the position of that is controlled elsewhere. –  Mr.Wizard Feb 11 '12 at 23:53

2 Answers 2

up vote 14 down vote accepted

The help window position can be set to be remembered from the Options Inspector: open it, select Global preferences, go to Global Options -> Dialog Settings -> Help Viewer Settings and set Enabled to True.

share|improve this answer
4  
Confirmed to work. It does not work after positioning only the Documentation Center page, but after position another window, that one also comes up in the new location. –  Mr.Wizard Feb 12 '12 at 4:03
    
Thank you, that's very helpful already. All that's left is now doing this for a new notebook as well. Would there be some way of having some autorun commands for each new nb created? –  David Feb 12 '12 at 6:46
1  
Unfortunately it is not possible to set a global default size and position for each new notebook that is created. So the 1/3 screen for the help browser is possible but not the 2/3 screen for the notebook. –  Mike Honeychurch Feb 12 '12 at 11:44
    
@David I don't know. I tried to change things like DefaultNotebook in the past but could not get it to work. I would very much like to know, too, for the same reason as you. –  acl Feb 12 '12 at 13:38
    
@acl I actually asked Tech Support about this a week or so ago after I couldn't figure out how to answer a question re: default size and positioning of notebooks. They advised it is not possible to globally set default size and position for new notebooks. (whereas you can for various dialogs as above) –  Mike Honeychurch Feb 12 '12 at 23:59

From what I've read here on MSE, it is not possible to create a default WindowSize for new notebooks. To cope with this efficiently, I've created the following Palette which others might find handy as well.

The result looks like this:

enter image description here

And the full code is:

(* Screen sizing buttons *)

fullscreen = 
 Button[Text[Style["Full Screen", Small, FontFamily -> "Helvetica"]],
  SetOptions[SelectedNotebook[], WindowSize -> {Full}], 
  BaseStyle -> {"GenericButton", 10}, ImageSize -> Medium]

autosize = Button[Text[Style["Auto Size", Small, FontFamily -> "Helvetica"]],
  SetOptions[SelectedNotebook[], WindowSize -> {Automatic}], 
  BaseStyle -> {"GenericButton", 10}, ImageSize -> Medium]

medsize = Button[Text[Style["Med size", Small, FontFamily -> "Helvetica"]],
  SetOptions[SelectedNotebook[], WindowSize -> {Medium}], 
  BaseStyle -> {"GenericButton", 10}, ImageSize -> Medium]

windowTwoThirds = 
 Button[Text[Style["2/3 width", Small, FontFamily -> "Helvetica"]],
  SetOptions[SelectedNotebook[], WindowSize -> {Scaled[2/3], Scaled[.98]},
   WindowMargins -> {{0, Automatic}, {Automatic, 0}}], 
  BaseStyle -> {"GenericButton", 10}, ImageSize -> Medium]

windowOneHalf = 
 Button[Text[Style["1/2 width", Small, FontFamily -> "Helvetica"]],
  SetOptions[SelectedNotebook[], WindowSize -> {Scaled[1/2], Scaled[.98]},
   WindowMargins -> {{0, Automatic}, {Automatic, 0}}], 
  BaseStyle -> {"GenericButton", 10}, ImageSize -> Medium]

windowOneThird = 
 Button[Text[Style["1/3 width", Small, FontFamily -> "Helvetica"]],
  SetOptions[SelectedNotebook[], WindowSize -> {Scaled[1/3], Scaled[.98]},
   WindowMargins -> {{0, Automatic}, {Automatic, 0}}], 
  BaseStyle -> {"GenericButton", 10}, ImageSize -> Medium]

maxwindow = Button[Text[Style["Max size", Small, FontFamily -> "Helvetica"]],
  SetOptions[SelectedNotebook[], WindowSize -> {Scaled[1], Scaled[1]},
   WindowMargins -> {{0, Automatic}, {Automatic, 0}}], 
  BaseStyle -> {"GenericButton", 10}, ImageSize -> Medium]

maxwidth = Button["\[LeftRightArrow]",
  SetOptions[SelectedNotebook[], 
   WindowSize -> {Scaled[1], Automatic}(*WindowMargins\[Rule]{{0,
   Automatic},{Automatic,0}}*)], BaseStyle -> {"GenericButton", 10}, 
  ImageSize -> Medium]

maxheight = 
 Button[Text[Style["\[UpDownArrow]", Small, FontFamily -> "Helvetica"]],
  SetOptions[SelectedNotebook[], WindowSize -> {Automatic, Scaled[1]}
   (*WindowMargins\[Rule]{{0,Automatic},{Automatic,0}}*)], 
  BaseStyle -> {"GenericButton", 10}, ImageSize -> Medium]

(* Screen movement buttons *)

movetopleft = 
 Button[Text[
   Style["\[UpperLeftArrow] Move", Small, FontFamily -> "Helvetica"]],
  SetOptions[SelectedNotebook[], 
   WindowMargins -> {{0, Automatic}, {Automatic, 0}}], 
  BaseStyle -> {"GenericButton", 10}, ImageSize -> Medium]

movetopright = 
 Button[Text[
   Style["Move \[UpperRightArrow]", Small, FontFamily -> "Helvetica"]], 
  SetOptions[SelectedNotebook[], 
   WindowMargins -> {{Automatic, 0}, {Automatic, 0}}], 
  BaseStyle -> {"GenericButton", 10}, ImageSize -> Medium]

movebottomright = 
 Button[Text[
   Style["Move \[LowerRightArrow]", Small, FontFamily -> "Helvetica"]], 
  SetOptions[SelectedNotebook[], 
   WindowMargins -> {{Automatic, 0}, {0, Automatic}}], 
  BaseStyle -> {"GenericButton", 10}, ImageSize -> Medium]

movebottomleft = 
 Button[Text[
   Style["\[LowerLeftArrow] Move", Small, FontFamily -> "Helvetica"]], 
  SetOptions[SelectedNotebook[], 
   WindowMargins -> {{0, Automatic}, {0, Automatic}}], 
  BaseStyle -> {"GenericButton", 10}, ImageSize -> Medium]

(* Create palette *)

CreatePalette[Row@{
   (*Grid@{{unlockCell,quitKernel,redColor},{lockCell, "",clearColor}},*)

   Grid@{{fullscreen, maxwindow, autosize}, {windowTwoThirds, windowOneHalf, 
      windowOneThird}},
   Grid@{{maxheight}, {maxwidth}},
   Grid@{{movetopleft,
      movetopright},
     {movebottomleft,
      movebottomright}}
   },
 WindowTitle -> "Screen management"
 ]

Once the palette has shown up as a dialog window in Mathematica, you should use (menu) > Palettes > Install palette... to ensure it is always available under the Palettes menu.

share|improve this answer
    
Wow. This is extremely useful. Thanks!! –  Edmund Mar 14 at 10:57
    
Very helpful indeed! However, I notice that this palette only couples to one specific notebook, and that if I have multiple notebooks open, the palette is only visible when the notebook it was opened from is in focus. This is not the case for Basic Math Assistant for instance. Is there a way to change this so that the palette applies to whichever notebook is currently in focus? –  Marius Ladegård Meyer Mar 25 at 8:01
    
Nevermind, I just needed to close Mathematica with the palette open, now it applies to all open Notebooks. Cheers! –  Marius Ladegård Meyer Mar 25 at 8:26
    
Strange, it works for me: the palette works on whichever window is in focus, even including the Help window (a.k.a. Wolfram Documentation). Have you installed the palette so that it appears in the Palette menu? –  zentient Mar 25 at 8:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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