is now part of CreativePro.com!

Fixing TOC Levels That Refuse to Behave

32

Faithful fan Tao J. emailed us this plea:

I am currently working on a catalogue and is getting to the last stage now, I am trying to create the Table of contents. But, I’ve already spent 2 nights on this, and I just couldn’t figure out why the level 1 entry sits under the level 2 entry. If you could have a look and figure out what’s wrong, that would be awesome!!!!

I didn’t really understand the problem until I opened up the InDesign sample page he sent along and took a look.

. . . .

This article is for members only. To continue reading, please sign in, or sign up for a membership today. Thanks for supporting CreativePro!

BECOME A MEMBER

CreativePro membership keeps you up-to-date with the technology, solutions, and resources to strengthen your professional development.

For just $6.50/month (billed annually), you’ll get access to valuable benefits, including:

  • 12 monthly issues of CreativePro Magazine, filled with practical, real-world tutorials written by experts
  • Downloadable resources including templates, fonts, scripts, design assets, cheat sheets, and more
  • Hundreds of members-only tutorial and tip articles
  • Top Tips for InDesign, Photoshop, and Illustrator ebook collection
  • Discounts on events and books
  • and more...

Sign up now!


More Resources To Long Documents

CreativePro Week is the essential HOW-TO conference for creative professionals who design, create, or edit in Adobe InDesign, Photoshop, Illustrator, Acrobat, and Microsoft PowerPoint.

Featuring over 30 expert speakers and 75 sessions and tutorials, CreativePro Week offers five days of in-depth training and inspiration, all in one place. No matter your skill level, you’ll learn techniques and best practices you can start using immediately to improve your productivity.

LEARN MORE

Members get a special discount on registration! Sign up today.

