summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-12-19 00:07:28 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-12-19 00:07:28 -0800
commit4c103f67f9c4a9c65be1f5af9116c7e4250c763f (patch)
treeaab74dcc83ef8e1b3c84eaccbc83d7fec4c9d29c /src/Text/Pandoc
parentce21b2ca073c94926c57de3bb6816578a1c3b260 (diff)
parentf0c47907ca1d7ee9600a574c3e007640c7700d7d (diff)
Merge branch 'master' of https://github.com/AndreasLoow/pandoc into AndreasLoow-master
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs7
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', [])