Inset journal abstracts like the reference class
This commit is contained in:
1 parent
b8c2be8837
commit
02218dbf42
2 files changed
+6
-4
No files matched your search
@@ -2003,8 +2003,8 @@ pub(super) fn build_positioned_pages(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !model.abstract_runs.is_empty() {
|
if !model.abstract_runs.is_empty() {
|
||||||
let abstract_width = (content_width_mm - 12.0).max(40.0);
|
let abstract_width = (content_width_mm - 40.0).max(40.0);
|
||||||
let abstract_inset = millimeters_to_scaled(6.0);
|
let abstract_inset = millimeters_to_scaled(20.0);
|
||||||
let mut heading = Run::plain("Abstract".to_string());
|
let mut heading = Run::plain("Abstract".to_string());
|
||||||
heading.bold = true;
|
heading.bold = true;
|
||||||
heading.small_caps = true;
|
heading.small_caps = true;
|
||||||
@@ -2077,7 +2077,7 @@ pub(super) fn build_positioned_pages(
|
|||||||
for line in measure_positioned_lines(
|
for line in measure_positioned_lines(
|
||||||
&runs,
|
&runs,
|
||||||
base_font_size.saturating_sub(1).max(1),
|
base_font_size.saturating_sub(1).max(1),
|
||||||
content_width_mm,
|
(content_width_mm - 40.0).max(40.0),
|
||||||
metrics,
|
metrics,
|
||||||
font_cache,
|
font_cache,
|
||||||
cjk_family,
|
cjk_family,
|
||||||
@@ -2096,7 +2096,7 @@ pub(super) fn build_positioned_pages(
|
|||||||
top_skip,
|
top_skip,
|
||||||
max_depth,
|
max_depth,
|
||||||
line,
|
line,
|
||||||
millimeters_to_scaled(15.0_f64.min(content_width_mm / 4.0)),
|
millimeters_to_scaled(20.0_f64.min(content_width_mm / 4.0)),
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1976,4 +1976,6 @@ Body paragraph.
|
|||||||
"missing {needle:?} in title block: {svg}"
|
"missing {needle:?} in title block: {svg}"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
let abstract_x = text_x(&svg, "This");
|
||||||
|
assert!(abstract_x > 10.0, "journal abstract x={abstract_x}");
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user