diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-24 14:09:38 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-24 14:09:38 +0100 |
| commit | 448844d66cef5f4980d0575e783757264c962bb5 (patch) | |
| tree | f280aaef927da2a30c18f13cc124c8eb77ad3abf /src/export | |
| parent | 6547c2d6d5b25f44e52ac56698ed08ff6a5dbb3a (diff) | |
Allow multiple authors
Diffstat (limited to 'src/export')
| -rw-r--r-- | src/export/pdf/mod.rs | 8 |
1 files changed, 5 insertions, 3 deletions
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(); |
