Marius Hofert
2010-Aug-19 08:36 UTC
[R] texi2dvi: option "clean" also deletes the generated pdf file
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)
Tim Gruene
2010-Aug-19 10:33 UTC
[R] texi2dvi: option "clean" also deletes the generated pdf file
Dear Marius,
from reading the texi2dvi man-page and R-help on texi2dvi I suggest to set
'clean=F' and use 'texi2dvi = getOption("texi2dvi
--mostly-clean")' instead.
Tim
On Thu, Aug 19, 2010 at 10:36:30AM +0200, Marius Hofert
wrote:> 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)
>
> ______________________________________________
> 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.
--
--
Tim Gruene
Institut fuer anorganische Chemie
Tammannstr. 4
D-37077 Goettingen
GPG Key ID = A46BEE1A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL:
<https://stat.ethz.ch/pipermail/r-help/attachments/20100819/ee125bf3/attachment.bin>