11. Creating Tables

Lesson overview

In this lesson, you’ll learn how to do the following:

  • Convert text to a table, import tables from other applications, and create tables from scratch.

  • Change the number of rows and columns in a table.

  • Rearrange rows and columns.

  • Adjust row and column sizes.

  • Format tables with strokes and fills.

  • Specify repeating header rows for long tables.

  • Place graphics in table cells.

  • Create and apply table and cell styles.

Image

This lesson will take about 45 minutes to complete. To get the lesson files used in this chapter, download them from the web page for this book at www.adobepress.com/InDesignCIB2020. For more information, see “Accessing the lesson files and Web Edition” in the Getting Started section at the beginning of this book.

Image

With Adobe InDesign, you can easily create tables, convert text to tables, and import tables from other applications. Rich formatting options—including headers, footers, and alternating row and column patterns—can be saved as table styles and cell styles.

Getting started

In this lesson, you’ll work on a fictional botanic gardens activity flyer designed to be attractive, easy to use, and easy to revise. You’ll convert text to a table, and then format the table using options in the Table menu and various panels. The table will include header rows that repeat when the table flows across multiple pages. Finally, you will create a table style and a cell style so that you can apply formatting quickly and consistently to other tables.

Image Note

If you have not already downloaded the project files for this lesson to your computer from your Account page, make sure to do so now. See “Getting Started” at the beginning of the book.

  1. To ensure that the preferences and default settings of your InDesign program match those used in this lesson, move the InDesign Defaults file to a different folder following the procedure in “Saving and restoring the InDesign Defaults file” on pages 45.

  2. Start InDesign.

  3. The InDesign Start screen displays. Click Open at left. (If the Start screen does not display, choose File > Open from the InDesign menu bar.)

  4. Open the 11_Start.indd file in the Lesson11 folder, located inside the Lessons folder within the InDesignCIB folder on your hard disk.

  5. Choose File > Save As, rename the file 11_Tables.indd, and save it in the Lesson11 folder.

    Image Note

    The screen captures in this book show the Medium Light interface. Interface elements such as panels and dialog boxes will be darker on your screen if you are using the default interface.

  6. To ensure that the panels and menu commands match those used in this lesson, choose Window > Workspace > [Advanced], and then choose Window > Workspace > Reset Advanced.

  7. To display the document at a higher resolution, choose View > Display Performance > High Quality Display (if it’s not already enabled).

    Image
  8. If you want to see what the finished document looks like, open the 11_End.indd file in the same folder. You can leave this document open to act as a guide as you work.

Working with tables

Tables are grids of individual cells set in vertical columns and horizontal rows. To create a table, you can convert existing text into a table, insert a new table at a text insertion point in a text frame (which anchors the table in the text), create a new freestanding table, or import a table from another application.

You will use the Type tool to edit and format tables. Controls for formatting tables are in the Tables menu, Tables panel, Properties panel, and Control panel. Throughout this lesson, you will experiment with different options for selecting table elements and modifying tables. Once you become accustomed to working with tables, you can use the options that work best for you.

Converting text to a table

Often, the text for a table already exists in the form of “tab-delimited text,” in which the columns of information are separated by tab characters and the rows of information are separated by paragraph returns. In this case, the InDesign document was received from the botanic gardens in its current state. You will select this text and convert it to a table.

Image Note

As you work through this lesson, change the zoom level to suit your display size and vision.

  1. Using the Type tool (), click in the text frame starting with the words “DAILY DROP-IN ACTIVITIES.”

  2. Choose Edit > Select All.

    Image

    Image Note

    If you do not see the paragraph returns, tabs, and spaces, choose Type > Show Hidden Characters.

  3. Choose Table > Convert Text To Table.

    In the Convert Text To Table dialog box, you will indicate how the selected text is currently separated. Because Hidden Characters (Type menu) is selected, you can see that the columns of information are separated by tabs () and that the rows are separated by paragraph returns ().

  4. From the Column Separator menu, choose Tab. From the Row Separator menu, choose Paragraph.

  5. Confirm that Table Style is set to [No Table Style], and then click OK.

    Image

    The new table is automatically anchored in the frame that contained the text.

    Image
  6. Choose File > Save.

