0 Replies Latest reply on Mar 15, 2010 4:18 AM by jain_rakesh11

    Format page numbers while Generating Index

    jain_rakesh11

      We are using JavaScript for creating index markers in Indesign CS3. We have a requirement that some of the page numbers should be in bold depending upon some business logic. For example, in following generated indexes, page numbers 119, 118 and 131 are to be in bold.

       

       

      Index

       

      First Source Safety and Health, Inc.  1, 115, 119, 130, 156

      Abell,Kevin  28, 111, 118, 134

      Abraham,C. J.  2, 108, 114, 123, 125, 131

       

      The following command creates the page reference:

      index.pageReferences.add(found[f], PageReferenceType.currentPage);

       

      ExtendScript Toolkit help for pageReferences.add gives a property pageNumberStyleOverride to override style for page number. We are unable to use it for our requirements. Is there any example script for this option?

       

      We created a character style and used it in javascript as follows:

      index.pageReferences.add(found[f], PageReferenceType.currentPage, myCharacterStyle.capitalization);

       

      It does not give any error on javascript console. But, when we generate indexes; the character style sheet is not applied.

       

      Can anyone help?

       

       

      Thanks,

      Rakesh Jain