diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 28a1e7174..7dd736da4 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -163,7 +163,7 @@ blockToLaTeX (Plain lst) = inlineListToLaTeX lst blockToLaTeX (Para [Image txt (src,tit)]) = do capt <- inlineListToLaTeX txt img <- inlineToLaTeX (Image txt (src,tit)) - return $ "\\begin{figure}[htb]" $$ "\\centering" $$ img $$ + return $ "\\begin{figure}[htbp]" $$ "\\centering" $$ img $$ ("\\caption{" <> capt <> char '}') $$ "\\end{figure}" $$ blankline blockToLaTeX (Para lst) = do result <- inlineListToLaTeX lst diff --git a/tests/writer.latex b/tests/writer.latex index e6adff585..ff6e9d58b 100644 --- a/tests/writer.latex +++ b/tests/writer.latex @@ -788,7 +788,7 @@ or here: From ``Voyage dans la Lune'' by Georges Melies (1902): -\begin{figure}[htb] +\begin{figure}[htbp] \centering \includegraphics{lalune.jpg} \caption{lalune}