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 (ADR-0014 § 3, 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 and unused until M5-36. 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
(ADR-0014, M5-34). Absent means before M5-34, when a theme ignores a
value it does not declare, so leftovers from an earlier theme may sit
in the maps. M5-34 writes 1 on new books and when it normalizes an old
one. Reserved in format version 2; nothing reads or writes it until
M5-34.
custom_theme: Option<CustomThemeLink>The custom theme this book’s design was taken from (ADR-0015 § Where it lives): 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 until M5-39.
extra: ExtraFields written by newer builds, kept on round-trip.