@@ -498,12 +498,15 @@ inlineCommands = M.fromList $
498498 [ "noindent", "index", "nocite" ]
499499
500500mkImage :: 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
502505 case takeExtension src of
503506 "" -> do
504507 defaultExt <- getOption readerDefaultImageExtension
505− return $ image (addExtension src defaultExt) "" (str "image")
506− _ -> return $ image src "" (str "image")
508+ return $ image (addExtension src defaultExt) "" alt
509+ _ -> return $ image src "" alt
507510
508511inNote :: Inlines -> Inlines
509512inNote ils =