Anne-Marie “Her Geekness” Concepción is the co-founder (with David Blatner) and CEO of Creative Publishing Network, which produces InDesignSecrets, InDesign Magazine, and other resources for creative professionals. Through her cross-media design studio, Seneca Design & Training, Anne-Marie develops ebooks and trains and consults with companies who want to master the tools and workflows of digital publishing. She has authored over 20 courses on lynda.com on these topics and others. Keep up with Anne-Marie by subscribing to her ezine, HerGeekness Gazette, and contact her by email at [email protected] or on Twitter @amarie
  • Bob Levine says:

    Interesting. I wonder if that would screw up an EPUB export as well.

  • Tao Jiang says:

    A big thank you to David/A-M, you guys are awesome. And, I really didn’t expect that both David and A-M replied to my question within 12 hours.
    Tao from Aucland, New Zealand.

  • Mike Rankin says:

    Very cool. Well, cool that you figured it out.

    It does make sense since InDesign has to take those insets into account when deciding if text is actually on a page, and therefore should get that page number in a TOC. Like, if you have a text frame that sits partly on the page and partly on the pasteboard, the text won’t appear in a TOC if an inset makes it impossible for that text to appear on the page. In that context, the sensitivity to insets is very clever. But you wish you could turn it off in situations like this.

  • Tim says:

    Boy, I’ve torn my hair out a few times with situations like that. I remember a chapter opener that I had in a book that just would not come out as the first object in my TOC the way I wanted it to.

    Turns out, I had the CO boxes positioned with the entire text box indented to the right, let’s say 9 picas. But because I was running 3 columns of body text, the TOC generator thought that my #1 heads in the first text column were the first objects.

    To solve it, I positioned the CO boxes flush left on the same margin as the first column of text. Then I used a para indent in the CO style to position it to the right the way I wanted the text to look.

    What a headache.

  • Eugene Tyson says:

    Interesting problem and solution. What were the thought process in trouble shooting this problem? Do you guys have a system where you go through certain things?

    Personally – I would have taken all the text to a new document in a single text frame and then create the TOC. If it created the right way – I’d go back to the original document and see how I can start duplicating the problem.

    Basically going step by step creating the TOC until the problem occurred.

  • Interesting problem and well layout solution. It clearly demonstrates how the indentation made via Object > Text Frame Options, actually ‘kind’ of creates a ‘column(s)’ as if it was a table, messing up the cascading logic of the TOC features. I will keep that in mind for sure!
    Thanks guys!

  • Not the only thing that’s wonky with TOC entries, but that one’s a doozy!

  • David B says:

    I had the same problem and had fortunately just read this thread! Nothing like running into a problem you -fortunately- already have the answer to. Especially when it’s as cryptic as this!

    Here’s my minor variation:

    I was using a text frame for my chapter title because it was longer than the column, and I didn’t want a line break. But placing that text frame within the column’s text frame meant that the header was fractionally to the right of the rest of the text in the column. So my sub-header was being ‘found’ first for the TOC.

    Not having any indents meant that my solution was in the ‘anchored object’ options instead. With position set to ‘custom’, I was able to adjust the ‘X offset’ by half a millimeter, which was enough for the table of contents to populate correctly.

  • Kelly says:

    Thank you for posting this. I had a similar problem and would never have been able to figure it out had I not read your post.

    I had a TOC with 2 levels. The first level was a page header that was left aligned. The second level was right aligned.

    Not all of the left aligned text boxes were stretched to reach the right margin, so like the issues noted above, some of the level 2 entries were “read” before the level 1 entries (at least the ones that were not pulled out all the way to right margin.

    Re-sizing the text boxes fixed my problem.

    • Amanda says:

      Just came across this post today and it didn’t help my problem, but I re-sized the text box and it fixed it. So thanks for mentioning that.

  • Desko says:

    Great! I have this problem long ago, and few days ago again. With this advice I have it fixed. Works like a charm!
    Many thanks!

  • Marco says:

    I had a very similar problem but my text frames referred to (header and sub-header, the latter appearing on top) had the same text-indent so was scratching my head for a while.

    My solution was that the paragraph styles for the header and sub-header were in the wrong order. This might be obvious but I thought I’d share anyway.

  • JM says:

    Thanks to Kelly who said: “Not all of the left aligned text boxes were stretched to reach the right margin, so like the issues noted above, some of the level 2 entries were ?read? before the level 1 entries (at least the ones that were not pulled out all the way to right margin.

    “Re-sizing the text boxes fixed my problem.”

    I was so disappointed when I found that I did not have left inset set on my problem text frames–glad I read through the comments! Now I have a happy TOC! ^_^

  • Monica says:

    Thank you thank you THANK YOU. I was despairing that I’d be fighting with this TOC for hours or longer, but with your help, I may be done with the entire doc by lunch!

  • LeeAnn says:

    I thought this response was going to solve my problem, but it’s not fixing it. I’m wondering if it’s because I have my section headers not only in separate text boxes–but they’re actually separate “stories” where the main running text is one long story in several linked text boxes across several pages. Any help for how to get section headers to appear in the right order in this case? The first page appears properly, but then the subheads on the second page appear ABOVE the section header on the second page.

    • Jennifer says:

      LeeAnn,
      I have the exact same problem. Did you ever find a solution? I too am thinking that it has something to do with the placed InCopy stories.

    • Jennifer says:

      LeeAnn,
      I have the exact same problem. Did you ever find a solution? I too am thinking that it has something to do with the placed InCopy stories.

  • Eric says:

    Had the same problem and with this info I was able to fix it.
    Need now to change some layout, but that’s a minor problem.
    Thanks a lot !!

  • BC says:

    Don’t know if anyone is still looking at this, but here goes…

    Another variation on the theme — a TOC list (list of photos) where I’ve used separate text frames on a hidden layer to identify photographer & shortened captions for the list.

    The TOC list generates fine for all but one photographer who has the greatest # of photos. For that one the photos are listed in this page order: 106, 69, 134, 71, 156, 139, 162, 170, 172.

    The only thing I can think of is that InDesign is going through the document looking for the frames referencing this photographer’s photos first looking at the pages that come in on the Left, then Right, Left, Right… In this case the first frame on the left is on page 106, first frame on the right is 69, next on the left is 134, next on right 71, next left 156, next right 139, next left 162 and the rest fall in line since there are no more right hand pages represented.

    The frame text doesn’t have indents or other spacing. I’ve tested changing the width to be consistent, but so far that doesn’t seem to do it either.

    I’m hoping that I don’t have to resort to a manual kludge (i.e. generate the TOC to get the pages on a hidden layer, then manually add it on a printed one).

    Any ideas?

  • DN says:

    This is not a bad suggestion assuming you have text boxes that are lined up with one another, but that’s not always the case. Designers frequently put whole text boxes to the right of other text boxes for design reasons, and it won’t matter what you do with the insets in those cases. InDesign simply can’t handle it. So, what I’d like to know is: what’s the point of creating an order in the TOC pane if InDesign basically ignores it. We use the TOC creator to confirm page numbers and leave a text box with that info on the pasteboard for reference. Then we create the TOC manually using the design and styles we want. Trying to automate it has been a nightmare on anything but a simple, all-text layout.

  • enigmanomaly says:

    So glad I found this thread! Otherwise I wouldn’t have been able to figure out what was happening in my TOC. THANK YOU

  • emmanuel NTIAMOAH says:

    I cant number my prelims separately from my main body text, so the numbering starts from the first page of my document Which is not what I want

  • Luis Montoya says:

    Thanks for this post, I spent a few hours trying to fix the same issue.
    For any one trying to solve this one, here is an extra tip.
    I was trying to use the TOC to include some anchored text boxes with some rounded corners. The order on the TOC list was not the same as the order on the anchored objects in the paragraph.
    I found that rounded corners were affecting the anchor location by giving it a inset position. I made them square and they worked perfectly.

  • Guy Ivie says:

    Four years later, and this post is still saving people’s sanity! I wish I had found out that the TOC generator works R-L, and then to-bottom, a few days ago. I’d have a lot more hair!

    I’ve been searching, reading, and watching videos, trying to understand why hidden text centered at the top of the page was going into the TOC as I wanted, but coming in several lines down the list rather than as the first item. As soon as I read this post, I yelled out, “Eureka!” (Well, actually it was something a bit longer and less polite…)

    As soon as I moved the hidden text frame so that it was just slightly to the left of the visible frame below it, the TOC looked the way it should. Thanks, Ann-Marie, for once again curing my InDesign ills!

  • Guy, I’m so glad to hear that! Thank you!

  • Sharon says:

    OMG!! I have been battling the TOCs with hundreds of entries in the wrong order for years. I could never figure out why some worked and some didn’t. I have the caption frames for the TOCs on a hidden layer and paid no attention to left alignment of these frames. That’s all it took to fix the problem – fix the left alignment of these frames. Thank you so much.

  • Marie says:

    THANK YOU SO MUCH! I have been fighting with this issue for months! Finding this article made my day!!!

    Thanks again!

  • I had a similar problem and I would have never been able to fix it myself!! Thanks a lot!! :D

  • Spencer Hart says:

    Late to the party here I guess! This article helped me work out why my TOC was ordering headings by how far left they appeared on the page itself. I dragged my text frames around to check and hey presto, different TOC ordering each time.
    So my question. In simple terms, I have a main heading at the top of the page, and many of my subheadings appear in ‘fly outs’ that sneak into the left margins, hence further to the edge of the page than the main headings. Paragraph indents don’t help me here – the text is still further left than any other text on the page.
    Any ideas? Thanks InDesign gods.

  • Belinda says:

    OMG thank you for fixing my TOC issue! (7 years later and we still need this article)

  • DBLjan says:

    I dont really get the problem (not a member), but I was struggeling with my TOC too.
    Everything was fine, then I rearranged my doc, and put all tables in a single textbox which wraps around pages. But somehow a whole table woulndt show up again in my toc.

    Solution was to throw in a different paragraph-style between this two tables. Odd, but it worked.

  • >