• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

InDesign TOC Run-in - Using one line

Community Beginner ,
Jan 27, 2022 Jan 27, 2022

Copy link to clipboard

Copied

I am creating an index at the back of the brochure based upon Product Numbers. There are two product numbers per product. In the image below it is one product per line. 

 

Ideally I need the first product number, then a tab, then the next product number, then a page number -- All on the one line. 

 

This is my data -> 

ADOBE - Sample Data for Contents.JPG

 

This is the desired way I'd like it displayed -->  

ADOBE - Desired outcome.JPG

 

I required the two product codes to stay grouped together, as it would be good if the entire index was in alphabetical order. 

 

My first product codes have one paragraph style assigned, the second have another assigned. 

 

Any help greatly appreciated! 

TOPICS
How to

Views

133

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
community guidelines
Community Expert ,
Jan 27, 2022 Jan 27, 2022

Copy link to clipboard

Copied

I assume the original data in a table, hence the two paragraph styles. 

You could collect the two product numbers and just the page number on the second one with a TOC Style.

     ORFT3S-XXX 

     004519-XX   <tab> PageNum

Clean up with a Find/Change.

 

David Creamer: Community Expert (ACI and ACE 1995-2023)

Votes

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
community guidelines
Community Expert ,
Jan 28, 2022 Jan 28, 2022

Copy link to clipboard

Copied

Hi @LSY86:

 

I agree with Dave's approach. I would set this up as a TOC and not an index—it will take less time and effort.

 

Taking it a bit further, call both paragraph styles into the TOC—and check the Sort Entries in Alphabetical Order checkbox.

 

That will produce the list similar to this (but I typed it in your order and not alphabetical). Set the two necessary tab stops.

1.png

 

GREP is not my strength, but this works, according to what you have shared with us. 

2.png

 

Change All.

3.png

 

Result. 

4.png

 

Once working, save the query because you will need to run it after each TOC update. 

 

~Barb

Votes

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
community guidelines
Community Beginner ,
Jan 30, 2022 Jan 30, 2022

Copy link to clipboard

Copied

Thank you so much for your response. Unfortunately I see now the data isn't quite represenative of the entire table. The XXX or XX don't appear on data further down.

Votes

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
community guidelines
Community Expert ,
Jan 30, 2022 Jan 30, 2022

Copy link to clipboard

Copied

Hi @LSY86:

 

As I said in my post, "...this works, according to what you have shared with us." We can work with what you choose to share. 

 

  ~Barb

Votes

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
community guidelines
Community Beginner ,
Jan 30, 2022 Jan 30, 2022

Copy link to clipboard

Copied

Thanks Barb - Do you have any further suggestions? For example, here is another sample of the data. Thanks adobe-forum-sample-data.JPG

 

 

Votes

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
community guidelines
Community Expert ,
Jan 30, 2022 Jan 30, 2022

Copy link to clipboard

Copied

LATEST

Same principle but you need to put something distinctive at the end of the first paragraph style so you can distinguish it when doing the find/change. Search for with GREP so you can replace the actual paragraph style content and remove the special characters and any digits before the paragraph return. 

image.png

You would search for "P60113@@4^p" and replace it with "P60113^t".

Let us know if you need the actual GREP F/C query.

David Creamer: Community Expert (ACI and ACE 1995-2023)

Votes

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
community guidelines