This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
How to | Do Basic Notebook Styling and Formatting
Mathematica notebooks provide a state-of-the-art technical document system as well as being the primary working environment. The tools for creating publication-quality documents include extensive capabilities for formatting and structuring text.
This is a selection of examples from the complete "How to" screencast. »
You can create title and section headings in a Mathematica notebook by choosing the appropriate cell style in the FormatStyle menu. Add a Title cell to your notebook by choosing FormatStyleTitle:
Note that the cursor that appears in the Title cell is very large. Type in a title for your notebook:
Next, click below the Title cell and add a section header by using the FormatStyleSection menu item. Enter a name for the section header in your notebook:
You can also change the style of an existing cell.
Click below the section header and type. By default, Mathematica interprets this as an Input cell:
Click the cell bracket to the right of the Input cell and change the style from Input to Text by using the FormatStyleText menu item. Note that the converted text appears in a different font from the input:
To further structure your Mathematica notebooks, you can also implement an automatic numbering scheme.
To add automatic numbering to the Section cells, place your cursor at the beginning of the Section cell you created earlier and select InsertAutomatic Numbering:
In the window that pops up, select Section from the Counter drop-down menu, and select OK. The section number now appears to the left of the header.
Here, the original number typed manually to the right of the header was deleted, and a space was inserted between the automatically inserted number and the header:
Add another section header, as above, and repeat the InsertAutomatic Numbering steps to number it as well.
You can also create automatically numbered cells by simply copying and pasting a cell that has already been numbered. When you paste the cell, the numbering will automatically update to reflect the appropriate count.
For example, the third and fourth numbered sections here were created by copying and pasting the second section:
Similarly, you can add bulleted lists in Mathematica by using the FormatStyle menu. Click below the Text cell created in the first section to position the horizontal insertion bar. Then select Item from the FormatStyle menu.
A bullet is inserted and you can then type any text. Pressing Enter will create another bullet under the current one:
Mathematica also lets you check the spelling of text in your notebook. Start the spell checker by selecting the EditCheck Spelling menu item:
You can control text background color as well as font face, family, and size through the Format menu.
Begin by selecting some text:
Use the FormatSize and FormatFace menu items to make the selected text 16 point italicized font.
You can also apply these changes at the cell level by selecting the cell bracket. Select the bracket of the Text cell, and apply a light blue background to the cell by using the FormatBackground Color menu item: