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

Remove all indexing markers/hidden/special characters

Explorer ,
Dec 07, 2023 Dec 07, 2023

Hi All

Started to rebuild a new index for the next edtition of a 500 page manual

I used the existing INDEX template and found it difficult and confusing to remove all the redundant markers etc

 

This worked a treat - cleaned everything with no ghost markers to be found

 

Step 1.

  1. Open your whole book
  2. click on find/change
  3. under "find what" click on the @symbol
  4. click on markers --> then index marker
  5. leave change to: blank
  6. under search, search "all documents"
  7. Then "change all"

 

Step 2. (can you believe it?)

  1. remove unused topics
  2. from index menu check reference and book
  3. highlight (click on) any indexed topic
  4. go to top right menu and "remove unused topics"

 

Tah DAH - all index markers are deleted and your old index is clean ready to rebuild

Whew!! you're welcome 

Sean5CF1_0-1701996215896.png

 

 

All this SHOULD be an ID single click menu option. WHY?

  • For all of us who rebuild indexes for the same book/manual/document
  • requiring all old/dead/deleted (but not deleted) special or hidden characters
  • but require all styles and indexing setup to remain intact
TOPICS
Activation billing and install , Bug , EPUB , Experiment , Feature request , How to , Import and export , InCopy workflow , Performance , Print , Publish online , Scripting , Sync and storage , Type , UXP Scripting
2.0K
Translate
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

correct answers 1 Correct answer

Community Expert , Dec 08, 2023 Dec 08, 2023

You can use this one-liner to remove all index markers and all topics:

app.documents.everyItem().indexes.everyItem().topics.everyItem().remove();

 With your method you don't remove cross-references, by the way.

Translate
Community Expert ,
Dec 08, 2023 Dec 08, 2023

You can use this one-liner to remove all index markers and all topics:

app.documents.everyItem().indexes.everyItem().topics.everyItem().remove();

 With your method you don't remove cross-references, by the way.

Translate
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
Explorer ,
Jan 07, 2024 Jan 07, 2024

Thanks Peter

What you've written there makes no sense to me, but if it works for you, good!

sean

 

Translate
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 ,
Mar 12, 2025 Mar 12, 2025

This doesn't work for me in ID 2025. After deleting all of the index markers (there were only a few), each topic (there are hundreds, inherited from a previous book) still has a page icon with the letters "PN" next to it (in the References button). When you click on "Go to reference," nothing happens. When you generate the index, there are no page numbers next to the entries. But when you try to "Remove Unused Topics" from either the References or Topics button, nothing happens. Have to delete each topic one at a time.

Translate
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 ,
Mar 12, 2025 Mar 12, 2025

When you delete index markers the way Sean described (find index markers and replace with nothing) you remove the page references, not the topics. To remove topics, use that one-line script I showed. That will of course also remove any associated page references. Did you try that?

Translate
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 ,
Mar 12, 2025 Mar 12, 2025

Sorry, I have no idea how to "use a script," not being a programmer. I assumed that "Remove Unused Topics" in the Index drop-down menu was supposed to remove unused topics. I'm open to using a script, but I would need instructions for how to do it. Thanks.

Translate
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 ,
Mar 12, 2025 Mar 12, 2025
LATEST

1. Create a text file (using a plain-text editor) with just the one-liner and save it as delete-all-topics.jsx.

2. Open InDesign's Scripts panel (Window > Utilities > Scripts), right-click the User folder, select 'Open in Finder' (or Explorer). This opens the Scripts folder in your file manager.

3. Copy the jsx file to the Scripts Panel folder.

 

You'll see the script in the Scripts panel.

 

To run the script. double-click it.

Translate
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