Copy link to clipboard
Copied
I created a TOC at the end of my book as my index in order to use a paragraph style. Unfortunately I'm getting repeated copies of the same entry like I show below.
4-14K...........114
4-14K...........114
4-14K...........114
404A..............65
404A..............65
Is there a way for me to find the repeated lines and remove the copies and leave only one of them? I tried creating a GREP but could not figure it out. I would greatly appreciate you help with this.
Thank you,
Tomas
One possible solution can be found in this old blog entry from Colin Flashman: https://colecandoo.com/2012/08/30/making-picture-indexes-with-captions/
Scroll down to part 2...
Copy link to clipboard
Copied
A TOC entry is linked to one single paragraph style entity, headline 1. Do you work with paragraph styles or are you formatting manually?
Copy link to clipboard
Copied
I work with paragraph styles. All items that need to appear in the index are assigned a single paragraph style. Once I generate the list, I then run the SortParagraphs.jsx script to sort to the correct alphabetical and numerical order. Unfortunately, I end up with duplicates because I assigned repeated items the same paragraph style within the book. In the future I plan to change the paragraph style for repeated items to prevent duplicates on my generated TOC. For now, I want to avoid the fix because it takes a long time to run the SortParagraphs.jsx script and would like to remove duplicates manually or with a GREP until I have time to make the changes for future updates. It takes a very long time to run the script because I have over 5,500 items. I also want to keep the smart page number links to print as an interactive PDF.
Copy link to clipboard
Copied
One possible solution can be found in this old blog entry from Colin Flashman: https://colecandoo.com/2012/08/30/making-picture-indexes-with-captions/
Scroll down to part 2...
Copy link to clipboard
Copied
Thank you very much Peter. It was excactly what I needed. It worked great!