emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Cook, Malcolm" <MEC@stowers.org>
To: 'Nick Dokos' <ndokos@gmail.com>,
	"'emacs-orgmode@gnu.org'" <emacs-orgmode@gnu.org>
Subject: Re: import R data frame into org-mode table
Date: Tue, 30 Jul 2013 17:59:59 +0000	[thread overview]
Message-ID: <D4772401B9D976478C0895769BE3E792BBDF19@MBSRV02.sgc.loc> (raw)
In-Reply-To: <87a9l5avuc.fsf@gmail.com>

>>
 >> Indeed, thanks, and, my worked out example follows using emacs 2.18.9 and org-mode version 8.0.6
 >>
 >
 >2.18.9?

oops, that was the GTK_ Version number.  My emacs is 24.3.1.

>> #+LATEX: \listoftables
 >> #+LaTeX_HEADER: \usepackage{longtable}
 >> #+name: longtabletest
 >> #+CAPTION: test of longtable caption
 >> #+begin_src R :results value :colnames yes
 >> data.frame(num=1:260,alpha=rep(LETTERS,10))
 >> #+end_src
 >>
 >> #+RESULTS:
 >> #+attr_latex: :environment longtable
 >> | num | alpha |
 >> |-----+-------|
 >> |   1 | A     |
 >> |   2 | B     |
 >> ...
 >
 >Does this really produce a table caption for you when you export to
 >latex?
> And does the attr_latex line stay there at the top of the table
 >when the code block is evaluated?  

Yes and Yes.  At least, I swear it worked in my hands yesterday, but today the answer is No and No.  !!  I can't explain what has changed.

> For me, the answers are "no" and
 >"no". 
> I have to rewrite it as follows in order for it to work:
 >
 >> #+begin_src R :results value :colnames yes
 >> data.frame(num=1:260,alpha=rep(LETTERS,10))
 >> #+end_src
 >>
 >> #+CAPTION: test of longtable caption
 >> #+attr_latex: :environment longtable
 >> #+RESULTS:
 >> | num | alpha |
 >> |-----+-------|
 >> |   1 | A     |
 >> |   2 | B     |

In my hands, both the #+CAPTION and the #+att_latex as you place them are deleted upon source block evaluation. 

Are you sure your placement works for you?

Summary: In my hands today, there is no placement of them that both survives source block re-evaluation and works.  And, they can both be placed immediately above or below the #+RESULTS: line and are respected on export.

(However, another funny interaction, the caption of the longtable has multiple entries, one for each page, in my #+LATEX: \listoftables )

Hmmmm....

 >
 >--
 >Nick
 >
 >

  reply	other threads:[~2013-07-30 18:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-16 15:19 import R data frame into org-mode table Rob Stewart
2013-07-17 22:09 ` Andreas Leha
2013-07-29 14:42   ` Rob Stewart
2013-07-29 15:35     ` Cook, Malcolm
2013-07-29 16:03       ` John Hendy
2013-07-29 17:11         ` Nick Dokos
2013-07-29 20:17         ` Cook, Malcolm
2013-07-29 21:40           ` Nick Dokos
2013-07-30 17:59             ` Cook, Malcolm [this message]
2013-07-17 22:48 ` Thomas S. Dye

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=D4772401B9D976478C0895769BE3E792BBDF19@MBSRV02.sgc.loc \
    --to=mec@stowers.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=ndokos@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).