From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vikas Rawal Subject: Re: orgmod: R and threeparttable Date: Sat, 14 Dec 2013 13:06:03 +0100 Message-ID: References: <87sitvakg6.fsf@gmail.com> <87ob4jae2y.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c336761784a704ed7d679a Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vrnyz-0004va-28 for emacs-orgmode@gnu.org; Sat, 14 Dec 2013 07:06:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vrnyt-0001s3-W8 for emacs-orgmode@gnu.org; Sat, 14 Dec 2013 07:06:08 -0500 Received: from mail-ob0-f173.google.com ([209.85.214.173]:61664) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vrnyt-0001rv-PG for emacs-orgmode@gnu.org; Sat, 14 Dec 2013 07:06:03 -0500 Received: by mail-ob0-f173.google.com with SMTP id gq1so3077669obb.32 for ; Sat, 14 Dec 2013 04:06:03 -0800 (PST) In-Reply-To: <87ob4jae2y.fsf@gmail.com> 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" --001a11c336761784a704ed7d679a Content-Type: text/plain; charset=ISO-8859-1 On Sat, Dec 14, 2013 at 12:04 PM, Nicolas Goaziou wrote: > Vikas Rawal writes: > > > I do not know if I am expressing myself clearly. The table is being > > generated by an R source code. We need a way of adding notes to such a > > table. > > There are two different problems: > > 1. How to generate "threeparttable" environment using Org syntax and > `latex' export back-end. > 2. How to generate Org syntax specified above from a source block. > > At the moment, my only concern is point 1. > > Yes, this is right. > Unfortunately, on such matters, one has to work with the conventions in > > different disciplines. At least in social sciences, it is usually > expected > > that notes are placed below Tables and Figures, and not as part of > > footnotes, which are reserved for notes to text. At least my > collaborators > > and readers frown when I put table sources and notes in the footnotes. > > Understood. You didn't answer to my suggestion to use special blocks, > though. > > I do not know how to use special blocks. I will read the manual and see what can be done with those. I f special blocks cannot give a statisfactory solution (I do not know), other questions you raise may be relevant in exploring a better solution. > > > If my suggestion to use special blocks doesn't apply, you still need to > properly define your problem. In particular: > > - How table notes are generated? Do you want to hijack footnotes in > table to produce them? > - Should note numbers be configurable? > We should be able to add something to #+RESULTS block. I would think that the natural way would be to specify threeparttable in #+attr_latex. It would be ideal to put contents of a footer under a separate headline (tagged noexport) somewhere in the document with a custom_id property. This custom_id could be specified along with threeparttable in the above #+attr_latex. Something like the following: #+attr_latex: threeparttable [[notes_custom_id_1]] #+RESUlTS: |x|y|z| |1|2|2| * Table notes :noexport: :PROPERTIES: :CUSTOM_ID: notes_custom_id_1 :END: + first note here + second note here + third note here - Should "threeparttable" be generated only when table contains at least > a note and some global option is set to a non-nil value? Or should > a user explicitly write that he requires such an environment for the > current table? > I would think threeparttable be generated when you have something like the above specified in #+attr_latex. > - Can another environment than "tabular" be used within > "threeparttable"? > - Is the "table" environment around mandatory? > - ... > I use tabulary inside threeparttable (that is, when I give raw latex code). The code I used has table environment around it. I am no expert on latex and I must have put it together using whatever I could find on threeparttable. I cannot say whether this is mandatory. I am sure other people on this list would just know this. Otherwise, I can experiment. I am really stretching my capabilities and knowledge of org. So, please excuse me, if what I said is nonsensical. Vikas --001a11c336761784a704ed7d679a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



On Sat, Dec 14, 2013 at 12:04 PM, Nicolas Goaziou <n.goaziou@gma= il.com> wrote:
Vikas R= awal <vikaslists@agra= rianresearch.org> writes:

> I do not know if I am expressing myself clearly. The table is being > generated by an R source code. We need a way of adding notes to such a=
> table.

There are two different problems:

=A0 1. How to generate "threeparttable" environment using Org syn= tax and
=A0 =A0 =A0`latex' export back-end.
=A0 2. How to generate Org syntax specified above from a source block.

At the moment, my only concern is point 1.


Yes, this is r= ight.

> Unfortunately, on such matters, one has to work wit= h the conventions in
> different disciplines. At least in social sciences, it is usually expe= cted
> that notes are placed below Tables and Figures, and not as part of
> footnotes, which are reserved for notes to text. At least my collabora= tors
> and readers frown when I put table sources and notes in the footnotes.=

Understood. You didn't answer to my suggestion to use special blo= cks,
though.


I do not know = how to use special blocks. I will read the manual and see what can be done = with those. I f special blocks cannot give a statisfactory solution (I do n= ot know), other questions you raise may be relevant in exploring a better s= olution.

=A0

If my suggestion to use special blocks doesn't apply, you still n= eed to
properly define your problem. In particular:

- How table notes are generated? Do you want to hijack footnotes in
=A0 table to produce them?
- Should note numbers be configurable?

W= e should be able to add something to #+RESULTS block. I would think that the= natural way would be to specify threeparttable in #+attr_latex. It would b= e ideal to put contents of a footer under a separate headline (tagged noexp= ort) somewhere in the document with a custom_id property. This custom_id co= uld be specified along with threeparttable in the above #+attr_latex. Somet= hing like the following:

#+attr_latex: threeparttable [[notes_custom_id_1]]
=
#+RESUlTS:
|x|y|z|
|1|2|2|

* Table = notes=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 :noexport:
:PROPERTIES: :CUSTOM_ID: notes_custom_id_1
:END:
+ first note here
<= /div>
+ second note here
+ third note here

- Should "threeparttable" be generated only when table contains a= t least
=A0 a note and some global option is set to a non-nil value? Or should
=A0 a user explicitly write that he requires such an environment for the =A0 current table?

I would think threep= arttable be generated when you have something like the above specified in #= +attr_latex.
=A0
- Can another environment than "tabular" be used within
=A0 "threeparttable"?
- Is the "table" environment around mandatory?
- ...

I use tabulary inside threepartta= ble (that is, when I give raw latex code).

The code I us= ed has table environment around it. I am no expert on latex and I must have= put it together using whatever I could find on threeparttable. I cannot sa= y whether this is mandatory. I am sure other people on this list would just= know this. Otherwise, I can experiment.

I am really stretching my capabilities and knowledge of org. So, p= lease excuse me, if what I said is nonsensical.

Vikas
=


--001a11c336761784a704ed7d679a--