diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-12-19 00:07:28 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-12-19 00:07:28 -0800 |
commit | 4c103f67f9c4a9c65be1f5af9116c7e4250c763f (patch) | |
tree | aab74dcc83ef8e1b3c84eaccbc83d7fec4c9d29c /src/Text | |
parent | ce21b2ca073c94926c57de3bb6816578a1c3b260 (diff) | |
parent | f0c47907ca1d7ee9600a574c3e007640c7700d7d (diff) | |
download | pandoc-4c103f67f9c4a9c65be1f5af9116c7e4250c763f.tar.gz |
Merge branch 'master' of https://github.com/AndreasLoow/pandoc into 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', []) |