Highlighted

Right Align Numbers / Left Align Text in Table of Contents

New Here ,
Sep 28, 2020

Copy link to clipboard

Copied

Hello! 

 

I have been trying and failing to create a table of contents that has right aligned numbers (on the left side) and left aligned text. Like this: TOC-Alignment-01.png

 

Seems like there should be a simple solution to this that I'm missing.. Any thoughts?  


Thanks!

TOPICS
How to, Print, Type

Views

94

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Right Align Numbers / Left Align Text in Table of Contents

New Here ,
Sep 28, 2020

Copy link to clipboard

Copied

Hello! 

 

I have been trying and failing to create a table of contents that has right aligned numbers (on the left side) and left aligned text. Like this: TOC-Alignment-01.png

 

Seems like there should be a simple solution to this that I'm missing.. Any thoughts?  


Thanks!

TOPICS
How to, Print, Type

Views

95

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 28, 2020 0
Adobe Community Professional ,
Sep 28, 2020

Copy link to clipboard

Copied

Include a tab in front of the page numbers, and set the tab to right-alignment

Screen Shot 2020-09-28 at 11.44.02 AM.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 28, 2020 0
New Here ,
Sep 28, 2020

Copy link to clipboard

Copied

Sorry is there a way to do this through the Table of Contents dialog? This is what I currently have which is close: Screen Shot 2020-09-28 at 11.50.29 AM.png

 

Sorry I am not an InDesign expert, so this is a bit new to me..

 

Thank you!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 28, 2020 0
Adobe Community Professional ,
Sep 28, 2020

Copy link to clipboard

Copied

There is no way I know of in that dialog to add a tab before the number, but after the TOC has been generated, you can use this GREP find/change to add the tab. (It finds the beginning of a paragraph and one digit, and replaces it with a tab followed by the found digit)

Screen Shot 2020-09-28 at 12.40.33 PM.png Screen Shot 2020-09-28 at 12.40.52 PM.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 28, 2020 0
New Here ,
Sep 28, 2020

Copy link to clipboard

Copied

Interesting, ok. I'll try out the GREP workflow. I'm creating a template for non-graphic designers so I want to just make sure to create as simple a workflow as possible. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 28, 2020 0
New Here ,
Sep 28, 2020

Copy link to clipboard

Copied

Thank you for looking into this!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 28, 2020 0
Adobe Community Professional ,
Sep 28, 2020

Copy link to clipboard

Copied

Hi C5FB2,

there is a way to do what you want. However, this is a trick that comes at a cost:
You have to use a different scheme of page numbering in the Pages panel.

 

Do not use: 1,2,3 …

Instead use: 001, 002, 003 … if you expect three-digit page numbers.

 

You then could use a GREP style to hide the leading zeros in the TOC. I created a character style that applies fill color [None] to one or two leading zeros at the beginning of a paragraph:

TOC-Entries-HideLeadingZerosAtTheBeginning-1.PNG

 

The issue with this approach:

That trick is not working with auto page numbers, because a page number is always treated as one unit and the applied GREP style cannot grab any leading zeros:

TOC-Entries-HideLeadingZerosAtTheBeginning-2.PNG

 

A workaround could be to use a numbered list for the page numbers on the pages.

So this might be no real solution for your use case.

 

Regards,
Uwe Laubender

( ACP )

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 28, 2020 1
New Here ,
Sep 28, 2020

Copy link to clipboard

Copied

Yeah the auto-numbering is key on this project unfortunately, but that's a very clever fix I'll keep that one in mind for future projects!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 28, 2020 0
Adobe Community Professional ,
Sep 28, 2020

Copy link to clipboard

Copied

Hi C5FB2,

ok, here is yet another solution that will work, also with a trick:

 

Create two TOC styles for two purposes:

1. TOC style with page numbers only for the first TOC.

2. TOC style without page numbers for the second TOC.

 

You can create two text frames with two TOCs with the two TOC styles.

Arrange the two text frames side by side:

 

TwoTOCs-One-PageNumbersOnly-Two-NoPageNumbers.PNG

 

TwoTOCs-One-PageNumbersOnly-Two-NoPageNumbers-2.PNG

The left TOC contains both, the page numbers and the contents of the headlines as well. However, the headlines are hidden with a GREP style. The alignment of the paragraphs is Right Aligned.

 

This time the character style that is hiding the headlines' contents is done a bit different:

Fill color [None], character scaling: 1%, size: 0.1 Pt. That's pretty small and should "condense" the not visible text to such a small amount, that it is hardly visible, that behind every page number there is indeed some white space:

 

TwoTOCs-One-PageNumbersOnly-Two-NoPageNumbers-4.PNG

 

The TOC style is using the special white space character 1/24 of an EM space.

The GREP style is using that delimiter character to identfy the point where all text after this character will be formatted with the character style "Invisible-NoFill".

 

TOC style for the left TOC where the title of the TOC is just a blank character:

TwoTOCs-One-PageNumbersOnly-Two-NoPageNumbers-5.PNG

 

TOC style for the right TOC is simply leaving out the page numbers ("Keine Seitenzahl" with my German InDesign):

TwoTOCs-One-PageNumbersOnly-Two-NoPageNumbers-6.PNG

 

FWIW: All the page numbers are done with option: "1,2,3 …"

 

Regards,
Uwe Laubender

( ACP )

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 28, 2020 0
New Here ,
Sep 29, 2020

Copy link to clipboard

Copied

Ah yeah I think that makes the most sense, I'll try and set that up! New to GREP so it may take a mintue.. 
Thank you again for all the help! 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 29, 2020 0
Adobe Community Professional ,
Sep 29, 2020

Copy link to clipboard

Copied

Warning: Be aware, that you can get a bit into trouble if one entry in the right TOC needs two or more lines of text.

The TOC to the left will suck in all that text into one "singularity" after the page number and the entry remains in one line of text.

 

Regards,
Uwe Laubender

( ACP )

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 29, 2020 0