From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erik Iverson Subject: Re: [org-babel] suggestions for using tikz() graphic device with org-babel-R Date: Wed, 14 Apr 2010 09:46:41 -0500 Message-ID: <4BC5D551.9040901@ccbr.umn.edu> References: <87y6gqf6yj.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O23rm-0007F2-II for emacs-orgmode@gnu.org; Wed, 14 Apr 2010 10:46:58 -0400 Received: from [140.186.70.92] (port=49269 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O23rk-0007EL-Ed for emacs-orgmode@gnu.org; Wed, 14 Apr 2010 10:46:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O23re-0003nn-45 for emacs-orgmode@gnu.org; Wed, 14 Apr 2010 10:46:51 -0400 Received: from walleye.ccbr.umn.edu ([128.101.116.11]:2585) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O23rd-0003nG-U2 for emacs-orgmode@gnu.org; Wed, 14 Apr 2010 10:46:50 -0400 In-Reply-To: <87y6gqf6yj.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: emacs-orgmode@gnu.org > But, back to your question. What does the R block return? > > - if it returns the path to a file, then you can use :results file to > insert a link to that file in your org-mode buffer, or you can wrap > the path to that file in an include with something like the following > > #+source: graph-generator > #+begin_src R :results file > ... > #+end_src > > #+begin_src emacs-lisp :var path=graph-generator :results latex > (format "input{%s}" path) > #+end_src > > - if it returns raw LaTeX then you can use the :results latex header as > used in the elisp block above I just started looking at tikzDevice in R about two days ago. It is indeed a graphical device, just like X11, pdf, or postscript, so it doesn't return anything. It writes out a .tex file though, so you should be able to write a wrapper function that does return something useful for you. --Erik