Changing rows and columns

When you start with source data from a client, you will often need to add a few rows, rearrange text, and more to complete the table. Once a table is created, you can easily add rows and columns, delete rows and columns, merge cells, rearrange rows, adjust row height and column width, and specify text inset for cells. In this section, you will complete the shell of the table so that you know its size before you start formatting it.

Adding and deleting rows

You can add rows above or below a selected row. The controls for adding and deleting columns work the same as for adding and deleting rows. Here, you will add a row to the top of the table to contain the column descriptions.

  1. Using the Type tool (), click in the first row of the table, which starts with “DAILY,” to activate a cell. You can click in any cell.

  2. Choose Table > Insert > Row.

  3. In the Insert Row(s) dialog box, type 1 in the Number box, and click Below. Click OK to add the row.

    Image
  4. Click in the first new cell and type Activity. To add column heads to the remaining cells, click with the Type tool in each empty cell, or press the Tab key to navigate from cell to cell. Type the following text in each cell, as shown:

    • Second cell: Day

    • Third cell: Time

    • Fourth cell: Fee

    Image
  5. Using the Type tool, click in the first cell of the second row, and then drag to the right to select all cells in the row with the new column headings.

  6. Choose Type > Paragraph Styles. If necessary, click the arrow next to the Table Styles group to open it.

  7. Click Table Column Heads in the Paragraph Styles panel.

    Image
  8. Click in the cell containing the word “Fee” to activate the cell.

    You will insert a column to the right of this column to contain images.

  9. Choose Table > Insert > Column.

  10. In the Insert Column(s) dialog box, type 1 in the Number box, and click Right. Click OK to add the column.

    Image

    The table is now wider than the frame and the page; you will resolve that later.

    Image
  11. Choose File > Save.

Deleting rows

You can delete selected rows and columns. Here, you will delete the blank row at the bottom of the table.

Image Tip

To activate a row or column, click in it. To select multiple rows to delete, position the Type tool on the left edge of the table until the arrow displays; then drag to select the rows. To select multiple columns to delete, position the Type tool on the top edge of the table until the arrow displays; then drag to select the columns.

  1. Using the Type tool (), move the pointer over the left edge of the last row of the table until it appears as a horizontal arrow (). Click to select the row.

    Image
  2. Choose Table > Delete > Row.

  3. Choose File > Save.

Rearranging rows and columns

While working on a table, you may find that information works better in a different order, or you may discover a mistake. In that case, you can select and drag rows or columns to a new location. This table is in day-of-the-week order, but the Friday row is in the wrong location.

Image Tip

To drag and drop rows or columns, you must select the entire row or column. To drag a copy of a row or column to a new position, press Alt (Windows) or Option (macOS) while dragging.

  1. Locate the last row of the table, which starts with “Growing”.

  2. Using the Type tool (), move the pointer over the left edge of the “Growing” row until it appears as a horizontal arrow (). Click to select the row.

  3. Click and hold in the selected row, and then drag the “Growing Edible Flowers” row up and drop it just under the “Tending Flowers” row. A bold blue line indicates where the row will be inserted.

    Image
  4. Choose File > Save.

Adjusting column widths, row heights, and text placement

Columns and rows, and the way text fits within them, often need fine-tuning according to the content and the design. By default, table cells expand vertically to fit their content—so if you keep typing within a cell, it gets taller. You can, however, specify a fixed row height or column width. Or, you can have InDesign create columns or rows of equal size within the table. If you want columns of the same width, rows of the same height, or both, use the Table > Distribute Columns Evenly or Table > Distribute Rows Evenly commands.

Image Tip

Dragging the cell boundary between two columns changes the size of the column and moves the remainder of the columns out or in (depending on whether you increase or decrease the column size). To retain the overall table width when dragging cell boundaries, press Shift and then drag the boundary. The columns adjoining the boundary are now increased or decreased in size while the table dimensions remain the same.

