emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Andreas Leha <andreas.leha@med.uni-goettingen.de>
To: emacs-orgmode@gnu.org
Subject: Re: [ODT] image scaling overridden by long caption
Date: Sat, 21 Jan 2012 11:18:05 +0100	[thread overview]
Message-ID: <87r4yt9x5u.fsf@med.uni-goettingen.de> (raw)
In-Reply-To: <81pqefv4r9.fsf@gmail.com>

Jambunathan K <kjambunathan@gmail.com> writes:

> Hello Andreas
>
>> Hi all,
>>
>> I experience unexpected behaviour with the excellent odt exporter in case of
>> included images.
>> When I add a #+caption the text width of that caption overrides the
>> specified image width (#ATTR_ODT: :witdh X), which I use to downscale
>> the image in the odt.
>> Especially if that caption will span across multiple lines, that effect
>> is visible.
>>
>> Here is the example:
>>
>> -----------------------------------------------------------------------
>> * odt image test
>>   #+caption: foo
>>   #+ATTR_ODT: :width 8
>>   #+header: :file foo.png
>>   #+header: :width 3600 :height 3600 :res 600
>>   #+begin_src R :exports results :results graphics
>>     plot(1:100, 1:100)
>>   #+end_src
>>   #+caption: foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
>>   #+ATTR_ODT: :width 8
>>   #+header: :file foo.png
>>   #+header: :width 3600 :height 3600 :res 600
>>   #+begin_src R :exports results :results graphics
>>     plot(1:100, 1:100)
>>   #+end_src
>> -------------------------------------------------------------------------
>>
>>
>> I'd expect the image scaling to take place in either case.  Maybe even
>> the caption should wrap at the specified width.
>
> I have pushed a fix for this. Hope the new behaviour is according to
> your expectation.
>

Thanks a lot, this works fine now!

But I experienced another issue with respect to images scaling in the odt
export:

This subtree:

======== test.org ==========================
* Test image scaling in odt
#+caption: bar
#+label: fig:bar
#+name: bar
#+attr_odt: :width 8
#+header: :file bar.png
#+header: :width 7200 :height 3600 :res 600
#+begin_src R :exports results :results graphics
  plot(1:10, 1:10)
#+end_src

#+caption: baz
#+label: fig:baz
#+name: baz
#+attr_odt: :scale 0.5
#+header: :file baz.png
#+header: :width 7200 :height 3600 :res 600
#+begin_src R :exports results :results graphics
  plot(1:10, 1:10)
#+end_src
======================================

exports to this: http://i.imgur.com/sUHQi.png on my system.


>> 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?

- Andreas


>
> Jambunathan K.

  reply	other threads:[~2012-01-21 10:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-18  8:52 Andreas Leha
2012-01-19 20:03 ` Jambunathan K
2012-01-21 10:18   ` Andreas Leha [this message]
2012-01-23 19:53     ` Jambunathan K
2012-01-23 21:20       ` Nicolas Goaziou
2012-02-01  9:16         ` comments and attributes Jambunathan K
2012-02-01 13:04           ` Nicolas Goaziou
2012-02-15  0:03       ` [ODT] image scaling overridden by long caption Andreas Leha
2012-01-27 14:40     ` Jambunathan K
2012-01-27 22:41       ` Andreas Leha
2012-01-31  4:59         ` Jambunathan K
2012-02-07 10:04           ` Andreas Leha
2012-01-23  1:53   ` Side-by-side support (was:Re: [ODT] image scaling overridden by long caption) Christian Wittern
2012-01-23 16:34     ` Side-by-side support Jambunathan K
2012-01-23 23:51       ` Christian Wittern

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=87r4yt9x5u.fsf@med.uni-goettingen.de \
    --to=andreas.leha@med.uni-goettingen.de \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: [ODT] image scaling overridden by long caption' \
    /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

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