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

Index - page number OR page range

Engaged ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

Hello.

 

I created my (first) index in a book. Everything works properly but in the word list, the page numbers all appear comma separated. But those which are continuous I want to have as a range, separated (from - to) by a hyphen:

 

Theme 1 ....... 1,4,10

Theme 2 ....... 1-4,6

Theme 3 .......5-6,10-20,25

 

Is it a unfulfillable wish of mine?

 

Greets!

 

TOPICS
Print , Type

Views

3.0K

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
Advocate ,
Nov 13, 2019 Nov 13, 2019

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
New Here ,
Jan 01, 2021 Jan 01, 2021

Copy link to clipboard

Copied

Thank you for providing a link to this script. It works, but does not retain the character style applied to the page numbers in the index. How can that be fixed?

– Peter

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
New Here ,
Aug 05, 2021 Aug 05, 2021

Copy link to clipboard

Copied

Hello Mario,
I would like to use your script but when I do I get this error:
JavaScript Error!
Error Number 25

Error String: Expected: ;

Engine: main

Line 29

Source: Das Folgende Skript macht f. und ff. an Seitenfolgen dran:
Offending text: folgende
I am using Indesign on a PC (Version 16.3)
Is this a compatibility issue? Thank you 
Paul Kimball

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
New Here ,
Aug 05, 2021 Aug 05, 2021

Copy link to clipboard

Copied

Sorry, I copied too much of the text. It works fine! Thank you for this script. It saves much time. I had to manually redo this ten times on a previous index.

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 ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

It's not unfulfillable, per se, but it will demand considerable, remedial effort on your part.

 

There are two ways to handle this:

 

1. To go through your index entries, identify the ones you want to set with a range, and manually identify which index entries you've already made identify the start of a range of pages in your Index panel. This is the only practical way to edit index entries you've already made. Double-click on the entry to open the Page Reference Options panel, then go to the Type: options box and change from the default Current Page reference to the For Next # of Pages option. This opens the Number: edit box below, which lets you ener the number of pages in the range of pages you want to describe, including the page of the index entry. Using your "Theme 3" example, to define the range of "10-20" means that you would have to enter 11 in the Number: edit box, as shown in the second illustration below.

 

1.jpg

This will allow to identify a range of pages in the relevant InDesign document. Not the book. If you used InDesign's book functions to string together smaller InDesign documents, your page range references cannot be strung across them. For the InDesign document example I used below, the reference was for page 5 of a 256-page book. It doesn't matter if reference should cover the range between pages 5-14; since this document is only six pages it stopped the page range at pages 5-6.

 

2.jpg

Which leads us to ...

 

2. Edit the placed index manually, as you did in the example above. When you have index entries defined as 10,11,12,13,14,15,16.17,18,19,20

you will need to highlight

,11,12,13,14,15,16,17,18,19,

and replace it with

-

 

Ideally, the index and table of contents will be the last thing you do before you reproduce the book. So the good news is that, ideally, you should only need to do this once per book. These aren't the best solutions, but they are the best ones I can provide for you.

 

Hope this helps,

 

Randy

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
Engaged ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

Thank you Randy.

 

The catalogues I make periodically have more then 300 pages and over 15 chapters (separate documents). I am searching for an InDesign-tool which has that function. I could make a script by myself if I would need, but I want to avoid it. Heard about the Index-tool and thought it was capable to do what I want. 😉

There are some things in ID that could work better (tables for ex. or the index). Maybe in version CC2030...

 

Regards

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 ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

I wouldn't sell InDesign's index capabilities short. I use them often in book production, and they work extraordinarily well. There's always room for improvement, of course. I don't work for Adobe, but I know that they're always looking for ways to make the program better.

 

I think you've got some valid suggestions. You can submit feature requests at the following link, and put your ideas on Adobe's task list for future consideration. Just submit a request here:

 

Adobe Feature Request Form

 

Hope the day is tereating you well,

 

Randy

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
Engaged ,
Nov 16, 2019 Nov 16, 2019

Copy link to clipboard

Copied

Good idea.

🙂

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 ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

Hallo cmoke73,

offenbar möchtest Du direkt benachbarte Seitenzahlen wie die 5,6 im Ausdruck 5,6,10-20,25 nicht mit einem Bindestrich versehen. Dafür braucht's dann ein Skript, dass dies berücksichtigen kann. Schau Dich mal auf Marc Autret's Indiscripts-Seite um. Ah, hab's gefunden, da müsste alles drin sein, was Du brauchst:

 

Page Range Formatter
By Marc Autret, October 15, 2013

http://www.indiscripts.com/post/2013/10/page-range-formatter

 

Gruß,
Uwe Laubender

( ACP )

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
Engaged ,
Nov 13, 2019 Nov 13, 2019

Copy link to clipboard

Copied

Hi Uwe.

Nee, eigentlich nicht. Das war ein Versehen. Sollte schon alle fortlaufenden Seitenzahlen mit einem Bindestrich versehen.

Die Sache ist, ich habe keinen Bock mehr, ehrlich gesagt, Defizite in der InDesign-Programmierung mit einem Script zu lösen. Das wäre im Grunde genommen ein elementarer Bestandteil des Index. Zumindest optional einstellbar.

Werde aber dann wohl nicht um einen Script herum kommen.

 

Danke Dir.

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 ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

> ... to solve deficits in InDesign programming ...

 

But this feature is already in there!

Proper indexing includes making a difference between a mere mention on page 5 and one on page 6, and a longer story that starts on page 5 and continues on page 6. Both types can be marked in the Index tool.

 

That said: 🙂 Marc's script ought to do exactly what you ask here, based on your existing index.

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
Engaged ,
Nov 14, 2019 Nov 14, 2019

Copy link to clipboard

Copied

Hi Jongware

 

I didn´t say Mark´s script doesn´t help. 🙂

I've meant, I would prefer not to need to use a script, but work with the tool "index", that should have that function.

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 ,
Aug 05, 2021 Aug 05, 2021

Copy link to clipboard

Copied

LATEST

Hi together,

also see into Marc Autret's:

 

Page Range Formatter
Marc Autret, October 15, 2013

https://www.indiscripts.com/post/2013/10/page-range-formatter

 

Note: It takes an array of page numbers as main input.

Not selected text like Martin Fischer's groupSequentiellNum.jsx that Mario linked to above.

 

So Marc's script is more a script for script writers with:

function formatPgRanges(numbers,separator,joiner,minWidth,tolerance)

 

This code was the result of a discussion that can be found ( again ) in the forum:

 

chronological order number needs in index numbers to be changed as ndash
sandy_88, Sep 15, 2010

https://community.adobe.com/t5/indesign/chronological-order-number-needs-in-index-numbers-to-be-chan...

 

Regards,
Uwe Laubender

( ACP )

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