In this exercise, you will manually adjust the column widths, and then you will modify how the text fits within the cells.

  1. Using the Type tool (), point at a vertical divider between any two columns. When the double-arrow icon () displays, drag to the left or right to resize the column.

  2. Choose Edit > Undo. Experiment with resizing columns a few more times to get a feel for the tool. Choose Edit > Undo after each move. As you drag, keep an eye on the horizontal ruler at the top of the document window.

  3. Place the final columns by dragging the right edge of each column, using the horizontal ruler at the top of the window as a guide.

    • Activity column: 3.5"

    • Day column: 4.25"

    • Time column: 5.5"

    • Fee column: 6.25"

    • Blank image column: 7.75"

    Image
    Image

    Now that the columns widths better fit the text, you will add a little space around the text in the cells. In this case, you will change the entire table, but you can modify selected cells only.

  4. Choose Window > Type & Tables > Table to open the Table panel.

  5. Click anywhere in the table, and choose Table > Select > Table.

  6. Type .125 in inside the Top Cell Inset field (), and press Enter (Windows) or Return (macOS). If necessary, click Make All Settings The Same () to increase the inset on all four edges of each cell.

    Image Tip

    You can click the arrows () next to any field to increase or decrease its value.

  7. With the table still selected, click Align Center () in the Table panel.

    This centers the text vertically within each cell.

    Image
  8. Click anywhere in the table to deselect the cells.

  9. Choose File > Save.

Merging cells

You can merge adjacent selected cells to produce a single cell. Here, you will merge the cells in the top row so the header “DAILY DROP-IN ACTIVITIES” spans the table.

  1. Using the Type tool (), click in the first cell of the first row, and then drag to select all the cells in the row.

  2. Choose Table > Merge Cells. Click the pasteboard to deselect the table.

    Image Tip

    The Properties panel and the Control panel have a Merge Cells icon () for easy access.

  3. Choose File > Save.

    Image

Formatting a table

The border of a table is a stroke that lies outside the entire table. Cell strokes are lines within the table that set the individual cells apart from each other. InDesign includes many easy-to-use formatting options for tables. You can use these options to make tables attractive and help them convey information to readers. In this section, you will specify fills and strokes for the table.

Adding a fill pattern

To achieve effects such as shading every other row, InDesign provides fill patterns for both rows and columns. You can specify where the pattern starts, which allows you to exclude any header rows. As you add, delete, and move rows and columns, the pattern updates automatically. You will add a fill to every other row in this table.

  1. Using the Type tool (), click anywhere in the table to activate it.

  2. Choose Table > Table Options > Alternating Fills.

  3. From the Alternating Pattern menu, choose Every Other Row. Leave the default settings for the remaining options.

    Image
  4. Click OK. Every other row now has a gray background.

    Image
  5. Choose File > Save.

Applying a fill color to cells

An entire table can have a fill color, and each cell can have its own fill color. Using the Type tool, you can drag to select any contiguous cells to apply a fill color. In this section, you will apply a fill color to the header row.

  1. Using the Type tool (), move the pointer over the left edge of the “DAILY DROP-IN ACTIVITIES” row until it appears as a horizontal arrow (). Click to select the row.

  2. Choose Window > Color > Swatches.

    Image Tip

    You can use the Fill box on the Control panel to apply color to cells as well.

  3. Select the Fill box () in the Swatches panel, and then click the Purple Cool swatch.

  4. Drag the Tint slider to 50%.

    Image
  5. Choose Edit > Deselect All to view the color. Choose File > Save.

Editing cell strokes

