From: Jambunathan K <kjambunathan@gmail.com>
To: "Jérémy Compostella" <jeremy.compostella@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [odt] [PATCH] Anchoring image to a page
Date: Mon, 26 Dec 2011 16:31:50 +0530 [thread overview]
Message-ID: <81sjk7d2ap.fsf@gmail.com> (raw)
In-Reply-To: <86zkflxl5k.fsf@gmail.com> ("Jérémy Compostella"'s message of "Thu, 24 Nov 2011 22:31:19 +0100")
[-- Attachment #1: Type: text/plain, Size: 2416 bytes --]
Jeremy
> Jambunathan K <kjambunathan@gmail.com> writes:
>
>> Jeremy
>>
>>> What about the second patch ? I'm very interested in seeing it
>>> merged.
>>
>> I did a quick run of the attached patch (authored by you).
>>
>> When I do this:
>>
>> #+ATTR_ODT: :anchor page
>> [[./org-mode-unicorn.png]]
>>
>> I see that the image is anchored to the page as expected. But the moment
>> I attach a caption and label to it like this:
>>
>> #+CAPTION: caption
>> #+LABEL: label
>> #+ATTR_ODT: :anchor page
>> [[./org-mode-unicorn.png]]
>>
>> the image is no longer anchored to the page. I need to make additional
>> modifications to achieve the desired effect for captioned images. (Let
>> me do this modification myself.)
> OK.
>
>> I am wondering what your use case is. For example, when someone does
>> this:
>>
>> #+ATTR_ODT: :anchor page
>> [[./org-mode-unicorn.png]]
>>
>> some text
>>
>> #+ATTR_ODT: :anchor page
>> [[./org-mode-unicorn.png]]
>>
>> what do you think should be the desired behaviour. Practically, I see
>> that the images get super-posed one on top of the other on the same page
>> (i.e, effectively I see only one image). I am wondering what the trick
>> is to embed multiple page anchored images in the document.
> You get the "correct" behavior :) The trick is : you write text and text
> and text. Sometimes, you want to add a picture but you don't want a page
> break. For example, you want to add a big illustration. To render
> correctly, the picture needs its own page but you don't want to break
> the page. In this case you need to anchor the picture to the "page". I
> made an example based on the road book I'm working on :
> http://www.jerryland.fr/tatw/WorldTrip.odt. Quick example visible on
> pages 20 and 23. For information, the first map inclusion was at the
> beginning of 2.1.1 and the second map inclusion at the beginning of
> 2.3.1.
>
> Obviously if you anchor consecutively two pictures to the "same page",
> you could be disappointed by the result but it's an issue you have to
> address with some others parameters which I do not know actually.
I have added support for page-anchored images based on your
suggestions. I have also added support for associating custom frame
styles to the images.
The attached org file and odt file will serve as an illustration.
Thanks for working on this patch and suggesting improvements to the odt
exporter.
Jambunathan K.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: page.org --]
[-- Type: text/x-org, Size: 1471 bytes --]
#+TITLE: page.org
#+AUTHOR: Jambunathan K
#+EMAIL: kjambunathan@gmail.com
#+DATE: 2011-12-25 Sun
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE: en
#+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+OPTIONS: TeX:t LaTeX:dvipng skip:nil d:nil todo:t pri:nil tags:not-in-toc
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+LINK_UP:
#+LINK_HOME:
#+XSLT:
* Image1
#+ATTR_ODT: :scale 0.5 :anchor "page"
#+CAPTION: Centered Image
[[./org-mode-unicorn.png]]
* Image2
#+ATTR_ODT: :scale 0.5 :anchor "page" :style "OrgPageBottomImage"
[[./org-mode-unicorn.png]]
="OrgPageBottomImage"= is a custom frame style that is defined as
below in =OrgOdtStyles.xml=.
#+begin_src nxml
<style:style style:name="OrgPageBottomImage" style:family="graphic" style:parent-style-name="Graphics">
<style:graphic-properties text:anchor-type="page" fo:margin-top="0.21cm" fo:margin-bottom="0.21cm" style:vertical-pos="bottom" style:vertical-rel="page" style:horizontal-pos="center" style:horizontal-rel="page" fo:background-color="transparent" style:background-transparency="100%" style:shadow="none" style:mirror="none" fo:clip="rect(0cm, 0cm, 0cm, 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard">
<style:background-image/>
</style:graphic-properties>
</style:style>
#+end_src
[-- Attachment #3: page.odt --]
[-- Type: application/vnd.oasis.opendocument.text, Size: 31926 bytes --]
next prev parent reply other threads:[~2011-12-26 11:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-24 15:56 [PATCH] org-babel-exp-lob-one-liners should not parse the entire buffer Jérémy Compostella
2011-11-24 18:28 ` Jambunathan K
2011-11-24 19:40 ` Jérémy Compostella
2011-11-24 20:21 ` [odt] [PATCH] Anchoring image to a page Jambunathan K
2011-11-24 21:31 ` Jérémy Compostella
2011-12-26 11:01 ` Jambunathan K [this message]
2011-11-25 16:33 ` [PATCH] org-babel-exp-lob-one-liners should not parse the entire buffer Eric Schulte
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=81sjk7d2ap.fsf@gmail.com \
--to=kjambunathan@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=jeremy.compostella@gmail.com \
/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).