Skip to main content
aanavaras
Inspiring
June 17, 2013
Question

Index markers misplaced

  • June 17, 2013
  • 1 reply
  • 2430 views

Hi All,

I have a strange issue..."Index markers are misplaced"...please help me on this.

My need is to find keywords  with a specific ParagraphStyle and to add index for it.

So, i wrote script to findGrep the specified pStyle, loop through them and added index topic.

But unfortunately, index markers are not placed at the founded text (places somewhere else)

please help me to solve this issue.

Thanks

SaRaVaNaN.N

This topic has been closed for replies.

1 reply

Legend
June 17, 2013

Hello,

Try adding the index markers in reverse order.

There is a free script here, that might do what you want.

http://www.kerntiff.co.uk/products-4-indesign/indexers-corner/kps-index-utilities/quickindex

P.

aanavaras
aanavarasAuthor
Inspiring
June 22, 2013

Hi Pickory,

Thanks for your responce and the Link.

While i face this at the first time, i changed to reverse order, but it doesn't became a solution for me.

I have tested with the Script provided from given Link and the issue is still exists.

Below is my Script:

    var myDoc = app.activeDocument;

    app.findGrepPreferences.appliedParagraphStyle = "H2";

    app.findGrepPreferences.findWhat  = "^.+\\([A-Z]\\)$";     // REGEX TO MATCH THE EXACT INDEX ENTRY

    var myFinds = myDoc.findGrep();

    for (i=myFinds.length-1; i>=0; i--)

    {

        var myTxt = myFinds.contents;

        var myTopic = myDoc.indexes[0].topics.add(myTxt).pageReferences.add(myFinds);

    }

    alert("Index Generated Successfully.!");

Community Expert
June 24, 2013

Hello,

I am Mac 10.6.8, ID 6.

There does seem to be a fix here.

http://www.hilfdirselbst.ch/foren/Script_f%FCr_Index_in_InDesign_CS5_P449901.html

edit

That trick works for up to two tables. You could put it a loop.

P.


Thanks, Pickory!
I had vague memories about this post on hilfdirselbst.ch.

Uwe