-
-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved OS X Rcpp Compiler Information #433
Conversation
OS X users: @kevinushey @jjallaire @thirdwing Any comments or good as is? |
👍 |
In the patched Rnw file, when I compile it to PDF I'm not seeing any of the command lines in the
and:
blocks (but this could just be me not compiling the Rnw file properly) There are some refs to
needs an +100 for inclusion of the 4.8.2 Apart from that, these are really helpful instructions for folks on OS X, are spot-on, and pretty much (except for OpenMP which I don't use right now) all things I've had to do (and mimic what I've done). I'd make the Rnw changes myself but remember just enough latex to be dangerous. Side note: I'd feel a bit better if there was a "dummy" post written to r-sig-mac with some of the advice on The Coatless Professor's blog & linking to those vs linking to what could be a transient resource (if the r-sig-mac list archives go away then R is prbly gone too :-) |
… knitr chunk names
|
Wasn't implying anything abt you speficially @coatless :-) I've got a longstanding personal site as well but wouldn't suggest linking to it as an official documentation source as I'm just a person vs an org. Just a personal pref. |
Just in from a longish run. To you young'nes: There was a time when we all wrote vignettes with Sweave. Nuttin' wrong with. Outside of Will comment on substantial issues in a bit. edd@max:~/bin$ cat sweave
#!/bin/bash -e
function errorexit () {
echo "Error: $1"
exit 1
}
function filetest () {
if [ ! -f $1 ]; then
errorexit "File $1 not found"
fi
return 0
}
if [ "$#" -lt 1 ]; then
errorexit "Need to specify argument file"
fi
BASENAME=$(basename $1 .Rnw)
RNWFILE=$BASENAME.Rnw
filetest $RNWFILE
echo "library(tools); Sweave(\"$RNWFILE\")" \
| R --no-save --no-restore --slave
LATEXFILE=$BASENAME.tex
filetest $LATEXFILE && pdflatex $LATEXFILE
PDFFILE=$BASENAME.pdf
#filetest $PDFFILE && acroread $PDFFILE &
#filetest $PDFFILE && xpdf $PDFFILE &
#filetest $PDFFILE && kpdf $PDFFILE &
edd@max:~/bin$ |
Improved OS X Rcpp Compiler Information
Turns out that script no longer works due to extra Oh wait. It's because I am loosing my marbles -- it is because we use the even-less-standard driver based on highlight. My apologies. This script does it: edd@max:~/git/rcpp/vignettes(master)$ cat ~/bin/hilightsweave.R
#!/usr/bin/Rscript
## use given argument(s) as target files, or else default to .Rnw files in directory
files <- if (length(commandArgs(TRUE)) == 0) dir(pattern="*.Rnw") else commandArgs(TRUE)
## convert all files from Rnw to pdf using the highlight driver
invisible(sapply(files, function(srcfile) {
Sweave(srcfile, driver=highlight::HighlightWeaveLatex(boxes=TRUE))
tools::texi2pdf(gsub(".Rnw", ".tex", srcfile))
tools::texi2pdf(gsub(".Rnw", ".tex", srcfile), texi2dvi="pdflatex")
}))
edd@max:~/git/rcpp/vignettes(master)$ But for ease-of-use I replaced the 'published' version on my site with the current draft, so see here. Time to brew a new coffee and go over that. With that, big thanks to @coatless and @hrbrmstr for updates and reviews! |
Some of James' markup was not of the right kind for our (admittedly non-standard) use of highlight. I fixed that in 08ceaaf. New version copied to the same URL as above. |
Per discussion on the Rcpp dev list, here is a list of proposed changes for the OS X compilation section.