Working on creating a table of contents. It's right aligned, and since the page numbers go into double digits, I wanted to have a tab in between the page number and the page title so I know that the titles are flush right to each other.
So, I start with a left aligned text frame (first one below) with a tab and then the number. This works as expected. But, when I change the alignment to the right, it behaves like the second frame below shows, which is not what I expect! It pushes the titles to the left of the frame, and no amount of left- or right-justified tabs were able to affect that space.
I want it to look like the third frame below, but I don't want to have two text frames to do it, because I want to have the table of contents automatically generated into one frame if possible. Does anyone know how to get the result I want with tabbing only?
Left aligned text, two right angle tabs.
[tab]Page title[tab]page number
(there's a right angle tab at the right edge of the text area. It's somewhat hard to see in the image)
Another option is to set the text as a table with two columns and then align the columns as needed.
It's customary for many layout applications to use right-aligned text with a tab somewhere in the line to stretch the tab to fill the text area. For right-aligned text, tab often means "throw whats before this tab as far left as possible." This is a quick shortcut to force text to justify to the text area at specific breaking points. So really, what you see with right-aligned text is as designed.
You can use Paragraph Styles to add the tabs automatically to the beginning of TOC lines. Basically it's set up via Bullets & Numbering for a Paragraph style and you simply use a hollow character for the bullet. Assign the TOC to that Paragraph Style and the left tabs get added.
Click the "Add" button then click a blank character within the typeface.
This won't really help with the inner tab though.
It's a real head scratcher first time you encounter right-aligned tabs, isn't it? They're really useful when you know how to wrestle them under control.
Here's another method, it's very similar to Scott's but I've always found it slightly easier as you don't need the extra tab marker pushed right to the end:
- Right align the text
|tab|Page number on each line
Turn the second tab in the middle (which defaults to a left aligned tab in right-aligned text) into a right aligned tab:
- open the tabs window (
- select all your text, then select the tab marker in the middle
- click on the
Right justified tabbutton in the top left of the panel
- open the tabs window (
Drag the now-right-aligned tab marker into the appropriate place
Don't forget to take a minute to experiment with the other options in the Tabs panel, like centre aligned tabs and leaders ("
." is a popular leader to get dotted lines), and see what happens when you have multiple left, right, and centre aligned tabs in the same line of text. It should all fall into place and start to make sense.