diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-11-16 14:09:09 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-11-16 14:09:09 -0800 |
commit | 892ba2dd163cbba598cbd86814a594008aae9f27 (patch) | |
tree | f2b4929a7ff0a21e150d383ef1b6ea53925546cf | |
parent | b4441c940dc76d1a64636ef88287b38306ebccb4 (diff) | |
download | pandoc-892ba2dd163cbba598cbd86814a594008aae9f27.tar.gz |
LaTeX writer: Properly escape pdftitle, pdfauthor.
Closes #1059.
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 72b0bde6d..7ff64cf74 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -126,14 +126,16 @@ pandocToLaTeX options (Pandoc meta blocks) = do (biblioTitle :: String) <- liftM (render colwidth) $ inlineListToLaTeX lastHeader let main = render colwidth $ vsep body st <- get + titleMeta <- stringToLaTeX TextString $ stringify $ docTitle meta + authorsMeta <- mapM (stringToLaTeX TextString . stringify) $ docAuthors meta let context = defField "toc" (writerTableOfContents options) $ defField "toc-depth" (show (writerTOCDepth options - if writerChapters options then 1 else 0)) $ defField "body" main $ - defField "title-meta" (stringify $ docTitle meta) $ - defField "author-meta" (intercalate "; " $ map stringify $ docAuthors meta) $ + defField "title-meta" titleMeta $ + defField "author-meta" (intercalate "; " authorsMeta) $ defField "documentclass" (if writerBeamer options then ("beamer" :: String) else if writerChapters options |