From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Berry Subject: =?UTF-8?B?UmU6IMKrTWFjcm/CuyBleHBhbnNpb24gaW4gc291cmNlIGJsb2Nr?= =?UTF-8?B?czsgY29kZS1zaGFyaW5nIGJldHdlZW4gYmxvY2tz?= Date: Fri, 19 Sep 2014 02:59:15 +0000 (UTC) Message-ID: References: <87bnqdqb7i.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUtf7-00014u-US for emacs-orgmode@gnu.org; Fri, 19 Sep 2014 04:35:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUtey-0007Wi-NX for emacs-orgmode@gnu.org; Fri, 19 Sep 2014 04:35:29 -0400 Received: from plane.gmane.org ([80.91.229.3]:41716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUtey-0007Vq-A2 for emacs-orgmode@gnu.org; Fri, 19 Sep 2014 04:35:20 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XUoPv-0005oy-Cx for emacs-orgmode@gnu.org; Fri, 19 Sep 2014 04:59:27 +0200 Received: from 137.110.34.228 ([137.110.34.228]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 19 Sep 2014 04:59:27 +0200 Received: from ccberry by 137.110.34.228 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 19 Sep 2014 04:59:27 +0200 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: emacs-orgmode@gnu.org Andreas Kiermeier gmail.com> writes: > > My two blocks (with some code removed for simplicity) are as follow: > > #+NAME: tbl-refyear > #+BEGIN_SRC R :results silent :exports none > latex(tabular( )) > #+END_SRC > > #+BEGIN_SRC latex :noweb yes > \begin{table}[h] > \label{tbl:refyear} > \caption{Separation outcomes (death or any type of discharge) by > reference year.} > <> > \end{table} > #+END_SRC > > I've tried :cache yes as part of the tbl-refyear source block, but > that didn't stop if from being run twice. Am I missing a suitable > header argument? > > This is the only way I could find to wrap the latex table (which has > some complex formatting and hence why I've used it over just producing > a table) in a float with a caption (though I still can't properly > reference the label when I export to a PDF file). > > Any thought would be greatly appreciated. TIA! > Why not use library(xtable) and do it all in R? If you are not sure this is the right choice, I suggest you look at the help page for print.xtable - you have a lot of control over caption, label, positioning, etc. HTH, Chuck