@@ -498,12 +498,15 @@ inlineCommands = M.fromList $
498 [ "noindent", "index", "nocite" ]
498 [ "noindent", "index", "nocite" ]
500mkImage :: String -> LP Inlines
500mkImage :: String -> LP Inlines
501−mkImage src =
501+mkImage src = do
502+ -- try for a caption
503+ alt <- option (str "image") $ try $ spaces >>
504+ controlSeq "caption" >> optional (char '*') >> grouped inline
502 case takeExtension src of
505 case takeExtension src of
504 defaultExt <- getOption readerDefaultImageExtension
507 defaultExt <- getOption readerDefaultImageExtension
505− return $ image (addExtension src defaultExt) "" (str "image")
508+ return $ image (addExtension src defaultExt) "" alt
506− _ -> return $ image src "" (str "image")
509+ _ -> return $ image src "" alt
508inNote :: Inlines -> Inlines
511inNote :: Inlines -> Inlines
509inNote ils =
512inNote ils =