Tuesday, March 10, 2009

Creating a Table of Contents, part 2

In part 1 of this series I described the best way to create and format a simple table of contents. The result is pictured below.

I don't like the way the multi-line TOC entries crowd the page numbers near the right edge of the frame. Most people would fix this by manually inserting line breaks (shift-return) in the text to cause it to break early. This isn't efficient for a long TOC, and it makes the text more difficult to edit in the future. Here's a better way.

1. Select the TOC text with the Type tool, and enter a value in the Right Indent field of the Control panel or Paragraph panel. This will push all the right edge of all the text to the left.

2. Enter the same value you entered in step 1, but negative, in the Last Line Right Indent field of the Control panel or Paragraph panel. This will pull the last line of text back out to the right edge of the text frame.

Using this method will make it easy to revise the TOC at any time without having to fuss with the formatting.

4 comments:

Anonymous said...

Hello, what if you have just one line toc entry?

Keith Gilbert said...

@Anonymous, I assume what you're getting at is that when you type just a single long line of text, the text doesn't wrap to the next line until it reaches the far right edge of the frame. This, unfortunately, is the way the last line indent command works. I wish the line of text would wrap as soon as it "bumps up" against the right indent value. But I guess that the way it works makes sense, also, since a single-line instance is the "last" line, so it should be "outdented" to the right edge of the frame.

Anonymous said...

Thanks for the tip; it was really useful. — trmartin

Anonymous said...

Perfect! searched a while, and it wasn't as complicated as I thought. Thank you soon much!