Added proper support for embedded images to opendocument writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1331 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
parent
333f3c607f
commit
e6b7cb608a
1 changed files with 6 additions and 1 deletions
|
@ -383,7 +383,7 @@ inlineToOpenDocument o ils
|
||||||
| TeX s <- ils = preformatted s
|
| TeX s <- ils = preformatted s
|
||||||
| HtmlInline s <- ils = preformatted s
|
| HtmlInline s <- ils = preformatted s
|
||||||
| Link l (s,t) <- ils = mkLink s t <$> inlinesToOpenDocument o l
|
| Link l (s,t) <- ils = mkLink s t <$> inlinesToOpenDocument o l
|
||||||
| Image l (s,t) <- ils = mkLink s t <$> inlinesToOpenDocument o l
|
| Image l (s,t) <- ils = mkImg s t <$> inlinesToOpenDocument o l
|
||||||
| Note l <- ils = mkNote l
|
| Note l <- ils = mkNote l
|
||||||
| otherwise = return empty
|
| otherwise = return empty
|
||||||
where
|
where
|
||||||
|
@ -392,6 +392,11 @@ inlineToOpenDocument o ils
|
||||||
, ("xlink:href" , s )
|
, ("xlink:href" , s )
|
||||||
, ("office:name", t )
|
, ("office:name", t )
|
||||||
] . inSpanTags "Definition"
|
] . inSpanTags "Definition"
|
||||||
|
mkImg s _ l = ($$) l . inTags False "draw:frame" [] $
|
||||||
|
selfClosingTag "draw:image" [ ("xlink:href" , s )
|
||||||
|
, ("xlink:type" , "simple")
|
||||||
|
, (" xlink:show" , "embed" )
|
||||||
|
, ("xlink:actuate", "onLoad")]
|
||||||
mkNote l = do
|
mkNote l = do
|
||||||
n <- length <$> gets stNotes
|
n <- length <$> gets stNotes
|
||||||
let footNote t = inTags False "text:note"
|
let footNote t = inTags False "text:note"
|
||||||
|
|
Loading…
Add table
Reference in a new issue