InDesign Hack | TOC Tutorial 2
Creating TOCs from Multi-Line Headings

A common design for chapter and section headings has a smaller (or differently formatted) 1st line with larger text on the next line. But when the TOC is made, we want both lines to appear as one continuous entry.

Here's our InDesign Hack that makes it easy and quick to get the TOC you want.

1. Basic TOC Style

Because we're creating a TOC (table of contents), we must use Paragraph Styles in our InDesign layout to format (and, therefore, identify) which headings will be picked up by the TOC utility.

Download our demo INDD / IDML files as well as an accessible PDF sample. Examine the INDD layout file's paragraph styles and the TOC style to see how the features and settings work together to create the final TOC structure and appearance.

An alternate method with auto-numbered headings is detailed in the TOC-3 tutorial.

This tutorial assumes you know how to make a basic TOC with InDesign's utility:

  1. Layout menu | Table of Contents Styles creates the style (a.k.a. recipe or script) that defines which paragraph styles to pick up and how to format them.
  2. Layout menu | Table of Contents lets you choose which TOC style to use and generate the actual TOC.

Caption: InDesign's TOC utilities.

InDesign's Layout menu contains the TOC utilities at the bottom.

2. Create the Headings' Paragraph Style

Our sample document uses one paragraph style to format both lines of our section headings. A manual forced line break (Shift+Enter) wraps the second part to a new line. And a nested character style automatically formats the first line in a small font.

View our sample INDD and PDF for some design variations.

Note: The entire phrase "Chapter 1 All About Apples" is one paragraph that should be tagged as <H2> in the final PDF.

Caption: Our sample's design for section headings.

Sample shows the appearance of the 2-line section heading for <H2>.

3. Create the TOC Style

Select the Paragraph styles that will be picked up to generate the TOC and set their formatting below.

Note: Check the option to Remove Forced Line Break in the lower left. This will create a one-line entry in the TOC, rather than two.

Caption: InDesign's TOC dialogue for creating the TOC style (a.k.a. recipe or script).

Settings of InDesign's table of contents style for our sample. Note the option to remove the forced line break.

4. Generate the TOC

Caption: The final TOC in the InDesign layout.

The final design of InDesign's TOC.

5. Examine the Accessible Tagged PDF

Note: Per the PDF/UA specification, TOC entries underneath the section headings should be in sub-<TOC>/<TOCI> tags nested inside their parent <TOCI>. At this time (Nov. 2021), Adobe InDesign does not create the nested structure so make this minor correction to the PDF in Acrobat.

<TOC>

<TOCI> Chapter 1

<TOC> the nested sub-<TOC>

<TOCI> Macintosh

InDesign does create the correct tags for accessible hyperlinks, so let them be:

<TOCI> Macintosh

<Reference>

<Link>

Link - OBJR

Macintosh

. . .

2

Caption: The tag tree in Adobe Acrobat Pro.

The final PDF in Adobe Acrobat shows the complex nested tags in the tags panel.

Untitled Document

Logo, Pub Com dot com.

Learn to fish. Save money. Time. Hassle.

Our services help you maximize your technology, streamline your workflow, and seamlessly build accessibility into your digital publications. Our mission is to train and coach you so well that you no longer need us or outside remediation services.

By teaching you how to fish — and make accessible PDFs right out of the box — we hope to work ourselves out of our jobs!

PubCom has a full suite of courses on accessibility topics, as well as traditional desktop publishing, digital media, and website development. We started offering accessibility training to the federal government in 2001 right after Section 508 and WCAG 1.0 went into effect in the US. That was 23+ years ago and we haven't stopped yet!

The takeaway: we know publishing, from editorial to design to distribution (print and digital) — and we're accessibility experts (Bevi Chagnon is a delegate to the ISO committee for PDF accessibility that creates the PDF/UA standard). We share our knowledge and help you learn to fish. Our little fisherman keeps us on our goal.

Sketch: Our fisherman has learned to fish and is now inclusive and accessible.

""Drop us a line and let us know how we can help.

 

Untitled Document

Logo, Pub Com dot com.

Learn to fish. Save money. Time. Hassle.

Our services help you maximize your technology, streamline your workflow, and seamlessly build accessibility into your digital publications. Our mission is to train and coach you so well that you no longer need us or outside remediation services.

By teaching you how to fish — and make accessible PDFs right out of the box — we hope to work ourselves out of our jobs!

PubCom has a full suite of courses on accessibility topics, as well as traditional desktop publishing, digital media, and website development. We started offering accessibility training to the federal government in 2001 right after Section 508 and WCAG 1.0 went into effect in the US. That was 23+ years ago and we haven't stopped yet!

The takeaway: we know publishing, from editorial to design to distribution (print and digital) — and we're accessibility experts (Bevi Chagnon is a delegate to the ISO committee for PDF accessibility that creates the PDF/UA standard). We share our knowledge and help you learn to fish. Our little fisherman keeps us on our goal.

Sketch: Our fisherman has learned to fish and is now inclusive and accessible.

""Drop us a line and let us know how we can help.