Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>One-click Sweaving is easy to do in TeXShop using the Sweave.sh script by Gregor Gorjanc. Get it from <a href="http://cran.r-project.org/contrib/extra/scripts/Sweave.sh">http://cran.r-project.org/contrib/extra/scripts/Sweave.sh</a> and put it in your <code>~/Library/TeXShop/bin/</code> folder.</p> <p>Then add the following files to your <code>~/Library/TeXShop/engines/</code> folder:</p> <p>As <code>Sweave.engine</code>:</p> <pre><code>#!/bin/bash ~/Library/TeXShop/bin/Sweave.sh -ld "$1" </code></pre> <p>As <code>SweaveNoClean.engine</code>:</p> <pre><code>#!/bin/bash ~/Library/TeXShop/bin/Sweave.sh -nc -ld "$1" </code></pre> <p>You'll have to set the permissions on Sweave.sh and the two engine files to allow execution. </p> <p>To Sweave with one click, restart TeXShop after adding these files, open the Sweave document (with Rnw extension) and in the dropdown menu above the document window, change it from LaTeX to Sweave or SweaveNoClean. </p> <p>BEWARE: The "Sweave" option wll clean up after itself, deleting all the extra files LaTeX and Sweave creates. If your file is called myfile.Rnw, this will include files called myfile.R and myfile.tex. So a word to the wise: make sure the basename of your Rnw file is unique; then nothing unexpected will be written over and then deleted.</p> <p>The SweaveNoClean option does not clean up after itself. This makes sure you don't delete anything unexpected; though it could still write over a file called myfile.tex if you Sweave a myfile.Rnw. This also doesn't delete any graphics that have been created, in case you want to have them separate from your full typeset document. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload