[R] texi2dvi: option "clean" also deletes the generated pdf file
Marius Hofert
m_hofert at web.de
Thu Aug 19 10:36:30 CEST 2010
Dear expeRts,
below are two examples of using texi2dvi. The problem becomes clear from the
second example: on cleaning, texi2dvi also deletes the generated .pdf file.
Is there a solution?
Cheers,
Marius
## Example 1: texi2dvi cleans fine, without deleting the generated .pdf
require(tools)
sink(file="myLaTeXFile1.tex")
cat("\\documentclass{article}\n")
cat("\\usepackage[T1]{fontenc}\n")
cat("\\usepackage[english]{babel}\n")
cat("\\usepackage{blindtext}\n")
cat("\\begin{document}\n")
cat("\\blindtext[10]\n")
cat("\\end{document}\n")
sink()
texi2dvi("myLaTeXFile1.tex",pdf=TRUE,clean=TRUE,quiet=TRUE)
## Example 2: texi2dvi also deletes the generated .pdf
require(tools)
filepath <- paste(getwd(),"/test/myLaTeXFile2.tex",sep="")
sink(file=filepath)
cat("\\documentclass{article}\n")
cat("\\usepackage[T1]{fontenc}\n")
cat("\\usepackage[english]{babel}\n")
cat("\\usepackage{blindtext}\n")
cat("\\begin{document}\n")
cat("\\blindtext[10]\n")
cat("\\end{document}\n")
sink()
texi2dvi(filepath,pdf=TRUE,clean=TRUE,quiet=TRUE)
More information about the R-help
mailing list