the last couple of scripting lessons (#30 & #31) showed a couple of examples of how to use applescript to assist with reformatting an existing table. but if you are setting up your own tables you’d use table and cell styles to make your life a little easier.
as with paragraph, character and object styles — if you are going to use particular formatting settings more than once in a document, it’s smart to create a style for those settings. so, if your document has several tables with similar formatting, you’d create a table style. this example only has one table, so we’ll just look at cell styles.
the new style takes on the formatting of the selected cells. we’re calling that style ‘header row’ and you can see that, as well as the colour of the cells, the cell style will also apply a paragraph style to the text in those cells. that is, the paragraph style does not need to be applied separately — it’s part of the cell style :
the easiest way to proceed from here is to first apply the most common style to the entire table. to select every cell in a table, first place your cursor somewhere within the table and then move your mouse to the top left corner of the table until you see a downward pointing arrow, then click.
now here’s why you’ve gone to all that trouble … when the client comes back and says they want all the reversed rows to be thicker and all the blank rows to be thinner (or any of a gazillion other possible alterations), you don’t have to change each row individually (or use applescript) you just change the cell styles. unfortunately InDesign does not yet allow you to specify a specific cell height in the cell style (who knows why), but you CAN change the spacing — or cell insets. here we’re changing the top and bottom insets for the ‘header row’ style from 1mm to 2mm :
so, if you’re working with tables but not using cell styles, you’re probably working way too hard.