summaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-03-25 19:30:24 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-03-25 19:30:24 +0100
commitc941a00cac0655349b6c03618bc096ac07237779 (patch)
tree3eb53fba06e475b3ba56368f498271f7e368ecc2 /src/Text
parent7d3d5387ac9c34d88375739188f7fcaa494b82c2 (diff)
Ms writer: improved pdf metadata.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/Ms.hs4
1 files changed, 4 insertions, 0 deletions
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