[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [ODT] image scaling overridden by long caption
From: |
Jambunathan K |
Subject: |
Re: [O] [ODT] image scaling overridden by long caption |
Date: |
Tue, 24 Jan 2012 01:23:40 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (windows-nt) |
Hello Andreas
I have added support for character anchored images as part of the
following commit release_7.8.03-201-g1d99fd7.
I am attaching a sample Org file and the associated ODT output.
Nicolas/Eric
Don't be surprised. Please Read on ...
--8<---------------cut here---------------start------------->8---
#+TITLE: side-by-side.org
#+AUTHOR: Jambunathan K
#+EMAIL: address@hidden
#+DATE: 2012-01-23 Mon
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE: en
#+OPTIONS: H:3 num:t toc:nil \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:
Nicolas,
Does the existing behaviour as captured in [[Side-by-Side images laid
out by hand]] be preserved with new export driver?
Eric,
1. can the extraneous parbreaks in [[Side-by-Side images using Babel]] be
removed?
2. Can
[[http://lists.gnu.org/archive/html/emacs-orgmode/2012-01/msg00678.html][this
issue with #+header lines ]] be fixed?
* Side-by-Side images using Babel
Creating side-by-side images with Babel is problematic.
#+caption: foo
#+ATTR_ODT: :width 7 :height 7 :anchor as-char
#+header: :file foo.png
#+begin_src R :exports results :results graphics
plot(1:100, 1:100)
#+end_src
#+caption: foo
#+ATTR_ODT: :width 7 :height 7 :anchor as-char
#+header: :file foo.png
#+begin_src R :exports results :results graphics
plot(1:100, 1:100)
#+end_src
The images are vertically stacked because Babel introduces extraneous
parbreaks. This forces the images to be anchored as character, but to
*successive* paragraphs.
Here is a segment of Org buffer as seen by the ODT exporter at the end
of =org-export-preprocess-string=.
#+BEGIN_SRC org
,Creating side-by-side images with Babel is problematic.
,[[file:foo.png][file:foo.png]]
,[[file:foo.png][file:foo.png]]
,The images are vertically stacked because Babel introduces extraneous
,parbreaks. This forces the images to be anchored as character, but to
,*successive* paragraphs.
#+END_SRC
* Side-by-Side images laid out by hand
To create side-by-side images flank them with paragraph boundaries.
#+BEGIN_CENTER
#+caption: foo
#+ATTR_ODT: :width 7 :height 7 :anchor as-char
#+header: :file foo.png
[[./foo.png]]
#+caption: bar
#+ATTR_ODT: :width 7 :height 7 :anchor as-char
#+header: :file bar.png
[[./bar.png]]
#+END_CENTER
You should be seeing side-by-side images.
--8<---------------cut here---------------end--------------->8---
side-by-side.odt
Description: side-by-side.odt
>>> On a related note: Could I place two (correctly scaled) images
>>> side-by-side?
>>
>> For the sake of record, your request is much similar to what is
>> discussed here
>> http://lists.gnu.org/archive/html/emacs-orgmode/2011-12/msg00780.html -
>> save for (dynamically-generated) images taking the place of src blocks.
>>
>> Try something like this:
>>
>> #+begin_list-table
>> - [[./foo1.png]]
>> - [[./foo2.png]]
>> #+end_list-table
>>
>> Make sure that the images are "small" images. If you replace the image
>> links above with R srcblocks or attach caption/attr_odt to the above
>> above images, the results are less than satisfactory. So the answer to
>> your question is a "soft" no.
>
> Thanks for this. For two reasons that does not work for me:
> (1) I want to use captions on my images
> (2) it is odt-export specific
>
>>
>> Notes to self:
>>
>> There are multiple ways to achieve side-by-side effect.
>> - use tables (aka "list tables")
>> - use 2-Column sections
>> - 2-column frames (what is this?)
>>
>> "side-by-side" has surfaced in the list for the second time, I think it
>> deserves to be supported "out of the box".
>
> +1. And ideally generic enough, s.t. also the LaTeX supports it.
> Beamer has the concept of columns, which is nicely supported in org
> mode. Maybe that could be a general concept supported by all (or, most)
> exporters?
--
[O] Side-by-side support (was:Re: [ODT] image scaling overridden by long caption), Christian Wittern, 2012/01/22