E-book Export: Second Stage
E-book Export: Second Stage records the continuation of the work documented in E-book Export: A. M. A. Ayrookuzhiel, covering the next stage of planning and production for the EPUB edition of Essays on Dalits, Religion and Liberation II (EDRL II).
The purpose of this stage is to establish the EPUB’s structure, reading experience, technical organisation and quality-control process before making further changes to the production files. It is a working record. A proposal recorded here is not evidence that the corresponding source change, build or verification has already taken place.
The existing paperback production process remains separately documented in Print Book Production. The EPUB must be designed and tested as an electronic publication, not treated as a screen version of the print PDF.
Relationship with the first-stage export
The first-stage document records the original export plan, the selected nine essays, the existing production files, metadata, front matter, foreword, workflow and the subject-index requirement. This second-stage record continues from that work rather than replacing it.
The original essay Markdown files remain the source of truth. The EPUB production process must extract and assemble their content without modifying those source articles merely to accommodate the e-book layout.
The editorial-source audits for the essays remain relevant to the text used in the EPUB. Any new correction to an essay must follow the documented editorial process and must not be introduced silently by the EPUB builder.
EPUB and print PDF: separate reading experiences
The EPUB and paperback PDF are two different editions of the same book. They may share approved wording, editorial decisions, bibliographic information and source material, but their presentation and production rules must remain distinct.
EPUB
The EPUB (the standard name is written in uppercase) is a reflowable electronic publication. Its layout must adapt to the reader’s device, screen dimensions and reading preferences.
- Do not use fixed page dimensions, fixed page numbers, running heads or print folios.
- Do not insert artificial blank pages to imitate the paperback. In particular, the blank verso used after the half-title in the print PDF must not be forced into the EPUB.
- Allow readers to adjust font size, typeface, line spacing, margins and colour scheme where their reading application supports those controls. Avoid CSS that unnecessarily overrides reader preferences.
- Use semantic heading levels and a meaningful EPUB navigation document.
- Make contents entries, footnote references, note return links and other internal navigation functional.
- Use responsive images and tables that remain usable on narrow screens.
- Keep hyperlinks identifiable and accessible. Useful links may remain active in the EPUB even where the print edition uses plain text.
- Do not rely on page numbers for the subject index. Use internal links to stable locations in the text.
- Do not add a separate back-cover page. The front-cover image is the EPUB cover; the publication description and bibliographic information belong in the appropriate metadata or front matter.
Paperback print PDF
The print PDF is a fixed-layout production file. Its design must meet the requirements of a physical book and retain consistent page composition.
- Use the approved page size, margins, fixed typography and paragraph layout.
- Apply print-specific page breaks, article openings, running heads and folios where appropriate.
- Use a blank verso only where the print book’s page sequence requires it.
- Design the front and back cover as part of the print cover production, including the spine and printer requirements where applicable.
- Use the approved print subject index with printed page references.
- Apply print-specific treatments for signatures, credits, notes and other page elements.
A print layout decision must not automatically be copied into the EPUB stylesheet or builder. Equally, an EPUB interaction or reflow rule must not be imposed on the fixed-layout print PDF.
Proposed EPUB book sequence
The print-production source in ebook/edrl-ii/print/build.py was examined before setting out this sequence. It contains more than the nine essays: the half-title, full title page, publication information, author portrait, a Cittar Gnanakkovai quotation, Foreword, Editor’s Note and acknowledgement, About the Author, contents and essays. The EPUB should retain the relevant editorial material while adapting its presentation to a reflowable publication. It must not reproduce print-only blank pages, fixed page breaks, folios or cover components.
The proposed EPUB reading order is:
- Front cover: supplied as the EPUB cover image and displayed by the reading application; it is not a separate back-cover page.
- Half-title: the book title only.
- Full title page: title, author and The Sunil Abraham Project imprint.
- Publication information: author, editor, publisher, website, language, publication date, EPUB ISBN and the approved rights/copyright wording. The current preview notice must remain until the final wording is approved.
- Author photograph and opening quotation: retain the author portrait and the Cittar Gnanakkovai quotation present in the print-production source, adapting their presentation without forcing print page dimensions or artificial blank pages.
- Foreword: the text by Dr. Y. T. Vinayaraj, using the shared
foreword.mdsource. - Editor’s Note and acknowledgement: use the approved text from the print-production source. The acknowledgement is part of this material and should not be lost or treated as a separate, unapproved essay.
- About the Author: include the biographical text from the print-production source. The author portrait is already included earlier in the proposed sequence.
- Contents: a navigable book-level contents section linking to the front matter and all nine essays. The EPUB navigation document must also be generated and tested.
- Nine essays: in the chronological publication order already recorded in
manifest.yml. - Subject index: an EPUB-specific index with links to relevant passages, not paperback page numbers.
- Colophon: a short closing production/publication note, using confirmed information already recorded for the book. It should provide a considered ending after the index and final essay, rather than allowing the EPUB to stop abruptly. It is not a back cover.
The author photograph, quotation and biographical material are present in the print builder and therefore must be accounted for in the EPUB design; they must not be silently omitted merely because the current EPUB front matter does not yet contain them. Their exact presentation can be adapted for reflow.
There is no dedication page. There is no separate EPUB back-cover page. Do not reproduce the print builder’s blank verso or its fixed page sequencing. The sequence above is the proposed content order; the final generated EPUB must be checked to confirm its actual reading order and navigation.
Front cover, title pages and publication information
The front cover should be embedded as the EPUB cover and remain legible when displayed as a small thumbnail in a reading application. It is not followed by a separate back-cover page.
The half-title should remain restrained and show the title alone. The full title page should present the book title, author and The Sunil Abraham Project imprint in a clear hierarchy. The publication-information section should contain only confirmed details.
The current publication record identifies the title as Essays on Dalits, Religion and Liberation II, the author as A. M. Abraham Ayrookuzhiel, the publisher/imprint as The Sunil Abraham Project, the editor as Tito Dutta, the language as English, the planned publication date as 29 November 2026 and the EPUB ISBN as 978-93-345-1180-2. The paperback ISBN must not be substituted for the EPUB ISBN.
The current front matter is an editorial preview. Final copyright and rights wording, and any outstanding publication credits, must be confirmed before a distribution edition is prepared.
The print builder also contains the author photograph and the quotation from Cittar Gnanakkovai, as well as the About the Author text. These are substantive book materials, not back-cover matter. The EPUB sequence should account for them, adapting their layout to the reader’s screen rather than reproducing the print pages.
Foreword, Editor’s Note and shared material
The foreword is stored in the shared source file ebook/edrl-ii/foreword.md. The EPUB and print builders can use this shared text while applying their own presentation rules. The wording, poem and references must be preserved.
The print builder contains the Editor’s Note and its acknowledgement section, while the EPUB front matter currently contains only placeholder wording. The approved text must be transferred into the EPUB front matter as text, not copied with print-specific Typst markup or layout instructions. The acknowledgement belongs with the Editor’s Note as currently structured in the print source.
The print builder also contains an About the Author section and a separate author photograph. Both must be accounted for in the EPUB sequence. Their layout may be adapted, but the biographical content and photograph should not be omitted simply because they are not yet in the current EPUB front matter.
Subject index for the EPUB
The subject index is an important part of the EPUB. It must be an EPUB-specific, navigable index, not a reproduction of the paperback index with page numbers left in place. The index should be based on the editorially selected subjects, main entries, subentries and cross-references developed for the book. It is not a word-frequency list and must not be generated by treating every occurrence of a word as an index reference.
How the index will be prepared
The procedure should separate editorial selection from technical link generation.
- Prepare the index entries: establish the preferred subject headings, subentries, alternative terms and “See” / “See also” cross-references. Each entry must represent a subject that is meaningfully discussed in the essays.
- Identify the relevant passages: for each entry and subentry, identify the passage or passages that genuinely discuss that subject. A passing mention is not automatically index-worthy.
- Record matching information: maintain the preferred display term separately from the text or phrases used to locate relevant passages. Record known spelling variants and alternate forms where they are genuinely relevant.
- Search the source text: the build process searches the selected essay sources for the specified phrases. Exact matching can be the initial method, with explicitly recorded variants where required. The build must report terms or phrases that cannot be found.
- Review each occurrence: automated matching only locates candidates. The surrounding passage must be checked to establish that it is relevant to the index entry. Repeated or ambiguous matches must be reviewed individually; the script must not assume that every match is valid.
- Create stable destinations: for each approved occurrence, the builder inserts a stable internal anchor into the generated EPUB XHTML at the relevant passage. The anchor must not add visible words, alter the author’s wording or make the essay text look like a hyperlink.
- Generate the linked index: the index entries link to those internal destinations. Where an entry has several relevant passages, it may link to each approved location. “See” and “See also” references remain navigational links to the appropriate index entries.
- Validate the links: check that every index link resolves to an existing destination, that no destination is orphaned, and that the links open at the intended passage in an EPUB reader.
How locations will remain correct after edits
The index must not store page numbers, fixed character offsets or manually calculated positions. Those would become unreliable whenever an essay changes or the EPUB is rebuilt.
Instead, the builder should locate the approved text in the current source during each build and recreate the anchor at that location. When the essay is edited, the next build searches the updated text and places the link at the new position automatically. If a phrase has changed, disappeared or become ambiguous, the build should report the problem for editorial attention rather than silently dropping the reference or linking to an unrelated occurrence.
For repeated phrases, the index data must identify the intended occurrence using sufficient surrounding context or another unambiguous locator. Variants should be listed explicitly; the builder must not guess that a similar word or phrase is equivalent.
Editorial and technical responsibilities
- Editorial judgement determines which subjects and passages belong in the index.
- The index data records the approved entries and the phrases/locations to be found.
- The Python builder performs repeatable searching, anchor insertion and link generation.
- The generated EPUB is checked to confirm that the links point to the intended passages and that the essay wording remains visually unchanged.
The current ebook/edrl-ii/build.py does not yet implement this subject-index procedure. It currently assembles the front matter and nine essays, checks source extraction and footnote counts, and creates the EPUB 3 package; it does not search for index terms, insert passage anchors or generate a subject index. These are therefore implementation tasks, not completed features.
The paperback’s Cindex page references must not be copied into the EPUB. The EPUB index uses internal links, and those links must be regenerated from the current essay text on every build.
Colophon
The EPUB should end with a brief colophon after the subject index. The term is colophon. It is a closing publication and production note, not a back cover and not a second title or copyright page.
The print-production source already records publication and production information, including the publisher, edition and publication date, editor, cover and typesetting credits, print coordination, source attribution, ISBN and production tools. The EPUB colophon should draw only on details that are confirmed and appropriate to the electronic edition. It may identify the e-book edition and ISBN and give concise publication, editorial and production credits. It should not reproduce print-only information such as the printer, printed price or paperback ISBN.
The wording has not yet been finalised. Do not invent credits or repeat the entire publication-information page. The purpose is to provide a short, deliberate closing to the EPUB after the final index entry. No separate back-cover page is required.
EPUB production directory and build-script organisation
The current EDRL II production directory contains EPUB-related files directly under ebook/edrl-ii/, while the paperback production files are organised in the separate ebook/edrl-ii/print/ directory.
The next-stage proposal is to create a corresponding ebook/edrl-ii/epub/ directory and place the EPUB-specific build script there. The intended location for the EPUB builder is:
ebook/edrl-ii/epub/build.py
This will make the separation between EPUB and print production clearer and give each format a dedicated production area. The exact relocation of supporting files and any shared files must be mapped before changes are made. Shared sources, such as the foreword and the original essay Markdown files, should not be duplicated simply to create parallel directories.
The existing root-level ebook/edrl-ii/build.py currently assembles the manuscript and generates both an EPUB and a Pandoc PDF preview. That PDF preview is not the same production process as the paperback PDF generated by ebook/edrl-ii/print/build.py. This distinction must be resolved during the reorganisation: the EPUB-specific builder should have a clearly defined output scope, and the print builder must remain independent.
Before moving or renaming the script:
- Map every path used by the current builder, including the repository root, manifest, front matter, metadata, stylesheet, foreword, cover and output directory.
- Identify which configuration and source files are EPUB-specific and which are shared.
- Update the local launcher and GitHub Actions workflow to call the new path.
- Check that the print builder’s paths and workflow are not changed accidentally.
- Confirm that generated files remain in the intended output directory and are not committed unintentionally.
- Run the new EPUB build and inspect the resulting file before considering the relocation complete.
No file move, rename or build-script change is recorded as completed by this document.
EPUB quality assurance
A successful automated build is only a technical milestone. It does not establish that the EPUB is complete, accessible or ready for distribution.
The review must include:
- Confirmation that all nine essays appear in the correct order and that no substantive text is missing or duplicated.
- Comparison of extracted text, quotations, references, notes, tables, images and captions against the approved source material.
- Verification of the foreword and approved Editor’s Note.
- Inspection of the cover, half-title, title page and publication information.
- Testing of the EPUB navigation document and the visible contents links.
- Testing of footnote links and return links.
- Testing of the subject-index links after the index has been prepared.
- Inspection in more than one EPUB reading application and at different font sizes and screen widths.
- Review of reflow, image and table behaviour, contrast, link identification and accessibility.
- Validation with EPUBCheck, followed by review and resolution of reported errors and relevant warnings.
The generated EPUB must be inspected as an actual reading file. The build log and automated checks alone are not sufficient evidence.
Staged work plan
The second-stage work will proceed in recorded steps. The immediate priority is to complete the production inventory and agree the actual reading sequence and index data before reorganising the builder. Each step should identify the files examined, the issue or decision, the approved action, and the verification performed.
- Production inventory: Confirm the current directory structure, file responsibilities, workflow triggers and dependencies between EPUB and print.
- EPUB design specification: Confirm the sequence against the print source, including the author photograph, opening quotation, Foreword, Editor’s Note and acknowledgement, About the Author, contents, subject index and closing colophon; adapt presentation for reflow.
- Format separation: Establish the precise distinction between reflowable EPUB behaviour and fixed-layout print PDF behaviour.
- Builder reorganisation: Move the EPUB-specific builder into the proposed
epub/directory, update paths and workflow references, and preserve the independent print builder. - Front-matter and content review: Resolve the Editor’s Note, optional biographical material and any remaining content decisions.
- Subject index implementation: Prepare and review the EPUB index entries and passage locators; implement source searching, stable anchor insertion, linked index generation, failure reporting and link validation.
- Build and technical validation: Generate a fresh EPUB, run automated checks and EPUBCheck, and record the results.
- Reader testing: Inspect the actual EPUB in reading applications, test reflow and navigation, and record defects.
- Final review: Resolve outstanding issues and determine whether the EPUB is an editorial preview or an approved distribution edition.
A step must not be marked complete merely because a file was edited or a workflow succeeded. Completion requires the relevant output to be checked.
Working principles
- Preserve the author’s wording and meaning. Do not introduce unapproved editorial changes through the export process.
- Keep original essay Markdown files as the source of truth.
- Keep EPUB and paperback production rules separate.
- Do not reproduce print pagination, blank pages, folios or fixed page geometry in the reflowable EPUB.
- Do not create a separate EPUB back-cover page.
- Prefer reader-controlled typography and responsive layout.
- Preserve accessible navigation and meaningful internal links.
- Record proposals, changes, test results and unresolved questions distinctly.
- Do not describe the EPUB as publication-ready until the content, technical validation and reader testing have been completed.
Current status and resumption point
This document establishes the second-stage plan. The current repository files have not been reorganised or modified as part of creating this record.
The print builder and current EPUB builder have now been examined for this stage. The next tasks are to confirm the final reading sequence and colophon wording, prepare the editorial index data and implement its link-generation procedure, and then map the builder dependencies before moving build.py into the dedicated epub/ directory.
See also
- E-book Export: A. M. A. Ayrookuzhiel - first-stage export plan and production history.
- Print Book Production: Essays on Dalits, Religion and Liberation II - separate paperback production documentation.
- Editorial Source Audit - first-stage editorial source audit.
- Editorial Source Audit: Second Stage - second-stage source comparison record.
📄 This page was created on 22 November 2026. You can view its history on GitHub, preview the fileTip: Press Alt+Shift+G, or inspect the .