* Arranging images on a LaTeX page?
@ 2014-01-29 23:19 Peter Davis
2014-01-30 0:00 ` Bastien
0 siblings, 1 reply; 7+ messages in thread
From: Peter Davis @ 2014-01-29 23:19 UTC (permalink / raw)
To: emacs-orgmode
I can place images in my document, suitably scaled, with constructs like:
#+ATTR_LATEX: :height 4.5cm
[[/path/to/image.jpg]]
However, if I try to put two images side-by-side:
#+ATTR_LATEX: :height 4.5cm
| [[/path/to/image1.jpg]] | [[/path/to/image2.jpg]] |
the height attribute is ignored.
Is there a way to do this?
Thanks!
-pd
--
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Arranging images on a LaTeX page?
2014-01-29 23:19 Arranging images on a LaTeX page? Peter Davis
@ 2014-01-30 0:00 ` Bastien
2014-01-30 0:22 ` Peter Davis
0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2014-01-30 0:00 UTC (permalink / raw)
To: Peter Davis; +Cc: emacs-orgmode
Hi Peter,
Peter Davis <pfd@pfdstudio.com> writes:
> I can place images in my document, suitably scaled, with constructs like:
>
> #+ATTR_LATEX: :height 4.5cm
> [[/path/to/image.jpg]]
>
> However, if I try to put two images side-by-side:
>
> #+ATTR_LATEX: :height 4.5cm
> | [[/path/to/image1.jpg]] | [[/path/to/image2.jpg]] |
>
> the height attribute is ignored.
Because the scope of attributes is the element right after them.
Here is scope is the table, not the images.
> Is there a way to do this?
Not really. But you can use `org-latex-image-default-height'
for all pictures in your file.
--
Bastien
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Arranging images on a LaTeX page?
2014-01-30 0:00 ` Bastien
@ 2014-01-30 0:22 ` Peter Davis
2014-01-30 0:29 ` John Hendy
0 siblings, 1 reply; 7+ messages in thread
From: Peter Davis @ 2014-01-30 0:22 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 422 bytes --]
Hi, Bastien,
On 1/29/14, 7:00 PM, Bastien wrote:
>
> Is there a way to do this?
>
> Not really. But you can use `org-latex-image-default-height'
> for all pictures in your file.
>
Thanks. I don't think setting an emacs variable is going to work for me.
Too much manual setting/unsetting. I may give it a try if I get
desperate though.
Thanks!
-pd
--
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com
[-- Attachment #2: Type: text/html, Size: 987 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Arranging images on a LaTeX page?
2014-01-30 0:22 ` Peter Davis
@ 2014-01-30 0:29 ` John Hendy
2014-01-30 0:58 ` Peter Davis
0 siblings, 1 reply; 7+ messages in thread
From: John Hendy @ 2014-01-30 0:29 UTC (permalink / raw)
To: Peter Davis; +Cc: emacs-orgmode
On Wed, Jan 29, 2014 at 6:22 PM, Peter Davis <pfd@pfdstudio.com> wrote:
> Hi, Bastien,
>
> On 1/29/14, 7:00 PM, Bastien wrote:
>
> Is there a way to do this?
>
> Not really. But you can use `org-latex-image-default-height'
> for all pictures in your file.
>
> Thanks. I don't think setting an emacs variable is going to work for me. Too
> much manual setting/unsetting. I may give it a try if I get desperate
> though.
This has come up before, and the answer is that it's not currently
possible with just Org. See the following [probably] duplicate
questions:
- http://lists.gnu.org/archive/html/emacs-orgmode/2013-03/msg01800.html
- https://www.mail-archive.com/emacs-orgmode@gnu.org/msg75806.html
There were some suggestions there you might try (e.g. using the LaTeX
subfig package).
Best regards,
John
>
> Thanks!
> -pd
>
> --
> ----
> Peter Davis
> The Tech Curmudgeon
> www.techcurmudgeon.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Arranging images on a LaTeX page?
2014-01-30 0:29 ` John Hendy
@ 2014-01-30 0:58 ` Peter Davis
2014-01-30 7:59 ` Andreas Leha
0 siblings, 1 reply; 7+ messages in thread
From: Peter Davis @ 2014-01-30 0:58 UTC (permalink / raw)
To: emacs-orgmode
On Wed, Jan 29, 2014 at 06:29:37PM -0600, John Hendy wrote:
>
> This has come up before, and the answer is that it's not currently
> possible with just Org. See the following [probably] duplicate
> questions:
> - http://lists.gnu.org/archive/html/emacs-orgmode/2013-03/msg01800.html
> - https://www.mail-archive.com/emacs-orgmode@gnu.org/msg75806.html
>
> There were some suggestions there you might try (e.g. using the LaTeX
> subfig package).
Thanks, John. I'll take a look.
Meanwhile. for the current need, I'll probaby just compose the images
in Photoshop or GIMP, and place the resulting composite in the
document.
Thanks!
-pd
--
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Arranging images on a LaTeX page?
2014-01-30 0:58 ` Peter Davis
@ 2014-01-30 7:59 ` Andreas Leha
2014-01-30 12:21 ` Peter Davis
0 siblings, 1 reply; 7+ messages in thread
From: Andreas Leha @ 2014-01-30 7:59 UTC (permalink / raw)
To: emacs-orgmode
Peter Davis <pfd@pfdstudio.com> writes:
> On Wed, Jan 29, 2014 at 06:29:37PM -0600, John Hendy wrote:
>>
>> This has come up before, and the answer is that it's not currently
>> possible with just Org. See the following [probably] duplicate
>> questions:
>> - http://lists.gnu.org/archive/html/emacs-orgmode/2013-03/msg01800.html
>> - https://www.mail-archive.com/emacs-orgmode@gnu.org/msg75806.html
>>
>> There were some suggestions there you might try (e.g. using the LaTeX
>> subfig package).
>
> Thanks, John. I'll take a look.
>
> Meanwhile. for the current need, I'll probaby just compose the images
> in Photoshop or GIMP, and place the resulting composite in the
> document.
>
This is not solving your original problem. But the following might
spare you from some manual work. It is a simple hack that uses
=imagemagick= to do the side-by-side composition.
--8<---------------cut here---------------start------------->8---
* Generate some Test Images
#+name: test1
#+begin_src R :results graphics :file test1.png
plot(1:10, 1:10)
#+end_src
#+results: test1
[[file:test1.png]]
#+name: test2
#+begin_src R :results graphics :file test2.png
plot(1:100, 1:100)
#+end_src
#+results: test2
[[file:test2.png]]
* Place Images Side by Side
#+name: testsidebyside
#+call: sidebyside(im1=test1(), im2=test2(), outname="test1_test2.png") :results file
#+ATTR_LATEX: :height 4.5cm
#+results: testsidebyside
[[file:test1_test2.png]]
* Function for Side-by-Side Images Using =imagemagick=
#+name: sidebyside
#+begin_src sh :session none :results file replace :var im1="test1.png" :var im2="test2.png" :var outname="test.png"
convert "$im1" "$im2" +append "$outname"
echo "$outname"
#+end_src
--8<---------------cut here---------------end--------------->8---
Regards,
Andreas
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Arranging images on a LaTeX page?
2014-01-30 7:59 ` Andreas Leha
@ 2014-01-30 12:21 ` Peter Davis
0 siblings, 0 replies; 7+ messages in thread
From: Peter Davis @ 2014-01-30 12:21 UTC (permalink / raw)
To: emacs-orgmode
On Thu, Jan 30, 2014 at 08:59:11AM +0100, Andreas Leha wrote:
>
> This is not solving your original problem. But the following might
> spare you from some manual work. It is a simple hack that uses
> =imagemagick= to do the side-by-side composition.
Thanks very much, Andreas! This is a real education in what org-mode can do.
For my current needs, the images are different sizes and aspect ratios, so I'm probably better off laying them out by hand.
But I'm definitely saving this example for future reference.
Thanks!
-pd
--
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-01-30 12:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-29 23:19 Arranging images on a LaTeX page? Peter Davis
2014-01-30 0:00 ` Bastien
2014-01-30 0:22 ` Peter Davis
2014-01-30 0:29 ` John Hendy
2014-01-30 0:58 ` Peter Davis
2014-01-30 7:59 ` Andreas Leha
2014-01-30 12:21 ` Peter Davis
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).