[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH] Add tikzDevice support to ob-R
From: |
Eric Schulte |
Subject: |
Re: [O] [PATCH] Add tikzDevice support to ob-R |
Date: |
Mon, 28 Nov 2011 00:08:50 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (gnu/linux) |
Applied, Thanks -- Eric
address@hidden (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/