Skip to main content
Inspiring
February 11, 2010
Answered

index problem

  • February 11, 2010
  • 2 replies
  • 517 views

Posting on the scripting forum because InDesign CS4 doesn't seem to be able to do this out of the box.

Need to have an index with listings, for example:

ANIMALS

  cats 3

  dogs  6

  penguins  4

  see also zebras

The problem is with the 'see also' listing. InDesign keeps putting it in the wrong place, and doesn't seem to be able to add it as a level 2 index entry.

Can any of you gurus suggest a workaround?

This topic has been closed for replies.
Correct answer Peter Kahrel

Sorry Jay, that should have been this (forgot about the z):

^z(_see( also)?_.+?)[\s\d]+$

To add italics to _see_ and _see also_, do this:

Find what: _([^_]+)_

Change to: $1

(and set italics in the "Change format" pane.

Peter

2 replies

Peter Kahrel
Community Expert
Peter KahrelCommunity ExpertCorrect answer
Community Expert
February 15, 2010

Sorry Jay, that should have been this (forgot about the z):

^z(_see( also)?_.+?)[\s\d]+$

To add italics to _see_ and _see also_, do this:

Find what: _([^_]+)_

Change to: $1

(and set italics in the "Change format" pane.

Peter

Inspiring
February 15, 2010

Peter,

Thank you so much for your solution and for taking the time to help. This time it is working perfectly.

Peter Kahrel
Community Expert
Community Expert
February 11, 2010

What you can do is rather than real cross-references, create sub-topics and call them "z_see_ abc" and "z_see also_ xyz". They're then generated as separate level-2 entries with a page number. The "z" in "z_see_ abc" ensures that they're sorted after the subtopics. The underscores are just a way to find "see" and "see also" so that you can apply a character style to them. The page numbers can be removed with this Grep:

Find: (^_see( also)?_.+?)[\s\d]+$

Change to: $1

but do this before adding the character styles.

Peter

Inspiring
February 15, 2010

Peter,

I very much appreciate your suggestion. It seems like it should work -- what am I doing wrong?

I get the following message:

The sample index looks like this:

The Find/Change looks like this: