diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-12-19 00:08:34 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-12-19 00:08:34 -0800 |
commit | 2998618e39009e36911d261491503fb8f178ce07 (patch) | |
tree | aab74dcc83ef8e1b3c84eaccbc83d7fec4c9d29c /src/Text | |
parent | ce21b2ca073c94926c57de3bb6816578a1c3b260 (diff) | |
parent | 4c103f67f9c4a9c65be1f5af9116c7e4250c763f (diff) | |
download | pandoc-2998618e39009e36911d261491503fb8f178ce07.tar.gz |
Merge branch 'AndreasLoow-master'
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index d7e0ec530..648b09c2c 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -130,7 +130,12 @@ pandocToLaTeX options (Pandoc meta blocks) = do | otherwise -> return () -- check for \usepackage...{csquotes}; if present, we'll use -- \enquote{...} for smart quotes: - when ("{csquotes}" `isInfixOf` template) $ + let headerIncludesField :: FromJSON a => Maybe a + headerIncludesField = getField "header-includes" metadata + let headerIncludes = fromMaybe [] $ mplus + (fmap return headerIncludesField) + headerIncludesField + when (any (isInfixOf "{csquotes}") (template : headerIncludes)) $ modify $ \s -> s{stCsquotes = True} let (blocks'', lastHeader) = if writerCiteMethod options == Citeproc then (blocks', []) |