From 448844d66cef5f4980d0575e783757264c962bb5 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 24 Feb 2023 14:09:38 +0100 Subject: Allow multiple authors --- src/export/pdf/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/export') 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(); -- cgit v1.2.3