Publishers of technology books, eBooks, and videos for creative people

Home > Articles

Text and Tables

This chapter is from the book

This chapter is from the book

Tables

Easy Selections

qustionmark_icon.jpg

No matter where I click on a table with either Selection tool, InDesign refuses to recognize my “clicks” and doesn't select anything. But Selection tool-clicking works fine with everything else in InDesign, so I know the tool is working.

tick_icon.jpg

The Selection tool doesn't let you select a single paragraph in a text frame, does it? Tables act the same way: You have to use the Type tool to select them or edit them. Once you understand that simple requirement, InDesign makes it very easy to select exactly what you want in a table.

Here's one example: Click an insertion point inside a cell, and from there you can select the cell itself, the cell's row, the cell's column or the entire table via:

  • The Table > Select submenu (which offers: Select Cell, Select Row, Select Column, and Select Table; Figure 3-23)

    03fig22.jpg

    Figure 3-23 If you click inside a table cell with the Type tool, you can use the Table > Select submenu options to easily make a variety of table-related selections.

  • The contextual menu (right-click, or Control-click with a one-button mouse), which also has a Select submenu;
  • The keyboard shortcuts for Select Cell, Select Row, Select Column, and Select Table; which are listed next to the menu items.

If you hover with the Type tool over the top or left-edge table border, you'll see the icon turn into an arrow. Click to select an entire row or column, or click and drag to select multiple rows and columns. Hover over the top left corner of a table and the arrow points down and to the right, if you click when you see that arrow, the entire table is selected.

Scale a Table and its Contents

qustionmark_icon.jpg

I know how to resize a table —I just hover over the lower right corner with the Type tool to see the double-headed arrow, then drag — but that maneuver doesn't also resize the contents of the table, which is what I really want. I can scale inline frames, why not an inline table?

tick_icon.jpg

Ah, one of the great mysteries of life.

While you can't scale an inline table, you can scale the text frame that contains it, which will also scale the table and its contents. To prevent scaling everything else in the text frame, you should isolate it in its own frame first. Select the table, cut it, paste it into an empty text frame, and choose Fit Frame to Content (from Object > Fitting) so the new frame hugs the border of the table.

Then select that frame with the Selection tool, switch to the Scale tool, and drag to scale it just as you would for any other object. The contents of the table will scale along for the ride.

You can copy or cut the scaled frame and paste it back into the original text frame (with the Type tool) as an inline frame if you want the table to be part of the text flow again.

Freely Rotate Cell Contents

qustionmark_icon.jpg

Like Ford Motors in its early days (the Model T was available in any color, as long as it was black), InDesign lets me rotate text in a cell at any angle, as long as it's 90, 180, or 270 degrees. But need my column labels to be rotated at 30 or 45 degrees; 90 degrees is too hard to read.

tick_icon.jpg

The tedious but do-able workaround is to put a cell's contents into its own frame, then cut and paste the frame as an inline frame into a cell. Now you can select the inline frame with the Selection tool and use any Transform command, including Rotate, freely.

Add a Tab Inside a Cell

qustionmark_icon.jpg

Whenever I click the Tab key inside a cell, InDesign moves my cursor to the next cell. I have set up custom tab stops for the text in this cell, all I want is for InDesign to honor them.

tick_icon.jpg

That's a feature-not-a-bug for cell navigation. Use Option/Alt-tab to insert a tab within a cell. It will move the cursor to the next default or custom tab stop it encounters, just as it works outside of a table.

Extend the Left Edge of a Table Outside its Frame

qustionmark_icon.jpg

I'm trying to create a table that extends beyond the width of its enclosing text frame on both sides, evenly. I notice that I can drag the right edge of a table outside of the text frame with no problem. But the same isn't true of the left edge of a table — in fact, I can't drag the left border anywhere, I get the right-arrow cursor for selecting the row instead.

tick_icon.jpg

Click an insertion point next to the table (not inside the table, but to the left or right of it) and change the horizontal alignment to Centered from the Paragraph or Control palette.

That doesn't magically allow you to drag on the left border of the table, but when you increase the width of the table by dragging its right edge, the amount the table extends beyond the text frame will now be evenly split between the left and right edges (Figure 3-24).

03fig23.jpg

Figure 3-24 You can't drag the left edge of a table past the left side of its enclosing text frame, but if you make the table wider than the frame and then center it, InDesign will do it for you.

Widen a Cell Without Widening its Column

qustionmark_icon.jpg

One of the cells in my table is a little too narrow to hold the content that has to be there. If I widen the cell by dragging or Shift-dragging on its right-hand border, I change the layout of the rest of the table, which I don't want to do. I could select the cell and the one to its right and choose “Merge Cells,” but I don't really want to merge them into one cell — I need to keep the cell to the right as its own cell.

tick_icon.jpg

