aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-02-11 19:03:46 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2011-02-11 19:03:46 -0800
commit84bf84650353d42668a9e5c8ac9f9609c3f6da6a (patch)
tree4af608b95876d0a6d17a95b6f36aa9297a6fa1db
parent37fa6df612c5d02acd7ff177293e2d7c4630ccb2 (diff)
downloadpandoc-84bf84650353d42668a9e5c8ac9f9609c3f6da6a.tar.gz
LaTeX writer: Changed figure defaults to htbp.
This prevents "too many unprocessed floats." Resolves Issue #285.
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs2
-rw-r--r--tests/writer.latex2
2 files changed, 2 insertions, 2 deletions
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: <http://example.com/>
From ``Voyage dans la Lune'' by Georges Melies (1902):
-\begin{figure}[htb]
+\begin{figure}[htbp]
\centering
\includegraphics{lalune.jpg}
\caption{lalune}