Using a numbered list to create chapter numbers in a TOC

This is one of those really esoteric solutions that makes sense for the two or three people who need this specific feature, but I’m writing it out hoping that others will take the concept behind the feature and apply it elsewhere.

First, here’s the problem.

I generate a TOC from the Chapter Names and the A Heads in my book. The TOC dialog box contains the controls to add tabs and numbers after the chapter name, but there’s no control to add anything before the entry.

toc-2.gif

In the past I have had to manually type “Chapter #” in front of each chapter name entry in the table of contents. It hasn’t been too difficult for 21 chapters, but it meant having to retype those manual entries if the TOC changed. Not fun.
toc-1.gif

This time I had a brilliant thought. Why not make the TOC entry a numbered list. In front of the chapter name entry, I could add the word “Chapter” and then insert the number from the numbered list as well as the tab character separating the number from the Chapter name.

toc-3.gif

With the mode set to continue from the Previous number, each chapter entry automatically gets a number which just happens to be the same as its actual chapter number.

I’m psyched about this technique and hope someone else can use it. (Hmmm, David, how’s your book doing?)

Bookmark
Please login to bookmark Close

This article was last modified on December 18, 2021

Comments (28)

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Mike Rankin
    July 18, 2024

    You could try the dotted rule technique from this post https://creativepro.com/creating-number-circles/ I’m not sure if it could be tweaked to work with double digits.

  2. July 17, 2024

    This is a great technique. I note in the options for adding special characters or numbers, that the Chapter Number is an option, but when I use that, all the numbers are “1”, so I went with the list numbering option instead.

    Currently my TOC1 style has a shaded background. Now that I have the number as well, I wanted to start that further to the left (which I did by adjusting the frame width, setting a tab on TOC1, and adjusting the left margin for all other TOC levels).

    What I would really LOVE to do now, is add a shaded circle behind the chapter number. I’m ruminating on how to do that. Any ideas?

    P.S. I realize I am not the David to whom you addressed the tail comment, but it hit me when I read that. :)

  3. Ginger Marks
    July 28, 2021

    Sandee, I don’t know what I am doing wrong, but it isn’t working for me. I am not sure what you mean by ‘A heads’ either.

    1. Mike Rankin
      July 29, 2021

      Hi Ginger- A heads refers to the top level heading within a document (like H1). Did you create a new style with the “chapter ” and numbering as shown in the last figure, and then specify it in the TOC settings to format the headings? If you do that, it should work.

  4. Jerry Kirkpatrick
    October 25, 2018

    Sandee, I’ve been spending all morning on this. I just discovered your suggestion and it works wonderfully! This goes to show that all great ideas are ultimately so simple! Now I can have lunch!!!

  5. Ali
    October 27, 2017

    Can someone help me with a problem I am having concerning adding chapter number before the numbered lists. I know how to add a chapter number but in this particular case, I want the chapter number to be fixed for example 7:1, 7:2, 7:3 in all levels and not sequential. Will appreciate any help offered. Thanks!

  6. Serge
    July 18, 2017

    Brilliant. One Thousand Thank Yous.

  7. Abigail
    March 30, 2017

    Thank you! I was looking for a solution to exactly this issue! Glad I searched before posting!

  8. Robyn
    June 24, 2014

    Hi, David!

    We met at Pepcon last week, where you worked on chapter numbering for me. I’ve been trying to implement your solution of using the Chapter Variable, rather than prefixes, as I had been doing. Unfortunately, I’ve hit a few problems, and I was hoping to run them by you.

    My project is composed of three separate books, each of which will end up containing 70 + chapters. The chapters are full of cross references to documents in the other two books. Each book will have its own table of contents.

    We would like to have pages in each book numbered chapter-page, e.g. 2-3, or 60-5.

    If you recall, I was using a prefix in the document numbering options to achieve this, but it is very inflexible; should a new chapter be inserted, or a chapter deleted without replacement, I’ll need to go through the book and manually change every single chapter’s prefix following it to keep the numbering correct.

    I’ve converted a few chapters to using chapter variables instead of prefixes in their page numbering, but I’ve run into two problems.
    -Chapter variables do not show up in the table of contents.
    -Chapter variables don’t show up in cross references.
    Am I implementing them incorrectly, or is this a limitation of chapter variables?

    1. June 24, 2014

      Robyn: This is a limitation. Drat. When we talked, I wasn’t thinking of making a TOC or x-refs. I’m going to keep thinking about this. It may be that we need a “renumber prefixes” script after all.

  9. Teri
    May 21, 2013

    Sandee – I have been trying to figure this out with no luck, until now. I’ve created a new InDesign template for a user guide, and I’m learning as I go. Getting “Chapter” to appear in the TOC entries was the one major stumbling block I couldn’t jump over to make it “just so.” Thank you so much for posting this; I’m so happy I found it. This made my afternoon! : ) I also added a character style to the numbering text, because I wanted “Chapter #” to appear in a different color than the chapter name itself. I created a different heading for the Index, so it wouldn’t be automatically numbered in the TOC. It worked perfectly.

  10. September 23, 2009

    is a web-project, which hold information about recovery operation in Canada.

  11. Traci
    September 30, 2008

    This is a little off topic, but I’m in a bind. I need to figure out a way to fix my numbering. My TOC/ numbering scheme is perfect except for a section that skips from 1 to 3. No 2 in sight. When I look at it in story editor, it also shows that it’s missing. I’ve gone to every Indesign Forum looking for help but I’m at a loss. If you could give me any hints, I would really appreciate it.

    I?m using ID3 and I?m having ID automatically generate the TOC.

    Level 1 (at C.) says continue from previous, restart numbering.(paragraph styles-bullets and numbering)
    Level 2 (at 1) says continues from previous, restart numbering. (paragraph styles-bullets and numbering)(I just right clicked on it to restart numbering and nothing changed.
    Level 3 (at a) has continue from previous, restart numbering, with a right click override to start at a.
    Level 3 (at b) has continue from previous, restart numbering.)
    Level 2 (at 3) has continue from previous, restart numbering. If I right clicked it, it says restart numbering.

    Traci

  12. Annie
    March 3, 2008

    I’m new to CS3 (and long docs) trying to layout a small magazine which will have future issues updated and completed by the editor using my template. Ads and number of pages will vary each issue. I’m exploring the TOC hoping to have pages updated automatically. I’d like to have page numbers listed first, followed by a colored vertical bar (leader) then the feature title. I’ll also have an advertisers’ index which will include the page numbers of where their ads are placed. Can anyone direct me a bit on this? I’m a little fish in a big pond here, but at least I know this is a great pond to be in:)

  13. Eugene
    August 25, 2007

    Perhaps variables need a special mention. They are new and they are awesome.

  14. August 24, 2007

    Sandee, you’re absolutely right for your book; great points. But I wanted to make sure we at least mentioned the Chapter Number variable in the discussion, as many people don’t know it exists.

  15. August 24, 2007

    Sandee, thank you for this neat idea — you’re a smart cookie!

  16. Eugene Tyson
    August 24, 2007

    Yes, you know what I was thinking. Autonumber for the chapter. Then character style for the autonumber. Then a variable in the running head to pick up the character style. But I already figured out months ago that the character style won’t be picked up as a variable if it’s an autonumber.

    By all means, I know that the Chapter No. Variable is the correct way to do it and I wasn’t insinuating otherwise.

    And the goal was to put text in before the text in the ToC, which you have done and I can’t find another way to do it. So well done, very clever.

  17. August 24, 2007

    The reason I have the chapter number variable at the front of the chapters is that I also use a chapter number variable in the running heads.
    That chapter number variable is not in its own paragraph.
    But even if I used a numbered list across documents, I still wouldn’t be able to get the word “Chapter” in the TOC entry.

  18. Eugene Tyson
    August 24, 2007

    I’m wondering why you would have a Chapter Number Variable here then? Could you not have achieved the same thing by having a Numbered List defined that carries across Chapters in the Book?

    Not that there is anything wrong with having two ways to do the same thing. I’m just curious as to why really, I’m sure you have a good reason and I’m sure there are many reasons for doing this, one being to have a variable for your running head, I suppose. I feel I have asked and answered my own question.

  19. August 24, 2007

    Eugene is correct, but even that solution wouldn’t work for me as the word “Chapter” doesn’t appear as part of the paragraph that holds the chapter number variable.

  20. Eugene Tyson
    August 24, 2007

    David’s way works well if you’re going to have:

    Chapter 1…… 1
    Getting Started…..1
    etc.

    Vector babe’s way is good if you want the ToC to look like

    Chapter 1 Getting Started…1

    I particluary like the numbering for doing Figures, Tables, Examples and other things. Throughout the body of your text you can have all these autmatically numbered, no hassle no fuss, just different paragraph styles.

  21. August 24, 2007

    OK, David. I’m actually using that chapter number variable in my chapters. Your solution is good for the chapters files. But I’m talking about the TOC.

    How do I get a single line entry in my TOC that
    ? Starts with the word “Chapter” (which never appears in the actual chapter document
    ? Then contains the number (which appears in its own paragraph style)
    ? Then contains the name of the chapter (which appears in yet another paragraph style)

    Is there a control in the TOC entry settings that will allow me to munge together three paragraph styles into a single TOC entry? If there is, I haven’t found it.

  22. August 24, 2007

    This is genius. I’m continually amazed by all the ways you come up with to make the software jump through brand new hoops. Love it.

  23. Eugene Tyson
    August 24, 2007

    This is exactly why I bought InD CS3. Numbered paragraphs are a time-saver all-round.

    Another thing, if you have numbered paragraph headings in your document there are options to include or exclude the number, the number and paragraph or not to inlcude these at all, these are settings at the bottom of the ToC Style dialogue box for this.

  24. Boyd Elliott
    August 24, 2007

    This is something I have been doing manually for years. Another top tip which allows me to update the contents without any extra work.

    This has to be the best site on the web.

  25. August 24, 2007

    Thanks,
    It’s a great tip… :o)