[R] texi2dvi runs but produces no output

Duncan Murdoch murdoch.duncan at gmail.com
Thu Jun 16 14:10:47 CEST 2011


On 11-06-16 7:50 AM, christiaan pauw wrote:
> Hi everybody.
>
> Was the problem below ever solved? I have the same problem on Windows 7 with
> R 2.13.0 and LyX 2 - everything freshly installed. My Rweave.bat and
> MakeSweave.R files are similar to below (I followed
> http://wiki.lyx.org/uploads/LaTeX/SweaveR/lyx_with_r_and_sweave_instructions.pdf
> )

I don't use LyX or that batch file, I use some code I wrote that's in 
the patchDVI package (https://r-forge.r-project.org/R/?group_id=233) 
that I wrote.  You might want to try it.

The single line to run Sweave and pdflatex is

Rscript -e "patchDVI::SweavePDF( '$1' )"

where $1 is the name of the .Rnw file.  If that doesn't work for you, I 
might be able to help with debugging.

Duncan Murdoch

> I also cannot do texi2dvi("Sweave-test-1.tex", pdf=TRUE) after running the
> example. I have Tinn-R installed but I believe the "--no-site-file" part in
> the batch file should take care of clashes there. I realy do not know what
> to do next
>
> best regards
> Christiaan
>
> On 8 April 2010 19:03, David Hewitt<dhewitt37 at gmail.com>  wrote:
>
>> I am working on a Windows XP machine with R 2.10.1 and a recent
>> installation of MiKTeX 2.8. I use LyX (www.lyx.org) to write documents
>> and have it set up to run Sweave, Stangle, and make the PDF through R
>> using a batch script and a MakeSweave.R file. This system worked just
>> fine until I ran some MiKTeX updates yesterday. This is a bit
>> embarrassing as I helped produce a "How-to" guide to getting this
>> working that is posted at the LyX Wiki
>> (http://wiki.lyx.org/LyX/LyxWithRThroughSweave).
>>
>> After the updates yesterday, everything goes smoothly except that the
>> code in the MakeSweave.R file that runs texi2dvi seems not to produce
>> a PDF but gives no warnings or errors.
>>
>> The contents of the batch file are:
>>
>> Rterm --no-site-file --no-save -f "C:/Program Files/LyX
>> 1.6.5/bin/MakeSweave.R" --args %1
>>
>> The batch file is called in the temporary directory where LyX does its
>> work, which is also open to all access. I have to admit that I still
>> confused on the --args %1 part, but I can see that it works in the
>> console transcript.
>>
>> The MakeSweave.R contents are:
>>
>> library(tools)
>> args<- commandArgs()
>> filename<- args[length(args)]
>> Sweave(filename)
>> Stangle(filename)
>> basename<- sub("\\.(Rnw|Rtex|nw)$", "", filename)
>> texi2dvi(paste(basename, ".tex", sep=""), pdf=TRUE)
>>
>> I run LyX from a command window and watch what goes on in the
>> background. All goes fine through the whole process, texi2dvi runs and
>> finishes, and then LyX pukes an error that it cannot open the PDF
>> because the PDF does not exist. Indeed, if I check the temp directory
>> for LyX, all files are present but the PDF. I get no other warnings or
>> errors from texi2dvi and cannot figure out why this happens.
>>
>> In case it helps, I can run
>> example(Sweave)
>> and then
>> texi2dvi("Sweave-test-1.tex", pdf=TRUE)
>> and the same thing happens. No PDF.
>>
>> Can someone help me figure out why texi2dvi fails to produce a PDF?
>>
>> A potential complication (as always) is that I am working in a
>> non-Admin account on the machine. I can invoke Admin permissions to
>> change things and had managed to get everything working before.
>> Permissions may be an issue, but I have set full access to all the
>> folders involved in this process (R, LyX, MiKTeX bins for example),
>> and this got it working prior to updates. I am hoping that is not it.
>> It seems like an issue with texi2dvi.
>>
>> Dave Hewitt
>> Research Fishery Biologist
>> USGS Western Fisheries Research Center
>> Klamath Falls Field Station, Oregon
>> http://profile.usgs.gov/dhewitt
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list