From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Cook, Malcolm" Subject: Re: import R data frame into org-mode table Date: Tue, 30 Jul 2013 17:59:59 +0000 Message-ID: References: <87mwpket4b.fsf@med.uni-goettingen.de> <87a9l5avuc.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4EDT-0002z0-8b for emacs-orgmode@gnu.org; Tue, 30 Jul 2013 14:00:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4EDM-00057y-7Q for emacs-orgmode@gnu.org; Tue, 30 Jul 2013 14:00:11 -0400 Received: from smtp01.stowers.org ([12.201.176.61]:57173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4EDL-00051c-VK for emacs-orgmode@gnu.org; Tue, 30 Jul 2013 14:00:04 -0400 In-Reply-To: <87a9l5avuc.fsf@gmail.com> Content-Language: en-US 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: 'Nick Dokos' , "'emacs-orgmode@gnu.org'" >> >> Indeed, thanks, and, my worked out example follows using emacs 2.18.9 a= nd 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=3D1:260,alpha=3Drep(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? =20 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".=20 > I have to rewrite it as follows in order for it to work: > >> #+begin_src R :results value :colnames yes >> data.frame(num=3D1:260,alpha=3Drep(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 d= eleted upon source block evaluation.=20 Are you sure your placement works for you? Summary: In my hands today, there is no placement of them that both survive= s source block re-evaluation and works. And, they can both be placed immed= iately above or below the #+RESULTS: line and are respected on export. (However, another funny interaction, the caption of the longtable has multi= ple entries, one for each page, in my #+LATEX: \listoftables ) Hmmmm.... > >-- >Nick > >