Re: [O] Arranging images on a LaTeX page?

2014-01-30 Thread Andreas Leha
Peter Davis p...@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




Re: [O] Arranging images on a LaTeX page?

2014-01-30 Thread Peter Davis
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



[O] Arranging images on a LaTeX page?

2014-01-29 Thread Peter Davis

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




Re: [O] Arranging images on a LaTeX page?

2014-01-29 Thread Peter Davis

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



Re: [O] Arranging images on a LaTeX page?

2014-01-29 Thread John Hendy
On Wed, Jan 29, 2014 at 6:22 PM, Peter Davis p...@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



Re: [O] Arranging images on a LaTeX page?

2014-01-29 Thread Peter Davis
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