Cell strokes are the lines around individual cells. You can remove or change the stroke for selected cells or for the entire table. In this section, you will remove the stroke width from all the horizontal strokes, as the alternating pattern provides enough delineation.

  1. Using the Type tool (), click anywhere in the table, and then choose Table > Select > Table.

  2. Locate the proxy preview () in the center of the Control panel (at the top of the screen).

    Each horizontal and vertical line represents a row stroke, column stroke, or border stroke. You can click the lines to toggle the selection on or off. Toggling a line on selects that particular stroke for formatting.

  3. Click all three horizontal lines in the proxy to select them. Ensure that all horizontal lines (and no vertical lines) are selected (toggled on) on the proxy. The selected lines are blue.

  4. Type 0 in the Control panel’s Stroke field. Press Enter (Windows) or Return (macOS).

  5. Click all three vertical lines in the proxy to select them. Deselect the horizontal lines.

  6. Select 0.5 pt from the Stroke menu on the Control panel.

    Image

    Specifying no (0) stroke for the horizontal lines (left) and 0.5 pt stroke for vertical lines (right).

  7. Choose Edit > Deselect All to see the results.

    Image
  8. Choose File > Save.

Adding table borders

A table border is a stroke around the entire table. As with other strokes, you can customize the border’s width, style, color, and more. In this section, you will apply a border to the table.

  1. Using the Type tool (), click anywhere in the table.

  2. Choose Table > Select > Table.

  3. Choose Table > Table Options > Table Setup. This opens the Table Options dialog box and displays the Table Setup tab.

  4. Select Preview in the lower-left corner.

  5. In the Table Setup tab, in the Table Border section, choose 0.5 pt from the Weight menu.

    Image
  6. Click OK, and then choose Edit > Deselect All.

  7. Choose View > Screen Mode > Preview to see the results of your formatting.

  8. Choose View > Screen Mode > Normal, and then choose File > Save.

Adding graphics to table cells

You can use InDesign to create effective tables that combine text, photographs, and illustrations. By default, table cells are essentially small text frames, but you can convert a text cell to a graphic cell. At that point, the cell essentially functions as a graphics frame whose dimensions are governed by the table. In this exercise, you will add photos to some of the course descriptions.

Image Tip

In addition to converting a cell to a graphic cell, you can anchor objects and images within the text of a table cell.

Converting cells to graphic cells

First, you will convert a selected cell to a graphic cell using the Table menu and the Table panel. Later, you will see how to automatically convert a cell to a graphic cell by placing an image.

  1. Using the Type tool (), click inside the far-right cell of the table’s first body row (the row describing Attracting Butterflies).

  2. Chose Table > Select > Cell to select the cell.

  3. With the cell selected, choose Table > Convert Cell To Graphic Cell.

    Image
  4. Choose Table > Cell Options > Graphic to see the options for positioning a graphic within a cell.

    Image Tip

    You can convert a text cell to a graphic cell simply by placing an image in it. However, if you are creating a template that indicates where images should be placed, you can do this by converting the cells to graphic cells.

    Image
  5. After viewing the options in the Graphic tab of the Cell Options dialog box, click Cancel.

  6. Click inside the far-right cell in the third body row (the row describing Creating Garden Flags). Drag to the right to select the cell.

    Image Tip

    To format a cell or convert a cell’s content, you must first select the cell. To select a graphic cell with the Type tool, drag across the graphic cell.

  7. If necessary, choose Window > Type & Tables > Table to display the Table panel.

  8. Choose Convert Cell To Graphic Cell from the Table panel menu.

    Image

Placing images in graphic cells

Now, you will place images in the two cells converted to graphic cells. You will then automatically convert two text cells to graphic cells as you place images.

Image Note

