From c941a00cac0655349b6c03618bc096ac07237779 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 25 Mar 2017 19:30:24 +0100 Subject: Ms writer: improved pdf metadata. --- src/Text/Pandoc/Writers/Ms.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Writers/Ms.hs b/src/Text/Pandoc/Writers/Ms.hs index 6e8c1bd63..7d0c278a6 100644 --- a/src/Text/Pandoc/Writers/Ms.hs +++ b/src/Text/Pandoc/Writers/Ms.hs @@ -117,11 +117,15 @@ pandocToMs opts (Pandoc meta blocks) = do body <- blockListToMs opts blocks let main = render' body hasInlineMath <- gets stHasInlineMath + let titleMeta = (escapeString . stringify) $ docTitle meta + let authorsMeta = map (escapeString . stringify) $ docAuthors meta let context = defField "body" main $ defField "has-inline-math" hasInlineMath $ defField "hyphenate" True $ defField "pandoc-version" pandocVersion $ defField "toc" (writerTableOfContents opts) + $ defField "title-meta" titleMeta + $ defField "author-meta" (intercalate "; " authorsMeta) $ metadata case writerTemplate opts of Nothing -> return main -- cgit v1.2.3