From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Moe Subject: Re: image attributes in ODT export for wrapped text possible? Date: Sat, 26 Apr 2014 15:04:18 +0200 Message-ID: References: <87ha5h7m4c.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1We2Hp-0001vX-1r for emacs-orgmode@gnu.org; Sat, 26 Apr 2014 09:05:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1We2Hf-00045G-6q for emacs-orgmode@gnu.org; Sat, 26 Apr 2014 09:04:56 -0400 Received: from mail-forward1.uio.no ([2001:700:100:10::70]:51749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1We2He-0003xa-Rf for emacs-orgmode@gnu.org; Sat, 26 Apr 2014 09:04:47 -0400 Received: from exim by mail-out1.uio.no with local-bsmtp (Exim 4.75) (envelope-from ) id 1We2H6-0006sz-8G for emacs-orgmode@gnu.org; Sat, 26 Apr 2014 15:04:12 +0200 In-reply-to: <87ha5h7m4c.fsf@ucl.ac.uk> 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: Eric S Fraga Cc: emacs-orgmode@gnu.org 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