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.

ElementRequiredHolds
<metadata>YesThe book’s and the author’s details: the Title Page.
<frontMatter>NoPages before the story.
<manuscript>YesThe parts, chapters and scenes, and the book’s targets.
<backMatter>NoPages after the story.
<stash>NoParts, chapters and scenes taken out of the book but kept.
<configurations>YesThe 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.

ElementTitle Page fieldRequiredWithout itUsed for
<title>TitleYesEverywhere the book is named.
<shortTitle>Short titleNoThe title in capitalsA manuscript’s running header, {shortTitle}.
<genre>GenreNoNoneAn ebook’s subject, which stores and readers may show.
<author>YesThe author’s details, below.
<language>LanguageNoenAn ebook’s language, and a print book’s hyphenation. A language tag such as en, en-GB or fr.
<isbn>ISBNNoA fixed identifier made from the title and authorAn ebook’s identifier, and {isbn} on a copyright page. An edition’s own ISBN takes its place (see edition).
<publisher>PublisherNoNoneThe title page of an ebook or print book, and {publisher}.
<description>DescriptionNoNoneThe blurb an ebook carries for readers and stores.
<cover>CoverNoNo coverAn ebook’s cover: a .jpg, .jpeg or .png file, relative to the book’s folder.

author

ElementTitle Page fieldRequiredWithout itUsed for
<legalName>Legal nameYesThe contact details on a manuscript’s first page.
<penName>Pen nameNoThe legal nameThe byline, {author}, and a print book’s left-hand running heads.
<surname>SurnameNoThe last word of the pen nameA manuscript’s running header, {surname}.
<address>AddressNoNoneThe contact details. It holds one <line> element for each line of the address.
<email>EmailNoNoneThe contact details.
<phone>PhoneNoNoneThe 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.

ElementAttributeRequiredWhat it is
<manuscript>targetNoThe book’s word target, a whole number.
dailyTargetNoYour daily goal, in words.
dueNoWhen the book is due, written YYYY-MM-DD. With a target, the daily goal is worked out from it (see Chapter 7).
<part>titleYesThe part’s title.
<chapter>titleNoThe chapter’s title. Without one, the chapter has its number only.
targetNoThe chapter’s word target.
<scene>fileYesThe scene’s file.
statusNooutline, draft, revised or final. Without it, draft.
titleNoThe scene’s name in Septangular. Without it, the name comes from the file’s name. Never printed in the book.
synopsisNoA 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.

ElementIn Septangular’s menusUsuallyIts file
<copyright file="…"/>Copyright PageFrontRequired
<dedication file="…"/>DedicationFrontRequired
<epigraph file="…"/>EpigraphFrontRequired
<page title="…" file="…"/>Other Page…FrontRequired, with a title for the page’s heading
<acknowledgements file="…"/>AcknowledgementsBackRequired
<aboutTheAuthor file="…"/>About the AuthorBackRequired
<alsoBy file="…"/>Also ByBackOptional. 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 InvitationBackRequired
<nextBook/>Next in the Series (Its First Chapter)BackNone: 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:

PartRequiredWhat it is
id attributeYesA 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 attributeNoThe configuration’s name in Septangular, such as “Agent submission”. Without it, the id is shown.
<output>At least oneA file to build: see output. Several outputs build the same book in several formats at once.
<include>NoWhich scenes, and which front and back matter, go in: see include.
<style>NoHow a manuscript looks, and the chapter headings: see style.
<edition>NoWhich 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.

