From: Christian Moe <mail@christianmoe.com>
To: Eric S Fraga <e.fraga@ucl.ac.uk>
Cc: emacs-orgmode@gnu.org
Subject: Re: image attributes in ODT export for wrapped text possible?
Date: Sat, 26 Apr 2014 15:04:18 +0200 [thread overview]
Message-ID: <m2ha5gqm25.fsf@vpn-client375.uio.no> (raw)
In-Reply-To: <87ha5h7m4c.fsf@ucl.ac.uk>
Hello,
Yes, it's possible, though if you're only going to wrap a single image
in the final output, it's very likely easier to just open the document
in LibreOffice, right-click the image and take it from there.
Anyway, here's one way to do it by creating a custom style. (If it's
possible to pass wrap settings directly, I don't know how.)
Exported images are contained in frames, and it's the wrap settings of
the surrounding frame that matters. Luckily, ODT supports frame styles,
so you just have to create a styles file with an extra frame style for
the wrapping you want. This is easier than it sounds, though see the
manual 12.9.4, "Applying custom styles" for useful tips on how to do it
right.
So: export a sample ODT document with the images you want. Open it in
OpenOffice/LibreOffice. Open the "Styles and Formatting" window, go to
the "Frames" tab.
If your image has a caption, it will be wrapped in two frames, with the
outer one styled "OrgImageCaptionFrame". Right-click this style and
choose "New" to add a derived style. A window opens. Under the
"Organizer" tab, change the new style's name from "Untitled1" to
e.g. "OrgImageCaptionFrameWrapped". Under the "Wrap" tab, choose the
wrap settings you want.
Exported images *without* captions are contained in a single frame with
the style "OrgDisplayImage". To wrap such images too, you may want to
create a "OrgDisplayImageWrapped" style, following the same steps as
above. Customize any existing styles you like while you're at it.
Now save the ODT document as your styles file,
e.g. "/path/MyStyles.odt".
Back in your org document, set:
#+ODT_STYLES_FILE: "/path/MyStyles.odt"
[...]
Let me know if this works for you. (If not, though, I may not be able to
help -- I'll be offline for a few days.)
Yours,
Christian
Eric S Fraga writes:
> Hello,
>
> I (for my sins) am needing to export an org document to ODT unlike my
> usual target of PDF via LaTeX. One of my figures is ideally placed by
> having text wrap (flow) around it. Having looked at ox-odt.el, I can
> see that I can specify values for :anchor, :style and :attributes but I
> have no idea if what I want is possible at all and, if so, how to
> specify it! Any pointers would be greatly welcome.
>
> Thanks,
> eric
next prev parent reply other threads:[~2014-04-26 13:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-25 10:13 image attributes in ODT export for wrapped text possible? Eric S Fraga
2014-04-26 13:04 ` Christian Moe [this message]
2014-04-27 16:46 ` Eric S Fraga
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2ha5gqm25.fsf@vpn-client375.uio.no \
--to=mail@christianmoe.com \
--cc=e.fraga@ucl.ac.uk \
--cc=emacs-orgmode@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.