Skip to content

Commit 63a949d

Browse files
committed
LaTeX writer: use displayquote for block quotes with csquotes.
Closes #10456.
1 parent e096e06 commit 63a949d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Text/Pandoc/Writers/LaTeX.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ blockToLaTeX (LineBlock lns) =
426426
blockToLaTeX $ linesToPara lns
427427
blockToLaTeX (BlockQuote lst) = do
428428
beamer <- gets stBeamer
429+
csquotes <- liftM stCsquotes get
429430
case lst of
430431
[b] | beamer && isListBlock b -> do
431432
oldIncremental <- gets stIncremental
@@ -438,7 +439,10 @@ blockToLaTeX (BlockQuote lst) = do
438439
modify (\s -> s{stInQuote = True})
439440
contents <- blockListToLaTeX lst
440441
modify (\s -> s{stInQuote = oldInQuote})
441-
return $ "\\begin{quote}" $$ contents $$ "\\end{quote}"
442+
let envname = if csquotes then "displayquote" else "quote"
443+
return $ ("\\begin" <> braces envname) $$
444+
contents $$
445+
("\\end" <> braces envname)
442446
blockToLaTeX (CodeBlock (identifier,classes,keyvalAttr) str) = do
443447
opts <- gets stOptions
444448
inNote <- stInNote <$> get

0 commit comments

Comments
 (0)