From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [PATCH] Add tikzDevice support to ob-R Date: Mon, 28 Nov 2011 00:08:50 -0700 Message-ID: <8739d87mgt.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUvKh-0002O9-9Q for emacs-orgmode@gnu.org; Mon, 28 Nov 2011 02:08:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RUvKf-0004P8-SL for emacs-orgmode@gnu.org; Mon, 28 Nov 2011 02:08:55 -0500 Received: from mail-iy0-f169.google.com ([209.85.210.169]:51320) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUvKf-0004P4-OR for emacs-orgmode@gnu.org; Mon, 28 Nov 2011 02:08:53 -0500 Received: by iaek3 with SMTP id k3so10725505iae.0 for ; Sun, 27 Nov 2011 23:08:53 -0800 (PST) In-Reply-To: (Thomas S. Dye's message of "Sat, 26 Nov 2011 21:32:57 -1000") 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: "Thomas S. Dye" Cc: Org-mode Applied, Thanks -- Eric tsd@tsdye.com (Thomas S. Dye) writes: > Aloha all, > > The attached patch adds tikzDevice support to ob-R. It requires that > the tikzDevice package be available to R, so it must be installed and > loaded. Something like the following code in .Rprofile will load the > package by default: > > old <- getOption("defaultPackages") > options(defaultPackages = c(old, "tikzDevice")) > > Then, specify a .tex file in the :file header argument of the R source > code block, e.g., :file intervals.tex, and the graphic will be produced > by tikzDevice. > > The advantage of this for LaTeX export is that the resulting file will > be set with the fonts of its surrounding document. > > Something like this works for me, where the \sffamily command uses the > document's sans serif font and the file is called intervals.tex: > > \begin{figure}[htb!] > \centering > \sffamily > \input{../figure/intervals} > \caption[Elapsed time between Polynesian colonization of Hawai`i and > fire-pit use]{Elapsed time between Polynesian colonization of Hawai`i > and fire-pit use.} > \label{fig:elapsed-time} > \end{figure} > > All the best, > Tom -- Eric Schulte http://cs.unm.edu/~eschulte/