Skip to content

Commit

Permalink
LaTeX writer: use displayquote for block quotes with csquotes.
Browse files Browse the repository at this point in the history
Closes #10456.
  • Loading branch information
jgm committed Dec 18, 2024
1 parent e096e06 commit 63a949d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Text/Pandoc/Writers/LaTeX.hs
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ blockToLaTeX (LineBlock lns) =
blockToLaTeX $ linesToPara lns
blockToLaTeX (BlockQuote lst) = do
beamer <- gets stBeamer
csquotes <- liftM stCsquotes get
case lst of
[b] | beamer && isListBlock b -> do
oldIncremental <- gets stIncremental
Expand All @@ -438,7 +439,10 @@ blockToLaTeX (BlockQuote lst) = do
modify (\s -> s{stInQuote = True})
contents <- blockListToLaTeX lst
modify (\s -> s{stInQuote = oldInQuote})
return $ "\\begin{quote}" $$ contents $$ "\\end{quote}"
let envname = if csquotes then "displayquote" else "quote"
return $ ("\\begin" <> braces envname) $$
contents $$
("\\end" <> braces envname)
blockToLaTeX (CodeBlock (identifier,classes,keyvalAttr) str) = do
opts <- gets stOptions
inNote <- stInNote <$> get
Expand Down

0 comments on commit 63a949d

Please sign in to comment.