| MATLAB® | ![]() |
| On this page… |
|---|
Modifying Styles in the M-Book Template Choosing Loose or Compact Format for Notebook |
You can print all or part of an M-book by doing one of the following, depending on the version of Microsoft® Word you are using:
In Microsoft Word 2002, 2003 — Select File > Print.
In Microsoft Word 2007 — Select Microsoft Office Button > Print
Word follows these rules when printing M-book cells and graphics:
Cell markers are not printed.
Input cells, autoinit cells, and output cells (including error messages) are printed according to their defined styles. If you prefer to print these cells using black type instead of colors or shades of gray, you can modify the styles.
You can control the appearance of the text in your M-book by modifying the predefined styles stored in the M-book template, m-book.dot. These styles control the appearance of text and cells. By default, M-books use the Word Normal style for all other text.
For example, if you print an M-book on a color printer, input cells appear dark green, output and autoinit cells appear dark blue, and error messages appear red. If you print the M-book on a grayscale printer, these cells appear as shades of gray. To print these cells using black type, you need to modify the color of the Input, Output, AutoInit, and Error styles in the M-book template.
The table below describes the default styles used by Notebook. If you modify styles, you can use the information in the tables below to help you return the styles to their original settings. For general information about using styles in Word documents, see the Word documentation.
When you change a style, Word applies the change to all characters in the M-book that use that style and gives you the option to change the template. Be cautious about making changes to the template. If you choose to apply the changes to the template, you will affect all new M-books that you create using the template. See the Word documentation for more information.
You can specify whether a blank line appears between the input and output cells by selecting the loose or compact format, as follows:
In the Notebook Options dialog box, select either Loose or Compact. Loose format adds an empty line. Compact format does not.
Note Changes you make using the Notebook Options dialog box take effect for output generated after you click OK. To affect existing input or output cells, you must reevaluate the cells. |
To change how Notebook displays numeric output, follow these steps:
In the Notebook Options dialog box, select a format from the Numeric Format list. These settings correspond to the choices available with the MATLAB® format command.
Note Changes you make using the Notebook Options dialog box take effect for output generated after you click OK. To affect existing input or output cells, you must reevaluate the cells. |
This section describes how to control several aspects of the graphic output produced by MATLAB commands in an M-book, including
By default, graphic output is embedded in an M-book. To display graphic output in a separate figure window, follow these steps:
Note Embedded figures do not include Handle Graphics® objects generated by the uicontrol and uimenu functions. |
Notebook determines whether to embed a figure in the M-book by examining the value of the figure object's Visible property. If the value of the property is off, Notebook embeds the figure. If the value of this property is on, Notebook directs all graphic output to the current figure window.
If an input or autoinit cell generates figure output that you want to suppress, follow these steps:
Notebook suppresses graphic output from the cell, inserting the string (no graph) after the input cell.
To allow graphic output for a cell, repeat the procedure. Notebook removes the (no graph) marker and allows graphic output from the cell.
Note Toggle Graph Output for Cell overrides the Embed Figures in M-book option, if that option is set. |
To set the default size of embedded graphics in an M-book, follow these steps:
In the Notebook Options dialog box, use the Units, Width and Height fields to set the size of graphics generated by the M-book.
Note Changes you make using the Notebook Options dialog box take effect for graphic output generated after you click OK. To affect existing input or output cells, you must reevaluate the cells. |
You change the size of an existing embedded figure by selecting the figure, clicking the left mouse button anywhere in the figure, and dragging the resize handles of the figure. If you resize an embedded figure using its resize handles and then regenerate the figure, its size reverts to its original size.
To crop an embedded figure to cut off areas you do not want to show, follow these steps:
You can add white space around an embedded figure by moving the boundaries of a graphic outward. Select the graphic, then hold down the Shift key and drag a sizing handle away from the graphic.
![]() | Evaluating MATLAB® Commands with Notebook | Configuring Notebook | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |