2.11.13 Options for Notebooks
| • Use the Option Inspector menu to change options interactively. | | • Use SetOptions[obj, options] from the kernel. | | • Use NotebookCreate[options] to create a new notebook with specified options. |
Ways to change the overall options for a notebook. This creates a notebook displayed in a window with a thin frame. | |
In[1]:=
NotebookCreate[WindowFrame->"ThinFrame", WindowSize->{40, 30}]
|
|
| option | typical default value | | | StyleDefinitions | "DefaultStyles.nb" | the basic style sheet to use for the notebook | | ScreenStyleEnvironment | "Working" | the style environment to use for screen display | | PrintingStyleEnvironment | "Printout" | the style environment to use for printing |
Style options for a notebook. In giving style definitions for a particular notebook, Mathematica allows you either to reference another notebook, or explicitly to include the Notebook expression that defines the styles.
| option | typical default value | | | CellGrouping | Automatic | how to group cells in the notebook | | ShowPageBreaks | False | whether to show where page breaks would occur if the notebook were printed | | NotebookAutoSave | False | whether to automatically save the notebook after each piece of output |
General options for notebooks. | With CellGrouping->Automatic, cells are automatically grouped based on their style. | | 
|
| With CellGrouping->Manual, you have to group cells by hand. | | 
|
| option | typical default value | | | DefaultNewCellStyle | "Input" | the default style for new cells created in the notebook | | DefaultDuplicateCellStyle | "Input" | the default style for cells created by automatic duplication of existing cells |
Options specifying default styles for cells created in a notebook. Mathematica allows you to take any cell option and set it at the notebook level, thereby specifying a global default for that option throughout the notebook.
| option | typical default value | | | Editable | True | whether to allow cells in the notebook to be edited | | Selectable | True | whether to allow cells to be selected | | Deletable | True | whether to allow cells to be deleted | | ShowSelection | True | whether to show the current selection highlighted | | Background | GrayLevel[1] | what background color to use for the notebook | | Magnification | 1 | at what magnification to display the notebook | | PageWidth | WindowWidth | how wide to allow the contents of cells to be |
A few cell options that are often set at the notebook level. | Here is a notebook with the Background option set at the notebook level. | | 
|
| option | typical default value | | | Visible | True | whether the window should be visible on the screen | | WindowSize | {Automatic, Automatic} | the width and height of the window in printer's points | | WindowMargins | Automatic | the margins to leave around the window when it is displayed on the screen | | WindowFrame | "Normal" | the type of frame to draw around the window | | WindowElements | {"StatusArea", ... } | elements to include in the window | | WindowTitle | Automatic | what title should be displayed for the window | | WindowToolbars | { } | toolbars to display at the top of the window | | WindowMovable | True | whether to allow the window to be moved around on the screen | | WindowFloating | False | whether the window should always float on top of other windows | | WindowClickSelect | True | whether the window should become selected if you click in it |
Characteristics of the notebook window. WindowSize allows you to specify how large you want a window to be; WindowMargins allows you to specify where you want the window to be placed on your screen. The setting WindowMargins->{{left, right}, {bottom, top}} gives the margins in printer's points to leave around your window on the screen. Often only two of the margins will be set explicitly; the others will be Automatic, indicating that these margins will be determined from the particular size of screen that you use.
| "Normal" | an ordinary window | | "Palette" | a palette window | | "ModelessDialog" | a modeless dialog box window | | "ModalDialog" | a modal dialog box window | | "MovableModalDialog" | a modal dialog box window that can be moved around the screen | | "ThinFrame" | an ordinary window with a thin frame | | "Frameless" | an ordinary window with no frame at all | | "Generic" | a window with a generic border, as used for the examples in this book |
Typical possible settings for WindowFrame. Mathematica allows many different types of windows. The details of how particular windows are rendered may differ slightly from one computer system to another, but their general form is always the same. WindowFrame specifies the type of frame to draw around the window. WindowElements gives a list of specific elements to include in the window.
| "StatusArea" | an area used to display status messages, such as those from ButtonNote options | | "MagnificationPopUp" | a popup menu of common magnifications | | "HorizontalScrollBar" | a scroll bar for horizontal motion | | "VerticalScrollBar" | a scroll bar for vertical motion |
Some typical possible entries in the WindowElements list. | Here is a window with a status area and horizontal scroll bar, but no magnification popup or vertical scroll bar. | | 
|
| "RulerBar" | a ruler showing margin settings | | "EditBar" | buttons for common editing operations |
Some typical possible entries in the WindowToolbars list. | Here is a window with ruler and edit toolbars. | | 
|
|