Note that there are some explanatory texts on larger screens.

plurals
  1. POMore efficient R / Sweave / TeXShop work-flow?
    text
    copied!<p>I've now got everything to work properly on my Mac OS X 10.6 machine so that I can create decent looking LaTeX documents with Sweave that include snippets of R code, output, and LaTeX formatting together. Unfortunately, I feel like my work-flow is a bit clunky and inefficient:</p> <ol> <li><p>Using TextWrangler, I write LaTeX code and R code (surrounded by &lt;&lt;>>= above and @ below R code chunk) together in one .Rnw file.</p></li> <li><p>After saving changes, I call the .Rnw file from R using the Sweave command </p> <pre><code>Sweave(file="/Users/mymachine/Documents/Assign4.Rnw", syntax="SweaveSyntaxNoweb") </code></pre> <p>In response, R outputs the following message:</p> <blockquote> <p>You can now run LaTeX on 'Assign4.tex'</p> </blockquote> <p>So then I find the .tex file (Assign4.tex) in the R directory and copy it over to the folder in my documents <code>~/Documents/</code> where the .Rnw file is sitting (to keep everything in one place).</p></li> <li><p>Then I open the .tex file (e.g. Assign4.tex) in TeXShop and compile it there into pdf format. It is only at this point that I get to see any changes I have made to the document and see if it 'looks nice'.</p></li> </ol> <p><strong>Is there a way that I can compile everything with one button click?</strong> Specifically it would be nice to either call Sweave / R directly from TextWrangler or TeXShop. I suspect it might be possible to code a script in Terminal to do it, but I have no experience with Terminal.</p> <p>Please let me know if there's any other things I can do to streamline or improve my work flow.</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