Reply To: TOC and multiple identical entries

Home Page / Forums / General InDesign Topics (CLOSED) / TOC and multiple identical entries / Reply To: TOC and multiple identical entries

#84659
Ari Singer
Member

You can leave everything the way you want and use the following cleanup FindChangeList.txt script support to clean up the file in one fell swoop.

If you’re not familiar with FindChangebyList check it this article, it’s very simple.

Just replace the default FindChanngelist text support file contents with the following lines:


grep	{findWhat:"(?s)(bd{8,}b)(.+?)(d{1,3})(.+?)(1(.+?)(d{1,3})(.+?))+"}	{changeTo: "", appliedFont:"Times New Roman", fontStyle:"Italic"}	{searchBackwards:false, includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, kanaSensitive:true, widthSensitive:true} //Find duplicates and apply temporary formatting

grep	{findWhat:"(d{1,3})(r)", appliedFont:"Times New Roman", fontStyle:"Italic"}	{changeTo: "$1,"}	{searchBackwards:false, includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, kanaSensitive:true, widthSensitive:true} //Delete returns & add commas

grep	{findWhat:"(?<=,)(d{8,}).+?(?=d)", appliedFont:"Times New Roman", fontStyle:"Italic"}	{changeTo: ""}	{searchBackwards:false, includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, kanaSensitive:true, widthSensitive:true} //Delete all unnecessary characters

grep	{findWhat:",$", appliedFont:"Times New Roman", fontStyle:"Italic"}	{changeTo: ""}	{searchBackwards:false, includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, kanaSensitive:true, widthSensitive:true} //Delete last comma  

What this basically does is find any instances of duplicate entries, apply a temporary font (Times New Roman, Italic), then find any text with said formatting and delete any returns and replace with commas. Then delete all unnecessary text and delete the last comma.

Just Note: When the script is done, there will be local Times New Roman formatting on all the fixed instances so make sure to select all text and press on the Clear Overrides in Selection button on the bottom of the paragraph styles panel.

This article was last modified on May 8, 2016

Comments (0)

Loading comments...