emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Vikas Rawal <vikaslists@agrarianresearch.org>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: orgmod: R and threeparttable
Date: Sun, 15 Dec 2013 10:55:06 +0100	[thread overview]
Message-ID: <CAFVt51Jfzga0TVosoy40wk6a41gTuHuEyq_OBtiW739CNa1O+A@mail.gmail.com> (raw)
In-Reply-To: <CAFVt51L0fc29QP3XQk3HXY3cp1zCt_EdhXfr5Ry7mvsQ-GJadg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4909 bytes --]

Sorry again. Found the solution.

#+begin_threeparttable must come after name and caption.

The following works:

Org syntax:

#+NAME: gharsondi-yield
#+CAPTION: Average yields of selected crops in Gharsondi, Gwalior, Madhya
Pradesh and India, 2007-08 (kilograms per acre)
#+begin_threeparttable
#+RESULTS: gharsondi-yield-in
| Crop      | Gharsondi | Gwalior | Madhya Pradesh | India |
|-----------+-----------+---------+----------------+-------|
| Soybean   |       nil |     689 |            442 |   500 |
| Paddy     |      1553 |     866 |            569 |  1337 |
| Urad      |        53 |     142 |            142 |   192 |
| Sesame    |       101 |     127 |            153 |   170 |
| Wheat     |       824 |     664 |            652 |  1134 |
| Chick pea |       462 |     445 |            288 |   308 |
| Rapeseed  |       501 |     280 |            375 |   405 |
#+begin_tablenotes
\item [] \footnotesize{Note: Yield of rice Gwalior, Madhya Pradesh and
India were converted to paddy equivalents.}
\item [] \footnotesize{Source: Data for Gwalior, Madhya Pradesh and
India taken from the website Directorate of Economics and Statistics,
Ministry of Agriculture, Government of India}
#+end_tablenotes
#+end_threeparttable


Gives this:

\begin{threeparttable}
\caption{\label{gharsondi-yield}Average yields of selected crops in
Gharsondi, Gwalior, Madhya Pradesh and India, 2007-08 (kilograms per acre)}
\begin{center}
\begin{tabular}{lrrrr}
Crop & Gharsondi & Gwalior & Madhya Pradesh & India\\
\hline
Soybean & nil & 689 & 442 & 500\\
Paddy & 1553 & 866 & 569 & 1337\\
Urad & 53 & 142 & 142 & 192\\
Sesame & 101 & 127 & 153 & 170\\
Wheat & 824 & 664 & 652 & 1134\\
Chick pea & 462 & 445 & 288 & 308\\
Rapeseed & 501 & 280 & 375 & 405\\
\end{tabular}
\end{center}
\begin{tablenotes}
\item [] \footnotesize\{Note: Yield of rice Gwalior, Madhya Pradesh and
India were converted to paddy equivalents.\}
\item [] \footnotesize\{Source: Data for Gwalior, Madhya Pradesh and
India taken from the website Directorate of Economics and Statistics,
Ministry of Agriculture, Government of India\}
\end{tablenotes}
\end{threeparttable}




On Sun, Dec 15, 2013 at 10:50 AM, Vikas Rawal <
vikaslists@agrarianresearch.org> wrote:

>
>
>
> On Sat, Dec 14, 2013 at 2:48 PM, Vikas Rawal <
> vikaslists@agrarianresearch.org> wrote:
>
>>
>> Nicolas,
>>
>> Special blocks seem to work very well, actually. Thank you.
>>
>>
> On further exploration, there seems to be a problem.
>
> As you can see in the example below, \end{table} is wrongly placed.
> tablenotes and \end{threeparttable} should come before \end{table} and not
> after. Since special blocks are wrapping around the table, this is creating
> a problem.
>
>
> My org syntax;
>
> #+begin_threeparttable
> #+NAME: gharsondi-yield
> #+CAPTION: Average yields of selected crops in Gharsondi, Gwalior, Madhya
> Pradesh and India, 2007-08 (kilograms per acre)
> #+RESULTS: gharsondi-yield-in
> | Crop      | Gharsondi | Gwalior | Madhya Pradesh | India |
> |-----------+-----------+---------+----------------+-------|
> | Soybean   |       nil |     689 |            442 |   500 |
> | Paddy     |      1553 |     866 |            569 |  1337 |
> | Urad      |        53 |     142 |            142 |   192 |
> | Sesame    |       101 |     127 |            153 |   170 |
> | Wheat     |       824 |     664 |            652 |  1134 |
> | Chick pea |       462 |     445 |            288 |   308 |
> | Rapeseed  |       501 |     280 |            375 |   405 |
> #+begin_tablenotes
> \item [] \footnotesize{Note: Yield of rice Gwalior, Madhya Pradesh and
> India were converted to paddy equivalents.}
> \item [] \footnotesize{Source: Data for Gwalior, Madhya Pradesh and
> India taken from the website Directorate of Economics and Statistics,
> Ministry of Agriculture, Government of India}
> #+end_tablenotes
> #+end_threeparttable
>
> When exported, this creates the following in the .tex file.
>
> \begin{threeparttable}
> \begin{table}[htb]
> \caption{\label{gharsondi-yield}Average yields of selected crops in
> Gharsondi, Gwalior, Madhya Pradesh and India, 2007-08 (kilograms per acre)}
> \centering
> \begin{tabular}{lrrrr}
> Crop & Gharsondi & Gwalior & Madhya Pradesh & India\\
> \hline
> Soybean & nil & 689 & 442 & 500\\
> Paddy & 1553 & 866 & 569 & 1337\\
> Urad & 53 & 142 & 142 & 192\\
> Sesame & 101 & 127 & 153 & 170\\
> Wheat & 824 & 664 & 652 & 1134\\
> Chick pea & 462 & 445 & 288 & 308\\
> Rapeseed & 501 & 280 & 375 & 405\\
> \end{tabular}
> \end{table}
> \begin{tablenotes}
> \item [] \footnotesize\{Note: Yield of rice Gwalior, Madhya Pradesh and
> India were converted to paddy equivalents.\}
> \item [] \footnotesize\{Source: Data for Gwalior, Madhya Pradesh and
> India taken from the website Directorate of Economics and Statistics,
> Ministry of Agriculture, Government of India\}
> \end{tablenotes}
> \end{threeparttable}
>
> Vikas
>

[-- Attachment #2: Type: text/html, Size: 6489 bytes --]

  reply	other threads:[~2013-12-15  9:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-11 11:12 orgmod: R and threeparttable Vikas Rawal
2013-12-11 20:43 ` John Hendy
2013-12-13  7:07   ` Vikas Rawal
2013-12-14  8:08   ` Vikas Rawal
2013-12-14  8:46     ` Nicolas Goaziou
2013-12-14  9:40       ` Vikas Rawal
2013-12-14 11:04         ` Nicolas Goaziou
2013-12-14 12:06           ` Vikas Rawal
2013-12-14 13:48             ` Vikas Rawal
2013-12-15  9:50               ` Vikas Rawal
2013-12-15  9:55                 ` Vikas Rawal [this message]
2013-12-15  9:58                 ` Nicolas Goaziou
2013-12-15 10:21                   ` Vikas Rawal
2013-12-15 10:46                     ` Nicolas Goaziou
2013-12-15 10:50                       ` Vikas Rawal

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=CAFVt51Jfzga0TVosoy40wk6a41gTuHuEyq_OBtiW739CNa1O+A@mail.gmail.com \
    --to=vikaslists@agrarianresearch.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /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).