2008-04-27

Sweave (bash) shell script

My Sweave.sh (bash) shell script eases the compilation of Sweave (link1, link2) file to Postscript or PDF format i.e. Sweave --> LaTeX --> Postscript/PDF. Although, this seems an easy task, it can get quite involved, since there are many ways and glitches on how to compile LaTeX (LaTeX web page, Wikipedia) source file. For example:
  • LaTeX --> PS via texi2dvi or latex and dvips and then ps2pdf for PS --> PDF,
  • LaTeX --> PDF via texi2pdf or pdflatex.
Until now Sweave.sh worked only with Sweave source files i.e. a mix of LaTeX and R code. Today I have modified it in such a way so that it can also work with LaTeX file only. Now I can easily type
Sweave.sh --noweave -otld file.tex
to compile file.tex to PDF and open it directly in default PDF previewer. New version will be posted on CRAN. For the impatient I uploaded the script to my webpage.

See also:

No comments: