[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bug: Bad ODT files when including multiple images [7.9.3f (relea

From: Christian Moe
Subject: Re: [O] Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)]
Date: Tue, 03 Dec 2013 14:53:04 +0100
User-agent: mu4e; emacs 24.3.1


This problem was also reported by Tyler Smith a couple of weeks back. I
confirmed it and did a little checking. Unfortunately I also sort of
promised a patch, which I never got around to. 

Instead, let me report what I've found about the syntax:

It seems LibreOffice 4.1 now requires that draw:frame elements wrapping
images be uniquely named with the draw:name attribute if there's more
than one of them.

Multiple uncaptioned images fail because Org currently wraps them in
frames without these attributes.

e.g. a simple document containing



results in unnamed image frames, e.g. for the first image of the

  <draw:frame draw:style-name="OrgDisplayImage" 
  svg:width="12.70cm" svg:height="12.70cm" text:anchor-type="paragraph">

  <draw:image xlink:href="Images/0001.jpg" xlink:type="simple"
  xlink:show="embed" xlink:actuate="onLoad"/> 


This now results in a read error in LibreOffice 4.1. LibreOffice uses
draw:name="graphics1", "graphics2" etc. for the draw:frame element when
a picture is inserted, but I think any unique value will do.

The problem does not occur if you add captions to the images. Then the
draw:frame gets a draw:name attribute containing the caption text.


  #+caption: A picture

  #+caption: Another picture

exports without a problem, because it results in draw:frame elements
like (for the first picture of the example):

  <draw:frame draw:style-name="OrgCaptionedImage" (...)
  draw:name="A picture" text:anchor-type="paragraph">
However, this only works as long as each caption is unique. If you have
more than one image with identical #+captions, even if they have different
#+names, you get the read error. 

So we may need a fix for the corner case of identical captions as well.

I haven't checked what other elements may be affected by similar new
requirements besides images.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]