emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* image attributes in ODT export for wrapped text possible?
@ 2014-04-25 10:13 Eric S Fraga
  2014-04-26 13:04 ` Christian Moe
  0 siblings, 1 reply; 3+ messages in thread
From: Eric S Fraga @ 2014-04-25 10:13 UTC (permalink / raw)
  To: emacs-orgmode

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

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.5h-1027-g4c0a29

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: image attributes in ODT export for wrapped text possible?
  2014-04-25 10:13 image attributes in ODT export for wrapped text possible? Eric S Fraga
@ 2014-04-26 13:04 ` Christian Moe
  2014-04-27 16:46   ` Eric S Fraga
  0 siblings, 1 reply; 3+ messages in thread
From: Christian Moe @ 2014-04-26 13:04 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: emacs-orgmode


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: image attributes in ODT export for wrapped text possible?
  2014-04-26 13:04 ` Christian Moe
@ 2014-04-27 16:46   ` Eric S Fraga
  0 siblings, 0 replies; 3+ messages in thread
From: Eric S Fraga @ 2014-04-27 16:46 UTC (permalink / raw)
  To: Christian Moe; +Cc: emacs-orgmode

On Saturday, 26 Apr 2014 at 15:04, Christian Moe wrote:
> 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.

Which is what I did in the end as I needed to get the document out
fairly quickly.

> 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.)

[...]

> 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.)

Thanks for this.  I will play with this when I get a chance (when I get
some feedback on the document I sent out Friday).  What you suggest
makes perfect sense but, if I understand correctly, this will make all
figures have the wrapped style?  It is not possible to specify an option
in the org file on a per figure basis?

Thanks again,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.2, Org release_8.2.5h-1027-g4c0a29

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-27 16:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-25 10:13 image attributes in ODT export for wrapped text possible? Eric S Fraga
2014-04-26 13:04 ` Christian Moe
2014-04-27 16:46   ` Eric S Fraga

Code repositories for project(s) associated with this 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).