emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] import R data frame into org-mode table


From: Cook, Malcolm
Subject: Re: [O] import R data frame into org-mode table
Date: Tue, 30 Jul 2013 17:59:59 +0000

>>
 >> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]