Chapter 12
IN THIS CHAPTER
Using the Table tool
Importing Excel tables and charts
Adding text and pictures to tables
Formatting tables
Breaking tables across pages
Adding header and footer rows
Converting a table back to text
A table in QuarkXPress is a collection of boxes that make up a new kind of item — a table! The boxes (cells) behave like regular text, picture, or no-content boxes; you control the table’s attributes with either the Table menu, the Table tab in the Modify dialog box (Windows), or the Home/Classic or Table tab of the Measurements palette (Mac).
In this chapter, you learn to create, edit, and format tables. Some tables are so long that they need to break across pages, so you find out how to set them to automatically break, as well as how to add header and footer rows to repeat across pages. And for those times when you need to get the text back out of a table, you see how to convert a table back into text, or into separate boxes.
You can create a table in several ways:
After you create a table, you can format it using all the powerful tools in QuarkXPress, including running headers and footers, background blends, graphics, and gridlines.
You can split a table either manually or automatically as it reaches a specific size, or insert it into a text box as an inline table. You can even convert a table back to text or into separate boxes.
To get started creating a table on your page, get the Table tool from the Tools palette, as shown in Figure 12-1. Then follow these steps:
With the Table tool active, click and drag on your page to draw out a table the size you need.
The Table Properties dialog box appears, as shown in Figure 12-2.
In the Cell Type area, shown in Figure 12-2, choose whether you want to fill the cells with Text or Pictures.
You can change this for individual cells after creating the table.
In the Auto Fit area, shown in Figure 12-2, choose whether you want the text cells to expand as you add text.
You can enable Auto Fit for Rows, Columns, or both.
If you want your text to flow from cell to cell (similar to linked text boxes), select the Link Cells check box and choose a Link Order from the Link Order drop-down menu, shown in Figure 12-2.
Later, you can also control linking by choosing Table ⇒ Link Text Cells. Even if you don’t link the text cells, you can still press the Tab key to jump from cell to cell while entering or editing data.
Here are some other options you might want to select in the Table Properties dialog box:
If you have text on your page that is consistently formatted with a single tab, comma, or space between each “column” of text, and each “row” ends in a single paragraph return, you can quickly convert it to a table. Here’s how:
Get the Text Content tool from the Tools palette and select all the text you want to convert to a table.
As is true of selecting text anywhere in QuarkXPress, you can select text by either dragging across it, double-clicking to select one word, triple-clicking to select a line of text, or quadruple-clicking (that is, four times) to select all the text in the cell. These techniques are similar in all word processing and page layout applications, so you may be familiar with them already.
Choose Table ⇒ Convert Text to Table.
The Convert Text to Table dialog box displays, with QuarkXPress’s best guess for the number of rows and columns, as shown in Figure 12-3.
In the Auto Fit area of the Convert Text to Table dialog box, shown in Figure 12-3, choose whether you want the text cells to expand as you add text.
You can enable Auto Fit for Rows, Columns, or both.
Click OK.
A new table is created at the same size as the original text box, slightly below and to the right of the original text box.
QuarkXPress has a special level of support for tables and charts imported from Microsoft Excel, which are explained in the following sections.
For example, when you import table data from an Excel spreadsheet, QuarkXPress can link to it, rather than copying its data onto your page. That way, if the Excel spreadsheet changes, you can update the table in QuarkXPress by choosing Utilities ⇒ Usage and clicking the Update button in the Usage dialog box.
Also, if you import an Excel spreadsheet as an inline table (as explained in this section), you can format it with a table style, which dramatically speeds the process of formatting of tables and ensures consistency in appearance when you have multiple tables.
You can import Excel data into a QuarkXPress table in several ways:
Whichever way you create the table, the Table Link dialog box, shown in Figure 12-4, appears.
To import the Excel table data, follow these steps:
If the file includes multiple worksheets, choose the one you want to import from the Sheet drop-down menu.
If you want to import only a portion of the data, you can specify a cell range in the Range field or choose a named range from the drop-down menu.
Inline tables were introduced in QuarkXPress 2015 as an option when importing an Excel spreadsheet. Their advantage is that they can automatically jump across pages, and you can apply a Table Style to them. Also, because QuarkXPress places inline tables as items inside the flow of a text box, you can easily export them automatically into Reflowable ePub documents.
The content of an inline table behaves much like the content of a picture box: You can change some qualities of its appearance in QuarkXPress, but you can change the actual data only by editing the file it’s linked to. So, to change the text in an inline table, you must edit the Excel spreadsheet and then update the table by using the Usage dialog in QuarkXPress.
Unfortunately, in contrast to other styles in QuarkXPress, you can’t create a table style from an existing table — yet. Instead, you must build it from scratch or append an existing table style from another QuarkXPress layout.
To create or edit a table style, follow these steps:
To create a new, unformatted table style, click the New (+) button.
The Edit Table Style dialog box appears, as shown in Figure 12-5.
After you create a table style, it is listed in the Table Styles palette and is available to apply when you insert an inline table.
If your Excel worksheet has charts or pictures created by choosing Insert ⇒ Chart or Insert ⇒ Picture, you can import those charts or pictures the same way you import other pictures in QuarkXPress. To do this, choose File ⇒ Import Picture and click the Insert Chart tab in the bottom section of the Import Picture dialog box. Just as with other imported pictures, you can update or check their status by choosing Utilities ⇒ Usage and clicking Tables in the left pane.
After your table is created, you’ll likely need to edit the rows and columns, add text and pictures, link text cells together, and format the appearance of the content and the borders. In this section, you find out how to manipulate all the elements of a table.
If you’ve ever used a spreadsheet or database application, you’ll be familiar with navigating through a table in QuarkXPress.
To navigate through a table, get the Text Content tool from the Tools palette, click a cell, and then do the following:
Table cells are similar to regular text boxes or picture boxes. You can type text into them, import text or a picture, or just give their background a color or blend. You can link text cells together like text boxes, and you can convert a text cell to a picture cell by choosing Item ⇒ Content ⇒ Picture.
QuarkXPress provides three ways of selecting cells, rows, and columns. Each requires you to use the Text Content or Picture Content tool. Although you can select rows and columns by carefully (very carefully!) clicking your mouse pointer just barely outside the row or column, you may have better success (and sanity) by choosing the appropriate menu option from the Table menu or the Table context menu. (To display the context menu, Control-click on a Mac or right-click in Windows on the table.) These menus contain the options shown in Figure 12-6.
If you prefer to select rows and columns by clicking, do the following:
Editing text in a table cell is exactly like editing text in a text box, but with these additions:
You can link table cells just as you can regular text boxes. When you link table cells, text that you type, import, or paste into a table fills the first linked text cell and then flows into each subsequent linked cell. You can see the order of the linked text cells by getting the Linking tool from the Tools palette and clicking one of the linked text cells. Arrows then appear that show how text flows from one cell to another. Here are the various ways to link table cells:
Formatting tables can be tricky but rewarding. In earlier versions of QuarkXPress, it was downright difficult to select and format a table, but now it’s straightforward — you just have to be careful to select the part you want to format, and then know where to find the controls. Here is where you find most of the controls:
To resize a table and its content proportionally, press Command-Shift (Mac) or Ctrl+Shift (Windows) while dragging a resize handle.
To resize a table proportionally (but not its content), press Shift while dragging a resize handle.
To resize a column or row of cells by dragging, get either the Text Content or Picture Content tool from the Tools palette and drag the dividing line between two cells.
To resize a column or row of cells numerically, change the value in the Column Width or Row Height on the Table tab of the Measurements palette (Mac) or by choosing Item ⇒ Modify ⇒ Table to open the Table dialog box (Windows).
To format the outside border of a table, follow these steps:
Choose Table ⇒ Select ⇒ Border.
This activates the Border attributes fields in the Home/Classic tab of the Measurements palette.
Gridlines are the horizontal and vertical lines between rows and columns, and can be formatted differently from the table border.
To format gridlines, you first select the gridlines you want to format by choosing among the Select options in the Table menu and Table context menu (shown in Figure 12-6). Then use the following controls to adjust the attributes of the selected gridlines:
To format the background of one or more cells, think of them as regular text or picture boxes and use the color, tint, and opacity controls in the Measurements palette, the Colors palette, or the Color Blends palette, as described in Chapter 15. With some clever use of drop shadows and varying levels of opacity in blends, you can make a table as imaginative as the one shown in Figure 12-9.
To insert rows, click in a cell that is immediately above or below where you want to add a row. To insert columns, click in a cell to the right or left of where you want to add a column. Then choose Table ⇒ Insert ⇒ Row or Table ⇒ Insert ⇒ Column. A dialog box appears that lets you choose how many rows or columns to add, and whether to insert the row above or below the cell, or insert the column to the left or right of the cell.
To delete rows or columns, first select the rows or columns you want to delete. You can select rows and columns by clicking with the Text Content tool next to the cell or row (just outside the table) or by choosing among the Select options in the Table menu and Table context menu (refer to Figure 12-6). Then choose Table ⇒ Delete ⇒ Row or Table ⇒ Delete ⇒ Column.
To combine multiple cells into one, you get the Text Content tool from the Tools palette and Shift-click multiple cells to create a rectangular selection of cells. Then choose Table ⇒ Combine Cells. To revert combined cells, select the combined cells and then choose Table ⇒ Split Cells.
If you anchor a table in a text box, it will automatically break at the bottom of its column or box. To anchor a table in a text box, do this:
Choose Edit ⇒ Paste.
The table now flows along with the text.
To add a repeating header, see the “Adding header and footer rows” section, later in this chapter.
If you add a table break to a table, you can force the table to break vertically or horizontally when it reaches the maximum size that you define. Adding a break is the only way to split a wide table horizontally, which you would do if you wanted to put some of the columns on one page and the other columns on another. Breaking a table this way maintains it as a linked table, so that if you add new rows or columns or change their formatting, all the table portions adjust to accommodate these changes.
To break a table, you first select it and then follow these steps:
Select the Width check box to break the table when its width exceeds the value in the field.
At first, the current width of the table displays, and decreasing this value breaks the table.
Select the Height check box to break the table when its height exceeds the value in the field.
At first, the current height of the table displays, and decreasing this value breaks the table.
To add header rows, enter a value in the Header Rows field.
If the table already has a header, you can turn on Continued Header to create a different version of it in continued portions of the table. For example, if the header on the first portion of the table is “Dog Costumes,” the Continued Header might be “Dog Costumes (continued).”
To set the content of the Continued Header, click OK; then edit the header text in any continued portion of the table after the first portion. All the continued portions of the table will then use that text in their header.
Click OK.
If the table is taller or wider than the values you typed into the Table Break Options field, the table separates into two or more linked tables. If not, the table may break and recombine later as you adjust it by resizing or adding rows and columns.
You can make header and footer rows repeat automatically in continued portions of a table, which is why you set them up in the Table Break Properties dialog box, as described in the preceding section, “Breaking tables manually.”
To change the number of header and footer rows, either reopen the Table Break Properties dialog box (choose Table ⇒ Table Break to open that dialog box) or select the header or footer rows and choose Table ⇒ Repeat As Header or Table ⇒ Repeat as Footer.
To convert a table to text, select the table and then choose Table ⇒ Convert Table ⇒ To Text. The dialog box shown in Figure 12-11 appears. You can select among options for how you want to separate the rows and columns, such as by paragraphs, spaces, commas, or tabs. You can also choose the order in which to extract the text from the cells (any combination of left-to-right or right-to-left and top-to-bottom or bottom-to-top), and whether to delete the original table.
Circling back to the beginning of this chapter, remember that a table is just a group of regular QuarkXPress text boxes and picture boxes with some intelligence connecting them. This means that you can, for example, duplicate the table and extract the separate boxes for use elsewhere. To remove the table’s intelligence and convert it to a group of separate text and picture boxes, choose Table ⇒ Convert Table ⇒ To Group. To work with the individual boxes after that, ungroup them by choosing Item ⇒ Ungroup.