[Tikzdevice-bugs] Running TikzDevice on Mac OS 10.6

Cameron Bracken cameron.bracken at gmail.com
Wed Oct 28 16:58:37 CET 2009


Hi Mike,

I use the same system.  Are you using the GUI?  The problem, I think, is
that the Mac GUI does not set the PATH completely.  What I suggest (this is
what I do) is create the file ~/.Rprofile and add the following lines:

Sys.setenv("PATH" = paste(Sys.getenv("PATH"),"/usr/texbin",sep=":"))
options(tikzMetricsDictionary = path.expand("~/.tikzMetricsDictionary"))

This will set the path to your latex compiler and also use a global metrics
file.  The advantage the second line is that tikzDevice will cache string
width calculations and access them later for speed.

Anyway, I suspect that this will fix your problem.

Cheers,
-Cameron

--
Cameron Bracken
Graduate Research Assistant
CADSWES
University of Colorado at Boulder
cameron.bracken at colorado.edu
(707) 986-8633


On Wed, Oct 28, 2009 at 9:36 AM, Mike Lawrence <Mike.Lawrence at dal.ca> wrote:

> Hi all,
>
> I'm having troubles running TikzDevice. My OS is fresh install of Mac
> 10.6, I'm running R 10.0, I have the 2008 MacTex distribution
> installed and running fine, and I was able to use "tlmgr install pgf"
> to install PGF. However, when I attempt to library(tikzDevice), I get
> the error below despite the fact that options('latexcmd') seems to
> properly point to "latex" as the path to the installed compiler. Help?
>
> Loading required package: filehash
> filehash: Simple key-value database (2.0-1 2008-12-19)
> tikzDevice: A Device for R Graphics Output in PGF/TikZ Format (v0.4.8)
> Checking for a LaTeX compiler...
>
> Error in fun(...) :
>
> An appropriate LaTeX compiler could not be found.
> Access to LaTeX is required in order for the TikZ device
> to produce output.
>
> The following places were tested for a valid LaTeX compiler:
>
>        A pre-existing value of the global option tikzLatex
>        The R environment variable R_LATEXCMD
>        The R environment variable R_PDFLATEXCMD
>        The global option latexcmd
>        The PATH using the command latex
>        The PATH using the command pdflatex
>
> If you have a working LaTeX compiler, try one of the
> following solutions:
>
>        Set the path to your compiler as the value of either latexcmd or
>        tikzLatex in .Rprofile using options().
>
>        Set the path to your compiler as the value of either R_LATEXCMD or
>        R_PDFLATEXCMD in .Renviron.
>
>        Ensure the folder containing your compiler is included in PATH.
>
> Error : .onLoad failed in 'loadNamespace' for 'tikzDevice'
> Error: package/namespace load failed for 'tikzDevice'
>
>
>
> --
> Mike Lawrence
> Graduate Student
> Department of Psychology
> Dalhousie University
>
> Looking to arrange a meeting? Check my public calendar:
> http://tr.im/mikes_public_calendar
>
> ~ Certainty is folly... I think. ~
> _______________________________________________
> Tikzdevice-bugs mailing list
> Tikzdevice-bugs at lists.r-forge.r-project.org
>
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/tikzdevice-bugs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.r-forge.r-project.org/pipermail/tikzdevice-bugs/attachments/20091028/59619819/attachment.htm 


More information about the Tikzdevice-bugs mailing list