- #33 Special Effects for Type
- #34 Setting Up Drop Caps and Nested Styles
- #35 Inserting Special Characters and Glyphs
- #36 Anchoring Objects in Text
- #37 Wrapping Text Around Objects
- #38 Applying Optical Margin Alignment
- #39 Importing Tables from Word and Excel
- #40 Creating New Tables
- #41 Converting Text to Tables
- #42 Adding Content to Tables
- #43 Formatting Tables
- #44 Using Table and Cell Styles
- #45 Adding Headers and Footers to Tables
- #46 Editing Tables
#44 Using Table and Cell Styles
With the array of table-formatting options in InDesign, you can create impressive-looking tables. The process, however, can get tedious if you're working on a document with many tables or applying the same table attributes over and over. To quickly format tables, InDesign lets you create table styles and cell styles. Similar to paragraph styles and character styles, table styles and cell styles let you apply multiple attributes with one click. In addition, changes you make to table styles and cell styles are reflected in any tables and cells to which the styles are applied. So if you decide that cells need a larger text inset or tables need a stroke, you can make that change globally in multiple tables. You can apply a table style when you create a table.
Creating Table and Cell Styles
Table styles apply to entire tables and include both table formatting options and cell styles. For example, a table style might include a table border, a cell style for header rows, and an alternating pattern of row strokes. Cell styles include options such as text inset, baseline, and fills.
Generally, the best way to create styles is to first format a sample table or sample cell. Then, use the formatted table or cell as a basis for the style. To create a style:
- Using the Type tool, select a formatted table.
- Choose Window > Type & Tables > Table Styles or Cell Styles.
- From the Table Styles or Cell Styles panel menu, choose New Table Style or New Cell Style.
- In the Table Style Options (Figure 44a) or Cell Style Options dialog box, enter a name for the style.
Figure 44a The Table Style Options dialog box lets you specify a name and shortcut key in the General pane and table formatting in the Table Setup, Row Strokes, Column Strokes, and Fills panes.
- All the options are already set based on the formatting applied to the selected table or cell as summarized in the Style Settings area. Click in the scroll list at left to display panes of different options and change any formatting.
If you're not working with a formatted table or cell, you can create a new style by clicking the Create New Style button at the bottom of the Table Styles or Cell Styles panel. This creates a new style in the panel called Table Style 1 or Cell Style 1. The number reflects the creation order. Double-click the new style to name and modify it.
Applying Table and Cell Styles
You can apply a table style when you create a table (Table > Insert Table) or convert text to a table (Table > Convert Text to Table). In addition, you can select tables and cells and apply styles from the Control panel, Table Styles panel, and Cell Styles panel.
-
Table style: To apply a table style, click in a table with the Type tool. Click the style name in the Table Styles panel (Figure 44b). If rows or columns are selected in the table, you can choose a style from the Control panel as well.
Figure 44b Click a style name in the Table Styles panel to apply it to selected text.
- Cell style: To apply a cell style, select the cell, cells, rows, or columns with the Type tool (see #43 for more information about selecting rows and columns). Click the style name in the Cell Styles panel or the Control panel.
Once you apply a table style, you're not stuck with that formatting. You can continue to modify the table's formatting as you wish. Any formatting that does not match the style is called an "override." After applying overrides, if you need to revert a table's formatting to exactly match the formatting in its style, choose Clear Overrides from the Table Styles panel menu. You can also Option-click (Mac OS) or Alt-click a style name. If rows or columns are selected in the table and you only want to clear overrides in the selection, click Clear Overrides in Selection at the bottom of the Table Styles panel. These same techniques work for clearing overrides in selected cells.
Modifying Styles
To change the attributes specified in a table style or cell style, double-click the style name or select the style name and choose Style Options from the Table Styles or Cell Styles panel menus. Or, as a shortcut, reformat a cell or table, and then choose Redefine Style from the panel menu. The Table Styles and Cell Styles panel menus also provide options for duplicating, deleting, importing, and exporting styles.