Building an EPUB Table of Contents: Where Chapter Titles Actually Come From

Chapter sources feed matching entries into a visible contents page

The chapter titles in an EPUB's table of contents are copied from the headings in your manuscript. You do not edit the contents page to rename a chapter; you edit the heading, and the contents follow. So when a chapter is missing from the contents, or a chapter name is not what you expected, the place to look is the manuscript, not the contents.

This article covers where chapter titles come from, what decides the chapter boundaries, and how to separate chapters that belong in the contents from those that do not. The internal structure of the contents file, and the editorial judgement about excluding a preface, are covered separately.

A table of contents is a list of names and destinations

An eBook's table of contents plays the same role as a printed one, but it is produced differently. In print, a person builds it at the end of typesetting. In an eBook it is a list of chapter names paired with destinations; the reader taps a line and lands in the body.

Which means building a table of contents is really deciding where each chapter starts and ends, and what to call it. Settle those two and the contents can be generated mechanically.

Doing it by hand

Assembling by hand means writing the contents page yourself: listing chapter names and, next to each, the destination in the body. Ten chapters means ten lines, each with its own destination.

When a converter builds a contents page from manuscript headings, check which heading levels it reads and how it decides where a chapter ends. Those rules differ by tool; without checking them, a break can land somewhere you did not intend.

By hand, every new chapter stops you

The time sink is not the first build. It is every later change.

Adding a chapter is not one new line in the contents. You create the page, write the destination, and check that the destinations of later chapters have not shifted. Reorder two chapters and both the contents and the body order have to be brought back into agreement.

The same goes for renaming. Fix the heading in the body, forget the contents, and you ship a book whose contents and body disagree about a chapter's name. Readers use the contents to form expectations, so that mismatch is conspicuous.

Chapter boundaries are the third trap. If all chapters live in one file, something has to tell the software where they divide. Let it infer breaks from blank lines and the blank lines you inserted for dramatic pacing become chapter breaks too.

In rune Studio, headings and page breaks decide the contents

rune Studio takes chapter titles from the headings in your manuscript and uses the order in which you selected the files as the book's order. To split a single file into several chapters, insert a page-break mark where the division belongs.

I verified this by driving the development build from the command line. With one file beginning with a chapter-one heading and another beginning with a chapter-two heading, the exported contents listed exactly those two, each linking into the body. Inspecting the manuscript confirmed the heading was recognised on the first line.

To change a chapter name, you edit the heading text in the manuscript. There is no separate contents-editing task.

Chapters can be kept out of the contents

Some sections do not belong in the contents: a title leaf, a short interlude between chapters, an afterword.

rune Studio lets you choose, per chapter, whether it appears in the contents. Excluding the third chapter and exporting removed it from the contents list while leaving its page in the reading order. Removing a chapter from the contents does not remove it from the book.

Heading depth can be limited

When a manuscript mixes several heading levels, the contents can grow unwieldy. rune Studio has a setting for how deep a heading level appears in the contents; reading the settings out showed it defaulting to the deepest level. For a long non-fiction title, reducing it makes the contents far easier to scan.

Who this suits, and who is fine without it

It suits books with many chapters, and writers who reorder as they go. Collecting a serial, or adding chapters while drafting, is exactly where not having to hand-edit the contents pays off.

With two or three chapters and no plans to change them, hand-writing is fine. Few lines means few chances to disagree, and it can be quicker than learning a converter's quirks.

Scope note: what was verified is that the contents are built correctly inside the EPUB file. Whether every reading app displays them identically was not tested.

Summary

For a first step, read your headings from top to bottom and ask whether that list alone would tell a reader what the book contains. Any heading that fails is the one place worth editing.

See the current product scope on the Rune Studio product page.