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

Index - any scripts to automate tagging?

Community Beginner ,
Feb 27, 2024 Feb 27, 2024

Copy link to clipboard

Copied

Hi all,

I've been working on indexing several documents, and am trying to find out if there are any scripts or other methods out there to automate the process. It would be so much easier if you could give InDesign a full list of terms and it will automatically tag them for the index, rather than finding and tagging each manually.

I did find a few scripts but they seem to be for much older versions.

I don't know anything about creating scripts myself.

Any leads/advice welcome! thanks!

TOPICS
Scripting

Views

205

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

correct answers 1 Correct answer

Community Expert , Feb 27, 2024 Feb 27, 2024

This eschews the normal index feature, but will generate an index from a word list

 

https://creativepro.com/files/kahrel/indesign/index_from_wordlist.html

Votes

Translate

Translate
Community Expert ,
Feb 27, 2024 Feb 27, 2024

Copy link to clipboard

Copied

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 ,
Feb 27, 2024 Feb 27, 2024

Copy link to clipboard

Copied

so, from the sounds of it, there's no simple solution?
Or, you can add the terms, but still have to run the "add all" for each term separately?

Note that I need to work with the InDesign index generator so that all the links and such will work for ebooks/ehanced PDF.

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 ,
Feb 27, 2024 Feb 27, 2024

Copy link to clipboard

Copied

Do you work on Mac or a PC? 

 

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 ,
Feb 27, 2024 Feb 27, 2024

Copy link to clipboard

Copied

This eschews the normal index feature, but will generate an index from a word list

 

https://creativepro.com/files/kahrel/indesign/index_from_wordlist.html

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 ,
Feb 27, 2024 Feb 27, 2024

Copy link to clipboard

Copied

Yes, I've seen this.
Again, I need to make sure the index terms are properly linked to the terms throughout the document, so this wouldn't work.

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 ,
Feb 27, 2024 Feb 27, 2024

Copy link to clipboard

Copied

@brianp311, @P28476046v7uw 

 

But @Peter Kahrel's script is adding topics and references using built-in Index mechanism?

 

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 ,
Feb 27, 2024 Feb 27, 2024

Copy link to clipboard

Copied

No it doesn't. 

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 ,
Feb 28, 2024 Feb 28, 2024

Copy link to clipboard

Copied

quote

No it doesn't. 


By @brianp311

 

I'm sorry, but have you seen the code? 

 

Or my understanding of JavaScript is so bad?

 

... 

new_topic = docs[i].indexes[0].topics.add (word_list[j]);

... 

new_topic.pageReferences.add (found[k], PageReferenceType.currentPage);

... 

 

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 ,
Feb 28, 2024 Feb 28, 2024

Copy link to clipboard

Copied

LATEST

Ah, had been a while since I actually used it. I thought it eschewed it. Or I may be thinking of another one of his. My bad.

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 ,
Feb 27, 2024 Feb 27, 2024

Copy link to clipboard

Copied

I tried out the script, and it does indeed work! Yay!
Unfortunately it wipes out any exisitng index tagging so won't work on this particular project, but will on any that I'm starting an index from scratch.

So, solved! Thanks a bunch

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 ,
Feb 28, 2024 Feb 28, 2024

Copy link to clipboard

Copied

@P28476046v7uw

 

You need to change to "false" this:

 

// Replace index?

 var replace_index = true ;

 

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