Polish journal author and abstract typography
This commit is contained in:
1 parent
7fa81aa01d
commit
fb361b7df9
2 files changed
+46
-34
No files matched your search
@@ -1855,7 +1855,11 @@ pub(super) fn build_positioned_pages(
|
||||
.collect()
|
||||
};
|
||||
let mut author_emails = Vec::new();
|
||||
for author in &model.authors {
|
||||
let mut author_runs = Vec::new();
|
||||
for (author_index, author) in model.authors.iter().enumerate() {
|
||||
if author_index > 0 {
|
||||
author_runs.push(Run::plain(" and ".to_string()));
|
||||
}
|
||||
let mut runs = author.runs.clone();
|
||||
if !author.affiliations.is_empty() || author.corresponding {
|
||||
let mut marks = author
|
||||
@@ -1868,36 +1872,37 @@ pub(super) fn build_positioned_pages(
|
||||
}
|
||||
runs.push(Run::plain(marks));
|
||||
}
|
||||
for line in measure_positioned_lines(
|
||||
&runs,
|
||||
base_font_size,
|
||||
content_width_mm,
|
||||
metrics,
|
||||
font_cache,
|
||||
cjk_family,
|
||||
mono_family,
|
||||
sans_family,
|
||||
math_metrics,
|
||||
math_layout,
|
||||
cache,
|
||||
) {
|
||||
push_title_line(
|
||||
&mut pages,
|
||||
&mut deferred,
|
||||
&mut cursor,
|
||||
page_breaks,
|
||||
page_goal,
|
||||
top_skip,
|
||||
max_depth,
|
||||
line,
|
||||
0,
|
||||
true,
|
||||
);
|
||||
}
|
||||
author_runs.extend(runs);
|
||||
if let Some(email) = &author.email {
|
||||
author_emails.push(email.clone());
|
||||
}
|
||||
}
|
||||
for line in measure_positioned_lines(
|
||||
&author_runs,
|
||||
base_font_size,
|
||||
content_width_mm,
|
||||
metrics,
|
||||
font_cache,
|
||||
cjk_family,
|
||||
mono_family,
|
||||
sans_family,
|
||||
math_metrics,
|
||||
math_layout,
|
||||
cache,
|
||||
) {
|
||||
push_title_line(
|
||||
&mut pages,
|
||||
&mut deferred,
|
||||
&mut cursor,
|
||||
page_breaks,
|
||||
page_goal,
|
||||
top_skip,
|
||||
max_depth,
|
||||
line,
|
||||
0,
|
||||
true,
|
||||
);
|
||||
}
|
||||
|
||||
for affiliation in &model.affiliations {
|
||||
let mut runs = vec![Run::plain(format!("{} ", superscript(affiliation.index)))];
|
||||
@@ -1969,12 +1974,15 @@ pub(super) fn build_positioned_pages(
|
||||
}
|
||||
|
||||
if !model.abstract_runs.is_empty() {
|
||||
let abstract_width = (content_width_mm - 12.0).max(40.0);
|
||||
let abstract_inset = millimeters_to_scaled(6.0);
|
||||
let mut heading = Run::plain("Abstract".to_string());
|
||||
heading.bold = true;
|
||||
heading.small_caps = true;
|
||||
for line in measure_positioned_lines(
|
||||
std::slice::from_ref(&heading),
|
||||
base_font_size,
|
||||
content_width_mm,
|
||||
abstract_width,
|
||||
metrics,
|
||||
font_cache,
|
||||
cjk_family,
|
||||
@@ -2028,11 +2036,15 @@ pub(super) fn build_positioned_pages(
|
||||
}
|
||||
|
||||
if !model.keywords.is_empty() {
|
||||
let mut runs = vec![Run::plain("Keywords: ".to_string())];
|
||||
let mut keyword_run = Run::plain(String::new());
|
||||
keyword_run.bold = true;
|
||||
runs.push(keyword_run);
|
||||
runs.extend(model.keywords.clone());
|
||||
let mut label = Run::plain("Keywords: ".to_string());
|
||||
label.bold = true;
|
||||
let mut runs = vec![label];
|
||||
for (index, keyword) in model.keywords.iter().enumerate() {
|
||||
if index > 0 {
|
||||
runs.push(Run::plain(", ".to_string()));
|
||||
}
|
||||
runs.push(keyword.clone());
|
||||
}
|
||||
for line in measure_positioned_lines(
|
||||
&runs,
|
||||
base_font_size.saturating_sub(1).max(1),
|
||||
|
||||
+1
-1
@@ -1896,7 +1896,7 @@ Body paragraph.
|
||||
">Alice<",
|
||||
">Bob<",
|
||||
">Department<",
|
||||
">Abstract<",
|
||||
">BSTRACT<",
|
||||
">Keywords:<",
|
||||
">abstract<",
|
||||
">body<",
|
||||
|
||||
Reference in new issue
Block a user