Expand description
The semantic document: Book → Sections → Blocks → Inlines.
Structs§
- Block
Ref - Where a top-level block is:
sections[section].blocks[block]. Edits (M4book_apply) address sections by index and blocks with this; a change inside a quote, list or footnote replaces its top-level block. Positions, not ids stored in the file: ops run one after another on the book held in Rust, so a position is exact when its op runs. - Book
- A whole book as imported and edited by the author.
- Credit
- One credit line on the copyright page.
- Custom
Theme Link - The link from a book to the custom theme it was designed from
(
StyleSettings::custom_theme). - Epigraph
- Imprint
- The rest of the copyright page (DE: Impressum); the © line, ISBNs and
edition are in
Metadata. German press law asks for the name and address of the publisher (Metadata::publisher; a self-publisher names themselves) and of the printer. Values only, printed as written; the theme adds labels (“Druck:”, “Printed by”) in the book’s language. - Lang
- BCP 47 language tag, e.g.
en,en-GB,de,de-AT. - Metadata
- Section
- Section
Number - A chapter’s or part’s number, from
Book::section_numbers. - Series
- Style
Settings - Everything about appearance the author chooses. Themes interpret the parameters; unknown parameters are kept for forward compatibility.
Enums§
- Block
- Every variant carries
extra(unknown fields, seeExtra); build blocks with the constructors below and match with... - Image
Placement - Where a picture stands.
- Image
Side - The side a
Besidepicture stands on. - Inline
- Numbering
- Section
Kind - What role a section plays. Drives page layout (display pages, running
heads, numbering) and EPUB semantics (
epub:type).
Constants§
- KIND_
BACK_ MATTER - Key for the sections after the last chapter: afterword, acknowledgments, about the author, also-by.
- KIND_
CHAPTERS - Key in
StyleSettings::kindsfor the numbered and unnumbered chapters. The mapping fromSectionKindto these keys is left to the caller. - KIND_
FRONT_ MATTER - Key for the sections before the first chapter: dedication, epigraph, foreword and the like.
- KIND_
PARTS - Key for part pages.
- MAX_
VERSE_ INDENT - The deepest verse indent level the model reads; the importers stop there too. A level is a step in from the verse’s own indent; the themes decide how far.
Type Aliases§
- Extra
- Fields in
book.jsonthat this build does not know, kept as read and written back on save, so a file saved by a newer build loses nothing when an older one re-saves it. Code never puts known field names here; leave it empty when building a value.