cameronbracken / pgfSweave

Quality graphics and speedy compilation with Sweave
http://r-forge.r-project.org/projects/pgfsweave/
29 stars 6 forks source link

unexpected #line numbers inserted #1

Closed yihui closed 13 years ago

yihui commented 13 years ago

I just found pgfSweave under R 2.12.0 had a weird issue now: it will insert line numbers in the beginning of every code chunk like this

#line 25 'pgfSweave-example.Rnw'

I know this is for the purpose of reporting errors in code chunks (new feature of R 2.12.0), but I'm sure there are no errors in the code. On the other hand, I'm not sure if this problem is actually from my tidy.source() function, or some other parts of pgfSweave.

Searching for "#line" in http://svn.r-project.org/R/trunk/src/library/utils/R/Sweave.R might reveal the problem.

Yihui

yihui commented 13 years ago

so this has been solved by nasty tricks; I'll close it.

cameronbracken commented 13 years ago

Thanks. Nasty tricks is what it took indeed.