If necessary, deselect Show Import Options in the Place dialog box.

  1. Using the Selection tool (), click inside the new graphic cell in the Attracting Butterflies row.

  2. Choose File > Place. In the lower-left corner of the Place dialog box, select Replace Selected Item.

  3. Navigate to the Lesson 11 folder, select the Butterfly.jpg file, and then click Open.

  4. To fit the cell to the image, choose Object > Fitting > Fit Frame To Content.

    Image Tip

    Use options in the Control panel or Properties panel, such as Fit Content Proportionally, to adjust the image size and placement within the cell.

    Image
  5. Click inside the new graphic cell in the Creating Garden Flags row.

  6. Choose File > Place. In the Place dialog box, select the GardenFlag.jpg file in the Lesson11 folder, and click Open.

  7. To fit the cell to the image, use the keyboard shortcut for Fit Frame To Content: Ctrl+Alt+C (Windows) or Command+Option+C (macOS).

  8. Choose File > Place. In the Place dialog box, select the WateringCan.jpg file. Then, Ctrl-click (Windows) or Command-click (macOS) the Kite.jpg file to load the pointer with both the WateringCan.jpg and Kite.jpg files. Click Open.

    Image Note

    If you place the wrong image in a cell, choose Edit > Undo and try again.

  9. Click the loaded graphics icon () in the last cell of the Making and Flying Kites row.

  10. Click the loaded graphics icon in the last cell of the Tending Flowers row.

  11. Using the Selection tool, click the image of watering can and fit the cell to the image using the keyboard shortcut or the Object > Fitting > Fit Frame To Content command. Repeat the process for the kite image.

    Image
  12. Choose File > Save.

Adjusting the row heights

The images are 1 inch in height, so you will now make all the table body rows 1 inch high.

  1. If necessary, choose Window > Type & Tables > Table to open the Table panel.

  2. Using the Type tool (), move the pointer over the left edge of the first body row until it appears as a horizontal arrow ().

  3. Drag from the first table body row, starting with “Attracting Butterflies,” to the last table row, ending with “Free”.

    Image
  4. With the table body rows selected, choose Exactly from the Row Height menu. Then, type 1 in inside the Row Height field to the right of the menu. Press Enter (Windows) or Return (macOS).

  5. Choose Edit > Deselect All to see the results.

  6. Choose File > Save.

    Image

Anchoring graphics in table cells

You can have both text and graphics in a cell by anchoring images in the text. In this exercise, you will place a leaf icon next to the classes that are held off-campus.

  1. Choose View > Fit Page In Window to center page 1 in the document window.

  2. Using the Selection tool (), select the leaf icon immediately to the left of the header row.

    Image
  3. Choose Edit > Cut.

  4. Select the Type tool (), or double-click inside the table to automatically switch to the Type tool.

  5. In the first body row of the table, click immediately after “Illustrating Botanicals” and type a space.

  6. Choose Edit > Paste.

    Image
  7. Click the Type tool after “Making and Flying Kites,” type a space, and then choose Edit > Paste.

  8. Choose File > Save.

Creating a header row

A table’s name and the column headings are often formatted to stand out from the rest of the table. To do this, you can select and format the cells that contain the header information. This header information may need to repeat if the table flows across multiple pages. With InDesign, you can specify header and footer rows that repeat when a table continues to the next column, frame, or page. Here, you will format the first two rows of the table—which often contain the table name and the column headings—and specify them as header rows that repeat.

Image Tip

When you edit text in a header row, the text is automatically updated in other instances of the header row. You can edit the text in the original header only; the other instances of the header are locked.

  1. Using the Type tool (), move the pointer over the left edge of the first row until it appears as a horizontal arrow ().

  2. Click to select the entire first row, and then drag to include the second row. You will have selected “DAILY” through “Fee.”

    Image
  3. With the two rows still selected, choose Table > Convert Rows > To Header.

  4. Click the Type tool in the last row of the table.

  5. Choose Table > Insert > Row.

  6. In the Insert Row(s) dialog box, type 4 in the Number box, and click Below. Click OK to add the rows.

    Image Note

    You can use these new blank rows to practice typing text in cells. Remember to use the Type tool, press Tab to jump to the next cell, and press Shift+Tab to go back to the previous cell.

  7. Choose Layout > Next Page to view the table on page 2. Notice that the continuation of the table has the same header rows.

    Image
  8. Choose Layout > Previous Page to return to page 1, and then choose File > Save.

Creating and applying table and cell styles

