Format Text

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Choose Font Style, Size, and Colors

To change the font for a particular piece of text, input expression, or output expression:

  1. Select what you want to format.

  2. Select Format>Characters from the main menu or use context menu.

  3. In the Character Format dialog box choose the font style, font size, font and background colors, and effects. The window at the bottom of the dialog box shows a preview of your changes.

    If you want to experiment with different fonts, and see how the formatted text looks in your notebook, click the Apply button. This button applies formatting to the selected text and leaves the Character Format dialog box open. You can change font and color of your text several times without having to open this dialog box for each change. When you finish formatting, click OK to close the Character Format dialog box.

To format selected text, you also can use the Format toolbar. If you do not see the Format toolbar, select View>Toolbars>Format from the main menu.

To change the font size quickly, you can use Format>Increase Size and Format>Decrease Size or the corresponding buttons on the Format toolbar.

Choose Indention, Spacing, and Alignment

To change paragraphs settings such as indention, spacing, alignment, and writing direction:

  1. Select the paragraphs you want to format.

  2. Select Format>Paragraph from the main menu or use the context menu.

  3. In the Paragraph Format dialog box choose indention, spacing, alignment, background color, and writing direction of the text. The writing direction is a language-specific option that allows you to type from right to left.

    If you want to experiment with different paragraph settings, and see how the formatted text looks in your notebook, click the Apply button. This button applies formatting to the selected text and leaves the Paragraph Format dialog box open. You can change paragraph settings several times without having to open this dialog box for each change. When you finish formatting, click OK to close the Paragraph Format dialog box: