From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [PATCH] ox-latex.el: Wrap table into figure environment Date: Tue, 02 Jul 2013 11:20:54 +0200 Message-ID: <871u7hjp1l.fsf@pank.eu> References: <51D274D8.3030402@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utwlp-0002sk-2E for emacs-orgmode@gnu.org; Tue, 02 Jul 2013 05:21:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Utwln-00027M-TR for emacs-orgmode@gnu.org; Tue, 02 Jul 2013 05:21:08 -0400 Received: from plane.gmane.org ([80.91.229.3]:34566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utwln-000275-NO for emacs-orgmode@gnu.org; Tue, 02 Jul 2013 05:21:07 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Utwlm-0001y5-QJ for emacs-orgmode@gnu.org; Tue, 02 Jul 2013 11:21:06 +0200 Received: from 193.175.2.17 ([193.175.2.17]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 02 Jul 2013 11:21:06 +0200 Received: from rasmus by 193.175.2.17 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 02 Jul 2013 11:21:06 +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 Xavier, > Since I did not find another way to do it, I would like to submit the > following patch Great! > diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el > index 09928a4..3da2dd5 100644 > --- a/lisp/ox-latex.el > +++ b/lisp/ox-latex.el > @@ -2333,6 +2333,7 @@ This function assumes TABLE has `org' as its > :type' property and > ((and (not float) (plist-member attr :float)) nil) > ((string= float "sidewaystable") "sidewaystable") > ((string= float "multicolumn") "table*") > + ((string= float "figure") "figure") > ((or float (org-element-property :caption table)) > "table"))))) > ;; Extract others display options. > Maybe it is quite "counterintuitive" to use =figure= environment > inside =table= env. but I heavily use tabular to put figures > side-by-side or on a grid array (I guess I am not the only one). There > may be a better way to achieve that... Yeah, you should do it with the package subfigure or subcaption. I use the latter mostly, recently. Do /not/ use the package subfig! Is there support for this now? I have no idea. I've usually just added it manually, with #+LATEX-lines. But I agree that support might be nice. It could probably be handled how matrices are handled (i.e. with no newline between the lines tables and #+LATEX_ATTR lines they are put into the same math environment). I don't know how often people requires side-by-side floats, but for me it would certainly be of interest. I lack time experimenting with it right now, though. –Rasmus -- May contains speling mistake