Skip to main content
redi_tom2014
Participant
July 26, 2024
Answered

Hiding the second line tab leader using GREP

  • July 26, 2024
  • 1 reply
  • 397 views

I have a layout that a client supplied to me that uses a leader of a period followed by a space. This all works great on the sample they sent me but some of the text requires a second line so I need to use a tab after the soft return which also has the same leader which I do not want. Is there a way to make the period invisible after the soft return and up to the first letter or digit using GREP?

This topic has been closed for replies.
Correct answer James Gifford—NitroPress

Oh, I see, you want all the following text to be flush right. Yes, that's a slightly more complex trick.

 

I am not sure it can be done with a single paragraph style — a best-case solution would be to use one style for the first line and one for any further indented lines.

 

I don't think GREP can find leader dots (they sort of "don't exist" in the text flow). However this seems to work:

  • Character Style NUNNY — set text color to None.
  • GREP Style search for \n\t

 

Any soft-return/tab combo is set to no text color, or invisible. That's pretty wonky, except for print and PDF export, so no guarantees in any other usage. The tab and the leader dots would still exist, which might cause other odd problems (as with TOCs, cascading formatting, etc.)

 

I can't help but think there's a better solution; perhaps someone else has a more fundamental way to get this text arrangement without the fix-up.

1 reply

James Gifford—NitroPress
Legend
July 26, 2024

This sounds as if you are not fully using InDesign's indent capabilities. If you want a first line at, say, the left margin, and all other lines indented, the method is to set the overall left indent (at say, 1/2 inch) and then outdent — negatively indent — the first line by giving it a -1/2 inch 'indent.'

 

With that, a tab on the first line with the defined leader does not need to be repeated on additional lines.

redi_tom2014
Participant
July 26, 2024

I don't quite get what you are saying. I mean, I understand everything you are saying about indents but do understand what changes the left indent would have on the leader. Maybe I didn't explain my use very well, example attached.

James Gifford—NitroPress
Legend
July 26, 2024

Oh, I see, you want all the following text to be flush right. Yes, that's a slightly more complex trick.

 

I am not sure it can be done with a single paragraph style — a best-case solution would be to use one style for the first line and one for any further indented lines.

 

I don't think GREP can find leader dots (they sort of "don't exist" in the text flow). However this seems to work:

  • Character Style NUNNY — set text color to None.
  • GREP Style search for \n\t

 

Any soft-return/tab combo is set to no text color, or invisible. That's pretty wonky, except for print and PDF export, so no guarantees in any other usage. The tab and the leader dots would still exist, which might cause other odd problems (as with TOCs, cascading formatting, etc.)

 

I can't help but think there's a better solution; perhaps someone else has a more fundamental way to get this text arrangement without the fix-up.