From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremie Juste Subject: How to use :prologue with latex Date: Mon, 24 Apr 2017 12:41:53 +0200 (CEST) Message-ID: <87k26a84um.fsf@u-cergy.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2bRS-0000H6-EV for emacs-orgmode@gnu.org; Mon, 24 Apr 2017 06:42:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d2bRP-0001AE-Bx for emacs-orgmode@gnu.org; Mon, 24 Apr 2017 06:42:02 -0400 Received: from snowwhite.contactoffice.com ([212.3.242.89]:57974) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d2bRP-00015w-5k for emacs-orgmode@gnu.org; Mon, 24 Apr 2017 06:41:59 -0400 Received: from univcergy1.co-bxl (univcergy1.co-bxl [10.2.0.10]) by snowwhite.contactoffice.com (Postfix) with ESMTP id 1A0A9B75 for ; Mon, 24 Apr 2017 12:41:56 +0200 (CEST) Received: from freegnu ([194.167.235.219]) by univcergy.contactoffice.com (envelope-from ) with ESMTPSA for ; Mon, 24 Apr 2017 12:41:53 +0200 (CEST) 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" To: emacs-orgmode@gnu.org Hello, I would like to use :prologue and epilogue with latex output when using R. Would it be possible to do something like the following? #+NAME: test1123 #+BEGIN_SRC R :results output latex :prologue \\begin{table} :epilogue \\end{table} :session *R* :dir tmp :cache no print(xtable(data.frame(a=rnorm(10),b=letters[1:10])),floating.environment=FALSE) #+END_SRC #+RESULTS: test1123 #+BEGIN_EXPORT latex Error: unexpected input in "\" % latex table generated in R 3.3.1 by xtable 1.8-2 package % Mon Apr 24 12:40:21 2017 \begin{FALSE}[ht] \centering \begin{tabular}{rrl} \hline & a & b \\ \hline 1 & -0.79 & a \\ 2 & 0.71 & b \\ 3 & 0.82 & c \\ 4 & 1.04 & d \\ 5 & 0.46 & e \\ 6 & 1.02 & f \\ 7 & 0.89 & g \\ 8 & -1.12 & h \\ 9 & 0.77 & i \\ 10 & 2.08 & j \\ \hline \end{tabular} \end{FALSE} Error: unexpected input in "\" #+END_EXPORT Best wishes, Jeremie