@@ -311,12 +311,14 @@ blockToLaTeX (Plain lst) =
311311 inlineListToLaTeX $ dropWhile isLineBreakOrSpace lst
312312-- title beginning with fig: indicates that the image is a figure
313313blockToLaTeX (Para [Image txt (src,'f':'i':'g':':':tit)]) = do
314− capt <- if null txt
315− then return empty
316− else (\c -> "\\caption" <> braces c) `fmap` inlineListToLaTeX txt
314+ inNote <- gets stInNote
315+ capt <- inlineListToLaTeX txt
317316 img <- inlineToLaTeX (Image txt (src,tit))
318− return $ "\\begin{figure}[htbp]" $$ "\\centering" $$ img $$
319− capt $$ "\\end{figure}"
317+ return $ if inNote
318+ -- can't have figures in notes
319+ then "\\begin{center}" $$ img $+$ capt $$ "\\end{center}"
320+ else "\\begin{figure}[htbp]" $$ "\\centering" $$ img $$
321+ ("\\caption" <> braces capt) $$ "\\end{figure}"
320322-- . . . indicates pause in beamer slides
321323blockToLaTeX (Para [Str ".",Space,Str ".",Space,Str "."]) = do
322324 beamer <- writerBeamer `fmap` gets stOptions