Polish journal author and abstract typography
This commit is contained in:
1 parent
7fa81aa01d
commit
fb361b7df9
2 files changed
+25
-13
No files matched your search
@@ -1855,7 +1855,11 @@ pub(super) fn build_positioned_pages(
|
|||||||
.collect()
|
.collect()
|
||||||
};
|
};
|
||||||
let mut author_emails = Vec::new();
|
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();
|
let mut runs = author.runs.clone();
|
||||||
if !author.affiliations.is_empty() || author.corresponding {
|
if !author.affiliations.is_empty() || author.corresponding {
|
||||||
let mut marks = author
|
let mut marks = author
|
||||||
@@ -1868,8 +1872,13 @@ pub(super) fn build_positioned_pages(
|
|||||||
}
|
}
|
||||||
runs.push(Run::plain(marks));
|
runs.push(Run::plain(marks));
|
||||||
}
|
}
|
||||||
|
author_runs.extend(runs);
|
||||||
|
if let Some(email) = &author.email {
|
||||||
|
author_emails.push(email.clone());
|
||||||
|
}
|
||||||
|
}
|
||||||
for line in measure_positioned_lines(
|
for line in measure_positioned_lines(
|
||||||
&runs,
|
&author_runs,
|
||||||
base_font_size,
|
base_font_size,
|
||||||
content_width_mm,
|
content_width_mm,
|
||||||
metrics,
|
metrics,
|
||||||
@@ -1894,10 +1903,6 @@ pub(super) fn build_positioned_pages(
|
|||||||
true,
|
true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if let Some(email) = &author.email {
|
|
||||||
author_emails.push(email.clone());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for affiliation in &model.affiliations {
|
for affiliation in &model.affiliations {
|
||||||
let mut runs = vec![Run::plain(format!("{} ", superscript(affiliation.index)))];
|
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() {
|
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());
|
let mut heading = Run::plain("Abstract".to_string());
|
||||||
heading.bold = true;
|
heading.bold = true;
|
||||||
|
heading.small_caps = true;
|
||||||
for line in measure_positioned_lines(
|
for line in measure_positioned_lines(
|
||||||
std::slice::from_ref(&heading),
|
std::slice::from_ref(&heading),
|
||||||
base_font_size,
|
base_font_size,
|
||||||
content_width_mm,
|
abstract_width,
|
||||||
metrics,
|
metrics,
|
||||||
font_cache,
|
font_cache,
|
||||||
cjk_family,
|
cjk_family,
|
||||||
@@ -2028,11 +2036,15 @@ pub(super) fn build_positioned_pages(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !model.keywords.is_empty() {
|
if !model.keywords.is_empty() {
|
||||||
let mut runs = vec![Run::plain("Keywords: ".to_string())];
|
let mut label = Run::plain("Keywords: ".to_string());
|
||||||
let mut keyword_run = Run::plain(String::new());
|
label.bold = true;
|
||||||
keyword_run.bold = true;
|
let mut runs = vec![label];
|
||||||
runs.push(keyword_run);
|
for (index, keyword) in model.keywords.iter().enumerate() {
|
||||||
runs.extend(model.keywords.clone());
|
if index > 0 {
|
||||||
|
runs.push(Run::plain(", ".to_string()));
|
||||||
|
}
|
||||||
|
runs.push(keyword.clone());
|
||||||
|
}
|
||||||
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),
|
||||||
|
|||||||
+1
-1
@@ -1896,7 +1896,7 @@ Body paragraph.
|
|||||||
">Alice<",
|
">Alice<",
|
||||||
">Bob<",
|
">Bob<",
|
||||||
">Department<",
|
">Department<",
|
||||||
">Abstract<",
|
">BSTRACT<",
|
||||||
">Keywords:<",
|
">Keywords:<",
|
||||||
">abstract<",
|
">abstract<",
|
||||||
">body<",
|
">body<",
|
||||||
|
|||||||
Reference in new issue
Block a user