Appendix D
book.xml
Every book has a file called book.xml that describes it: its details, its parts, chapters and scenes in order, its front and back matter, the Stash, and the ways it’s built. This appendix describes every part of it.
You never need to open book.xml: the Title Page, the Manuscript sidebar, Statistics and Publishing change it for you. It’s an ordinary text file, though, so you can read it in any text editor, and change it by hand with the book closed (see How Septangular changes the file).
The shape of the file
book.xml is written in XML: each part of the book is an element, written between a start tag such as <title> and an end tag such as </title>, or as a single tag ending in /> when it holds nothing. Settings inside a start tag, such as status="draft", are attributes. Anything between <!-- and --> is a comment, which Septangular ignores. Names are case-sensitive: legalName, not legalname.
Inside <book>, these elements are usually in this order, though Septangular reads them in any order.
| Element | Required | Holds |
|---|---|---|
<metadata> | Yes | The book’s and the author’s details: the Title Page. |
<frontMatter> | No | Pages before the story. |
<manuscript> | Yes | The parts, chapters and scenes, and the book’s targets. |
<backMatter> | No | Pages after the story. |
<stash> | No | Parts, chapters and scenes taken out of the book but kept. |
<configurations> | Yes | The ways the book is built. |
The <book> element itself must have version="1", and a new book’s also names the format, as in the example below. Every file named in book.xml is written relative to the book’s folder, with forward slashes: manuscript/the-crossing.md.
A complete example
A book with every part filled in. The comments explain each part; a book needs none of them.
<?xml version="1.0" encoding="UTF-8"?>
<book xmlns="urn:septangular:project:1" version="1">
<!-- The Title Page. Only the title and legal name are required. -->
<metadata>
<title>The Lighthouse Keeper</title>
<shortTitle>LIGHTHOUSE</shortTitle>
<genre>Literary Fiction</genre>
<author>
<legalName>Jane Q. Writer</legalName>
<penName>J. Q. Writer</penName>
<surname>Writer</surname>
<address>
<line>123 Harbour Road</line>
<line>Port Ellis, ME 04000</line>
</address>
<email>jane@example.com</email>
<phone>(555) 010-0199</phone>
</author>
<!-- For ebooks and print books. -->
<language>en-GB</language>
<isbn>978-1-23456-789-7</isbn>
<publisher>Harbour Press</publisher>
<description>A keeper, an island, a storm.</description>
<cover>cover.jpg</cover>
</metadata>
<frontMatter>
<copyright file="matter/copyright.md"/>
<dedication file="matter/dedication.md"/>
</frontMatter>
<!-- 80,000 words by 1 March 2027. -->
<manuscript target="80000" dailyTarget="500" due="2027-03-01">
<part title="Part One: The Island">
<chapter title="The Crossing" target="3000">
<scene file="manuscript/the-crossing.md" status="revised"
synopsis="Mara takes the boat out."/>
<scene file="manuscript/02-the-keeper.md" status="draft"
title="The keeper"/>
</chapter>
</part>
</manuscript>
<backMatter>
<aboutTheAuthor file="matter/about-the-author.md"/>
<alsoBy/>
</backMatter>
<stash>
<scene file="manuscript/the-old-opening.md" status="draft"/>
</stash>
<configurations default="submission">
<!-- Standard manuscript format: revised and final scenes. -->
<configuration id="submission" description="Submission">
<output format="pdf" file="build/lighthouse-submission.pdf"/>
<output format="docx" file="build/lighthouse-submission.docx"/>
<include minStatus="revised"/>
</configuration>
<!-- A reading copy: drafts too, on smaller pages. -->
<configuration id="reading-copy" description="Reading copy">
<output format="pdf" file="build/lighthouse-reading.pdf"/>
<include minStatus="draft"/>
<style>
<font family="Libertinus Serif" size="11pt"/>
<lineSpacing>1.3</lineSpacing>
<paper>a5</paper>
<margins>0.75in</margins>
<titlePage>false</titlePage>
<runningHeader>{title} · {page}</runningHeader>
<chapterHeading>{number}. {title}</chapterHeading>
<sceneBreak>* * *</sceneBreak>
</style>
</configuration>
<!-- Septangular Publish: an ebook and a paperback. -->
<configuration id="ebook" description="Ebook">
<output format="epub" file="build/lighthouse.epub"
theme="classic"/>
<include matter="copyright dedication aboutTheAuthor"/>
<edition name="Ebook" isbn="978-1-23456-790-3"/>
</configuration>
<configuration id="paperback" description="Paperback">
<output format="print" file="build/lighthouse-paperback.pdf"
trim="5.5x8.5" theme="classic" paper="cream"/>
<include minStatus="final"/>
<edition name="Paperback"/>
</configuration>
</configurations>
</book>
metadata: the book’s details
<metadata> holds what the Title Page shows. Each is an element holding text; leave out any that aren’t required, and the default is used.
| Element | Title Page field | Required | Without it | Used for |
|---|---|---|---|---|
<title> | Title | Yes | Everywhere the book is named. | |
<shortTitle> | Short title | No | The title in capitals | A manuscript’s running header, {shortTitle}. |
<genre> | Genre | No | None | An ebook’s subject, which stores and readers may show. |
<author> | Yes | The author’s details, below. | ||
<language> | Language | No | en | An ebook’s language, and a print book’s hyphenation. A language tag such as en, en-GB or fr. |
<isbn> | ISBN | No | A fixed identifier made from the title and author | An ebook’s identifier, and {isbn} on a copyright page. An edition’s own ISBN takes its place (see edition). |
<publisher> | Publisher | No | None | The title page of an ebook or print book, and {publisher}. |
<description> | Description | No | None | The blurb an ebook carries for readers and stores. |
<cover> | Cover | No | No cover | An ebook’s cover: a .jpg, .jpeg or .png file, relative to the book’s folder. |
author
| Element | Title Page field | Required | Without it | Used for |
|---|---|---|---|---|
<legalName> | Legal name | Yes | The contact details on a manuscript’s first page. | |
<penName> | Pen name | No | The legal name | The byline, {author}, and a print book’s left-hand running heads. |
<surname> | Surname | No | The last word of the pen name | A manuscript’s running header, {surname}. |
<address> | Address | No | None | The contact details. It holds one <line> element for each line of the address. |
<email> | No | None | The contact details. | |
<phone> | Phone | No | None | The contact details. |
manuscript: parts, chapters and scenes
<manuscript> holds the book in order: either <part> elements, each holding chapters, or <chapter> elements directly, never a mix of the two. A book needs at least one chapter, every part at least one chapter, and every chapter at least one scene.
| Element | Attribute | Required | What it is |
|---|---|---|---|
<manuscript> | target | No | The book’s word target, a whole number. |
dailyTarget | No | Your daily goal, in words. | |
due | No | When the book is due, written YYYY-MM-DD. With a target, the daily goal is worked out from it (see Chapter 7). | |
<part> | title | Yes | The part’s title. |
<chapter> | title | No | The chapter’s title. Without one, the chapter has its number only. |
target | No | The chapter’s word target. | |
<scene> | file | Yes | The scene’s file. |
status | No | outline, draft, revised or final. Without it, draft. | |
title | No | The scene’s name in Septangular. Without it, the name comes from the file’s name. Never printed in the book. | |
synopsis | No | A one-line summary, shown in the sidebar and above the editor. Never printed in the book. |
Chapters are numbered straight through the book, across parts, in the order they appear. Titles are used exactly as typed, so type curly quotes in them if you want them.
stash
<stash> holds what’s been moved to the Stash: <part>, <chapter> and <scene> elements, in any order, written just as in <manuscript>. The Stash is never built, and its words don’t count toward the book.
An item in the Stash may have pendingDelete="true": it has been deleted, and waits for your next save with ⌘S, which removes it and sends its scene files to the Trash. Auto-save leaves it waiting.
frontMatter and backMatter
<frontMatter> and <backMatter> list the pages before and after the story, in order. Each page is an element naming its kind. They appear in ebooks and print books only (see Chapter 9), and their files are written as Appendix B describes.
| Element | In Septangular’s menus | Usually | Its file |
|---|---|---|---|
<copyright file="…"/> | Copyright Page | Front | Required |
<dedication file="…"/> | Dedication | Front | Required |
<epigraph file="…"/> | Epigraph | Front | Required |
<page title="…" file="…"/> | Other Page… | Front | Required, with a title for the page’s heading |
<acknowledgements file="…"/> | Acknowledgements | Back | Required |
<aboutTheAuthor file="…"/> | About the Author | Back | Required |
<alsoBy file="…"/> | Also By | Back | Optional. Without a file, the page lists the books of the series; outside a series it’s then left out, with a warning. |
<newsletter file="…"/> | Newsletter Invitation | Back | Required |
<nextBook/> | Next in the Series (Its First Chapter) | Back | None: it’s the next book’s first chapter, made when the book is built. Left out, with a warning, outside a series or in its last book. |
Any kind of page may go in either list.
configurations
<configurations> holds one <configuration> element for each way the book is built: at least one. Its default attribute names the configuration the preview and the Publishing page start with; without it, the first is the default.
A <configuration> has these attributes and elements, its elements usually in this order:
| Part | Required | What it is |
|---|---|---|
id attribute | Yes | A short name, unique in the book, used to refer to the configuration. Use letters, digits and hyphens, starting with a letter or digit: large-print. |
description attribute | No | The configuration’s name in Septangular, such as “Agent submission”. Without it, the id is shown. |
<output> | At least one | A file to build: see output. Several outputs build the same book in several formats at once. |
<include> | No | Which scenes, and which front and back matter, go in: see include. |
<style> | No | How a manuscript looks, and the chapter headings: see style. |
<edition> | No | Which edition this is, and its ISBN: see edition. |
output
Each <output> builds one file. Only format and file are required; the rest belong to ebooks and print books, as the table says, and are refused on other formats.
| Attribute | For | Values | Without it |
|---|---|---|---|
format | All | pdf (a manuscript as a PDF), docx (a manuscript as a Word document), epub (an ebook) or print (a print book’s interior, as a PDF). epub and print are Septangular Publish’s. | Required |
file | All | Where the file goes, relative to the book’s folder, such as build/the-long-tide.epub. | Required |
theme | epub, print | classic, modern or plain. | classic |
trim | The page size: see trim sizes. | 5.5x8.5 | |
binding | paperback or hardcover (a case-laminate hardcover). | paperback | |
paper | cream, white or color. It sets the spine’s width on the cover template. | cream | |
font | The text’s typeface, by its name on your Mac, such as Garamond. | Libertinus Serif | |
fontSize | In points: 10.5pt. | 11pt; 16pt for large print | |
largePrint | true for a large-print edition: bigger type, more space between lines, ragged right and unhyphenated. | false | |
chapterStart | recto (chapters open on a right-hand page) or any (on the next page). | recto | |
contents | true for a contents page with page numbers. | false |
- Building replaces the file, and makes its folder if need be. A print output also writes its cover template beside it, with
-cover-templateadded to its name. - Versions leaves the folder each output is written to out of the book’s history. Give outputs a folder of their own, such as
build: never themanuscriptfolder, or your scenes would be left out of the history with it. - Keep outputs inside the book’s folder, so Septangular can open them for you.
Trim sizes
Width by height, in inches: the sizes KDP Print and IngramSpark offer, and A5.
| Paperback | Hardcover too |
|---|---|
5x8, 5.06x7.81, 5.25x8 | |
5.5x8.5 | Yes |
6x9, 6.14x9.21 | Yes |
6.69x9.61 | |
7x10 | Yes |
7.44x9.69, 7.5x9.25, 8x10 | |
8.25x11 | Yes |
8.5x11, a5 (5.83 × 8.27 in) |
include
| Attribute | Values | Without it |
|---|---|---|
minStatus | The least finished status that goes in: outline (every scene), draft, revised or final. Each takes in the statuses after it, in that order: revised includes revised and final scenes. | outline: every scene |
matter | all, none, or the kinds of page to include, by their element names, separated by spaces: copyright dedication aboutTheAuthor. Only ebooks and print books have front and back matter. | all |
A chapter whose scenes are all left out by status is left out too, and the chapters are numbered without it. A configuration that leaves out every scene can’t be built (see Appendix E).
style
<style> sets how a manuscript looks. Each setting is optional, in any order, and anything left out follows standard manuscript format, the defaults below. In ebooks and print books, only the chapter heading settings apply; their themes decide the rest.
| Element | Values | Default | Applies to |
|---|---|---|---|
<font family="…" size="…"/> | A typeface by its name on your Mac, and a size. | Times New Roman, 12pt | Manuscripts |
<lineSpacing> | single, onehalf, double, or a number from 1 to 3, such as 1.3. | double | Manuscripts |
<paper> | us-letter, us-legal, us-trade, us-digest, a4, a5 or a6. | us-letter | Manuscripts |
<margins> | A length, on every side. | 1in | Manuscripts |
<paragraphIndent> | A length: each paragraph’s first-line indent. | 0.5in | Manuscripts |
<titlePage> | true or false: a first page with your contact details, the title, the byline and the word count. | true | Manuscripts |
<runningHeader> | The header on each page, with {surname}, {shortTitle}, {title} and {page} filled in. Empty for none. | {surname} / {shortTitle} / {page} | Manuscripts |
<chapterHeading> | Each chapter’s heading, with {number} (3), {numberWords} (Three), {numberRoman} (III) and {title} filled in. | Chapter {numberWords} | All formats |
<showChapterTitles> | true or false: the chapter’s title under its heading. A heading with {title} in it doesn’t repeat the title below. | true | All formats |
<sceneBreak> | The mark centred between scenes and at scene breaks. | # | Manuscripts |
<endMarker> | The mark centred after the last scene. Empty for none. | END | Manuscripts |
- A length is a number and a unit:
pt,mm,cm,in, orem(times the type size):12pt,2.5cm,1.5em. - Empty means an element with nothing in it:
<endMarker></endMarker>or<endMarker/>. - Fonts: if a PDF manuscript’s font isn’t on your Mac, Septangular uses Times New Roman, then Liberation Serif, then Libertinus Serif, without a warning. A Word manuscript names the font, and Word chooses a substitute if the reader hasn’t got it.
- Paper: a PDF manuscript can use any paper size the Typst typesetting engine knows by name, but a Word manuscript only those in the table, so a configuration with a Word output should keep to them.
- Numbers in words go up to Nine Hundred Ninety-Nine, and Roman numerals to MMMCMXCIX; beyond them, the chapter’s number is written in figures.
edition
<edition> says which edition of the book a configuration makes. Each edition of a published book has an ISBN of its own.
| Attribute | What it is |
|---|---|
name | The edition’s name, such as Paperback or Large Print: {edition} on a copyright page, and the name offered by Mark as Published…. |
isbn | This edition’s ISBN, in digits and hyphens (and X). It takes the place of the book’s ISBN in this configuration’s builds: as an ebook’s identifier, and as {isbn}. {isbns} lists every edition’s. |
How Septangular changes the file
Septangular writes book.xml only when you save, and changes no more of it than it must:
- Rearranging, adding, renaming and deleting parts, chapters and scenes, and changing statuses, synopses and targets, change only the lines involved. Your comments, indentation and the layout of attributes stay as you wrote them, and a one-line comment directly above a scene or chapter moves with it.
- The Title Page rewrites
<metadata>as a whole, in the order above, leaving out what isn’t set. Front and back matter rewrite<frontMatter>or<backMatter>, and the configuration editor rewrites the one<configuration>it changed. A comment inside the element is lost then; a comment just above it stays. Deleting a configuration deletes a comment just above it too.
Edit the file by hand only while the book is closed. Septangular doesn’t watch the file while a book is open: it may write its own version over your changes the next time it saves a change to the book’s structure, and if your changes leave a mistake in the file, your writing is still saved, but the status bar reports the problem and the book is shown as it was, until the file is put right. When you next open the book, your changes are saved as a version, “Changes made outside Septangular”. Appendix C has more.
Messages about book.xml
If book.xml has a mistake, the book doesn’t open, and Septangular shows the message: on the welcome screen, or in the status bar if another book is open. Correct the file in a text editor, save it, and open the book again. The messages, with … standing for the part that varies, and the element they’re about:
| About | Message | What it means |
|---|---|---|
| The file | XML syntax error at line:column: … | The file isn’t well-formed XML at that line: a tag not closed, a missing quote, or a bare & or < in a name or title (write & and <). |
| Missing <book>, Missing <metadata>, Missing <manuscript>, Missing <configurations> or Missing <metadata>/<author> | A required element isn’t there, or is misspelt. | |
<book> | Unsupported project version "…" (expected 1) | <book> needs version="1". |
<metadata> | <metadata> needs a non-empty <title> | The book has no title. |
| <author> needs a non-empty <legalName> | The author has no legal name. | |
| <metadata>: <language> "…" is not a language tag like en or en-GB | The language should be a code such as en, en-GB or fr. | |
| <metadata>: <cover> "…" must be a .jpg or .png image | The cover’s file name must end in .jpg, .jpeg or .png. | |
<manuscript> | <manuscript> may contain <part> elements or <chapter> elements, not both | Put every chapter into a part, or take away the parts. |
| <manuscript> is empty: add at least one <chapter> | The book has no chapters. | |
| <manuscript>: target="…" must be a whole number of words (or dailyTarget) | A target must be a number such as 80000, with no comma. A chapter’s target gives the same message. | |
| <manuscript>: due="…" must be a date, written YYYY-MM-DD | Write the due date as 2027-03-01. | |
<part> | <part> #n needs a title attribute | The nth part has no title. |
| <part title="…"> has no chapters | A part is empty. | |
<chapter> | <chapter title="…"> has no scenes | A chapter is empty. |
<scene> | <scene> needs a file attribute | A scene doesn’t say which file it is. |
| <scene file="…">: status "…" must be one of outline, draft, revised, final | A misspelt status. | |
<stash> | <part> in <stash> needs a title attribute, or <part title="…"> in <stash> has no chapters | As for the book, in the Stash. |
| Front and back matter | <frontMatter>/<…>: unknown kind of page (kinds: …) | The element isn’t one of the kinds of page in the table above. (Or <backMatter>.) |
| … needs a file attribute | That kind of page is written in a file, so it needs one. | |
| … is made when the book is built, so it takes no file | <nextBook/> takes no file. | |
| … needs a title attribute | An other page, <page>, needs a title. | |
<configurations> | <configurations> needs at least one <configuration> | The book has no way to be built. |
| Duplicate configuration id "…" | Two configurations have the same id. | |
| Default configuration "…" is not defined | default names no configuration. | |
<configuration> | <configuration> needs an id attribute | A configuration has no id. |
| <configuration id="…"> needs at least one <output> | A configuration builds nothing. | |
<output> | …: unsupported output format "…" (supported: pdf, docx, epub, print) | A misspelt format. |
| …/<output> needs a file attribute | An output doesn’t say where its file goes. | |
| …: theme="…" is only for epub and print outputs, or unknown theme "…" | Themes are for ebooks and print books, and are classic, modern or plain. | |
| …: trim is only for print outputs (or another print setting) | A print setting on another format. | |
| …: unknown trim size "…" (sizes: …) | Use one of the trim sizes above. | |
| …: hardcovers come in 5.5x8.5, 6x9, 6.14x9.21, 7x10, 8.25x11, not … | That trim size isn’t made as a hardcover. | |
| …: fontSize="…" should be in points, like 11pt | Write the size as 11pt. | |
| …: chapterStart should be recto or any; … should be true or false; paper should be one of cream, white, color; binding should be one of paperback, hardcover | A print setting with a value it can’t take. | |
<include> | …: status "…" must be one of outline, draft, revised, final | A misspelt minStatus. |
| …: matter="…" should be all, none, or kinds of page (…) | A misspelt kind of page. | |
<edition> | …: <edition> isbn="…" should be digits and hyphens | An ISBN with other characters in it. |
<style> | …: <…> "…" is not a length like 12pt or 1in | A size or margin without a unit, or with one Septangular doesn’t know. |
| …: <…> must be true or false | A yes-or-no setting with another value. | |
| …: <lineSpacing> must be single, onehalf, double or 1–3 | Line spacing out of range. |
A scene whose file is missing doesn’t stop the book opening; see Appendix E.
series.xml
A series’ folder holds a file called series.xml that names the series and lists its books, in order, by their folders inside the series’ folder (see Chapter 10). It may also hold the series’ box sets, a Septangular Publish feature.
<?xml version="1.0" encoding="UTF-8"?>
<series xmlns="urn:septangular:series:1" version="1"
title="The Skerry Light Books">
<book folder="the-lighthouse"/>
<book folder="the-storm-season"/>
<boxSets>
<boxSet id="complete" title="Skerry Light: The Complete Series"
books="all" isbn="978-1-23456-791-0" cover="cover.jpg">
<output format="epub" file="build/skerry-light.epub"/>
<output format="print" file="build/skerry-light.pdf" trim="6x9"/>
</boxSet>
</boxSets>
</series>
| Element | Attribute | Required | What it is |
|---|---|---|---|
<series> | version | Yes | Always 1. |
title | No | The series’ name. Without it, the folder’s name. | |
<book> | folder | Yes | A book’s folder, directly inside the series’ folder. The books are numbered in this order. |
<boxSet> | id | Yes | A short name for the box set, unique in the series. |
title | Yes | The box set’s title. | |
books | No | all, or the books’ numbers in the series: "1 2 3". Without it, all. | |
isbn | No | The box set’s own ISBN. | |
cover | No | The box set’s ebook cover. |
A <boxSet> holds one or more <output> elements, just as a configuration’s, and may hold a <style> for its chapter headings. Its cover and its outputs’ files are named relative to the series’ folder.
Septangular rewrites series.xml as a whole when you rename the series or add or reorder its books, keeping <boxSets> exactly as written. If series.xml has a mistake in it, its books won’t open: Septangular says “The series file beside this book (series.xml) has a problem” and what it is. Correct the file, and open the book again. The messages are much like book.xml’s: “series.xml is not well-formed”, “A <book> in series.xml needs a folder inside the series folder”, “Two box sets are called "…"”, and so on.