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:50:34 +0100 Message-ID: References: <87sitvakg6.fsf@gmail.com> <87ob4jae2y.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e012940d87707eb04ed8fa00b Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vs8LR-0001Sr-Tb for emacs-orgmode@gnu.org; Sun, 15 Dec 2013 04:50:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vs8LM-0005ZZ-Ja for emacs-orgmode@gnu.org; Sun, 15 Dec 2013 04:50:41 -0500 Received: from mail-ob0-f170.google.com ([209.85.214.170]:59993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vs8LM-0005ZV-Ce for emacs-orgmode@gnu.org; Sun, 15 Dec 2013 04:50:36 -0500 Received: by mail-ob0-f170.google.com with SMTP id wp18so3700889obc.1 for ; Sun, 15 Dec 2013 01:50:35 -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" --089e012940d87707eb04ed8fa00b Content-Type: text/plain; charset=ISO-8859-1 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 --089e012940d87707eb04ed8fa00b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



On Sat, Dec 14, 2013 at 2:48 PM, Vikas Rawal <= vikasl= ists@agrarianresearch.org> wrote:

Nicolas,

Special blocks seem to work very well, actually= . Thank you.


On further exploration, th= ere 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 s= pecial blocks are wrapping around the table, this is creating a problem.

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}

Vikas
--089e012940d87707eb04ed8fa00b--