From: Rasmus <rasmus@gmx.us>
To: vikaslists@agrarianresearch.org
Cc: emacs-orgmode@gnu.org
Subject: Re: Table caption in Latex export with :float nil
Date: Wed, 11 Mar 2015 14:58:30 +0100 [thread overview]
Message-ID: <87sidbr5yx.fsf@gmx.us> (raw)
In-Reply-To: <239B1E00-B975-4FEA-9826-DDB82D7B4C8B@agrarianresearch.org> (Vikas Rawal's message of "Wed, 11 Mar 2015 19:07:13 +0530")
Vikas Rawal <vikaslists@agrarianresearch.org> writes:
>>
>>> Is :float deprecated?
>>
>> No but caption takes priority. I'm working on this case, but my
>> dev. computer is not well at the moment.
>>
>
> 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
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 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
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
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...
—Rasmus
--
Governments should be afraid of their people
next prev parent reply other threads:[~2015-03-11 13:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-11 2:16 Table caption in Latex export with :float nil Vikas Rawal
2015-03-11 5:54 ` Vikas Rawal
2015-03-11 8:51 ` Rasmus
2015-03-11 13:37 ` Vikas Rawal
2015-03-11 13:58 ` Rasmus [this message]
2015-03-12 13:36 ` Vikas Rawal
2015-03-12 13:52 ` Rasmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sidbr5yx.fsf@gmx.us \
--to=rasmus@gmx.us \
--cc=emacs-orgmode@gnu.org \
--cc=vikaslists@agrarianresearch.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).