From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: [new exporter]: LaTeX output from babel escapes comment delimiter Date: Wed, 24 Oct 2012 15:14:15 -1000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TRC1f-0001Cy-33 for emacs-orgmode@gnu.org; Wed, 24 Oct 2012 21:14:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TRC1d-0005yX-Lc for emacs-orgmode@gnu.org; Wed, 24 Oct 2012 21:14:23 -0400 Received: from oproxy9.bluehost.com ([69.89.24.6]:60417) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TRC1d-0005xv-Bq for emacs-orgmode@gnu.org; Wed, 24 Oct 2012 21:14:21 -0400 In-Reply-To: (Michael Gauland's message of "Thu, 25 Oct 2012 00:15:59 +0000 (UTC)") 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: Michael Gauland Cc: emacs-orgmode@gnu.org Aloha Mike, It looks like your source block and results are indented. IIRC, that's not a good thing. This might work better: #+name: gauland-eg #+HEADER: :results output raw #+HEADER: :exports results #+BEGIN_SRC R library(xtable) library(ascii) print(ascii(xtable(matrix(c(1,2,3,4),nrow=2,ncol=2))),type="org") #+END_SRC #+results: gauland-eg | | 1 | 2 | |---+------+------| | 1 | 1.00 | 3.00 | | 2 | 2.00 | 4.00 | Then you can let the new exporter do the work of making the LaTeX export look nice. This has the (possible) advantage that it also exports to the other back ends, not just LaTeX. hth, Tom Michael Gauland writes: > I use the xtables package in R to generate nice-looking tables for LaTeX output, > as in the snippet below. The new exporter escapes the % symbol in the R output, > so that the comments generated by xtable are no longer comments. > > * Snippet > #+HEADER: :results output latex > #+HEADER: :exports results > #+BEGIN_SRC R > library(xtable) > xtable(matrix(c(1,2,3,4),nrow=2,ncol=2)) > #+END_SRC > > #+RESULTS: > #+BEGIN_LaTeX > % latex table generated in R 2.15.1 by xtable 1.7-0 package > % Thu Oct 25 13:11:30 2012 > \begin{table}[ht] > \begin{center} > \begin{tabular}{rrr} > \hline > & 1 & 2 \\ > \hline > 1 & 1.00 & 3.00 \\ > 2 & 2.00 & 4.00 \\ > \hline > \end{tabular} > \end{center} > \end{table} > #+END_LaTeX -- Thomas S. Dye http://www.tsdye.com