pub struct StyleSettings {
pub theme: String,
pub trim: TrimSize,
pub params: Map<String, Value>,
pub kinds: BTreeMap<String, Map<String, Value>>,
pub params_version: Option<u32>,
pub custom_theme: Option<CustomThemeLink>,
pub extra: Extra,
}Expand description
Everything about appearance the author chooses. Themes interpret the parameters; unknown parameters are kept for forward compatibility.
Fields§
§theme: String§trim: TrimSize§params: Map<String, Value>§kinds: BTreeMap<String, Map<String, Value>>Design choices for a kind of section (between the book’s params and
one section’s style), keyed by KIND_CHAPTERS, KIND_PARTS,
KIND_FRONT_MATTER and KIND_BACK_MATTER. Reserved in format
version 2. Unknown keys are kept, since a newer build may add kinds;
values are stored as given.
params_version: Option<u32>Which rules params, kinds and the sections’ style were set under.
Absent means the older rules, under which a theme ignores a value it
does not declare, so leftovers from an earlier theme may sit in the
maps. Newer builds write 1 on new books and when they normalize an old
one. Reserved in format version 2; nothing reads or writes it yet.
custom_theme: Option<CustomThemeLink>The custom theme this book’s design was taken from: a link only, since the book keeps its own copy of the values and art. Reserved in format version 2; nothing reads or writes it yet.
extra: ExtraFields written by newer builds, kept on round-trip.