From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Berry Subject: Re: LaTeX export: images subplots Date: Thu, 12 Sep 2013 04:45:42 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJynG-0002Uz-V1 for emacs-orgmode@gnu.org; Thu, 12 Sep 2013 00:46:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJyn5-0006Id-6B for emacs-orgmode@gnu.org; Thu, 12 Sep 2013 00:46:14 -0400 Received: from plane.gmane.org ([80.91.229.3]:46594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJyn4-0006IV-ST for emacs-orgmode@gnu.org; Thu, 12 Sep 2013 00:46:03 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VJyn2-0008DH-Q6 for emacs-orgmode@gnu.org; Thu, 12 Sep 2013 06:46:00 +0200 Received: from 137.110.34.110 ([137.110.34.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Sep 2013 06:46:00 +0200 Received: from ccberry by 137.110.34.110 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Sep 2013 06:46:00 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Martin Leduc hotmail.com> writes: > > > Hi all, > I am using org-mode to write a report with several figures. I would > like to group some images into a same figure, let say a 2x2 panel. I > know that I can directly embed latex code in my org file, for > example by using the subfloats (from the latex subfig package). > However, I would prefer to use an org-based solution of inserting > the image links in order to keep the convenient way of previewing > images right into the buffer with C-c C-x C-v. > The only solution I found is by using tables such as: > > #+CAPTION: Insert caption here. > #+ATTR_LATEX: :align p{0.5\textwidth}p{0.5\textwidth} > | [[pathtoimage]] | [[pathtoimage]] | > | [[pathtoimage]] | [[pathtoimage]] | > > where the size of the images is controled by p{} and C-cxv is > working. However, in the exported TeX file, it is a table, not a > figure. Is there a cleaner way to make image panels that would > preserve the figure environment in the exported TeX file ? I think you are close. Use #+BEGIN_SRC org :exports none #+name: imtable #+END_SRC This gives you the images in a form you can view and a way to access the links so you can export them in a different form. For example, #+BEGIN_SRC emacs-lisp :var a=imtable :exports results :results raw (mapconcat (lambda(y) (mapconcat (lambda(x) (org-export-string-as x 'latex t)) y "")) a "") #+END_SRC exports as \includegraphics[width=.9\linewidth]{img3070YH.png} \includegraphics[width=.9\linewidth]img307BjN.png} \includegraphics[width=.9\linewidth]img307OtT.png} \includegraphics[width=.9\linewidth]img307b3Z.png} when the elements in the table are the image paths img*.png as shown. HTH, Chuck