Join Michael Murphy for an in-depth discussion in this video Defining and applying cell styles, part of InDesign Styles in Depth.
As we saw in the last movie, setting up the many options require to get a table to look just the way you want it to look, requires a lot of work, and no one wants to do that much work more than once. In this exercise, we will use the manually formatted table that we set up in the last movie to create the Cell Styles that we'll ultimately use as the building blocks for a Table Style. The best strategy when working with table and cell styles is to start with the Cell Styles and then work your way up to the Table Style. It's kind of the opposite of how we work with Paragraph and Character Styles, where you tend to start at the top level with the paragraph and then work your way down to the exceptions to the rule with Character Styles.
With Table and Cell Styles, it's the other way around. I am going to select these two tables on the page, go to the Application bar and zoom up to 150% so I can see everything a little bit better. I'm going to move this page over to the left, so I can work with panels and dialogs more easily. And on the page, we've got the formatted table that we set up in the last movie and another completely unformatted version of that same table. We're going to use this bottom table to test out our cell styles once we've created them all.
I'll start by double-clicking in one of the figure cells in the formatted table at the top. As with Paragraph and Character Styles, just having my cursor in this cell is going to establish the basis for the formatting of the Cell Style that I create. It's like selecting formatted text, and then creating a Paragraph Style. The attributes are picked up in the style that you create. And I don't have to do anything more than have my cursor in this cell. I don't need to select all the text, the entire cell, and I don't need to select more than one cell.
In fact, if I do, and I go to create a new Character Style, everything but the first cell, the top-left cell is completely ignored. So all I need is my cursor in a cell. I'll go to the Window menu > to Styles > to Cell Styles and I will move the Cell Styles panel over here to the right, and from the panel menu, I'll choose New Cell Style. I am going to name this style Figures and let's stop for a second and just take a look at the options in the New Cell Style dialog. One of the main differences between the New Cell Style dialog and the Cell Options dialog that you work in when you're manually formatting cells is that the New Cell Style dialog has no area in which you can specify the height of a row.
That's not a feature, not an attribute that you can assign to any cell in a Cell Style. It has to be done manually on the table in the layout. One thing that you can assign in a Cell Style that you can't with regular cell options is a Paragraph Style that will be used to format the text in that cell. From the Paragraph Styles menu at the bottom of this dialog, I'm going to choose my Table Figures Paragraph Style and assign it to this Cell Style. In this Style Info area, the Based On style is None.
Every cell style that you create is based on the None default Cell Style. And everything you see down here under Style Settings is what you've done differently from None. All of these different attributes that are appended here after the word none are the changes that have been made beyond the None Cell Style to this particular cell. Those are the attributes that are being picked up and assigned for this cell. Everything else is going to default to the way that the None Cell Style behaves.
In the Text area, my Cell Inset values are empty. They look that way because there is no difference in my settings for these cell insets than the settings that are applied to the None Cell Style. So nothing is reflected here, there's no difference. I did however change the vertical justification. So I'm seeing that here that I aligned my text to the center in this cell. Everything else is just like the None style, so everything is in either a neutral or a blank state here, because it just follows the instructions to the default.
Under Strokes and Fills, everything here is also mostly unassigned, picking up attributes from the None Cell Style. But I did do something different here from the None Cell Style. I have strokes on the left and right side of these cells for my figures, and I'm not seeing any stroke value reflected here. The reason I'm not seeing any values is because I have mixed values for strokes on the cell. I have strokes on the left and right, but not on the top and bottom.
All of this blue highlighting indicates that I'm looking for values for all of my strokes and those values are not the same. So I have to click the bottom, click the top to deselect them, and now I can see that I have consistent values on the left and the right of a half-point black dotted stroke. That's everything that I need to set for this Cell Style. So I am just going to click OK and I am going to move onto the next Cell Style. I will put my cursor in the Row Categories cell, go to the Cell Styles panel and choose New Cell Style from the panel menu, I'll name this Row Categories and unfortunately, Paragraph Styles are not automatically picked up, so I am going to have to define this for every Cell Style that I create.
I'll choose my Row Categories paragraph style, and assign it to this cell. Everything else should be picked up from the formatting of the cell that my cursor is in, so I am just going to click OK and move on to the next Cell Style. I will go up to my header, put my cursor in one of the header cells, choose New Cell Style from Cell Styles panel menu, name my style Header, assign it the Paragraph Style of Column Header and click OK. I will put my cursor in my footer, go to the Cell Styles panel menu, choose New Cell Style, name it Footer, assign the Paragraph Style Table Footer and for all of these I'm assuming that everything is being picked up properly from the formatted table.
I will click OK and now let's start applying these styles to the unformatted table at the bottom and see what we get. First I'll select all of the cells in the left-hand column for my Row Categories, and I will assign the Row Categories cell style. Next, I will select all of my figures and assign the Figures cell style. I will select the header row, and assign the Header style, select the footer row and assign the Footer style.
I will just click in another cell to deselect that bottom row and we can see that we've got most of our formatting, but not all of it, and we've got a few inconsistencies. So we've got a few things still left to deal with. This problem with the stroke on the right column, this first cell in the top-left that has a fill of purple that I don't want, and I'm missing my alternating fills between white and purple throughout the table, because that's handled at the table level, not at the cell level. So Cell Styles are handling most of the formatting but not all of it and some cells need special attention.
We'll fix those problem areas in the next movie.
- Setting up a style-centric workspace
- Creating relationships between paragraph styles
- Using Quick Apply to apply styles
- Using GREP styles to automate text formatting
- Connecting paragraphs with Keep Options
- Creating, applying, and modifying object styles
- Maintaining links between styled tables and external data
- Applying styles with Find/Change
- Working with text variables
- Resolving missing font problems in styles
- Mapping Word styles to InDesign styles
- Export tagging styles for EPUB, HTML, and PDF