Table & Cell Styles

To give visual structure to text, we can use tab characters and tab stops, as discussed in “Tabs” (page 248). But for longer runs of structured text, especially if the source is Microsoft Excel, tables are more suitable.

InDesign’s default Table Style is as attractive as dirt. I’ve seen nice dirt, but we can do better. To do so consistently and repeatably requires making a custom Table Style and its attendant Cell Styles.

Placing a Table

A table must be in a text frame. InDesign is better about creating one if you forget to insert your cursor into one before placing a table. However, we usually have a target story in mind: for example, the part in an annual report just after “Our fabulous earnings last year:”.

I typically create an otherwise empty paragraph, usually not indented, with my cursor blinking in it. Getting the table’s data into that text is as easy as using File > Place (be sure to Show Import Options) and choosing a spreadsheet file (Excel 1997–2004 .xls format) or a text file, with either CSV (Comma Separated Values) or tab delimited text. When placing an Excel sheet, you can specify the Sheet, the Cell Range, and whether the data comes in as a table at all or as Unformatted Tabbed Text. Placed as a table, you may either preserve Excel’s formatting (Formatted Table) or strip it (Unformatted Table), and you can choose to apply an InDesign Table Style if you have one. Interestingly, choosing a Table Style should accompany choosing Unformatted Table to avoid a collision of Excel and InDesign formatting. Numeric data can be rounded to a more modest Number of Decimal Places, too.

Note: The only tool used when editing a table is the Type tool! A table may look like an inline object, and in a way it is, but we interact with it using only that tool.

Often, I find a mysterious extra row when I first place a table. Perhaps that is residue from having started in Apple Numbers, exporting to Excel, then placing into InDesign. Regardless, it’s easy to get rid of that row. Simply click in a cell in an unwanted row, then use ⌘-delete/Ctrl-backspace. To delete an unwanted column use shift-delete/shift-backspace. If you take the time to select (highlight) a row or column, you can right-click and choose Delete > Row.

An issue that arises fairly often with data-rich tables is overset cells. These show a red dot rather than all the data that should be in a cell. You usually just need to make that row or column larger. Sometimes you need to dig a bit deeper and adjust the cell’s inset. To select an individual cell, use the Type tool cursor and drag slightly upward or downward, staying on the words in the cell just as you would to highlight a lot of text, but don’t drag far. If you keep going, you can highlight multiple cells.

To select an entire row quickly, move your cursor to its left edge. When it becomes a right-pointing arrow, click to highlight the row. A down arrow appears when you have the cursor at the top of a column, allowing you to select it. Clicking at the upper-left corner of a table selects it all.

You have to get the cursor in the right place to adjust row or column sizes with the Type tool. When you hover the cursor over a column boundary, it becomes a two-headed arrow. Click and drag, and all the columns to the right of that line move to allow the one to its left to become larger or smaller. If you’d prefer to move only the dividing line, borrowing room from one column to give to another, hold the shift key as you drag. It’s the same for rows. If you shift-drag the table’s right edge, however, all the columns grow or shrink proportionately. Shift-dragging the bottom edge of the table adjusts the row heights proportionately.

With one or more cells selected, the Control panel offers options for formatting them. If you have only small tables and very, very few of them, this is perhaps sufficient. But having a table style will serve you better, as it can more readily be copied to other projects and edited. I suggest that, despite knowing it’s a long road creating a table style.

Table Style To-Do List

The table style at work above is doing a couple of things: it’s applying that alternating pattern of fills and it’s calling upon Cell Styles to decorate the four kinds of cells present here (header cells, left column cells, right column cells, and body cells). A table style can actually auto-apply five types of cell styles, the last being for footers, which this table didn’t have.

I used the cell styles to get rid of the strokes around each kind of cell and to call upon paragraph styles to format the text in each kind of cell. If any of those paragraphs needed GREP or nested styles, I would have had to create character styles, too. I did use two character styles: one for italics and another for all caps. A lot of work and a bit of a to-do list, but the reward is that later, when I have another table that should look similar, it will require only one click to make it that way.

One last manual adjustment before tackling the creation of those styles: I had to highlight the top row, right-click it, and choose Convert to Header Rows so it “knows” its a header. If a table is long enough to traverse more than one text frame, a header automatically repeats at the top of each.

The Paragraph Styles

Either by sketching out ideas or while experimenting with the Control panel to format your table, you’ll develop a sense of how many different kinds of cells you’ll need, and from there, how many paragraph styles you’ll need to decorate them. If I’d intended to leave strokes in my table, I may have needed only two paragraph styles (one for the header, another for everything else). But I decided to differentiate cells with typography rather than lines. Some tables have many columns, thus the most important text formatting will be for those body cells. In the previous table, I have only one column of body cells, but it will serve as the foundation for the other two. In this case, I opted for center alignment and a fairly lightweight sans serif font.

For the left column, to give an impression of a column edge, I chose right alignment. For the same reason, I chose left alignment for the right column paragraph style. Finally, I chose all caps and center alignment for the header text. Later, when I chose a dark orange for the header cells’ fill, I changed its paragraph style to use Paper (a.k.a. white) as the Character Color.

The Cell Styles

We need the Cell Styles panel (Window > Styles > Cell Styles). Use its panel menu and choose New Cell Style…, which brings us to that dialog box’s General page.

General

I start with the style that will govern my body cells and name it appropriately. Also, here I can choose the Paragraph Style for text in this kind of cell. For subsequent cell styles, I usually use Based On and choose my body cells’ style.

Text

To give breathing room within a cell, even without strokes, I use a bit of Cell Inset on each side. In case a row gets taller, I choose Vertical Justification to determine where the text should be in the cell vertically (just like with a text fame). Again borrowed from Text Frame Options is First Baseline Offset “First Baseline Offset” (page 204).When squeezing a longish phrase into a narrow column, some use Text Rotation to turn the text in a cell sideways (90º). Note that any field you leave blank will not override a setting. That is, if you leave insets blank, it’ll be on you to apply insets to each cell manually.

Graphic

If all that’s in a cell is a graphic frame, you may control how it is inset and whether it’s clipped in favor of keeping a constant cell size.

Strokes and Fills

I usually set the Weight to 0. Of course, choose whatever you want for weight, color, and stroke type. In the previous example, I chose that orange-red Cell Fill color for my header cell style.

Diagonal Lines

If you want them, you can have them: choose stroke weight, color, and type, as well as whether the diagonals are in front of or behind other content.

The Table Style

Where it all comes together! From the Table Styles panel menu (Window > Styles > Table Styles) choose New Table Style…. The list of options is similar here.

General

Here, the big task is to choose the Cell Styles for the major kinds of cells in your table. You may have extra cell styles to apply to other cells, but for the Left Column, Right Column, Header, Footer, or general Body cells, you can have styles automatically applied.

Table Setup

If my cell styles haven’t already dealt with the stroke that surrounds a table, I can set it with the Table Border settings. Since a table occurs in the flow of a story, we also usually need a little Space Before and Space After it.

Row Strokes and Column Strokes

When cell styles have not been configured to deal with strokes, you can set them here. Especially nice is the ability to have Alternating Patterns: every other stroke dashed, for example, or a different color. For the table in the example, I chose no pattern at all.

Fills

I very often choose an Alternating Pattern here. The zebra-striping can make it easier for the eye to follow a row, especially a very wide one.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset