@@ -395,12 +395,17 @@ blockToLaTeX (Plain lst) =
395395blockToLaTeX (Para [Image txt (src,'f':'i':'g':':':tit)]) = do
396396 inNote <- gets stInNote
397397 capt <- inlineListToLaTeX txt
398+ -- We can't have footnotes in the list of figures, so remove them:
399+ captForLof <- if null (query queryNote txt)
400+ then return empty
401+ else brackets <$> inlineListToLaTeX (walk deNote txt)
398402 img <- inlineToLaTeX (Image txt (src,tit))
399403 return $ if inNote
400404 -- can't have figures in notes
401405 then "\\begin{center}" $$ img $+$ capt $$ "\\end{center}"
402406 else "\\begin{figure}[htbp]" $$ "\\centering" $$ img $$
403− ("\\caption" <> braces capt) $$ "\\end{figure}"
407+ ("\\caption" <> captForLof <> braces capt) $$
408+ "\\end{figure}"
404409-- . . . indicates pause in beamer slides
405410blockToLaTeX (Para [Str ".",Space,Str ".",Space,Str "."]) = do
406411 beamer <- writerBeamer `fmap` gets stOptions
@@ -1202,3 +1207,11 @@ commonFromBcp47 x = fromIso $ head x
12021207 fromIso "ur" = "urdu"
12031208 fromIso "vi" = "vietnamese"
12041209 fromIso _ = ""
1210+
1211+queryNote :: Inline -> [Inline]
1212+queryNote (Note xs) = [Note xs]
1213+queryNote _ = []
1214+
1215+deNote :: Inline -> Inline
1216+deNote (Note _) = RawInline (Format "latex") ""
1217+deNote x = x