Options for Notebooks
| • Use the Option Inspector menu to change options interactively. |
| • Use SetOptions[obj, options] from the kernel. |
| • Use CreateWindow[options] to create a new notebook with specified options. |
Ways to change the overall options for a notebook.
| In[1]:= |
option | typical default value | |
| StyleDefinitions | "Default.nb" | the basic stylesheet to use for the notebook |
| ScreenStyleEnvironment | "Working" | the style environment to use for screen display |
| PrintingStyleEnvironment | "Printout" | the style environment to use for printing |
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.
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.
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 |
| 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 |
| DockedCells | {} | a list of cells specifying the content of a docked area at the top of the window |
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 pixels 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.
WindowClickSelect is the principal option that determines whether a window acts like a palette. Palettes are generally windows with content that acts upon other windows, rather than windows that need to be selected for their own ends. Palettes also generally have a collection of other option settings such as WindowFloating->True and WindowFrame->"Palette".
DockedCells allows you to specify any content that you want to stay at the top of a window and never scroll offscreen. A typical use of the DockedCells option is to define a custom toolbar. Many default stylesheets have the DockedCells option defined in certain environments to create toolbars for purposes such as presenting slide shows and editing package files.
| "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 |
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 created by StatusArea |
| "MagnificationPopUp" | a popup menu of common magnifications |
| "HorizontalScrollBar" | a scrollbar for horizontal motion |
| "VerticalScrollBar" | a scrollbar for vertical motion |
Some typical possible entries in the WindowElements list.
