Skip to main content
Inspiring
May 6, 2019
Answered

How to make auto Right Indent in TOC for long name chapters

  • May 6, 2019
  • 3 replies
  • 1087 views

Hi,

Sorry to bother you all but i need some help

I have very big chapter name and when i generate my TOC the name of the chapter no look in the way i want

Here is upload image to show the problem

How to make automatic right indent in my TOC style Heading 4.

Thank you for your help

Best regards

Nik

This topic has been closed for replies.
Correct answer vinny38

Hi

using only right indents is not enough to avoid situations like this one:

Now, I remember having discussed about this before, so I'm copy/pasting the previous answer:

The trick is to set 2 tabs as separators between entries and numbering in your TOC panel. Yes, you can!

Now all you have to do is to set your 2 tabs along with your right indentation.

For example, your column width is 100 mm. You want text to "wrap" at 10 mm from the right.

First set your right indents like this:

Then set your 2 tabulations like this:

  • first tabulation: column width - right indent = 90 mm (don't forget to add tab leaders)
  • second tabulation : column width. make sure this one is right aligned and also add tab leaders.

Result is (with justified text for better understanding):

Additional and important note: Michel [FRIdNGE]​ did spot possible situations where sometimes tabs break and mess up the layout.

He smartly suggested to apply a non-breaking style using Grep style to avoid those situations: .{5}\t\t\d+$

3 replies

hammer0909
Community Expert
Community Expert
May 7, 2019

Basically you need to apply a positive right indent and a negative last line right indent to create space on the right side of the paragraph. I think that will achieve what you're looking for.

vinny38
Legend
May 7, 2019

"Basically", yes.

But...

FRIdNGE
May 7, 2019

"French Touch! …" 

vinny38
vinny38Correct answer
Legend
May 7, 2019

Hi

using only right indents is not enough to avoid situations like this one:

Now, I remember having discussed about this before, so I'm copy/pasting the previous answer:

The trick is to set 2 tabs as separators between entries and numbering in your TOC panel. Yes, you can!

Now all you have to do is to set your 2 tabs along with your right indentation.

For example, your column width is 100 mm. You want text to "wrap" at 10 mm from the right.

First set your right indents like this:

Then set your 2 tabulations like this:

  • first tabulation: column width - right indent = 90 mm (don't forget to add tab leaders)
  • second tabulation : column width. make sure this one is right aligned and also add tab leaders.

Result is (with justified text for better understanding):

Additional and important note: Michel [FRIdNGE]​ did spot possible situations where sometimes tabs break and mess up the layout.

He smartly suggested to apply a non-breaking style using Grep style to avoid those situations: .{5}\t\t\d+$

Legend
May 6, 2019

A few adjustments to your paragraph style can fix this