From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: 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 Message-ID: References: <87ob4zko8o.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnqQP-0005Vz-Ft for emacs-orgmode@gnu.org; Tue, 03 Dec 2013 08:54:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnqQG-0006Fu-2E for emacs-orgmode@gnu.org; Tue, 03 Dec 2013 08:54:05 -0500 Received: from mail-forward1.uio.no ([2001:700:100:10::70]:58062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnqQF-0005vM-NS for emacs-orgmode@gnu.org; Tue, 03 Dec 2013 08:53:55 -0500 Received: from exim by mail-out1.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1VnqPd-0004a6-It for emacs-orgmode@gnu.org; Tue, 03 Dec 2013 14:53:17 +0100 In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Enrico Scholz Cc: emacs-orgmode@gnu.org Hi, 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 [[file:test1.jpg]] [[file:test2.jpg]] results in unnamed image frames, e.g. for the first image of the example: 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. e.g. #+caption: A picture [[file:test1.jpg]] #+caption: Another picture [[file:test2.jpg]] exports without a problem, because it results in draw:frame elements like (for the first picture of the example): ^^^^^^^^^^^^^^^^^^^^^ 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. Yours, Christian