Skip to content

Option to Link Images Rather Than Embed Them For ODT #9815

Closed
@iandol

Description

@iandol

Describe your proposed improvement and the problem it solves.

For many formatting workflows, editors or publishers prefer not to embed figures. ODT allows you to easily embed or link images, and in fact the opendocument writer already supports linking:

pandoc -t opendocument

![](placeholder.png)

<text:p text:style-name="Text_20_body">
<draw:frame draw:name="img1">
<draw:image xlink:href="placeholder.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" />
</draw:frame>
</text:p>

BUT odt forces the image to be embedded, so the same markdown becomes something like:

<text:p text:style-name="Standard">
 <draw:frame draw:style-name="fr3" draw:name="Image1" text:anchor-type="as-char" svg:width="4.704cm" svg:height="1.552cm" draw:z-index="0">
  <draw:image draw:mime-type="image/png">
    <office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAMgAAABCCAMAAAAlrWkSAAABUFBMVEXL//jK/vfK/fbJ/fbJ
       /PXI/PXI+/TH+/TH+vPG+fLG+PHF+PHF9/HF9/DE9/DE9u/D9u/D9e/D9e7D9O7C9O3C8+3C
       8+zB8uvA8uvA8evA8eq/8Oq/8Om/7+m+7+m+7+i+7ui97ue97ee97ea87Oa87OW76+W76+S7
       6uS66uS66uO66eO56eK56OK46OG45+G35uC35t+25d+25N61492049204ty04duz4duz4dqz
       4Nqy4Nqx3tiw3dew3dav3Nau29Wu2tSt2dOs2NKr19Gr1tCq1c+p1c+p1M+o082n0s2n0syn
       0cym0cum0Mul0Mqlz8qlz8mkzsmkzsikzcijzcijzcejzMeizMaiy8WhysWhysSgycSgycOf
       yMOfyMKfx8Kex8GexsGdxsCdxcCdxb+cxL+cxL6cw76bw76bwr2awr2awryawbyZwbuZwLud
       UsQ6AAACBElEQVR42u3VA7J0OxgF0N38r23btm3bNs+ef/ElaVSzjPPdlzWJhf8ny7Isy7Ks
       0nn8DYdOCf6CHvIA8sH/RLIb8s1SefRDuvxfajOQbpvGTz5ka2XYFkTz3jGiBZJNMerWC7my
       v6i8rFCbgFzr1AaCr1S+siFVA7UzYJDaGgTKbJ7cuKNRCeCc2sfBfG+JB1LkdcxsPzNqGUoV
       o35OlwbLfXC34t75/XfG+ciAtsI4zuXKSG0AbuVZZ5IRGJmfTPRaBNfybDLe/YoHIb1nP4zz
       VgYX8+4yzLlaGa0PIoanpG/+4JNhnxVwNd8hjRUfUmtyqH3VwOUCJzSGkFLOI7WfBrhe8IJG
       P1LIuqP22wIBMq5odCNJxjU1px0iZN5Qc9qQ4N8ljR4IkX1P7bcJcYLnNAYgRt4jte8AYi3T
       GIYgBS9UfhFnkdoYRBmmcos4Y1QuIcsMlT3E6aLyAllWqCwjTiU1H0Q5pDINzT+8UAQtk1oR
       RHmI5J4z905yuwnKD5UmSOJxqNShet1hyPWQD7dUBiFJDrWJc8Z4m72gMgNJapjWKiTpZVqH
       kGSSjNpuzJ59Y9QjJFli2NdiIRTf0DXDHA8E2aXxMBZERNMOQ3IhyA2Vo04PYhUtfVGphSDf
       /F0tR5J/449kH+TIeJ3JREqe7uNpyOHzIb0gLMuyLMuyLFn+A7VPEV2OysTaAAAAAElFTkSu
       QmCC
    </office:binary-data>
   </draw:image>
  </draw:frame>
</text:p>

It would be great if there was a command-line option to allow to link to images (i.e. preserve the opendocument way for odt). This way we could generate ODT files with figures that were linked. The same technically applies to DOCX (Word does allow linking, but of course the syntax is much more complex).

Describe alternatives you've considered.

I imagine a Lua filter could do this, and I suspect it is a viable workaround?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions