From: Christian Moe <mail@christianmoe.com>
To: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Cc: emacs-orgmode@gnu.org
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 [thread overview]
Message-ID: <m27gbm11of.fsf@uio.no> (raw)
In-Reply-To: <ly61r65h3r.fsf@ensc-virt.intern.sigma-chemnitz.de>
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:
<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"/>
</draw:frame>
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):
<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.
Yours,
Christian
next prev parent reply other threads:[~2013-12-03 13:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-02 17:22 Bug: Bad ODT files when including multiple images [7.9.3f (release_7.9.3f-17-g7524ef @ /usr/share/emacs/24.3/lisp/org/)] Enrico Scholz
2013-12-02 20:10 ` Jambunathan K
2013-12-02 23:54 ` Enrico Scholz
2013-12-03 11:06 ` Enrico Scholz
2013-12-03 13:53 ` Christian Moe [this message]
2013-12-03 14:25 ` Enrico Scholz
2013-12-03 14:41 ` Christian Moe
2013-12-03 15:47 ` Jambunathan K
2013-12-17 14:04 ` Tim
2013-12-17 18:46 ` Jambunathan K
2013-12-17 19:28 ` Tim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m27gbm11of.fsf@uio.no \
--to=mail@christianmoe.com \
--cc=emacs-orgmode@gnu.org \
--cc=enrico.scholz@sigma-chemnitz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).