Skip navigation
Currently Being Moderated

Table of Contents - Page Range

Feb 6, 2012 12:38 PM

Tags: #catalog #toc #table_of_contents #indesign_cs5 #master_pages #automation #page_range #override_master_items

I am formatting a catalog in Indesign CS5 and I am trying to work out snags now before our vendors send in their files.  I have a simple template with the Product Classification and the Section at the top of each page (created as master pages, different master for each section but all based on the same master) and I want to automate a Table of Contents to include each Product classification.  I formatted each product class with the same paragraph style and when I generate the TOC, it simply lists each page number instead of a range which is what I would expect it to do.  For example:

 

Product Classification A........2

Product Classification A........3

Product Classification A........4

 

The same product class runs across multiple pages,  and because I have the paragraph style applied in the master page they show up as individual TOC entries.   I was wondering if there was a way to automate the TOC with page ranges, instead of just each instance of the paragraph style.  The only workaround I could come up with was just including the text that I want to show in TOC on a hidden layer on the first page of the page range with the correct paragraph style applied to each one and then typing the range in manually after my whole catalog is finished.  Or I could just let ID do its thing and then delete the unecessary entries when it's updated.

 

I need it to look like this:

 

Product Classification A.......2-4

Product Classification B.......5-10

 

Better yet, I need the heirarchy to look like this if possible:

 

Section

     Product Classification A.......2-4

     Product Classification B.......5-10

 

In order for items to show up in an automated TOC, they have to be overridden in the document (if they are on master pages)...so I don't think I could even automate it this last way unless I would override all master items, which would cause more harm than good in this case ( I never know when something might change).

 

Could someone offer a solution or another workaround that might be easier than just typing out the TOC and formatting it by hand?

 

Thanks in advance.

 
Replies
  • Currently Being Moderated
    Nov 9, 2012 3:14 AM   in reply to samallen3

    I'm in the same situation at the moment as well but if it helps i'm looking for a script or messing with the index to get a similar result.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 9, 2012 5:47 AM   in reply to samallen3

    The commercial InDesign Cross-References Plug-In from dtptools.com might work for you. There are some free supplementary scripts mentioned on the product page that you can request. One creates a TOC by using cross-references to extract source content that you specify. It works a lot like the built-in InDesign TOC tool, but it may be more customizable. There's a free trial. If you can't make it do what you need, often an email to their support techs will get a prompt reply (allowing for time differences between Europe and wherever you are) and some useful suggestions.

     

     

    HTH

     

     

    Regards,

     

     

    Peter

    _______________________

    Peter Gold

    KnowHow ProServices

     

    samallen3 wrote:

     

    I am formatting a catalog in Indesign CS5 and I am trying to work out snags now before our vendors send in their files.  I have a simple template with the Product Classification and the Section at the top of each page (created as master pages, different master for each section but all based on the same master) and I want to automate a Table of Contents to include each Product classification.  I formatted each product class with the same paragraph style and when I generate the TOC, it simply lists each page number instead of a range which is what I would expect it to do.  For example:

     

    Product Classification A........2

    Product Classification A........3

    Product Classification A........4

     

    The same product class runs across multiple pages,  and because I have the paragraph style applied in the master page they show up as individual TOC entries.   I was wondering if there was a way to automate the TOC with page ranges, instead of just each instance of the paragraph style.  The only workaround I could come up with was just including the text that I want to show in TOC on a hidden layer on the first page of the page range with the correct paragraph style applied to each one and then typing the range in manually after my whole catalog is finished.  Or I could just let ID do its thing and then delete the unecessary entries when it's updated.

     

    I need it to look like this:

     

    Product Classification A.......2-4

    Product Classification B.......5-10

     

    Better yet, I need the heirarchy to look like this if possible:

     

    Section

         Product Classification A.......2-4

         Product Classification B.......5-10

     

    In order for items to show up in an automated TOC, they have to be overridden in the document (if they are on master pages)...so I don't think I could even automate it this last way unless I would override all master items, which would cause more harm than good in this case ( I never know when something might change).

     

    Could someone offer a solution or another workaround that might be easier than just typing out the TOC and formatting it by hand?

     

    Thanks in advance.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 9, 2012 6:48 AM   in reply to daveTannoy

    Don't know how I missed this the first time through...

     

    Here's a script Peter Kahrel wrote for me a few years ago that consolidates all page numbers for a single topic and separates them with a comma for use in making an "index to advertisers". It will get you part way there:

     

    //Consolidate lisitngs

    //By Peter kahrel with some minor additions by Peter Spier

     

    var myFrame = app.selection[0];

    if (myFrame != null && (myFrame.constructor.name == "TextFrame" ||myFrame.parent.constructor.name == "Story")) {

     

       app.findGrepPreferences = app.changeGrepPreferences = null;

       app.findGrepPreferences.findWhat = "^(.+
    s)(Re: Table of Contents - Page Range)
    r
    1(Re: Table of Contents - Page Range
    )$";

       app.changeGrepPreferences.changeTo = "$1$2, $3";

       f = myFrame.parentStory.changeGrep ();

     

       while (f.length > 0)

        f = myFrame.parentStory.changeGrep ();

         

    } else { alert ("Select the Index Frame");  

    }

     

    I can't log in this morning, so I'm replying by email and I don't know if the script will come through intact. but if it does this would be the first step. You can then use find/change to replace the middle numbers and commas with a dash, if the numbers are continuous for each section, or you can do it manually if not.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 9, 2012 6:55 AM   in reply to daveTannoy

    As feared, the script did not make it...

     

    I'll try to come back when the forum lets me log in, or you can try searching for "index to advertisers" and my name, and an earlier thread with bot the script and more discussion may come up. This was all done for an article that appeared in ID MAG June-July 2009  if you want to purchase the back issue and get the whole story from start to finish.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 9, 2012 9:55 AM   in reply to Peter Spier

    OK, I'm logged in now, so here's the script as it should be:

     

     

    //Consolidate lisitngs
    //By Peter Kahrel with some minor additions by Peter Spier
    
    var myFrame = app.selection[0];     
         if (myFrame != null && (myFrame.constructor.name == "TextFrame" ||myFrame.parent.constructor.name == "Story")) {
         
                   app.findGrepPreferences = app.changeGrepPreferences = null;
                   app.findGrepPreferences.findWhat = "^(.+\\s)([\\d,\\s]+)\\r\\1([\\d,\\s]+)$";
                   app.changeGrepPreferences.changeTo = "$1$2, $3";
                   f = myFrame.parentStory.changeGrep ();
    
                   while (f.length > 0)
                        f = myFrame.parentStory.changeGrep ();
                        
         } else { alert ("Select the Index Frame");               
    }
    
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 12, 2012 5:19 AM   in reply to Peter Spier

    Thanks Peter I'll have a look at this to see if this is what i need

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 12, 2012 6:02 AM   in reply to daveTannoy

    It isn't exactly what you need, but it will consolidate consecutive entries into a single line.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points