emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] org-babel-exp-lob-one-liners should not parse the entire buffer.
@ 2011-11-24 15:56 Jérémy Compostella
  2011-11-24 18:28 ` Jambunathan K
  2011-11-25 16:33 ` [PATCH] org-babel-exp-lob-one-liners should not parse the entire buffer Eric Schulte
  0 siblings, 2 replies; 7+ messages in thread
From: Jérémy Compostella @ 2011-11-24 15:56 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 909 bytes --]

All,

I'm currently generating a road book for a trip from different Org-Mode
file and other data. It results in a 13 thousands lines Org-Mode file
and I have some performance issues. Using the ELP package, I isolated
the two main bottlenecks.

1. One is in org-odt : the org-odt-write-manifest-file function is
   called once and takes 5.546672 seconds to write a 167 lines file. I
   rewrote this function and now it takes 0.01606 seconds to write the
   same file. As usually for this package, I directly send the patch to
   the org-odt author.
2. The other is in ob-exp : the org-babel-exp-lob-one-liners parse to
   the end of the buffer instead of the region given as arguments. On my
   "big" file it results in 50 seconds execution of the
   org-babel-exp-lob-one-liners function. With the patch it only takes
   0.871 seconds.

Please merge it or review it.

Regards,

Jeremy
-- 
Sent from my Emacs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch: org-babel-exp-lob-one-liners should not parse the entire buffer --]
[-- Type: text/x-diff, Size: 1013 bytes --]

From 86bd70539203443679fd55788db2a598529135d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Compostella?= <jeremy.compostella@gmail.com>
Date: Thu, 24 Nov 2011 16:20:00 +0100
Subject: [PATCH] org-babel-exp-lob-one-liners should not parse the entire
 buffer.

The org-babel-exp-lob-one-liners search "call" pattern through the entire
buffer instead of the region given as arguments.
---
 lisp/ob-exp.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/ob-exp.el b/lisp/ob-exp.el
index f2e20a0..de3a4c8 100644
--- a/lisp/ob-exp.el
+++ b/lisp/ob-exp.el
@@ -167,7 +167,7 @@ options are taken from `org-babel-default-header-args'."
   (save-excursion
     (goto-char start)
     (while (and (< (point) end)
-		(re-search-forward org-babel-lob-one-liner-regexp nil t))
+		(re-search-forward org-babel-lob-one-liner-regexp end t))
       (unless (org-babel-in-example-or-verbatim)
 	(let* ((lob-info (org-babel-lob-get-info))
 	       (inlinep (match-string 11))
-- 
1.7.5.4


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

* Re: [PATCH] org-babel-exp-lob-one-liners should not parse the entire buffer.
  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-25 16:33 ` [PATCH] org-babel-exp-lob-one-liners should not parse the entire buffer Eric Schulte
  1 sibling, 1 reply; 7+ messages in thread
From: Jambunathan K @ 2011-11-24 18:28 UTC (permalink / raw)
  To: Jérémy Compostella; +Cc: emacs-orgmode


> All,
>
> I'm currently generating a road book for a trip from different Org-Mode
> file and other data. It results in a 13 thousands lines Org-Mode file
> and I have some performance issues. Using the ELP package, I isolated
> the two main bottlenecks.
>
> 1. One is in org-odt : the org-odt-write-manifest-file function is
>    called once and takes 5.546672 seconds to write a 167 lines file. I
>    rewrote this function and now it takes 0.01606 seconds to write the
>    same file. As usually for this package, I directly send the patch to
>    the org-odt author.

I think it is multiple write-region that takes the toll. I have pushed a
variation of your original fix which minimizes the number of lines
originally modified by you.

I have acknowledged you as the author in the commit message (even though
I appear as the author)

> As usually for this package, I directly send the patch to the org-odt
> author.

Btw, you can post your patches to the list. I am a regular on this list.

Jambunathan K.
-- 

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

* Re: [PATCH] org-babel-exp-lob-one-liners should not parse the entire buffer.
  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
  0 siblings, 1 reply; 7+ messages in thread
From: Jérémy Compostella @ 2011-11-24 19:40 UTC (permalink / raw)
  To: Jambunathan K; +Cc: emacs-orgmode

