InDesign Hack | TOC Tutorial 3
Creating TOCs from Auto-Numbered Multi-Line Headings

This tutorial is a variation of the preceding TOC-2 tutorial so be sure to review it before continuing with this one.

This variation uses InDesign's auto-numbering utility to create the text "Chapter X".

If you create long, technical documents with many chapters, this method helps keep your chapters correctly numbered as they are added, deleted, or moved.

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 for this variation with 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.

Review the basic steps in the preceding tutorial, TOC-2.

Create the Heading's Paragraph Style

Just like the previous tutorial, this variation 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.

But this variation uses InDesign's numbering utility to automatically generate and format the "Chapter 1" text. View our sample INDD and PDF for details.

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

Caption: A sample of the formatted heading.

The auto-generated text includes "Chapter" and its number. End the 1st line with a manual forced line-break.

 

Caption: The Paragraph Style's settings use the Numbering utility to create the "Chapter 1" text. Be sure to set the Export Tagging to <H2> and not Automatic in order to produce the <H2> tag in the PDF rather than a List <L>.

Settings for the Heading 2 Paragraph Style uses the numbering utility. Note the detailed settings that are shown.

Details of the style's numbering settings: Chapter. Followed by a spacebar. Followed by ^ # with generates the automatic number. Followed by ^ >, which adds an en-space at the end.

Caption: A small tweak to the paragraph style's settings corrects the vertical leading in the 1st line so that it aligns at the top of the frame without a gap of white space.

Nested Style formats the manual forced line-break to correct its leading alignment.

Complete the TOC

Follow the previous tutorial's instructions to create the TOC Style and generate the actual TOC.

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.