AttributeForValuesWithout it
formatAllpdf (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
fileAllWhere the file goes, relative to the book’s folder, such as build/the-long-tide.epub.Required
themeepub, printclassic, modern or plain.classic
trimprintThe page size: see trim sizes.5.5x8.5
bindingprintpaperback or hardcover (a case-laminate hardcover).paperback
paperprintcream, white or color. It sets the spine’s width on the cover template.cream
fontprintThe text’s typeface, by its name on your Mac, such as Garamond.Libertinus Serif
fontSizeprintIn points: 10.5pt.11pt; 16pt for large print
largePrintprinttrue for a large-print edition: bigger type, more space between lines, ragged right and unhyphenated.false
chapterStartprintrecto (chapters open on a right-hand page) or any (on the next page).recto
contentsprinttrue 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-template added 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 the manuscript folder, 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.

PaperbackHardcover too
5x8, 5.06x7.81, 5.25x8
5.5x8.5Yes
6x9, 6.14x9.21Yes
6.69x9.61
7x10Yes
7.44x9.69, 7.5x9.25, 8x10
8.25x11Yes
8.5x11, a5 (5.83 × 8.27 in)

include

AttributeValuesWithout it
minStatusThe 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
matterall, 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.

ElementValuesDefaultApplies to
<font family="…" size="…"/>A typeface by its name on your Mac, and a size.Times New Roman, 12ptManuscripts
<lineSpacing>single, onehalf, double, or a number from 1 to 3, such as 1.3.doubleManuscripts
<paper>us-letter, us-legal, us-trade, us-digest, a4, a5 or a6.us-letterManuscripts
<margins>A length, on every side.1inManuscripts
<paragraphIndent>A length: each paragraph’s first-line indent.0.5inManuscripts
<titlePage>true or false: a first page with your contact details, the title, the byline and the word count.trueManuscripts
<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.trueAll formats
<sceneBreak>The mark centred between scenes and at scene breaks.#Manuscripts
<endMarker>The mark centred after the last scene. Empty for none.ENDManuscripts
  • A length is a number and a unit: pt, mm, cm, in, or em (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.

AttributeWhat it is
nameThe edition’s name, such as Paperback or Large Print: {edition} on a copyright page, and the name offered by Mark as Published….
isbnThis 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:

AboutMessageWhat it means
The fileXML 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 &amp; and &lt;).
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-GBThe language should be a code such as en, en-GB or fr.
<metadata>: <cover> "…" must be a .jpg or .png imageThe cover’s file name must end in .jpg, .jpeg or .png.
<manuscript><manuscript> may contain <part> elements or <chapter> elements, not bothPut 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-DDWrite the due date as 2027-03-01.
<part><part> #n needs a title attributeThe nth part has no title.
<part title="…"> has no chaptersA part is empty.
<chapter><chapter title="…"> has no scenesA chapter is empty.
<scene><scene> needs a file attributeA scene doesn’t say which file it is.
<scene file="…">: status "…" must be one of outline, draft, revised, finalA misspelt status.
<stash><part> in <stash> needs a title attribute, or <part title="…"> in <stash> has no chaptersAs 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 attributeThat 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 attributeAn 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 defineddefault names no configuration.
<configuration><configuration> needs an id attributeA 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 attributeAn 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 11ptWrite 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, hardcoverA print setting with a value it can’t take.
<include>…: status "…" must be one of outline, draft, revised, finalA misspelt minStatus.
…: matter="…" should be all, none, or kinds of page (…)A misspelt kind of page.
<edition>…: <edition> isbn="…" should be digits and hyphensAn ISBN with other characters in it.
<style>…: <…> "…" is not a length like 12pt or 1inA size or margin without a unit, or with one Septangular doesn’t know.
…: <…> must be true or falseA yes-or-no setting with another value.
…: <lineSpacing> must be single, onehalf, double or 1–3Line 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>
ElementAttributeRequiredWhat it is
<series>versionYesAlways 1.
titleNoThe series’ name. Without it, the folder’s name.
<book>folderYesA book’s folder, directly inside the series’ folder. The books are numbered in this order.
<boxSet>idYesA short name for the box set, unique in the series.
titleYesThe box set’s title.
booksNoall, or the books’ numbers in the series: "1 2 3". Without it, all.
isbnNoThe box set’s own ISBN.
coverNoThe 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.