Skip to main content

Crate setzer_model

Crate setzer_model 

Source
Expand description

Semantic document model for Kernsetzer.

A Book describes what a manuscript contains (chapters, paragraphs, emphasis, scene breaks, front and back matter), never how it is laid out. Layout decisions live in StyleSettings (theme + parameters) and in the themes themselves.

This crate must not depend on any other setzer crate.

Re-exports§

pub use asset::Asset;
pub use project::Meta;
pub use project::Project;
pub use project::ProjectError;
pub use table::ColumnAlign;
pub use table::PlacedCell;
pub use table::Table;
pub use table::TableCell;
pub use table::TableColumn;
pub use table::TableLayout;
pub use book::*;

Modules§

asset
Images that belong to a book, referenced by Block::Image::asset.
book
The semantic document: Book → Sections → Blocks → Inlines.
isbn
ISBNs as Kernsetzer reads them, one rule for print pre-flight, the EPUB’s dc:identifier and the app’s book details.
presets
Trim sizes and retailer margin rules, as data.
project
The .kernsetzer project file: a zip archive with
table
The table block: rows and columns, header rows, per-column alignment, merged cells and a caption. A cell holds inlines.
text
Language-aware text normalization shared by print and EPUB output.

Constants§

FORMAT_VERSION
Version of the book.json schema (and .kernsetzer container) written by this build. Bump when a change is not backwards compatible, append a step to project::MIGRATIONS and commit a fixture of the old version.