emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Table caption in Latex export with :float nil


From: Vikas Rawal
Subject: Re: [O] Table caption in Latex export with :float nil
Date: Thu, 12 Mar 2015 19:06:32 +0530

>> 
>> 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 consumption 
> of milk, India, kilograms per capita per annum}
> | Year                            | Rural | Urban |  All |
> |---------------------------------+-------+-------+------|
> | 1983                            |  38.7 |  55.6 | 44.7 |
> | 1993–1994                       |  50.3 |  66.4 | 54.3 |
> | 2004–2005                       |  50.2 |  69.3 |   55 |
> | 2009–2010                       |  51.7 |  71.6 | 57.1 |
> #+end_mdframed
> 
> 

Thanks, that is what I was trying to do for several days :).

> 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=95229
> 

I did see this, but needed an example to understand what was going to work. 
Specifying \captionof in a separate line did not occur to me.

> 
> You are using the float package.  It's heretic, but don't worry about
> it…
> 


:)

Thanks

Vikas


reply via email to

[Prev in Thread] Current Thread [Next in Thread]