From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Table caption in Latex export with :float nil Date: Wed, 11 Mar 2015 14:58:30 +0100 Message-ID: <87sidbr5yx.fsf@gmx.us> References: <7FE04555-FBB1-4A43-A50C-EF81E8F37308@agrarianresearch.org> <87r3svudbt.fsf@gmx.us> <239B1E00-B975-4FEA-9826-DDB82D7B4C8B@agrarianresearch.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:32804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVh9n-0005zR-Cy for emacs-orgmode@gnu.org; Wed, 11 Mar 2015 09:58:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVh9j-0003KM-C9 for emacs-orgmode@gnu.org; Wed, 11 Mar 2015 09:58:43 -0400 Received: from mout.gmx.net ([212.227.15.15]:64486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVh9j-0003Jd-1h for emacs-orgmode@gnu.org; Wed, 11 Mar 2015 09:58:39 -0400 In-Reply-To: <239B1E00-B975-4FEA-9826-DDB82D7B4C8B@agrarianresearch.org> (Vikas Rawal's message of "Wed, 11 Mar 2015 19:07:13 +0530") 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: vikaslists@agrarianresearch.org Cc: emacs-orgmode@gnu.org Vikas Rawal writes: >>=20 >>> Is :float deprecated? >>=20 >> No but caption takes priority. I'm working on this case, but my >> dev. computer is not well at the moment. >>=20 > > We need to consider the scenario that if we need a captioned table > without a floating environment, what is the right way of obtaining > it. Is that a question? A right approach is to use the float package as you did. I don't like it cause it redefines floats. Another right approach is not to make it a float if you don't want it to float.... Then you could use something like capt-of to get a caption and increase the counter in question. This can be dangerous as floats could get out of order. ATM for your example you could use either: #+begin_mdframed #+attr_latex: :float nil #+LATEX: \captionof{table}{\label{milk-consumption-india}Average consumptio= n of milk, India, kilograms per capita per annum} | Year | Rural | Urban | All | |---------------------------------+-------+-------+------| | 1983 | 38.7 | 55.6 | 44.7 | | 1993=E2=80=931994 | 50.3 | 66.4 | 54.3 | | 2004=E2=80=932005 | 50.2 | 69.3 | 55 | | 2009=E2=80=932010 | 51.7 | 71.6 | 57.1 | #+end_mdframed As caption forces float, or #+begin_mdframed #+name: milk-consumption-india #+attr_latex: :placement [H] #+caption: Average consumption of milk, India, kilograms per capita per ann= um | Year | Rural | Urban | All | |---------------------------------+-------+-------+------| | 1983 | 38.7 | 55.6 | 44.7 | | 1993=E2=80=931994 | 50.3 | 66.4 | 54.3 | | 2004=E2=80=932005 | 50.2 | 69.3 | 55 | | 2009=E2=80=932010 | 51.7 | 71.6 | 57.1 | #+end_mdframed Which relies on package-float's H. > That is needed if you want to insert a table in an mdframed block. The previous discussion is here: http://thread.gmane.org/gmane.emacs.orgmode/95224/focus=3D95229 Feel free to beat me with a patch! > I have managed to get it using :placement, but I am not sure if that > is the right approach. You are using the float package. It's heretic, but don't worry about it... =E2=80=94Rasmus --=20 Governments should be afraid of their people