Clamp held-over insertion depth with splitmaxdepth
This commit is contained in:
1 parent
0f4c1f85ae
commit
a09b1d1d36
5 files changed
+84
-12
No files matched your search
@@ -131,6 +131,7 @@ struct PageGeometry {
|
||||
top_skip: Option<i64>,
|
||||
max_depth: Option<i64>,
|
||||
split_top_skip: Option<i64>,
|
||||
split_max_depth: Option<i64>,
|
||||
hyphen_penalty: Option<i64>,
|
||||
ex_hyphen_penalty: Option<i64>,
|
||||
double_hyphen_demerits: Option<i64>,
|
||||
@@ -213,6 +214,8 @@ fn strip_page_geometry(source: &str) -> (String, PageGeometry) {
|
||||
geometry.max_depth = Some(value);
|
||||
} else if let Some(value) = dimension_assignment(trimmed, "splittopskip") {
|
||||
geometry.split_top_skip = Some(value);
|
||||
} else if let Some(value) = dimension_assignment(trimmed, "splitmaxdepth") {
|
||||
geometry.split_max_depth = Some(value);
|
||||
} else if let Some(value) = parfillskip_assignment(trimmed) {
|
||||
geometry.par_fillskip = Some(value);
|
||||
} else if let Some(value) = parshape_assignment(trimmed) {
|
||||
@@ -273,6 +276,9 @@ fn apply_geometry(document: &mut Document, geometry: &PageGeometry) {
|
||||
if let Some(skip) = geometry.split_top_skip {
|
||||
document.split_top_skip = skip;
|
||||
}
|
||||
if let Some(depth) = geometry.split_max_depth {
|
||||
document.split_max_depth = depth;
|
||||
}
|
||||
}
|
||||
|
||||
/// Read a `\parfillskip` glue assignment, preserving the `1fil` order.
|
||||
|
||||
Reference in new issue
Block a user