From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vikas Rawal Subject: Re: orgmod: R and threeparttable Date: Sun, 15 Dec 2013 10:55:06 +0100 Message-ID: References: <87sitvakg6.fsf@gmail.com> <87ob4jae2y.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0160c35e9ff4dd04ed8fb005 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52865) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vs8Pp-0002ki-DQ for emacs-orgmode@gnu.org; Sun, 15 Dec 2013 04:55:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vs8Pj-0006m0-1E for emacs-orgmode@gnu.org; Sun, 15 Dec 2013 04:55:13 -0500 Received: from mail-ob0-f177.google.com ([209.85.214.177]:59134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vs8Pi-0006ld-RX for emacs-orgmode@gnu.org; Sun, 15 Dec 2013 04:55:06 -0500 Received: by mail-ob0-f177.google.com with SMTP id vb8so3657741obc.22 for ; Sun, 15 Dec 2013 01:55:06 -0800 (PST) In-Reply-To: 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: Nicolas Goaziou Cc: "emacs-orgmode@gnu.org" --089e0160c35e9ff4dd04ed8fb005 Content-Type: text/plain; charset=ISO-8859-1 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 > --089e0160c35e9ff4dd04ed8fb005 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Sorry again. Found the solution.

#+= begin_threeparttable must come after name and caption.

Th= e following works:

Org syntax:

#+NAME: = gharsondi-yield
#+CAPTION: Average yields of selected crops in Gharsondi, Gwalior, Madhya P= radesh and India, 2007-08 (kilograms per acre)
#+begin_threeparttable#+RESULTS: gharsondi-yield-in
| Crop=A0=A0=A0=A0=A0 | Gharsondi | Gwali= or | Madhya Pradesh | India |
|-----------+-----------+---------+----------------+-------|
| Soybean= =A0=A0 |=A0=A0=A0=A0=A0=A0 nil |=A0=A0=A0=A0 689 |=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 442 |=A0=A0 500 |
| Paddy=A0=A0=A0=A0 |=A0=A0=A0=A0=A0 1553 |= =A0=A0=A0=A0 866 |=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 569 |=A0 1337 |
| Ur= ad=A0=A0=A0=A0=A0 |=A0=A0=A0=A0=A0=A0=A0 53 |=A0=A0=A0=A0 142 |=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 142 |=A0=A0 192 |
| Sesame=A0=A0=A0 |=A0=A0=A0=A0=A0=A0 101 |=A0=A0=A0=A0 127 |=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 153 |=A0=A0 170 |
| Wheat=A0=A0=A0=A0 |=A0=A0=A0= =A0=A0=A0 824 |=A0=A0=A0=A0 664 |=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 652 |=A0= 1134 |
| Chick pea |=A0=A0=A0=A0=A0=A0 462 |=A0=A0=A0=A0 445 |=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0 288 |=A0=A0 308 |
| Rapeseed=A0 |=A0=A0=A0=A0= =A0=A0 501 |=A0=A0=A0=A0 280 |=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 375 |=A0=A0= 405 |
#+begin_tablenotes
\item [] \footnotesize{Note: Yield of rice Gwalior, M= adhya 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 Ghars= ondi, Gwalior, Madhya Pradesh and India, 2007-08 (kilograms per acre)}
\begin{center}
\begin{tabular}{lrrrr}
Crop & Gharsondi & Gwal= ior & Madhya Pradesh & India\\
\hline
Soybean & nil &= 689 & 442 & 500\\
Paddy & 1553 & 866 & 569 & 13= 37\\
Urad & 53 & 142 & 142 & 192\\
Sesame & 101 & 127= & 153 & 170\\
Wheat & 824 & 664 & 652 & 1134\\<= br>Chick pea & 462 & 445 & 288 & 308\\
Rapeseed & 50= 1 & 280 & 375 & 405\\
\end{tabular}
\end{center}
\begin{tablenotes}
\item [] \footnotesi= ze\{Note: Yield of rice Gwalior, Madhya Pradesh and
India were converted= to paddy equivalents.\}
\item [] \footnotesize\{Source: Data for Gwalio= r, Madhya Pradesh and
India taken from the website Directorate of Economics and Statistics,
Mi= nistry of Agriculture, Government of India\}
\end{tablenotes}
\end{th= reeparttable}




On Sun, Dec 15, 2013 at 10:50 AM, Vikas Rawal <vikaslists@ag= rarianresearch.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 explorati= on, there seems to be a problem.

A= s you can see in the example below, \end{table} is wrongly placed. tablenot= es and \end{threeparttable} should come before \end{table} and not after. S= ince special blocks are wrapping around the table, this is creating a probl= em.


My org syntax;

#+begin_thre= eparttable
#+NAME: gharsondi-yield
#+CAPTION: Average yields of selec= ted crops in Gharsondi, Gwalior, Madhya Pradesh and India, 2007-08 (kilogra= ms per acre)
#+RESULTS: gharsondi-yield-in
| Crop=A0=A0=A0=A0=A0 | Gharsondi | Gwalio= r | Madhya Pradesh | India |
|-----------+-----------+---------+--------= --------+-------|
| Soybean=A0=A0 |=A0=A0=A0=A0=A0=A0 nil |=A0=A0=A0=A0 = 689 |=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 442 |=A0=A0 500 |
| Paddy=A0=A0=A0=A0 |=A0=A0=A0=A0=A0 1553 |=A0=A0=A0=A0 866 |=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 569 |=A0 1337 |
| Urad=A0=A0=A0=A0=A0 |=A0=A0=A0= =A0=A0=A0=A0 53 |=A0=A0=A0=A0 142 |=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 142 |= =A0=A0 192 |
| Sesame=A0=A0=A0 |=A0=A0=A0=A0=A0=A0 101 |=A0=A0=A0=A0 127= |=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 153 |=A0=A0 170 |
| Wheat=A0=A0=A0= =A0 |=A0=A0=A0=A0=A0=A0 824 |=A0=A0=A0=A0 664 |=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 652 |=A0 1134 |
| Chick pea |=A0=A0=A0=A0=A0=A0 462 |=A0=A0=A0=A0 445 |=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 288 |=A0=A0 308 |
| Rapeseed=A0 |=A0=A0=A0=A0=A0=A0 501 = |=A0=A0=A0=A0 280 |=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 375 |=A0=A0 405 |
#= +begin_tablenotes
\item [] \footnotesize{Note: Yield of rice Gwalior, Ma= dhya Pradesh and
India were converted to paddy equivalents.}
\item [] \footnotesize{Sourc= e: Data for Gwalior, Madhya Pradesh and
India taken from the website Dir= ectorate of Economics and Statistics,
Ministry of Agriculture, Governmen= t of India}
#+end_tablenotes
#+end_threeparttable

When exported, this creates the following in the .tex file.
=
\begin{threeparttable}
\begin{table}[htb]
\caption{\label{gharson= di-yield}Average yields of selected crops in Gharsondi, Gwalior, Madhya Pra= desh 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\\<= br>Chick pea & 462 & 445 & 288 & 308\\
Rapeseed & 50= 1 & 280 & 375 & 405\\
\end{tabular}
\end{table}
\begin{tablenotes}
\item [] \footnotesiz= e\{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,
Mi= nistry of Agriculture, Government of India\}
\end{tablenotes}
\end{th= reeparttable}

=
V= ikas

--089e0160c35e9ff4dd04ed8fb005--