Jambunathan K <kjambunathan@gmail.com> writes:
>> All,
>>
>> I'm currently generating a road book for a trip from different Org-Mode
>> file and other data. It results in a 13 thousands lines Org-Mode file
>> and I have some performance issues. Using the ELP package, I isolated
>> the two main bottlenecks.
>>
>> 1. One is in org-odt : the org-odt-write-manifest-file function is
>>    called once and takes 5.546672 seconds to write a 167 lines file. I
>>    rewrote this function and now it takes 0.01606 seconds to write the
>>    same file. As usually for this package, I directly send the patch to
>>    the org-odt author.
>
> I think it is multiple write-region that takes the toll.
I do agree.

> I have pushed a variation of your original fix which minimizes the
> number of lines originally modified by you.
>
> I have acknowledged you as the author in the commit message (even though
> I appear as the author)
Fine.

>> As usually for this package, I directly send the patch to the org-odt
>> author.
>
> Btw, you can post your patches to the list. I am a regular on this list.
OK.
> Jambunathan K.

What about the second patch ? I'm very interested in seeing it merged. 

Jeremy
-- 
Sent from my Emacs

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

* [odt] [PATCH] Anchoring image to a page
  2011-11-24 19:40   ` Jérémy Compostella
@ 2011-11-24 20:21     ` Jambunathan K
  2011-11-24 21:31       ` Jérémy Compostella
  0 siblings, 1 reply; 7+ messages in thread
From: Jambunathan K @ 2011-11-24 20:21 UTC (permalink / raw)
  To: Jérémy Compostella; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1076 bytes --]


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

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-odt.el-Add-page-anchor-image-type-support.patch --]
[-- Type: text/x-patch, Size: 4015 bytes --]

From 213cfc2a9c44a93639afe460fe2f8dbee793bcd1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Compostella?= <jeremy.compostella@gmail.com>
Date: Fri, 18 Nov 2011 16:39:17 +0100
Subject: [PATCH] org-odt.el: Add page anchor image type support.

This patch enables :
- The possibility to select the image anchor type with the ATTR_ODT tag
- The "page" anchor type
This patch is very useful to get "floating pictures".
---
 contrib/lisp/org-odt.el             |   15 +++++++++------
 contrib/odt/styles/OrgOdtStyles.xml |    5 +++++
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/contrib/lisp/org-odt.el b/contrib/lisp/org-odt.el
index 81abf5d..1d60b13 100644
--- a/contrib/lisp/org-odt.el
+++ b/contrib/lisp/org-odt.el
@@ -1495,12 +1495,12 @@ ATTR is a string of other attributes of the a element."
 	   (latex-frag (org-find-text-property-in-string
 			      'org-latex-src src))
 	   (category (and latex-frag "__DvipngImage__"))
-	   (embed-as (or embed-as
-			 (if latex-frag
-			     (or (org-find-text-property-in-string
-				  'org-latex-src-embed-type src) 'character)
-			   'paragraph)))
 	   (attr-plist (org-lparse-get-block-params attr))
+	   (embed-as (cond (embed-as)
+			   (latex-frag (or (org-find-text-property-in-string
+					     'org-latex-src-embed-type src) 'character))
+			   ((plist-get attr-plist :anchor))
+			   ('paragraph)))
 	   (size (org-odt-image-size-from-file
 		  src (plist-get attr-plist :width)
 		  (plist-get attr-plist :height)
@@ -1514,6 +1514,7 @@ ATTR is a string of other attributes of the a element."
 	(case embed-as
 	  (paragraph (org-odt-format-entity "DisplayImage" href width height))
 	  (character (org-odt-format-entity "InlineImage" href width height))
+	  (page (org-odt-format-entity "PageImage" href width height))
 	  (t (error "Unknown value for embed-as %S" embed-as))))
        (t
 	(org-odt-format-entity
@@ -1565,6 +1566,7 @@ ATTR is a string of other attributes of the a element."
 (defvar org-odt-entity-frame-styles
   '(("InlineImage" "__Figure__" ("OrgInlineImage" nil "as-char"))
     ("DisplayImage" "__Figure__" ("OrgDisplayImage" nil "paragraph"))
+    ("PageImage" "__Figure__" ("OrgPageImage" nil "page"))
     ("CaptionedDisplayImage" "__Figure__"
      ("OrgCaptionedImage"
       " style:rel-width=\"100%\" style:rel-height=\"scale\"" "paragraph")
@@ -1619,7 +1621,8 @@ ATTR is a string of other attributes of the a element."
 
 (defvar org-export-odt-default-image-sizes-alist
   '(("character" . (5 . 0.4))
-    ("paragraph" . (5 . 5)))
+    ("paragraph" . (5 . 5))
+    ("page" . (5 . 5)))
   "Hardcoded image dimensions one for each of the anchor
   methods.")
 
diff --git a/contrib/odt/styles/OrgOdtStyles.xml b/contrib/odt/styles/OrgOdtStyles.xml
index 5ec868a..df4f3f4 100644
--- a/contrib/odt/styles/OrgOdtStyles.xml
+++ b/contrib/odt/styles/OrgOdtStyles.xml
@@ -375,6 +375,11 @@
    <style:graphic-properties text:anchor-type="paragraph" style:wrap="none" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>
   </style:style>
 
+  <!-- Page Images   -->
+  <style:style style:name="OrgPageImage" style:family="graphic" style:parent-style-name="Graphics">
+   <style:graphic-properties text:anchor-type="page" style:wrap="none" style:vertical-pos="middle" style:vertical-rel="page" style:horizontal-pos="center" style:horizontal-rel="page"/>
+  </style:style>
+
   <!-- Captioned Images  -->
   <style:style style:name="OrgCaptionedImage" style:family="graphic" style:parent-style-name="Graphics">
    <style:graphic-properties style:rel-width="100%" text:anchor-type="paragraph" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" style:run-through="foreground" style:wrap="none" style:vertical-pos="from-top" style:vertical-rel="paragraph-content" style:horizontal-pos="from-left" style:horizontal-rel="paragraph-content" fo:padding="0cm" fo:border="none" style:shadow="none"/>
-- 
1.7.5.4


[-- Attachment #3: Type: text/plain, Size: 5 bytes --]


-- 

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

* Re: [odt] [PATCH] Anchoring image to a page
  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
  0 siblings, 1 reply; 7+ messages in thread
From: Jérémy Compostella @ 2011-11-24 21:31 UTC (permalink / raw)
  To: Jambunathan K; +Cc: emacs-orgmode

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.

Finally the patch I was talking about is not this one but the one
attached to http://comments.gmane.org/gmane.emacs.orgmode/49548. I
really need it because this bug lead to at least 50 seconds more to
generate my ODT file.

> From 213cfc2a9c44a93639afe460fe2f8dbee793bcd1 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Compostella?= <jeremy.compostella@gmail.com>
> Date: Fri, 18 Nov 2011 16:39:17 +0100
> Subject: [PATCH] org-odt.el: Add page anchor image type support.
>
> This patch enables :
> - The possibility to select the image anchor type with the ATTR_ODT tag
> - The "page" anchor type
> This patch is very useful to get "floating pictures".
> ---
>  contrib/lisp/org-odt.el             |   15 +++++++++------
>  contrib/odt/styles/OrgOdtStyles.xml |    5 +++++
>  2 files changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/contrib/lisp/org-odt.el b/contrib/lisp/org-odt.el
> index 81abf5d..1d60b13 100644
> --- a/contrib/lisp/org-odt.el
> +++ b/contrib/lisp/org-odt.el
> @@ -1495,12 +1495,12 @@ ATTR is a string of other attributes of the a element."
>  	   (latex-frag (org-find-text-property-in-string
>  			      'org-latex-src src))
>  	   (category (and latex-frag "__DvipngImage__"))
> -	   (embed-as (or embed-as
> -			 (if latex-frag
> -			     (or (org-find-text-property-in-string
> -				  'org-latex-src-embed-type src) 'character)
> -			   'paragraph)))
>  	   (attr-plist (org-lparse-get-block-params attr))
> +	   (embed-as (cond (embed-as)
> +			   (latex-frag (or (org-find-text-property-in-string
> +					     'org-latex-src-embed-type src) 'character))
> +			   ((plist-get attr-plist :anchor))
> +			   ('paragraph)))
>  	   (size (org-odt-image-size-from-file
>  		  src (plist-get attr-plist :width)
>  		  (plist-get attr-plist :height)
> @@ -1514,6 +1514,7 @@ ATTR is a string of other attributes of the a element."
>  	(case embed-as
>  	  (paragraph (org-odt-format-entity "DisplayImage" href width height))
>  	  (character (org-odt-format-entity "InlineImage" href width height))
> +	  (page (org-odt-format-entity "PageImage" href width height))
>  	  (t (error "Unknown value for embed-as %S" embed-as))))
>         (t
>  	(org-odt-format-entity
> @@ -1565,6 +1566,7 @@ ATTR is a string of other attributes of the a element."
>  (defvar org-odt-entity-frame-styles
>    '(("InlineImage" "__Figure__" ("OrgInlineImage" nil "as-char"))
>      ("DisplayImage" "__Figure__" ("OrgDisplayImage" nil "paragraph"))
> +    ("PageImage" "__Figure__" ("OrgPageImage" nil "page"))
>      ("CaptionedDisplayImage" "__Figure__"
>       ("OrgCaptionedImage"
>        " style:rel-width=\"100%\" style:rel-height=\"scale\"" "paragraph")
> @@ -1619,7 +1621,8 @@ ATTR is a string of other attributes of the a element."
>  
>  (defvar org-export-odt-default-image-sizes-alist
>    '(("character" . (5 . 0.4))
> -    ("paragraph" . (5 . 5)))
> +    ("paragraph" . (5 . 5))
> +    ("page" . (5 . 5)))
>    "Hardcoded image dimensions one for each of the anchor
>    methods.")
>  
> diff --git a/contrib/odt/styles/OrgOdtStyles.xml b/contrib/odt/styles/OrgOdtStyles.xml
> index 5ec868a..df4f3f4 100644
> --- a/contrib/odt/styles/OrgOdtStyles.xml
> +++ b/contrib/odt/styles/OrgOdtStyles.xml
> @@ -375,6 +375,11 @@
>     <style:graphic-properties text:anchor-type="paragraph" style:wrap="none" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>
>    </style:style>
>  
> +  <!-- Page Images   -->
> +  <style:style style:name="OrgPageImage" style:family="graphic" style:parent-style-name="Graphics">
> +   <style:graphic-properties text:anchor-type="page" style:wrap="none" style:vertical-pos="middle" style:vertical-rel="page" style:horizontal-pos="center" style:horizontal-rel="page"/>
> +  </style:style>
> +
>    <!-- Captioned Images  -->
>    <style:style style:name="OrgCaptionedImage" style:family="graphic" style:parent-style-name="Graphics">
>     <style:graphic-properties style:rel-width="100%" text:anchor-type="paragraph" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" style:run-through="foreground" style:wrap="none" style:vertical-pos="from-top" style:vertical-rel="paragraph-content" style:horizontal-pos="from-left" style:horizontal-rel="paragraph-content" fo:padding="0cm" fo:border="none" style:shadow="none"/>
> -- 
> 1.7.5.4

-- 
Sent from my Emacs

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

* Re: [PATCH] org-babel-exp-lob-one-liners should not parse the entire buffer.
  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-25 16:33 ` Eric Schulte
  1 sibling, 0 replies; 7+ messages in thread
From: Eric Schulte @ 2011-11-25 16:33 UTC (permalink / raw)
  To: Jérémy Compostella; +Cc: emacs-orgmode

> 
> 2. The other is in ob-exp : the org-babel-exp-lob-one-liners parse to
>    the end of the buffer instead of the region given as arguments. On my
>    "big" file it results in 50 seconds execution of the
>    org-babel-exp-lob-one-liners function. With the patch it only takes
>    0.871 seconds.
>

Applied, thanks -- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

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

* Re: [odt] [PATCH] Anchoring image to a page
  2011-11-24 21:31       ` Jérémy Compostella
@ 2011-12-26 11:01         ` Jambunathan K
  0 siblings, 0 replies; 7+ messages in thread
From: Jambunathan K @ 2011-12-26 11:01 UTC (permalink / raw)
  To: Jérémy Compostella; +Cc: emacs-orgmode

[-- 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 --]

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

end of thread, other threads:[~2011-12-26 11:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2011-11-25 16:33 ` [PATCH] org-babel-exp-lob-one-liners should not parse the entire buffer Eric Schulte

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