LaTeX writer: ensure that -M csquotes works even in fragment mode.

Closes #6265.
This commit is contained in:
John MacFarlane 2020-04-11 10:40:59 -07:00
parent dd06d63540
commit 9187b4bca9
2 changed files with 17 additions and 10 deletions

View file

@ -155,7 +155,8 @@ pandocToLaTeX options (Pandoc meta blocks) = do
_ -> "article"
when (documentClass `elem` chaptersClasses) $
modify $ \s -> s{ stHasChapters = True }
case T.toLower . render Nothing <$> getField "csquotes" metadata of
case lookupContext "csquotes" (writerVariables options) `mplus`
(stringify <$> lookupMeta "csquotes" meta) of
Nothing -> return ()
Just "false" -> return ()
Just _ -> modify $ \s -> s{stCsquotes = True}

6
test/command/6265.md Normal file
View file

@ -0,0 +1,6 @@
```
% pandoc -f markdown -t latex -M csquotes=true
"test"
^D
\enquote{test}
```