Turn TXT into a readable EPUB: encoding and chapter structure
Plan chapters before exporting a long text to EPUB. Diagnose garbled text, false chapter matches and navigation errors with a practical editorial checklist.
A long text is not yet a readable book
Putting text into an EPUB does not automatically give readers useful navigation. For a novel, interview collection or long set of notes, a working table of contents can matter more than a decorative cover.
Review the source first: are chapter titles on their own lines, do headings follow a consistent pattern, and should the preface and appendix appear in navigation? Clear structure makes detection easier to verify.
Fix encoding before formatting
If the source already looks garbled, whitespace cleanup and EPUB conversion carry that problem forward. Return to the original file, confirm its encoding, and make sure the text reads correctly first.
Whitespace cleanup needs judgment too. Blank lines may separate scenes, while indentation may belong to poetry, lists or code. Removing every gap can erase useful structure.
Chapter detection needs a human check
Automatic detection follows heading patterns rather than understanding the author’s intent. A sentence can resemble a chapter heading, and a real heading with different formatting can be missed.
In the chapter editor, check both the navigation title and the opening text. Pay special attention to the first chapter, short chapters and appendices before generating the book.
Judge the result in a reading app
Open the EPUB and test its contents links, paragraph breaks, punctuation and long headings. Fonts, pagination and spacing can vary between readers, so the browser preview is not a fixed layout for every device.
Keep the source text and a record of the chapter settings. Future revisions are easier to regenerate from a clear source than to reconcile across several exported copies.
A chapter map keeps the manuscript understandable
Before conversion, make a short map containing the preface, major chapters and appendix. For each entry, identify the real opening paragraph. This catches an easy-to-miss problem: a contents list near the beginning may repeat all chapter names without marking their actual locations.
Chapter levels should describe relationships. If every section is a top-level chapter, navigation can become noisy; if everything is nested under the first heading, readers may struggle to find later sections. Use the editor’s available levels deliberately and confirm the exported order.
When the source changes, treat navigation as part of the revision. A new preface shifts positions; a renamed heading can break a previously reviewed pattern. Re-run detection and check a few boundaries instead of assuming a successful first export proves every later edition is correct.
| Source feature | Editorial decision | Reader check |
|---|---|---|
| Preface | Include in navigation or keep introductory | Expected opening location |
| Chapter title | One real heading per boundary | Link opens the chapter, not a contents list |
| Short section | Choose a meaningful hierarchy | Navigation remains scannable |
| Appendix | Include when readers need reference access | Final link and reading order |
Before you finish
- Check punctuation and uncommon characters in the encoding preview.
- Preserve meaningful blank lines, verse and indentation.
- Test the first, middle and final chapter links.
- Keep a source copy and document your chapter choices for later revisions.
References
- W3C: EPUB 3.3
Background on EPUB publication structure and navigation. Reader layout and supported features vary.