Lesson B: Tables & Table Styles

  • Open the downloaded document called 4 Tabs & Tables. Set the magnification to fit a spread in the window (⌘-option-0/Ctrl-Alt-0), and go to pages 4 and 5.

On the left is a table that has a table style applied to it. To see it as it would print, make sure nothing is selected (⌘-shift-A/Ctrl-Shift-A) then tap the W key to enter (and again to exit) preview mode. You’ll see that the table has no strokes around the edges of its cells. This style uses typography and fill colors to differentiate one cell’s content from another’s. Before continuing, exit preview mode so you can see the cell edges again.

  • Make sure your tab characters (and other normally hidden characters) are visible: choose Type > Show Hidden Characters or use the shortcut ⌘-option-I/Ctrl-Alt-I.

On the right (page 5) is a text frame that contains a bit of tab delimited text. That is, each future cell’s content is separated (delimited) by a tab character. Each future row is separated by a paragraph return. Text like this can be generated by exporting a table from Microsoft Excel. Perhaps you’ve heard of CSV text files. The letters “CSV” stand for Comma Separated Values, where the delimiter is a comma. Either can be converted to a table in InDesign.

Create Tables by Converting Text

  • To convert the text we have into a table, insert the text cursor into the text frame on page 5. Double-click the word “Guest” to highlight it, then shift-click just to the right of the word “Engineer,” but make sure to exclude the return character (including it would create an extra, empty row in the table).
  • Go to the Table menu and choose Convert Text to Table… then we’ll make some decisions.
  • In the dialog box that opens, we can specify the delimiters and choose a table style if we wish. For us, the defaults (Tab as the Column Separator, and Paragraph as the Row Separator) are fine. Also, to see why I chose to make a table style, we will leave that last menu set to [Basic Table]. Click OK.
  • Note the large blinking cursor to the right of the table. Do not tap backspace or the whole table will disappear! Tables are type objects and are edited entirely with the Type tool. Using that tool, click in any cell of the table.

Style Waterfall

Rather than making you create a table style from scratch, we will apply an existing one and note that cell styles get applied as well. We will edit these so that they, in turn, apply paragraph styles. Later, applying the table style will then apply a cascade of styles: four cell and four paragraph styles.

  • With your cursor blinking somewhere in the table, open the Table Styles panel: Window > Styles > Table Styles. The Cell Styles panel will be in the same small window.
  • Click on the style called A Nicer Table Style. I wasn’t too imaginative the day I named that one. The table now enjoys a pattern of alternating row colors.
  • The first row should be different than the rest since it contains the headers for the data below. Move your text cursor slowly to the first row’s left edge. When it changes to an arrow, click. Similar to Excel, you’ve selected the entire row.
  • Once the first row is selected, right-click on it and choose Convert to Header Rows. You are now seeing the effect of at least two cell styles, automatically applied by the table style.
  • Edit the table style: right-click its name and choose Edit “A Nicer Table Style”…. Be sure to enable the Preview.

Often, the main job of a table style to apply cell styles for us. This one is no exception. Note which cell styles are chosen for which cells. I named them in a way to make it easier for you. When we’re done with this table style, you’ll be able to steal it for your own uses, customizing it for your documents’ look and feel.

  • In the Table Style Options dialog box, go to Table Setup. Since I didn’t want to use any strokes, I set the Table Border Weight to 0 points. I increased the space both above and below the table so it wouldn’t be up against the text around it. I chose nothing in either Row Strokes and Column Strokes, but changes were made in Fills.
  • Go to Fills and note the Alternating Pattern applied. Experiment! Try different colors! When you’ve had enough fun, either commit your changes by clicking OK, or dismiss your mischief by clicking Cancel.

Earlier, I claimed that the cell content would be distinguished by typography. That is not yet the case here.

  • Right-click on the cell style called Header Cells and choose Edit “Header Cells”….
  • Enable the Preview! Note that at the bottom of the General section, is a menu for choosing a paragraph style. Lucky for you, I built one of those, too. In that menu, choose table header cell text. That is the paragraph style you’ll edit if you don’t like the font, color, etc.
  • Go to the Text section. The Inset values push the content from the edges and make the cells a bit larger. Just in case you make the row taller (more on that soon), I set the Vertical Justification to Align Center as well. These settings are similar to the Text Frame Options; we can think of cells as tiny text frames.
  • Go to the Graphic section. In case the content is a graphic rather than text, you can specify a different inset.
  • Go to the Strokes and Fills section. I didn’t want strokes on any of my cells, so the Cell Stroke Weight is blank (zero also works). I wanted my header cells to have a color that contrasted with the blue of the zebra-striping below them, so I chose orange as the Cell Fill. Choose what you like and click OK.
  • Right-click on each cell style to edit it. Choose the appropriate paragraph style for each (body cell text for the body cells cell style, for example). Those will be the paragraph styles to redefine to suit your style guidelines.

Adjusting Rows and Columns

  • With the Type tool still chosen, slowly position the cursor above the line that divides the first and second columns. When it becomes a two-headed arrow, drag slowly to the left and to the right. Notice how both the columns to the right move, not just the dividing line.
  • Use Undo (-Z/Ctrl-Z). This time, hold the shift key as you move that line, and you’ll find that the line the only thing that moves.
  • Try dragging the right edge of the table with and without the shift key. Without it, only the last column’s width changes; with it, all the columns grow or shrink proportionately.
  • The behavior is equally interesting, and analogous, with rows. Try it, but start by shift-dragging the bottom edge downward to make all the rows taller. A row can be no shorter than its content and inset will allow.

Create Tables by Placing Spreadsheets

Above, we converted text to a table. If you have an Excel file (1997–2004 compatible .xls format), you can place that directly.

  • Insert the text cursor in the empty paragraph a couple of lines below the first table.
  • Choose File > Place…. Check the box to Show Import Options! Navigate to the file called speakers.xls and choose it.
  • In the Microsoft Excel Import Options dialog, be sure that only the cells you want are chosen in Cell Range: A1:C13. In Excel, I made the table small enough to hide all the empty cells.
  • In the Formatting section, set the Table formatting to Unformatted Table. We don’t want any of the formatting from Excel. We have something else in mind….
  • Choose A Nicer Table Style for the Table Style, then click OK.

The table will have an extraneous row at the top proclaiming that this is “Table 1.”

  • Put the cursor in that silly top row. To delete a table row, use -delete/Ctrl-Backspace. (It’s shift-delete/Shift-Backspace to delete a column.)
  • Select the top row (by clicking at its left edge), then right-click on it and choose Convert to Header Rows.

With two tables in that story, it’s likely that one spans both text frames. Note that the header repeats itself automatically!

  • Choose the Selection tool from the Tools panel (using the esc key doesn’t work from within a table), then resize the first frame and note how the table flows between them.
..................Content has been hidden....................

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