From: Rasmus Pank Roulund <rasmus.pank@gmail.com>
To: "Thomas S. Dye" <tsd@tsdye.com>
Cc: Org-mode <emacs-orgmode@gnu.org>
Subject: Re: [PATCH] Add tikzDevice support to ob-R
Date: Sun, 27 Nov 2011 12:18:10 +0000 [thread overview]
Message-ID: <87mxbhwygt.fsf@gmail.com> (raw)
In-Reply-To: <m1k46mhvfa.fsf@tsdye.com> (Thomas S. Dye's message of "Sat, 26 Nov 2011 21:32:57 -1000")
Aloha Thomas,
> 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:
Thanks a bunch. I always use pgfSweave and thus I haven't really
managed to move from Rnw (LaTeX + R files) to Org file.
Are you aware of the very handy pgfsweave bin? In the Arch R package it
is located in
/usr/lib/R/bin/pgfsweave
First, you don't have to load tikzDevice. Second, It makes this very
nice notation valid in Rnw files:
#+begin_src latex
\begin{figure}[tbh]
\caption{Time series $x$ and $y$}\label{fig:ts1}
<<ts3xy-plot, echo=FALSE, fig=T, tikz=T, external=T, cache=F, echo=F, width=7, height=3, sanitize=T>>=
plot(x.ts)
lines(y.ts)
#abline(lm(y.fil~x.fil))
@
\end{figure}
#+end_latex
which translates to the following automatically:
#+begin_src latex
\begin{figure}[tbh]
\caption{Time series $x$ and $y$}\label{fig:ts1}
\tikzsetnextfilename{class3-ts3xy-plot}
\tikzexternalfiledependsonfile{class3-ts3xy-plot}{class3-ts3xy-plot.tikz}
\input{class3-ts3xy-plot.tikz}
\end{figure}
#+end_src
It also adds nice formatting of R chucks without the need other R
packages.
Thus, using pgfSweave over regular Sweave is just wonderful. However, I
don't know whether it can integrate with Babel.
Thanks again.
–Rasmus
--
Sent from my Emacs
next prev parent reply other threads:[~2011-11-27 12:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-27 7:32 [PATCH] Add tikzDevice support to ob-R Thomas S. Dye
2011-11-27 12:18 ` Rasmus Pank Roulund [this message]
2011-11-28 7:08 ` Eric Schulte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mxbhwygt.fsf@gmail.com \
--to=rasmus.pank@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=tsd@tsdye.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).