To quickly and consistently apply formatting to tables, you can create table styles and cell styles. A table style applies to the entire table, whereas cell styles can be applied to selected cells, rows, and columns. Here, you will create a table style and a cell style so that you can quickly apply the formatting in other tables.

Creating table and cell styles

In this exercise, you will create a table style for the basic table formatting and a cell style for the header rows. Rather than specify formatting in the styles, you will simply create styles based on the formatting of the table.

Image Tip

The Table panel is grouped with the Table Styles and Cell Styles panels by default.

  1. Using the Type tool (), click anywhere in the table on page 1.

  2. Choose Window > Styles > Table Styles, and then choose New Table Style from the panel menu.

    Image
  3. Name the style Activity Table in the Style Name box.

    Image
  4. Click OK. The new style appears in the Table Styles panel.

  5. Using the Type tool, click in the first row of the table, which says “DAILY DROP-IN ACTIVITIES.”

  6. Choose Window > Styles > Cell Styles, and then click Create New Style at the bottom of the panel.

    Image
  7. Double-click the new Cell Style 1 to open the Cell Style Options dialog box. Name the style Table Header in the Style Name box.

    You will now specify a different paragraph style for the text in cells with the Table Header style applied.

  8. From the Paragraph Style menu, select Table Head. This is the paragraph style already applied to the text in the header rows.

    Image
  9. Click OK.

  10. Choose File > Save.

Applying table and cell styles

Now, you will apply the styles to the table. To make global changes to table formatting later, you can simply edit the table or cell styles.

Image Tip

To automate formatting, you can specify a paragraph style for header rows within a table style.

  1. Using the Type tool (), click anywhere in the table.

  2. Click the Activity Table style in the Table Styles panel.

  3. Using the Type tool, click in the first header row of the table. Choose Table > Select > Row to select the row.

  4. Click the Table Header style in the Cell Styles panel.

    Image

    As a final step, you’ll preview the flyer in its current state. If you were going to complete this flyer, you might enter data into the table cells in the blank rows on page 2 and add more rows as necessary.

  5. Choose Edit > Deselect All, and then choose View > Fit Page In Window.

    Image
  6. Select Preview from the Screen Mode button at the bottom of the Tools panel, and then Press Tab to close all panels.

  7. Choose File > Save.

Congratulations! You have now completed this lesson.

Exploring on your own

Now that you’re skilled in the basics of working with tables in InDesign, you can experiment with creating a new, freestanding table.

Image Tip

If you click the table creation pointer between column guides, the new table will span the width of the column.

  1. Navigate to the bottom of page 2.

  2. Choose Table > Create Table, and enter the number of rows and columns you want. Select an option from the Table Style menu, if you prefer. Click OK.

    Image
  3. Drag the table creation pointer () anywhere on the page. When you release the mouse button, InDesign creates a table that matches the dimensions of the rectangle you draw.

    Image
  4. Using the Type tool (), click the insertion point in the first cell and then type. Use the arrow keys on the keyboard to navigate among the cells.

  5. To convert the table back to text, select it and choose Table > Convert Table To Text. Tabs can separate what were previously columns, and paragraph breaks can separate rows. You can also modify these options.

Review questions

1. What are the advantages of using tables rather than just typing text and using tabs to separate the columns?

2. How can you ensure that a table’s title and column headings repeat if a table continues on multiple pages?

3. What tool is used most frequently when you work with tables?

Review answers

1. Tables give you much more flexibility and are far easier to format. In a table, text can wrap within a cell, so you don’t have to add extra lines to accommodate cells that contain a lot of text. Also, you can assign styles to selected cells, rows, and columns—including character styles and even paragraph styles—because each cell functions like a separate text frame.

2. Select the heading rows you want to repeat and then choose Table > Convert Rows > To Header. You can also repeat footer rows using Table > Convert Rows > To Footer.

3. The Type tool must be selected to work with a table. You can use other tools to work with the graphics within table cells, but to work with the table itself, such as selecting rows or columns, inserting text or graphics, adjusting table dimensions, and so forth, you use the Type tool.

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

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