aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-12-19 00:08:34 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-12-19 00:08:34 -0800
commit2998618e39009e36911d261491503fb8f178ce07 (patch)
treeaab74dcc83ef8e1b3c84eaccbc83d7fec4c9d29c /src/Text
parentce21b2ca073c94926c57de3bb6816578a1c3b260 (diff)
parent4c103f67f9c4a9c65be1f5af9116c7e4250c763f (diff)
downloadpandoc-2998618e39009e36911d261491503fb8f178ce07.tar.gz
Merge branch 'AndreasLoow-master'
Diffstat (limited to 'src/Text')
-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', [])