@@ -39,7 +39,7 @@ replaceBlocks opts (Div (label,_,attrs) [Plain [Image alt img]])
39
39
f | isFormat " latex" f ->
40
40
RawInline (Format " tex" ) (" \\ label{" ++ label++ " }" ) : alt
41
41
_ -> applyTemplate idxStr alt $ figureTemplate opts
42
- return $ Para [Image alt' ( fst img, " fig: " ) ]
42
+ return $ Para [Image alt' img]
43
43
replaceBlocks opts (Div (label,_,attrs) [Plain [Math DisplayMath eq]])
44
44
| " eq:" `isPrefixOf` label
45
45
= case outFormat opts of
@@ -113,9 +113,9 @@ replaceBlocks opts
113
113
replaceBlocks _ x = return x
114
114
115
115
divBlocks :: Block -> Block
116
- divBlocks (Para (Image alt img: c))
116
+ divBlocks (Para (Image alt ( img, title) : c))
117
117
| Just label <- getRefLabel " fig" c
118
- = Div (label,[] ,[] ) [Plain [Image alt (fst img, " fig:" )]]
118
+ = Div (label,[] ,[] ) [Plain [Image alt (img, " fig:" ++ title )]]
119
119
divBlocks (Para (math@ (Math DisplayMath _eq): c))
120
120
| Just label <- getRefLabel " eq" c
121
121
= Div (label,[] ,[] ) [Plain [math]]
0 commit comments