mod continuous;
mod layout;
mod notes;
mod paginated;
mod precise;
mod print;
mod responsive;
mod style;
mod toc;
mod typography;
pub use continuous::{Continuous, Section};
pub use layout::{ColumnLayout, GridArea, GridLayout};
pub use notes::{EndnotesConfig, FootnotePosition, FootnoteSeparator, FootnotesConfig};
pub use paginated::{FlowElement, Margins, PageElement, PageSize, Paginated, Position};
pub use precise::{
FontMetrics, LineInfo, PageRegion, PageTemplate, PreciseLayout, PrecisePage,
PrecisePageElement, PrecisePageSize,
};
pub use print::{
AlternateColor, BleedBox, ColorSpace, CropMarkStyle, MasterElementType, MasterPage,
MasterPageElement, MasterPageRegion, OutputIntent, PageBox, PdfXCompliance, PdfXLevel,
PlaceholderDefinition, PlaceholderType, PrintSpecification, RegionAlignment, SpotColor,
SpotColorType,
};
pub use responsive::{Breakpoint, Responsive, ResponsiveDefaults, ResponsiveStyle};
pub use style::{
Color, CssValue, FontWeight, Scale, Style, StyleMap, TextAlign, Transform, TransformOrigin,
WritingMode,
};
pub use toc::{TocConfig, TocLeaders};
pub use typography::{
BaselineGrid, HyphenationConfig, LineNumbering, LineNumberingRestart, LineNumberingSide,
TypographyConfig,
};
#[derive(Debug, Clone, Copy, PartialEq, Eq, strum::Display)]
#[strum(serialize_all = "lowercase")]
pub enum PresentationType {
Paginated,
Continuous,
Responsive,
Precise,
}
impl PresentationType {
#[must_use]
pub const fn as_str(&self) -> &'static str {
match self {
Self::Paginated => "paginated",
Self::Continuous => "continuous",
Self::Responsive => "responsive",
Self::Precise => "precise",
}
}
#[must_use]
pub const fn is_reactive(&self) -> bool {
matches!(self, Self::Paginated | Self::Continuous | Self::Responsive)
}
#[must_use]
pub const fn is_precise(&self) -> bool {
matches!(self, Self::Precise)
}
}