LaTeX writer: ensure that -M csquotes
works even in fragment mode.
Closes #6265.
This commit is contained in:
parent
dd06d63540
commit
9187b4bca9
2 changed files with 17 additions and 10 deletions
|
@ -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
6
test/command/6265.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
```
|
||||
% pandoc -f markdown -t latex -M csquotes=true
|
||||
"test"
|
||||
^D
|
||||
\enquote{test}
|
||||
```
|
Loading…
Reference in a new issue