Ms writer: improved pdf metadata.
This commit is contained in:
parent
7d3d5387ac
commit
c941a00cac
3 changed files with 8 additions and 2 deletions
|
@ -39,7 +39,8 @@
|
|||
.\" ***************************************************************
|
||||
.\" PDF metadata
|
||||
.mso pdfmark.tmac
|
||||
.pdfinfo /Title $title$
|
||||
.pdfinfo /Title "$title-meta$"
|
||||
.pdfinfo /Author "$author-meta$"
|
||||
$if(adjusting)$
|
||||
.ad $adjusting$
|
||||
$endif$
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -39,7 +39,8 @@
|
|||
.\" ***************************************************************
|
||||
.\" PDF metadata
|
||||
.mso pdfmark.tmac
|
||||
.pdfinfo /Title Pandoc Test Suite
|
||||
.pdfinfo /Title "Pandoc Test Suite"
|
||||
.pdfinfo /Author "John MacFarlane; Anonymous"
|
||||
.hy
|
||||
.EQ
|
||||
delim ||
|
||||
|
|
Loading…
Reference in a new issue