diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc.rs | 2 | ||||
| -rw-r--r-- | src/export/pdf/mod.rs | 8 |
2 files changed, 6 insertions, 4 deletions
@@ -25,7 +25,7 @@ pub struct Document { /// The document's title. pub title: Option<EcoString>, /// The document's author. - pub author: Option<EcoString>, + pub author: Vec<EcoString>, } /// A finished layout with elements at fixed positions. diff --git a/src/export/pdf/mod.rs b/src/export/pdf/mod.rs index 69fa805b..3813bad5 100644 --- a/src/export/pdf/mod.rs +++ b/src/export/pdf/mod.rs @@ -122,9 +122,11 @@ fn write_catalog(ctx: &mut PdfContext) { info.title(TextStr(title)); xmp.title([(None, title.as_str())]); } - if let Some(author) = &ctx.document.author { - info.author(TextStr(author)); - xmp.creator([(author.as_str())]); + + let authors = &ctx.document.author; + if !authors.is_empty() { + info.author(TextStr(&authors.join(", "))); + xmp.creator(authors.iter().map(|s| s.as_str())); } info.creator(TextStr("Typst")); info.finish(); |
