aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 0f47132b3..a63aca1c5 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -415,10 +415,10 @@ blockToLaTeX (Para [Image attr@(ident, _, _) txt (src,'f':'i':'g':':':tit)]) = d
else brackets <$> inlineListToLaTeX (walk deNote txt)
img <- inlineToLaTeX (Image attr txt (src,tit))
let footnotes = notesToLaTeX notes
- figure <- refLabel ident $ cr <>
+ caption <- refLabel ident ("\\caption" <> captForLof <> braces capt)
+ let figure = cr <>
"\\begin{figure}[htbp]" $$ "\\centering" $$ img $$
- ("\\caption" <> captForLof <> braces capt) $$
- "\\end{figure}" <> cr
+ caption $$ "\\end{figure}" <> cr
return $ if inNote
-- can't have figures in notes
then "\\begin{center}" $$ img $+$ capt $$ "\\end{center}"