pub struct Config {
pub template_dir: String,
pub templates: HashMap<String, String>,
pub keep_typst_files: bool,
pub template_parameters: HashMap<String, String>,
pub chapter_imports: Option<String>,
pub max_width: Option<f64>,
pub max_height: Option<f64>,
}Fields§
§template_dir: Stringthe typst template directory that holds all templates you can reference
templates: HashMap<String, String>the list of template name and template file name. this tool will generate a pdf file for each template if no template is provided, it will generate a default pdf file without template.
keep_typst_files: boolwhether the intermidate typst files for each chapter should be kept or not.
template_parameters: HashMap<String, String>parameter and value pairs for template use. you can define your value pair that match your template definition.
chapter_imports: Option<String>option multi-lines string that can be imported at the beginning of each chapter. it’s very useful when you want to add the import statements for popular typst external functions.
max_width: Option<f64>max_width in a floating number between 0.0 and 1.0 (include). this constraint will only be applied when the max height already meets the requirement.
max_height: Option<f64>max_height in a floating number between 0.0 and 1.0 (include).