Select both the cell that you need to widen and the one to its right (drag across to select both of them) and choose Split Cell Vertically from the Table or contextual menu. You now have four cells where before there were two. We'll call them Cell 1, 2, 3 and 4.

  1. Select any text in Cell 1 and cut it to the clipboard. Set the cell's left and right insets to 0.
  2. Shift-drag the line between Cells 1 and 2 all the way to the left, as far as you can go. Cell 1 has now virtually disappeared, and Cell 2 is wide.
  3. Select Cells 2 and 3 by dragging across them, and choose Merge Cells (Figure 3-25).

    03fig24.jpg

    Figure 3-25 Following the step-by-step instructions in the “Widen a Cell” solution on the previous page, you can adjust a single cell's width without adjusting the width of the other cells in the column.

  4. Click inside the merged cell and paste the text in your clipboard into it.
  5. Shift-drag the line between the merged cell and Cell 4 and drag to the left as far as possible without causing an overset in the merged cell. There's your wide cell.

Cell 4 should now be wide enough to hold the text that it originally held (when it was the one to the right of cell you needed to widen). If you run into minor alignment problems with the text in the merged cells, reduce the cells' left inset amounts.

Paste Pictures in Cells Perfectly

qustionmark_icon.jpg

When I paste an image inside a table cell, I seldom get what I want right off the bat. I'll end up with a blank cell showing an overset, or a huge cell that ruins the formatting of the rest of the table.

tick_icon.jpg

If you keep in mind that InDesign table cells are actually individual text frames, you'll be able to prepare the cell properly for accepting an image and avoid unpleasant surprises. When you paste an image into a table cell, it's the same as pasting an image into a text frame as an inline frame. All images in InDesign tables are, in fact, inline image frames.

That means that you can move the image up and down in the cell with the Selection tool, but you can't move it left or right, just like regular inline frames. (In InDesign CS2, they can also be anchored objects, so they can sit outside the table cell or even outside the text frame.) It also means that the image is treated like a text character in some ways — it's subject to the text frame's (cell's) paragraph alignment, text insets, first line offset, vertical alignment, and so on.

Here are some general guidelines for working with images in tables. Before you paste:

  • If you want the image to “kiss fit” the edges, select the cell and set its text inset to 0 from Table > Cell Options or from the Table palette text inset fields.
  • If you don't want the cell to automatically grow to fit the image, ruining the table geometry, select the cell or row and set the Row Height to “Exactly.” (You don't have to worry about Column Width, that's permanently set to an exact amount.) Of course you should set a height for the row that makes sense at the same time.
  • If you set the cell to an exact height, and you paste in an image that's taller than that amount, you'll end up with a blank cell with an overset icon, and no way to select the image and scale it. Blech! To prevent this, open the Cell Options dialog box and change the First Baseline Offset settings for the cell to Fixed (Figure 3-26). When you click OK, the overset frame will appear and you can click on it with the Selection tool to scale it or drag it into place.
    03fig25.jpg

    Figure 3-26 Banish empty-but-overset cells caused by too-large image frames by setting the cell's First Baseline Offset to Fixed.

  • If you set the cell to an exact height, and you changed the First Baseline Offset as described, the entire image will appear in the cell, overlapping surrounding cells and text if the image is larger than the cell. So you'll probably also want to turn on Clip Contents to Cell in the Cell Options dialog box. That way the cell boundaries act as a clipping path for the image if it's too large (Figure 3-27).
    03fig26.jpg

    Figure 3-27 If you set a cell to an Exact Height, and you set its First Baseline Offset to Fixed (Figure 3-26), and you turn on Clip Contents to Cell, images that are too large for the cell are much easier to deal with.

Then, after you paste the image in, you can select it with the Selection tool to drag it vertically, crop or scale it, apply transparency, and do other Object-related things to it. You can also select the image inside the inline frame with the Direct Select tool to adjust its position within the frame, or scale it without scaling its frame. Finally, you can drag over it with the Type tool and set text formatting commands like space above/below, indents (from the cell boundaries), horizontal alignment, and so on.

Update Table Data Without Losing Formatting

qustionmark_icon.jpg

Between the powerful table features and the ability to place linked Excel spreadsheets, I'm in hog heaven. Well I thought I was in hog heaven, until the first time I used the Links palette to update a linked spreadsheet. When the text repopulated the table I had spend so much time on, all the formatting was lost!

tick_icon.jpg

Yup, you're in hog hell. The good news is that there are a few different solutions, the not-so-bad news is that they cost a few bucks.

First, Dave Saunders wrote a shareware cross-platform script called PopTabFmClp.js (Populate Table From Clipboard) which you can download, along with documentation, from his site: www.pdsassoc.com. After you've placed and formatted the original Excel or Word data into a table in InDesign, at any time you can go back to the Word or Excel file, select the updated data and copy it to your clipboard. Back in InDesign, you select the first cell of the formatted table and run the script from the Scripts palette (choose Windows > Automation > Scripts). The script pastes the data into the cell and reapplies the formatting.

There are also two plug-in solutions for this problem. The first is Teacup Software's (www.teacupsoftware.com) TableStyles, which lets you — surprise! —create named styles for tables. After you have saved your table formatting as a style, you can update the linked spreadsheet (which wipes out the formatting) and simply reapply the table style. Another solution is the InDesign plug-in SmartStyles from Woodwing Software (www.woodwing.com) which does a similar thing but with a very different user interface.

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email ask@peachpit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.peachpit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020